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");
-	}
 
 	// 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";
 	}
 
 	// 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}
 \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 @@
 \end_layout
 
 \begin_layout Subsection
-a4
-\end_layout
-
-\begin_layout Description
-Found: @chk_a4@
-\end_layout
-
-\begin_layout Description
-CTAN: 
-\family typewriter
-macros/latex/contrib/ntgclass/
-\end_layout
-
-\begin_layout Description
-Notes: The package 
-\family sans
-a4
-\family default
- changes the margins of your document to suit the European A4 page dimensions
- with smaller margins that the default A4 format.
-\end_layout
-
-\begin_layout Subsection
-a4wide
-\end_layout
-
-\begin_layout Description
-Found: @chk_a4wide@
-\end_layout
-
-\begin_layout Description
-CTAN: 
-\family typewriter
-macros/latex/contrib/misc/
-\end_layout
-
-\begin_layout Description
-Notes: The package 
-\family sans
-a4wide
-\family default
- is another package that allows setting of the margins of your document
- to A4 paper.
- With this package, the margins are very wide, but do not follow typographical
- conventions.
-\end_layout
-
-\begin_layout Subsection
 geometry
 \end_layout
 
@@ -2215,6 +2167,36 @@
 bibtopic
 \family default
  is used to split BibTeX created bibliographies into sections.
+\end_layout
+
+\begin_layout Subsection
+dvipost
+\end_layout
+
+\begin_layout Description
+Found: @chk_dvipost@
+\end_layout
+
+\begin_layout Description
+URL: 
+\family sans
+http://freshmeat.net/projects/dvipost/
+\end_layout
+
+\begin_layout Description
+Notes: 
+\family sans
+dvipost
+\family default
+ is a post-processor for DVI files created by LaTeX and TeX.
+ It is needed by LyX to generate DVI or Postscript output of change tracking
+ marks.
+ To work properly, 
+\family sans
+dvipost 
+\family default
+needs teTeX version 2 or newer.
+ 
 \end_layout
 
 \begin_layout Subsection

Reply via email to