[l2h] Re: includegraphics broken in latex2html-2002-2-1 ?

Herb W. Swan lanhws at expl.ak.ppco.com
Tue Jun 10 20:15:48 CEST 2003

> Herb W. Swan wrote:
> > Bruce Miller <bruce.miller at nist.gov> wrote on Wed Jun  4 19:41:49 2003:
> >>I downloaded the latest l2h (latex2html-2002-2-1, dated May 23,2003)
> [...]
> > I just downloaded the same version of LaTeX2HTML that you did, and I got the
> > same result.
> The `same' is in same as me or same as before?
> Ie. it works now, I hope!

Sorry for the ambiguity.  latex2html-2002-2-1 (dated May 23,2003) does the
same thing you found, namely that it correctly outputs relative URLs for
images that need no processing (like pngs, jpegs, etc.)

> > However, latex2html-2002-2-1 has a much more serious defect not
> > present in latex2html-2002.
> Actually, with rotate=-90, I'm more surprised that latex got it right, than
> that latex2html got it wrong! ... but seriously ... :>
> In any case, graphicx is just passing it on to latex as traditional.

OK, the [angle=-90] optional argument to \includegraphics is an unnecessary
distraction.  Let's say we take it out.  My test document (test19.tex) then

Here is some text.

This still fails to convert wave.ps into img1.png using latex2html-2002-2-1.
Here are the resulting output messages under the -debug option:

beagle% latex2html -debug test19
This is LaTeX2HTML Version 2002-2-1 (1.70)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.

Revised and extended by:
 Marcus Hennecke, Ross Moore, Herb Swan and others
...producing markup for HTML version 3.2

Extension: loading /h/lanhws/l2h/versions/latin1.pl
HTML version: loading /h/lanhws/l2h/versions/html3_2.pl

 *** processing declarations ***
Starting at 1055299380 seconds

OPENING /h/lanhws/plano/text/www/test/test19.tex

Note: Working directory is /h/lanhws/plano/text/www/test/test19
Note: Images will be generated in /tmp/l2h19290

Debug (syswait): Running "/usr/bin/perl /h/lanhws/bin/sun5/texexpand -debug -auto_exclude -save_styles
/h/lanhws/plano/text/www/test/test19/TMP/styles -texinputs /h/lanhws/plano/text/www/test -out
/h/lanhws/plano/text/www/test/test19/TMP/test19 /h/lanhws/plano/text/www/test/test19.tex"
 at /h/lanhws/bin/sun5/latex2html line 807
texexpand V2002-2-1 (Revision 1.11)

texexpand: LaTeX2HTML inputs are in:
texexpand:    .
texexpand:    /h/lanhws/plano/text/www/test
texexpand: %--- Found class: \documentclass{article}
Debug (syswait): Finished child process: #19299
 at /h/lanhws/bin/sun5/latex2html line 807

Loading /h/lanhws/l2h/styles/texdefs.perl...
Package: loading /h/lanhws/l2h/styles/article.perl
Package: loading /h/lanhws/l2h/styles/html.perl
Package: loading /h/lanhws/l2h/styles/graphixx.perl
Package: loading /h/lanhws/l2h/styles/graphics-support.perl
Package: loading /h/lanhws/l2h/styles/getimagesize.perl
Reading ...

Translating ...
0/1:top of test19: for test19.html

 *** translating preamble ***
Warning: No implementation found for package: graphicx.
 *** preamble done ***

1/1:sectionstar:.."About this document ..." for node1.html

Writing image file ...

/usr/local/TeX/bin/sparc-solaris2.7/latex ./images.tex
Debug (syswait): Running "/usr/local/TeX/bin/sparc-solaris2.7/latex ./images.tex"
 at /h/lanhws/bin/sun5/latex2html line 3785
This is TeX, Version 3.14159 (Web2C 7.3.7x)
LaTeX2e <2001/06/01>
Loading CZ hyphenation patterns: Pavel Sevecek, v3, 1995
Loading SK hyphenation patterns: Jana Chlebikova, 1992
Babel <v3.7h> and hyphenation patterns for english, french, german, ngerman, ca
talan, croatian, czech, danish, dutch, estonian, finnish, greek, hungarian, ita
lian, latin, mongolian, norwegian, polish, portuguese, romanian, russian, slove
ne, serbocroat, slovak, spanish, swedish, ukenglish, ukrainian, welsh, dumylang
, nohyphenation, loaded.

Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/h/software/pai/TeX/texmf/tex/latex/base/inputenc.sty) (./images.aux)

latex2htmlLength hsize=349.0pt

latex2htmlLength vsize=633.0pt

latex2htmlLength hoffset=0.0pt

latex2htmlLength voffset=0.0pt

latex2htmlLength topmargin=0.0pt

latex2htmlLength topskip=0.00003pt

latex2htmlLength headheight=0.0pt

latex2htmlLength headsep=0.0pt

latex2htmlLength parskip=0.0pt plus 1.0pt

latex2htmlLength oddsidemargin=62.0pt

latex2htmlLength evensidemargin=62.0pt

Overfull \hbox (48.485pt too wide) detected at line 139
l2hSize :tex2html_wrap15:0.0pt::542.025pt::349.0pt.
[1] (./images.aux) )
(see the transcript file for additional information)
Output written on images.dvi (1 page, 456 bytes).
Transcript written on images.log.
Debug (syswait): Finished child process: #19304
 at /h/lanhws/bin/sun5/latex2html line 3785

 *** processing 1 images ***

Doing section links ......
 *** Adding document-specific styles ***

*********** WARNINGS ***********
No implementation found for style `graphicx'

