[latex2html] Re: [l2h] pixelimages and latex2html

Andre M. de Roos Andre M. de Roos" <aroos@bio.uva.nl
Fri, 08 Dec 2000 12:54:27 +0100 (CET)


I also tried to include some GIF images in my LaTeX2HTML document, but after
much experimenting I still did not succeed. My document
is segmented. I followed the recipe below, defining in a separate input file
the following command:







This input file is included in my main document (in the preamble) and in each
segment file (before the \startdocument command)

At the appropriate point in my file I use the new command:

\caption{Growth of the world population}

The resulting HTML code is as follows:

<DIV ALIGN="CENTER"><A NAME="fig:worldpop"></A><A NAME="720"></A>
Growth of the world population</CAPTION>

No figure is included at all! Actually, the content of the figure environment
is written to the images file and subsequently passed through LaTeX. LaTeX2HTML
then complains that no image was generated from this figure environment and
hence reports an error.

Is this all due to the fact that my document is segmented? I use

This is LaTeX2HTML Version 99.2beta8 (1.43)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.


On 23-Nov-00 Ross Moore wrote:
>> I want to include some screenshots in a LaTeX document and a HTML
>> document generated from this. If I use *.png files for the screeshots,
>> I can use the directly with pdfLaTeX for inclusion. If I write
>>   \includegraphics[width=\linewidth]{screenshot}
>> pdfLaTeX will take "screenshot.png", LaTeX will use
>> "screenshot.eps". Now I would like to tell latex2html to use
>> "screenshot.png" instead of rendering "screenshot.eps" and using the
>> result. Is there a way to get this?
> Yes.
> Since you already have screenshot.png available as an image file,
> there is no need to have LaTeX2HTML recreate an image for your
> HTML pages; simply use the one that you have already.
> The best way to acive this is to use a macro in your document source,
> but have that macro expand differently, depending on the TeX engine
> processing the document.
> e.g.
> your source should read something like:
> A view of the screen is given below, in figure~\ref{screenA}.
> In this one sees .....
> .....
> \begin{figure}
> \screenshotA
> \caption{A view of .....}
> \label{screenA}
> \end{figure}
> In the preamble to your document, or in a separate input file,
> use code like:
> %begin{latexonly}
>  \newcommand{\screenshotA}{\includegraphics{screenshot}}
> %end{latexonly}
> \begin{htmlonly}
>  \newcommand{\screenshot}{%
>   \htmladdimg[align=top,width=....,height=....,alt="...."]
>   {../images/screenshot.png}}
> \end{htmlonly}
> Notice how the \htmladdimg command (from  \usepackage{html} ) allows  you
> to specify all the meta-information about how to image is to be handled
> in the HTML file, including alignment, WIDTH/HEIGHT and ALT-text attributes.
>> Thanks
> Hope this helps,
>         Ross Moore

|  Andre M. de Roos
|  Population Biology section
|  University of Amsterdam
|  P.O.Box 94084
|  NL - 1090 GB Amsterdam, The Netherlands
|  Phone:       +31-20 525 7747
|  Fax:         +31-20 525 7754
|  E-mail:      aroos@bio.uva.nl