\TestPackage{float}
\TestPackage{fontspec}
\TestPackage{footmisc}
+\TestPackage{footnote}
\TestPackage{forest}
\TestPackage{framed}
\TestPackage{geometry}
\end_layout
+\begin_layout Subsection
+footnote
+\end_layout
+
+\begin_layout Description
+Found:
+\begin_inset Info
+type "package"
+arg "footnote"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+CTAN:
+\family typewriter
+macros/latex/contrib/footnote/
+\end_layout
+
+\begin_layout Description
+Notes: The package
+\family sans
+footnote
+\family default
+ is needed by \SpecialChar LyX
+ to allow footnotes in non-floating tables and multi-page
+ table headers and footers.
+
+\end_layout
+
\begin_layout Subsection
graphicx
\end_layout
"todonotes",
"forest",
"varwidth",
+ "footnote",
};
char const * bibliofeatures[] = {
bool inDeletedInset() const { return in_deleted_inset_; }
/// are we in a deleted inset?
void inDeletedInset(bool const b) { in_deleted_inset_ = b; }
+ /// set savenote environment (footnote package)
+ std::string saveNoteEnv() const { return savenote_env_; }
+ /// return savenote environment
+ void saveNoteEnv(std::string const s) { savenote_env_ = s; }
/// Runparams that will be used for exporting this file.
OutputParams const & runparams() const { return runparams_; }
/// Resolve alternatives like "esint|amsmath|wasysym"
bool in_deleted_inset_;
///
docstring htmltitle_;
+ ///
+ std::string savenote_env_;
};
#include "BufferParams.h"
#include "Counters.h"
#include "Language.h"
+#include "LaTeXFeatures.h"
#include "Layout.h"
#include "OutputParams.h"
#include "ParIterator.h"
return i;
}
+
+void InsetFoot::validate(LaTeXFeatures & features) const
+{
+ if (!features.saveNoteEnv().empty()) {
+ features.require("footnote");
+ features.addPreambleSnippet(
+ from_ascii("\\makesavenoteenv{"
+ + features.saveNoteEnv()
+ + "}\n"));
+ }
+
+ InsetText::validate(features);
+}
+
} // namespace lyx
size_t max_length = INT_MAX) const;
///
int docbook(odocstream &, OutputParams const &) const;
+ ///
+ void validate(LaTeXFeatures & features) const;
/// Update the counters of this inset and of its contents
void updateBuffer(ParIterator const &, UpdateType);
///
if (getVAlignment(cell) != LYX_VALIGN_TOP
|| !getPWidth(cell).zero())
features.require("array");
+ // Tell footnote that we need a savenote
+ // environment in non-long tables or
+ // longtable headers/footers
+ if (!is_long_tabular)
+ features.saveNoteEnv("tabular");
+ else if (!isValidRow(cellRow(cell)))
+ features.saveNoteEnv("longtable");
+
cellInset(cell)->validate(features);
+ features.saveNoteEnv(string());
}
}