Juergen Spitzmueller wrote:
if (isRequired("color")) { if (params_.graphicsDriver == "default") - packages << "\\usepackage[usenames]{color}\n"; - else + if (isRequired("dvipost")) + packages << "\\usepackage[usenames]{color}\n"; + else + packages << "\\usepackage{color}\n"; + else {
-- this is not user friendly _and_ can give errors when another package needs color with anotehr option. -- you should load xcolor with \IfFileExists{xcolor.sty}{% \PassOptionsToPackage{dvipsnames}{xcolor} \RequirePackage{xcolor}}{% \PassOptionsToPackage{usenames}{color} \RequirePackage{color}}
packages << "\\usepackage[" - << params_.graphicsDriver - << ",usenames" - << "]{color}\n"; + << params_.graphicsDriver; + if (isRequired("dvipost")) + packages << ",usenames"; + packages << "]{color}\n"; + }
\PassOptionsToPackage should _always_ be used instead of the above. Herbert