: layout(n, false), params(p)
{
// packages
+ array = false;
color = false;
graphics = false;
setspace = false;
}
void LaTeXFeatures::require(string const & name) {
- if (name == "color") {
+ if (name == "array") {
+ array = true;
+ } else if (name == "color") {
color = true;
} else if (name == "graphics") {
#ifdef USE_GRAPHICX
LyXTextClass const & tclass =
textclasslist.TextClass(params.textclass);
+ // array-package
+ if (array)
+ packages += "\\usepackage{array}\n";
+
// color.sty
if (color) {
if (params.graphicsDriver == "default")
if (prettyref)
packages += "\\usepackage{prettyref}\n";
+ // float.sty
+ // This is not correct and needs fixing.
+ // We don't need float.sty if we only use unchanged
+ // table and figure floats. (Lgb)
+ if (!usedFloats.empty())
+ packages += "\\usepackage{float}\n";
+
packages += externalPreambles;
return packages;
if (NeedLyXFootnoteCode)
macros += floatingfootnote_def;
+ // floats
+ // Here we will output the code to create the needed float styles.
+ // We will try to do this as minimal as possible.
+ // \floatstyle{ruled}
+ // \newfloat{algorithm}{htbp}{loa}
+ // \floatname{algorithm}{Algorithm}
return macros;
}
}
+string LaTeXFeatures::getIncludedFiles()
+{
+ string sgmlpreamble;
+
+ for(FileMap::const_iterator fi=IncludedFiles.begin(); fi != IncludedFiles.end(); ++fi)
+ sgmlpreamble += "\n<!entity " + fi->first + " system \"" + fi->second + "\">";
+
+ return sgmlpreamble;
+}
+
+
void LaTeXFeatures::showStruct() {
lyxerr << "LyX needs the following commands when LaTeXing:"
<< "\n***** Packages:" << getPackages()