[l2h] Using JPG images in Latex2HTML

Carsten Detlefs detlefs at esrf.fr
Tue Apr 8 14:24:48 CEST 2003


The most straightforward way is to use the graphicx package, and not
specify the extention (this means you cannot use dots in the file name)

...

\usepackage{graphicx}

...

\includegraphics[width=0.5\columnwidth]{picture}

...

this will look for picture.eps when compiled with LaTeX, 
picture.pdf, picture.png, or picture.jpg when compiled with pdfLaTeX,
and I don't know what exactly when run through latex2html, but it does
accept .jpg. BTW, the "width" parameter is not taken into account by l2h.

Note that this screws up for file names like "picture.1.jpg", as
"picture.1" would be interpreted as file-type ".1"; the extention
".jpg" is not added if a "." occurs in the file name. Dots may appear in
the path, though, "../pictures.all/picture" is OK.

This does mean changing the original source code, but the changes are
quite mechanical and could probably done by an awk script or something
similar. 

Hope this helps. 

Cheers,
       Carsten

---------------------------------------------------------------------
                     Carsten Detlefs                  
    ESRF BP220                          e-mail: detlefs at esrf.fr
    6, rue Jules Horowitz                Phone: +33 4 76 88 25 56
    F-38043 Grenoble, France               Fax: +33 4 76 88 25 42
---------------------------------------------------------------------

On Tue, 8 Apr 2003, Shigeharu TAKENO wrote:

> shige 04/08 2003
> ----------------
> 
> > I have an existing base of documents created for PDFLatex that use jpg
> > graphics.
> > 
> > I now want to use Latex2HTML to convert them , but I find that Latex2HTML
> > converts them.
> > Is there a way to bypass this conversion without changing the original
> > source code to use \htmlonly tags.
> 
> pdflatex can use jpeg image files, but dvips used in latex2html 
> can't.
> 
> One solution is to translate all jpg image file(s) to eps file(s)
> (ex. by jpeg2ps) and to modify your latex source file(s) which 
> can be translated by latex and dvips instead of pdflatex. 
> 
> I don't know any other way.
> 
> +========================================================+
>  Shigeharu TAKENO     NIigata Institute of Technology
>                        kashiwazaki,Niigata 945-1195 JAPAN
>  shige at iee.niit.ac.jp   TEL(&FAX): +81-257-22-8161
> +========================================================+
> _______________________________________________
> latex2html mailing list
> latex2html at tug.org
> http://tug.org/mailman/listinfo/latex2html
> 




More information about the latex2html mailing list