[l2h] pstoimg/dvips interaction problem in Fedora Core 2
Julius Smith
jos at ccrma.stanford.edu
Fri Jan 7 21:47:42 CET 2005
For anyone running Fedora Core 2 who has the gray-background problem, below
is a bugfix post to
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=127010. - jos
----
The following patch to /usr/bin/pstoimg seems to fix the
gray-image-background problem:
*** pstoimg-FC2-stock Mon Dec 27 05:21:18 2004
--- pstoimg Fri Jan 7 11:58:54 2005
***************
*** 1021,1027 ****
}
my $had_nonwhite;
if($opt{white}) {
! $had_nonwhite = ($ps =~ s/(\n\d+ \d+ bop gsave) \d*\.\d+
(TeXcolorgray clippath fill grestore)/$1 1 $2/s);
}
$ps_changed = $had_papersize || $had_nonwhite;
if($ps_changed) {
--- 1021,1028 ----
}
my $had_nonwhite;
if($opt{white}) {
! $had_nonwhite = ($ps =~ s/(\d+ \d+ bop gsave) \d*\.\d+
(TeXcolorgray clippath fill grestore)/$1 1 $2/s);
}
$ps_changed = $had_papersize || $had_nonwhite;
if($ps_changed) {
-----------------
All the patch does is remove '\n' from the beginning of the search
string. A change is needed because the FC2 version of dvips inserts
"TeXDict begin" at the beginning of the line, causing the search to
fail. (This initial string is not emitted by the version of dvips in
RH9.) Note that performance is slightly impacted since now the string is
sought anywhere in the line; to avoid this, the search string could be
updated to explicitly include "TeXDict begin". However, as this bug shows,
that would be dangerously fragile without coordinating with the dvips project.
More information about the latex2html
mailing list