]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
InsetBibitem.cpp: fix bibitemWidest.
[lyx.git] / src / LaTeXFeatures.cpp
index 99a7d811ef8baec3a7a436aca45e643f4a2ccfa0..efc3fc6a3be58fd75c0941e40c39064a310a3e51 100644 (file)
@@ -202,9 +202,8 @@ static string const textcyr_def =
        "\\AtBeginDocument{\\DeclareFontEncoding{T2A}{}{}}\n";
 
 static string const lyxmathsym_def =
-       "\\newcommand{\\lyxmathsym}{\\@ifstar{\\lyxm@thsym\\textit}{\\lyxm@thsym\\textrm}}\n"
-       "\\newcommand{\\lyxm@thsym}[2]{\\ifmmode\\begingroup\\def\\b@ld{bold}\n"
-       "  #1{\\ifx\\math@version\\b@ld\\bfseries\\fi#2}\\endgroup\\else#2\\fi}\n";
+       "\\newcommand{\\lyxmathsym}[1]{\\ifmmode\\begingroup\\def\\b@ld{bold}\n"
+       "  \\text{\\ifx\\math@version\\b@ld\\bfseries\\fi#1}\\endgroup\\else#1\\fi}\n";
 
 static string const papersizedvi_def =
        "\\special{papersize=\\the\\paperwidth,\\the\\paperheight}\n";
@@ -546,6 +545,16 @@ string const LaTeXFeatures::getColorOptions() const
        if (mustProvide("pdfcolmk"))
                colors << "\\usepackage{pdfcolmk}\n";
 
+       if (mustProvide("pagecolor")) {
+               // the \pagecolor command must be set after color is loaded and
+               // before pdfpages, therefore add the command here
+               // define the set color
+               colors << "\\definecolor{page_backgroundcolor}{rgb}{";
+               colors << outputLaTeXColor(params_.backgroundcolor) << "}\n";
+               // set the page color
+               colors << "\\pagecolor{page_backgroundcolor}\n";
+       }
+
        return colors.str();
 }
 
@@ -610,9 +619,11 @@ string const LaTeXFeatures::getPackages() const
        // [x]color and pdfcolmk are handled in getColorOptions() above
        
        // makeidx.sty
-       if (isRequired("makeidx")) {
-               if (!tclass.provides("makeidx"))
+       if (isRequired("makeidx") || isRequired("splitidx")) {
+               if (!tclass.provides("makeidx") && !isRequired("splitidx"))
                        packages << "\\usepackage{makeidx}\n";
+               if (!tclass.provides("splitidx") && isRequired("splitidx"))
+                       packages << "\\usepackage{splitidx}\n";
                packages << "\\makeindex\n";
        }