]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
adjust comment.
[lyx.git] / src / LaTeXFeatures.cpp
index af1ed2eb26b8044bbea7de863ac44bff62aa057b..6842b3e0cf8705085c2a8dd0b70251f51c973931 100644 (file)
@@ -164,6 +164,23 @@ static string const lyxdot_def =
        "%% A simple dot to overcome graphicx limitations\n"
        "\\newcommand{\\lyxdot}{.}\n";
 
+static string const boxcite_def =
+       "\\let\\cite@rig\\cite\n"
+       "\\newcommand{\\b@xcite}[2][\\%]{\\def\\def@pt{\\%}\\def\\pas@pt{#1}\n"
+       "  \\mbox{\\ifx\\def@pt\\pas@pt\\cite@rig{#2}\\else\\cite@rig[#1]{#2}\\fi}}\n";
+
+static string const lyxuline_def =
+       "\\newcommand{\\lyxuline}[1]{{\\let\\cite\\b@xcite\\uline{#1}}}\n";
+
+static string const lyxuuline_def =
+       "\\newcommand{\\lyxuuline}[1]{{\\let\\cite\\b@xcite\\uuline{#1}}}\n";
+
+static string const lyxuwave_def =
+       "\\newcommand{\\lyxuwave}[1]{{\\let\\cite\\b@xcite\\uwave{#1}}}\n";
+
+static string const lyxsout_def =
+       "\\newcommand{\\lyxsout}[1]{{\\let\\cite\\b@xcite\\sout{#1}}}\n";
+
 static string const changetracking_dvipost_def =
        "%% Change tracking with dvipost\n"
        "\\dvipostlayout\n"
@@ -545,6 +562,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();
 }
 
@@ -609,9 +636,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";
        }
 
@@ -730,6 +759,21 @@ string const LaTeXFeatures::getMacros() const
        if (mustProvide("lyxline"))
                macros << lyxline_def << '\n';
 
+       if (mustProvide("boxcite"))
+               macros << boxcite_def << '\n';
+
+       if (mustProvide("lyxuline"))
+               macros << lyxuline_def << '\n';
+
+       if (mustProvide("lyxuuline"))
+               macros << lyxuuline_def << '\n';
+
+       if (mustProvide("lyxuwave"))
+               macros << lyxuwave_def << '\n';
+
+       if (mustProvide("lyxsout"))
+               macros << lyxsout_def << '\n';
+
        if (mustProvide("noun"))
                macros << noun_def << '\n';