[l2h] l2h/99.1: ppmquant & picture-trouble

Ross MOORE Ross MOORE <ross@ics.mq.edu.au>
Tue, 29 Jun 1999 12:10:46 +1000 (EST)


> hi everybody!
> it`s first time using l2h and all i got is trouble!
> i wanted to convert a tex-file with eps-files and wrapfigure-environments.
> e.g. \vspace{1cm}
>  \begin{center}
>  \begin{figure}[h!t]
>  \hspace{1cm}
>  %
>  \begin{minipage}{6cm}
>  \centering
>      \epsfxsize=6cm
>      \epsffile{PIC00010.eps}
>      \caption{Unser Rechner}
> 
>  \end{minipage}
>  \hspace{1cm}
>  %
>  %
>   \begin{minipage}{4cm}
> Dieser etwas angestaubte Rechner 
> sollte unser Arbeitstier sein.
> Des "ofteren war er allerdings
> mehr Hindernis als Hilfe.  
> 
>  \end{minipage} 
>  \end{figure}
>  \end{center}

This is a very complicated environment.
Clearly you are trying to do a rather complicated page-layout.
It is beyond the abilities of LaTeX2HTML to give you what
you'd expect from LaTeX, without extra hints. The main reason
for this is that HTML is not as expressive as .dvi for describing
whole pages; some compromises must be made, and it is up to the
author to be more specific about the desired markup.

The rules for {figure} environments are:

 1. make an image of the whole environment, UNLESS
 2. it contains an instance of {makeimage} (from html.sty); OR
 3. it contains an instance of {minipage}

In cases 2. & 3. images will only be made of what occurs
within {makeimage} environments, or of particular commands
that have no alternative meaning.

Thus with your combination of 

\begin{figure}
 \begin{minipage}
 \epsfxsize=...
 \epsffile{....}
 ...
 \end{minipage}
....
...<more stuff>...
...
\end{figure}
 
the \epsfxsize and \epsffile commands are being treated
as independent commands, to be interpreted separately
by LaTeX2HTML.

What you really want is probably:

\begin{figure}
 \begin{minipage}
  \begin{makeimage}
   \epsfxsize=...
   \epsffile{....}
  \end{makeimage}
  \caption{....}
  ...
  ...

> and others like this:
> 
> +dq;
>   u_c:=q/C;
>   t:=t+dt;
> until t>mt;  
> \end{verbatim}  
> \caption{Entladevorgang}
> \end{minipage}
> \end{figure}
> \end{center}
> %%%%%

This isn't enough to run a test.
Please send a URL to your source, so I can get the full
context for testing.
 
> the problems were:
> 
> 1. some pictures can`t be converted to gifs by l2h. l2h produced the
> following errors:
> 
> ppmquant: making histogram...
> ppmquant: 0 colors found
> ppmquant: choosing 256 colors...
> ppmtogif: EOF / read error reading magic number
> pstoimg: Conversion failed: No such file or directory
> 
>  *** finished child process: #23479    
 
Look first in the images.log file for LaTeX errors.
These can cause extra pages in images.dvi,
which will mean either that some images will not be
made at all, or that some of those that are made
end up with the wrong names/numbering.

> ppmtogif: computing colormap...
> ppmtogif: 255 colors found
> sh: 21266 Memory fault
> pstoimg: Conversion failed: No such file or directory

Ouch. 
Probably what has happened is that an image has been
badly aligned on the dvi-page; or that a particular dvi-page
is empty, due to earlier problems (see images.log, as above).
The pnmcrop utility probably cropped away the entire (empty) image,
as it removes surrounding white-space.
Some of the  netpbm  utilities produced such errors, when asked
to process an empty image.
 
 
> During searching the error, i detected a 'core' file in the directory
> l2h23361 (which includes images and is also produced by l2h). 
> This file says that there`s an error in ppmquant (what i can`t believe)

results from the    sh: 21266 Memory fault
This is consistent with the above "explanation".
 
> 
> 2. if the are produced any pictures, then only some of them are included
> in the html and they are all at the wrong place!
 
normal result, when there are problem with images.tex;
check in images.log to get an idea of what part of your source
is not being handled adequately.

> 
> thank you for helping
> 

Hope this helps,

	Ross Moore