Juergen Spitzmueller <[EMAIL PROTECTED]> writes: | Jean-Marc Lasgouttes wrote: | > This is definitely the right solution. Getting rid of special casing | > is always better. | | Attached is the patch. Works like a charm. | The second patch is an update to LaTeXConfig.lyx.in and chkconfig.ltx. | | OK to apply? | Jürgen | | Index: src/buffer.C | =================================================================== | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v | retrieving revision 1.630 | diff -p -u -r1.630 buffer.C | --- src/buffer.C 29 Nov 2005 15:08:34 -0000 1.630 | +++ src/buffer.C 26 Jan 2006 09:09:06 -0000 | @@ -1157,10 +1157,8 @@ void Buffer::validate(LaTeXFeatures & fe | LyXTextClass const & tclass = params().getLyXTextClass(); | | if (features.isAvailable("dvipost") && params().tracking_changes | - && params().output_changes) { | + && params().output_changes) | features.require("dvipost"); | - features.require("color"); | - }
This is ok since it is for change tracking and we have not supported that before. | // AMS Style is at document level | if (params().use_amsmath == BufferParams::AMS_ON | Index: src/LaTeXFeatures.C | =================================================================== | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LaTeXFeatures.C,v | retrieving revision 1.119 | diff -p -u -r1.119 LaTeXFeatures.C | --- src/LaTeXFeatures.C 11 Jun 2005 11:02:22 -0000 1.119 | +++ src/LaTeXFeatures.C 26 Jan 2006 09:09:07 -0000 | @@ -281,13 +281,11 @@ string const LaTeXFeatures::getPackages( | | // color.sty | if (isRequired("color")) { | - if (params_.graphicsDriver == "default") | - packages << "\\usepackage[usenames]{color}\n"; | - else | - packages << "\\usepackage[" | + if (params_.graphicsDriver != "default") | + packages << "\\PassOptionsToPackage{" | << params_.graphicsDriver | - << ",usenames" | - << "]{color}\n"; | + << "}{color}\n"; | + packages << "\\usepackage{color}\n"; | } This one I am a bit more wary about. I am absolutely not certain that this won't have unforseen consequences. IMHO this should be held for later releases. | // makeidx.sty | | Index: lib/chkconfig.ltx | =================================================================== | RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/chkconfig.ltx,v | retrieving revision 1.15 | diff -u -r1.15 chkconfig.ltx | --- lib/chkconfig.ltx 16 Dec 2004 14:46:49 -0000 1.15 | +++ lib/chkconfig.ltx 26 Jan 2006 09:14:09 -0000 | @@ -215,8 +215,6 @@ | | | %%% Packages | -\TestPackage{a4} | -\TestPackage{a4wide} | \TestPackage{array} | \TestPackage{babel} | \TestPackage{color} % this one should be there if graphics.sty is there. | @@ -233,6 +231,8 @@ | \TestPackage{varioref} | \TestPackage{prettyref} | \TestPackage{natbib} | +\TestPackage{bibtopic} | +\TestPackage{jurabib} Are these already mentioned in LaTeXConfig? Or is it not needed? | \TestPackage{dvipost} | | % The test for the graphics package is slightly more involved... | Index: lib/doc/LaTeXConfig.lyx.in | =================================================================== | RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/doc/LaTeXConfig.lyx.in,v | retrieving revision 1.43 | diff -u -r1.43 LaTeXConfig.lyx.in | --- lib/doc/LaTeXConfig.lyx.in 25 Oct 2005 08:58:07 -0000 1.43 | +++ lib/doc/LaTeXConfig.lyx.in 26 Jan 2006 09:14:11 -0000 | @@ -2073,54 +2073,6 @@ The added section on dvipost is good. Get OK from J-M before removing the others from the doc. (I would have preferred two different patches for this) -- Lgb