[l2h] Problem converting an image?
Ross Moore
ross at ics.mq.edu.au
Thu May 13 17:48:43 CEST 2004
Hi Erling,
On 14/05/2004, at 1:12 AM, Erling D. Andersen wrote:
> Hi Ross,
>
> Yes. I am reading a gif file i.e.
>
> \includegraphics{lmtinitial.gif}
What environments is the command nested inside ?
> l.386 \includegraphics{lmtinitial.gif}
> %
I'm guessing it's inside a {figure} environment,
in which case LaTeX2HTML expects to make an
image of the whole figure's contents.
Hence \includegraphics{lmtinitial.gif} gets
passed to LaTeX for processing, and fails there,
since LaTeX doesn't handle .gif images.
>
> http://www.mosek.com/products/3/tools/doc/html/toolsinstall/
> lmtinitial.gif.
>
> I tried to make the small test document
>
> # Begin
>
> \documentclass{article}
>
> \usepackage{html}
> \usepackage{graphics}
>
> \begin{document}
>
> \includegraphics{lmtinitial.gif}
>
> \end{document}
>
> # End
>
> and it does *NO* image conversion. Whereas it does for my real
> document.
That's because there is no environment affecting how the
processing is to be handled.
When \includegraphics appears by itself, you'll get the image
processed in whatever way is most appropriate for its format-type.
The image stands by itself, without any surrounding context.
> Leaving me wondering what is happening. Why does it convert sometimes
> and sometimes not.
>
When it's inside another environment, there is an implicit
relationship to other material. This all gets passed to LaTeX,
unless there is extra markup that specifies otherwise.
>> ^^^^^^^^^^^^^^-------- how does this happen ?
>>
>> What is the coding in the images.tex file ?
>> And what was the original coding in your LaTeX
>> document that gives rise to this ?
>
> Here it is:
>
> %begin{latexonly}
> \includegraphics[scale=0.75]{lmtinitial.png}
> %end{latexonly}
> \begin{htmlonly}
> \includegraphics{lmtinitial.gif}
> %\htmladdimg{lmtinitial.gif}
> \end{htmlonly}
>
Why did you comment-out the
\htmladdimg{lmtinitial.gif}
which is the best way to include images directly.
Except, it probably should be
\htmladdimg{../lmtinitial.gif}
because the path needs to be relative
to where the HTML files will be located.
Alternatively, try:
\begin{figure}
%begin{latexonly}
\includegraphics[scale=0.75]{lmtinitial.png}
%end{latexonly}
\begin{htmlonly}
\begin{makeimage}
\end{makeimage}
\includegraphics{lmtinitial.gif}
\end{htmlonly}
\caption{...}\label{...}
\end{figure}
> %
> Bla bla bla
>
> On another note can make sure that latex2html starts on new line after
> doing
> \htmladdimg{lmtinitial.gif}. It does not do it as documented at
>
> http://www.mosek.com/products/3/tools/doc/html/toolsinstall/
> node4.html#SECTION00440000000000000000
Images are treated as horizontal material in HTML.
Just use \html{\\} to force line-breaks,
when it doesn't happen automatically.
>
> Scroll down a bit and look at the figures.
>
> Erling
>
>
> ***********************************************************************
> **
> MOSEK ApS
> C/O Symbion Science Park
> Fruebjergvej 3, Boks 16
> DK-2100 Copenhagen O
> Denmark
>
> Phone (work): +45 3917 9907
> Mobile-phone: +45 2362 9520
> Fax: +45 3917 9823
> Email to phone: 23629520 at gsm1800.telia.dk
> Email: e.d.andersen at mosek.com
> Homepage: http://erling.andersen.name
> http://www.mosek.com/homepages/e.d.andersen/
>
Cheers
Ross
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia fax: +61 +2 9850 8114
------------------------------------------------------------------------
More information about the latex2html
mailing list