]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
Fix small bug in reading \set_color in lyxrc
[lyx.git] / src / LaTeXFeatures.C
index 67341747bdaf5ce14ff24c14e606e469fe709e29..c7172bfa5577ea7c6d09f4bd6c8f9bfd8e5bc766 100644 (file)
@@ -29,6 +29,7 @@ LaTeXFeatures::LaTeXFeatures(BufferParams const & p, int n)
        : layout(n, false), params(p)
 {
        // packages
+       array = false;
        color = false;
        graphics = false;
        setspace = false;
@@ -73,7 +74,9 @@ LaTeXFeatures::LaTeXFeatures(BufferParams const & p, int n)
 }
 
 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
@@ -126,6 +129,10 @@ string LaTeXFeatures::getPackages()
        LyXTextClass const & tclass =
                textclasslist.TextClass(params.textclass);
 
+       // array-package
+       if (array)
+               packages += "\\usepackage{array}\n";
+
        // color.sty
        if (color) {
                if (params.graphicsDriver == "default")
@@ -332,6 +339,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()