Bug 127010 - latex2html ugly images and bad character encoding
Summary: latex2html ugly images and bad character encoding
Alias: None
Product: Fedora
Classification: Fedora
Component: tetex (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Fedora Legacy Bugs
QA Contact:
URL: http://eddy.csail.mit.edu/eh3/fc2_def...
: 145600 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-06-30 17:08 UTC by Ed Hill
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

Fixed In Version: 2002.2.1-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-18 09:17:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
make "english" the default lang (1.58 KB, text/plain)
2004-07-01 01:05 UTC, Ed Hill
no flags Details
add the patch (934 bytes, text/plain)
2004-07-01 01:06 UTC, Ed Hill
no flags Details
sample file to test the gray images problem (1.40 KB, text/plain)
2005-08-18 09:19 UTC, Jindrich Novy
no flags Details

Description Ed Hill 2004-06-30 17:08:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040518 Firefox/0.8

Description of problem:
The default Fedora Core 2 tetex-2.0.2-13 package has at least two
serious problems:

  1) ugly grey-backgrounded images
  2) messed-up (Japanese?) encoded menu items

as shown by:


For comparison, the Red Hat 9 tetex-1.0.7-66 package does not exhibit
these problems as one can see at:


Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Download the MITgcm code and docs from mitgcm.org
2. Build the documentation
3. Works fine with Red Hat 9 but html output is just ugly in FC2

Additional info:

Comment 1 Ed Hill 2004-07-01 01:05:34 UTC
Created attachment 101550 [details]
make "english" the default lang

Comment 2 Ed Hill 2004-07-01 01:06:17 UTC
Created attachment 101551 [details]
add the patch

Comment 3 Ed Hill 2004-07-01 01:07:48 UTC
Hi Tim, I made a *tiny* change to revert part of one of the japanese
patches ("l2h-2002-2-1+jp2.0.patch") so that english is once again the
default language.  This should hopefully fix the complaints by Neal
Becker and myself.  The results of this tiny change can be seen at:


which show that the titles and navigation are markedly improved.  And
essentially all of the japanese changes remain intact per your request.

Now, I just need to figure out why all the PNG images for the
equations have ugly grey (instead of white!) backgrounds.  I'm busy
working on that...


Comment 4 Tim Waugh 2004-07-01 10:22:49 UTC
Great, thanks!  I've built this into 2.0.2-16, which should appear in
rawhide tomorrow.  The spec file is here in the meantime:


Comment 5 Ben Webb 2004-07-22 20:24:36 UTC
Some comments (I ran into exactly the same problems).

1. I had a different workaround for the Japanese language problem - I
added the following to a file 'foo':

$default_language = 'english';
$TITLES_LANGUAGE = "english";

and then ran latex2html with the '-init_file foo' command line option.
Unfortunately, this works for everything except the display of the
date - there appears to be no way of changing that, since the date is
set before command line options are read (grep for '# Author address'
in /usr/bin/latex2html). But this appears to be a latex2html bug
rather than a packaging problem specifically. Patching the global
config in /usr/share/latex2html (as is done by Ed's patch) does work
for me though.

2. As regards the grey backgrounds, I saw this for some images (but
not all) under RedHat 9. I worked around it by adding the following to
my configuration:

However, under Fedora Core (1 and 2) _every_ image has an ugly grey
background. The only way I found of fixing this was to replace the
dvips binary used by latex2html with that from RedHat 9. There's some
difference in the PS files produced by the two versions of dvips which
confuses latex2html, but I haven't figured out what it is yet...

Comment 6 Julius Smith 2005-01-07 20:38:37 UTC
The following patch to /usr/bin/pstoimg seems to fix the gray 
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.

Comment 7 Jindrich Novy 2005-01-10 14:54:26 UTC
Julius, I tried to remove the '\n' in the tetex-2.0.2-21 but it didn't
helped me at all since I can still see the gray images in the
latex2html output. Maybe some further modifications need to be made?

Comment 8 Julius Smith 2005-01-10 20:01:55 UTC
I also have this in my ~/.latex2html-init file:

$TRANSPARENT_FIGURES = 0; # default = 1
$WHITE_BACKGROUND = 1; # default = 0

I believe the defaults come from /usr/share/latex2html/l2hconf.pm

Comment 9 Jindrich Novy 2005-01-20 11:42:32 UTC
*** Bug 145600 has been marked as a duplicate of this bug. ***

Comment 10 Matthew Miller 2005-04-26 15:57:31 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 11 Matthew Miller 2005-06-21 13:24:02 UTC
This isn't a security issue, and Fedora Legacy unfortunately only has the
resources to fix security issues and very critical bugs. It looks to me from
comment #4 that this should be fixed in FC4, so marking closed-currentrelease.
Please reopen and move to the Fedora Core "devel" version if I'm wrong. Thanks.

Comment 12 Ben Webb 2005-06-22 21:31:08 UTC
No; this is not fixed in FC4. The Japanese language issue is fixed (and has been
for some time, AFAIK), but the ugly grey images remain.

Comment 13 Julius Smith 2005-06-22 23:13:12 UTC
The "ugly grey images" remain because the patch in Comment #6 never made it in.
 However, I believe it is now (see Bug 161186).  Note that this patch works in
conjunction with requesting a white image background in latex2html (see Comment
#8 above).

Comment 14 Ben Webb 2005-06-22 23:54:45 UTC
Yes, the patch works just fine for me (as in comment #5, I used white
background) but it's not in FC4 i686 (latex2html-2002.2.1-3)

Comment 15 Jindrich Novy 2005-08-18 09:17:29 UTC
I don't see the gray images any more with latex2html-2002.2.1-3 on FC4 with
tetex-3.0. Attaching sample tex source I used to translate with latex2html.

Comment 16 Jindrich Novy 2005-08-18 09:19:08 UTC
Created attachment 117864 [details]
sample file to test the gray images problem

Note You need to log in before you can comment on or make changes to this bug.