]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
* GuiPrefs: fix typo.
[lyx.git] / src / LaTeXFeatures.cpp
index 99a7d811ef8baec3a7a436aca45e643f4a2ccfa0..79ef3e45204cfe44888c802c9f1ff76145bad930 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();
 }