+string const LaTeXFeatures::getColorOptions() const
+{
+ ostringstream colors;
+
+ // Handling the color packages separately is needed to be able to load them
+ // before babel when hyperref is loaded with the colorlinks option
+ // for more info see Bufferparams.cpp
+
+ // [x]color.sty
+ if (mustProvide("color") || mustProvide("xcolor")) {
+ string const package =
+ (mustProvide("xcolor") ? "xcolor" : "color");
+ if (params_.graphicsDriver == "default"
+ || params_.graphicsDriver == "none")
+ colors << "\\usepackage{" << package << "}\n";
+ else
+ colors << "\\usepackage["
+ << params_.graphicsDriver
+ << "]{" << package << "}\n";
+ }
+
+ // pdfcolmk must be loaded after color
+ if (mustProvide("pdfcolmk"))
+ colors << "\\usepackage{pdfcolmk}\n";
+
+ return colors.str();
+}
+
+