# [l2h] Relative URLs in png/gif images

Herb W. Swan lanhws at expl.ak.ppco.com
Wed Jun 4 19:30:45 CEST 2003

On Wed, 4 Jun 2003, Ross Moore wrote:

>
> OK, yes; it tried to make an image of the {figure} environment.
>
> To prevent this, simply insert an empty {makeimage} environment
> inside the figure; hence within your macro definition, as shown below.
> This is the way to tell LaTeX2HTML to make an image just of the specified
> portion of the {figure}, and interpret anything else.
> Of course an image is made *only* if the specified portion is not just
> whitespace.
>
> > \begin{htmlonly}
> > \newcommand{\showpng}[4][]{%
> >     \begin{figure}[htb]
> >     \begin{center}
>       \begin{makeimage}
>       \end{makeimage}
> >         \caption{\label{#2}#3}
> >         \end{center}
> >     \end{figure}
> >     }
> > \end{htmlonly}
> >
> > \begin{document}
> > I'm going to include a png image right here:
> > \showpng{l2h}{The figure caption}{../}
> > \end{document}
> >
> > % --------------------------------------------------------
> >

Thanks, Ross.  That did the trick.  And it was a trick.  I don't think I
would have come up with it on my own.  I would say that the coding that
Bruce Miller made possible through his modifications to graphicx.perl are
more straight-forward and more likely to be stumbled upon by an average
user.  He claims his modifications should have produced relative URLs.
It might be worth investigating why they did not in my case.  Could it
have something to do with the way I configured LaTeX2HTML?  If there's
anything I can do to help, please let me know.

--

/-----------------------+-----------------------------------\
| 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   |
\-----------------------+-----------------------------------/