]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
more changes, read the Changelog
[lyx.git] / src / LaTeXFeatures.C
index 61dd8a821c805cd042ae91892a89d603fc88b45e..d64f96b3ee45f1fde11b8f8b08fa1cb3fe38e875 100644 (file)
@@ -245,6 +245,13 @@ string LaTeXFeatures::getPackages()
        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;
@@ -298,6 +305,12 @@ string LaTeXFeatures::getMacros()
         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;
 }
 
@@ -319,6 +332,17 @@ string LaTeXFeatures::getTClassPreamble()
 }      
 
 
+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()