[l2h] using alternative gifs for figures

Ross MOORE Ross MOORE <ross@ics.mq.edu.au>
Fri, 21 May 1999 19:17:37 +1000 (EST)


> 
> Hi,
> 
> I have some gifs that were converted to ps for inclusion in a latex
> document. I now want to convert the latex file to html, but would like to
> use the original gifs in place of the (twice) converted latex2html ones. I
> would still like the caption of the figure to appear as before. I tried
> using the \htmladdimg inside a figure but it seems to get ignored - I
> assume this is because the figure environment is passed to Latex to
> process. 

Yes, that us the reason;
but you can stop it with an empty {makeimage} environment.
viz:

\begin{figure}
\begin{makeimage}
\end{makimage}
\htmladdimg{...URL to the existing image...}
%begin{latexonly}  LaTeX still needs the original source
 \includegraphics{... eps file ...}
%end{latexonly}
\caption{.. my really great image...}
\label{myimage}
\end{figure}


Make sure you  \usepackage{html} and the above code
will work correctly in both the HTML and LaTeX/dvi versions.

Note the use of  %begin{latexonly} .... %end{latexonly}
comments, to tell LaTeX2HTML to ignore the code in-between.
LaTeX will ignore the \htmladdimg  command anyway.


> 
> How can I use my original gifs and still have the captions? I imagine I
> could do a {latexonly} round the entire figure and then have a {htmlonly}
> copy with the gif below but this seems a bit clumsy. 

Right idea; but, as you say, a bit clumsy since it requires
repeating the {figure} markup and its \caption .

The above code handles the conditionals with minimum overhead.


Hope this helps,

	Ross Moore