If you are having problems displaying the correct images with Mosaic,
try selecting "Flush Image Cache" from "Options" in the menu-bar
and then reload the HTML file.

Timing: 1 seconds


Please note that:

	1)  Neither dvips nor pstoimg is called.
	2)  There is no l2h* directory left behind in /tmp.
	3)  I have recently upgraded to a "modern" version of LaTeX and
	    dvips (from TeX Live), so there should be no software
	    compatibility problems.
	4)  The img1.dvi file left behind in the test19 directory
	    was valid.
	5)  This same document works fine with latex2html-2002.

So it still appears that although latex2html-2002-2-1 does indeed fix the
absolute path problem, it introduces another more serious bug, which prevents
it from processing "normal" .ps files.

> I installed an old copy of 2002 (downloaded on Mar 21, 2002) that I
> had handy.  Both it and the current 2002-2-1 failed.
> A clue!! 2002's dvips command was:
>   /usr/bin/dvips -S1 -i  -E -o/tmp/l2h14262/image ./images.dvi
> but 2002-02-1's was:
>   /usr/bin/dvips -S1 -i  -Ppdf  -E -E -o/tmp/l2h15824/image ./images.dvi
> Ross is getting more generous with the -E's!
> Maybe your config went from 0 to 1, instead of 1 to 2?
> The -E option tries to produce encapsulated postscript, and crops the
> pages smaller, so the rest of the bitmap processing pipeline goes much faster
> (especially for the typically small formula).
> However, I suspect dvips is miscalculating the bounding box:
>   %%BoundingBox: 133 719 675 1117
> Without the -E it gives
>   %%BoundingBox: 0 0 612 792
> Since your figure is about 540x300 it looks like the actual graphs
> got missed when -E was used.

Indeed, the **rotated** file fails to be converted even in latex2html-2002,
becuase the BoundingBox is improperly computed in this case.  I also agree
that this problem does have a relatively easy work-around: simply rotate
the figure in the first place.  However, PostScript figures in Portrait
orientation are often written at a 90 degree angle to make them fit on a
rectangular printed page.

> If there's a "It should just work" solution, it's beyond me, maybe Ross
> has some ideas. Two workaround solutions are:
>  1) comment out any $DVIPSOPT = " -E" in l2hconf.pm
>     (I assume it will run slower on more typical cases).
>  2) Make your durn'ed figures rightsideup in the first place!!
>     What're we? Australians!?!?!  Sheesh!

The file wave.ps is available in a previous message in this thread if anyone
wants to test with it, although there is nothing remarkable about it.


 | Herbert Swan          | Geoscience Operations             |
 | Phillips Alaska, Inc. |                                   |
 | 700 G Street          | Phone:  (907) 263-4043            |
 | Anchorage, AK  99501  | Fax:    (907) 265-1608            |
 | Room:  ATO 1370       | e-mail: lanhws at expl.ak.ppco.com   |

More information about the latex2html mailing list