[l2h] Graphics errors - An old solution and a new reason

Michael L. Hall Hall@lanl.gov
Tue, 10 Sep 2002 20:34:31 -0600


I've been having some problems with the new updated l2h, which were
similar to other problems that have been reported here. That is, I had
problems with "Illegal seek", black borders at left and bottom of math
images, and some nasty lingering problems with rotated images.

I managed to fix a lot of the problems by upgrading to the very latest
latex2html (2002-2), giftrans (1.12.2-11), and netpbm (10.8). But the
problems with the rotated images were still there. It took me a while
to figure out that the problems were only with rotated images, and if
I didn't rotate them they worked correctly.

Eventually, I found a solution in the l2h archives at:

  http://www.xray.mpe.mpg.de/mailing-lists/latex2html/1999-08/msg00014.html

The bottom line is to remove the -E flags from $DVIPSOPT in l2hconf.pm
in two places. With that fix, I got rid of almost all the errors.

There were a scant few "Illegal seek" errors that remained. Eventually, 
I tracked it down -- and it even makes sense! The problem stems from 
the use of the null matching bracket symbol commands. For instance,
this file:

  \documentclass{article}
  
  \begin{document}
  \begin{equation}
  \left. F \right)
  \end{equation}
  
  \begin{equation}
  \left. D \right] 
  \end{equation}
  
  \end{document}

when processed via

  latex2html -nomath -html_version 3.2,math -white bug.tex

generates four images, two of which give this kind of error:

GNU Ghostscript 6.51 (2001-03-28)
Copyright (C) 2001 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 2343000 972645 1622424 328498 0 done.
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... 2641008 1231668 1642520 335962 0 done.
GS>GS>>>showpage, press <return> to continue<<
GS>Running "/usr/bin/pnmcrop -verbose  < /tmp/l2h31621/p31661.pnm | /usr/bin/pnmcrop -verbose  -bot  -sides  | /usr/bin/pnmcrop -verbose  -l  -sides   > /tmp/l2h31621/p31661.t01"
pnmcrop: Background color is white
pnmcrop: cropping 27 rows off the top
pnmcrop: cropping 5 rows off the bottom
pnmcrop: cropping 8 cols off the left
pnmcrop: cropping 14 cols off the right
pnmcrop: Background color is black
pnmcrop: cropping 2 rows off the bottom
pnmcrop: Background color is black
pnmcrop: cropping 2 cols off the left
Image "/tmp/l2h31621/p31661.pnm" is PPM, 7x30
Running "/usr/bin/pnmcrop -verbose   -sides  -bot < /tmp/l2h31621/p31661.pnm > /tmp/l2h31621/p31661.t02"
pnmcrop: Background color is white
pnmcrop: The image is entirely background; there is nothing to crop.
pstoimg: Error: "/usr/bin/pnmcrop -verbose   -sides  -bot < /tmp/l2h31621/p31661.pnm > /tmp/l2h31621/p31661.t02" failed: Illegal seek

So, I'm guessing that l2h generates an image for "\left." , and that
image has nothing in it, so it gives a cropping error. Does that
make sense? If so, can it be fixed?

Cheers,

-Mike

============================================================================
Dr. Michael L. Hall               <mailto:Hall@lanl.gov>
Los Alamos National Laboratory    <http://www.lanl.gov/Hall>
P.O. Box 1663, MS-D409            Research: computational physics, radiation
Los Alamos, NM 87545              transport, heat pipes, numerical modeling,
ph: 505-665-4312                  fluid dynamics, magnetohydrodynamics
============================================================================