]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Get rid of all-insets-toggle and explain how to replace it with inset-forall.
[lyx.git] / src / LaTeXFeatures.cpp
index 8f78e02d1ab0ce1c9ff00195dbc25d5d9d8a9b0c..615901f8936eea1430157d539bf70df20422d443 100644 (file)
@@ -590,11 +590,25 @@ string const LaTeXFeatures::getColorOptions() const
                colors << "\\pagecolor{page_backgroundcolor}\n";
        }
 
+       if (mustProvide("fontcolor")) {
+               colors << "\\definecolor{document_fontcolor}{rgb}{";
+               colors << outputLaTeXColor(params_.fontcolor) << "}\n";
+               // set the color
+               colors << "\\color{document_fontcolor}\n";
+       }
+
        if (mustProvide("lyxgreyedout")) {
                colors << "\\definecolor{note_fontcolor}{rgb}{";
                colors << outputLaTeXColor(params_.notefontcolor) << "}\n";
                // the color will be set together with the definition of
-               // the lyxgreyedout environment (lyxgreyedout_def)
+               // the lyxgreyedout environment (see lyxgreyedout_def)
+       }
+
+       // color for shaded boxes
+       if (isRequired("framed") && mustProvide("color")) {
+               colors << "\\definecolor{shadecolor}{rgb}{";
+               colors << outputLaTeXColor(params_.boxbgcolor) << "}\n";
+               // this color is automatically used by the LaTeX-package "framed"
        }
 
        return colors.str();
@@ -686,21 +700,7 @@ string const LaTeXFeatures::getPackages() const
                                 << params_.graphicsDriver
                                 << "]{graphicx}\n";
        }
-       // shadecolor for shaded
-       if (isRequired("framed") && mustProvide("color")) {
-               RGBColor c = rgbFromHexName(lcolor.getX11Name(Color_shadedbg));
-               //255.0 to force conversion to double
-               //NOTE As Jürgen Spitzmüller pointed out, an alternative would be
-               //to use the xcolor package instead, and then we can do
-               // \define{shadcolor}{RGB}...
-               //and not do any conversion. We'd then need to require xcolor
-               //in InsetNote::validate().
-               int const stmSize = packages.precision(2);
-               packages << "\\definecolor{shadecolor}{rgb}{"
-                       << c.r / 255.0 << ',' << c.g / 255.0 << ',' << c.b / 255.0 << "}\n";
-               packages.precision(stmSize);
-       }
-
+       
        // lyxskak.sty --- newer chess support based on skak.sty
        if (mustProvide("chess"))
                packages << "\\usepackage[ps,mover]{lyxskak}\n";