]> git.lyx.org Git - lyx.git/commitdiff
* src/LaTeXFeatures.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 14 Jan 2008 10:08:08 +0000 (10:08 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 14 Jan 2008 10:08:08 +0000 (10:08 +0000)
- load xcolor.sty the same way than color.sty, and only load one of them
  (xcolor, if requested, else color).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22548 a592a061-630c-0410-9148-cb99ea01b6c8

src/LaTeXFeatures.cpp

index 80bb7cf29d90f00d735dd54a2c2268746cce6622..b383f0fb10f3b219795aa68366d9cab1f9200813 100644 (file)
@@ -521,7 +521,6 @@ char const * simplefeatures[] = {
        "framed",
        "soul",
        "textcomp",
-       "xcolor",
        "pmboxdraw",
        "bbding",
        "ifsym",
@@ -589,14 +588,16 @@ string const LaTeXFeatures::getPackages() const
            (params_.use_esint != BufferParams::package_off || !isRequired("esint")))
                packages << "\\usepackage{wasysym}\n";
 
-       // color.sty
-       if (mustProvide("color")) {
+       // [x]color.sty
+       if (mustProvide("color") || mustProvide("xcolor")) {
+               string const package =
+                       (mustProvide("xcolor") ? "xcolor" : "color");
                if (params_.graphicsDriver == "default")
-                       packages << "\\usepackage{color}\n";
+                       packages << "\\usepackage{" << package << "}\n";
                else
                        packages << "\\usepackage["
                                 << params_.graphicsDriver
-                                << "]{color}\n";
+                                << "]{" << package << "}\n";
        }
 
        // pdfcolmk must be loaded after color