[l2h] images in a separate directory

R. Prabhakar prabha at strandgenomics.com
Mon Feb 10 13:13:55 CET 2003


hi ross,

somehow it is looking to convert the images that are alerady in jpg
format. the error message of latex2html may help:

---------------------------------------------------
This is TeX, Version 3.14159 (Web2C 7.3.7)
(./images.tex
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german,
ngerman, n
ohyphenation, loaded.


 *** processing 1 images ***

Generating postscript images using dvips ...
This is dvips(k) 5.86e Copyright 2001 Radical Eye Software
(www.radicaleye.com)
' TeX output 2003.02.10:1255' -> /tmp/l2h10226/image
(-> /tmp/l2h10226/image001) <tex.pro><alt-rule.pro><texc.pro><special.pro>
<color.pro>[1]
Converting image #1
pstoimg: Error: "/usr/bin/pnmcrop -verbose  < /tmp/l2h10226/p10241.pnm |
/usr/bin/ppmquant -floyd 256 |
/usr/bin/pnmtopng -interlace -trans '#ffffff'  > img1.png" failed: Illegal
seek

Error while converting image: No such file or directory

------------------------------------------------------------------------------


On Mon, 10 Feb 2003, Ross Moore wrote:

> > hello Ross,
> > 
> > specifying the graphics path too does not work. the pdflatex reports an
> > error saying the file is missing and latex2html compiles, but the images
> > are still in the same root html directory. 
> > 
> > i have also tried the following:
> > 
> > \newcommand{\screenshot}[2]{
> >     \begin{figure}[H]
> >     \htmladdimg{#1}
> >     \begin{latexonly}
> >     \begin{center}
> >     \includegraphics{#1}
> >     \end{center}
> >     \end{latexonly}
> >     \caption{#2}
> >     \end{figure}
> >     }
> > 
> > \screenshot{images/custom_script.jpg}{Custom Script Interface}
> > 
> > 
> > i thought this should work flawlessly, but alas, that too has problems in
> > the latex2html, while pdflatex seems to work fine. 
> 
> For this approach, it is better to use a conditional definition:
> 
> \begin{htmlonly}
>  \newcommand{\screenshot}[2]{%
>   \begin{figure}[H]
>   \htmladdimg{../#1}%%% <---  get the path right here !
>   \caption{#2}%
>   \end{figure}%
>  }
> \end{htmlonly}
> 
> %begin{latexonly}
>  \newcommand{\screenshot}[2]{%
>   \begin{center}%
>   \includegraphics{#1}%
>   \end{center}%
>  }
> %end{latexonly}
> 
> so that LaTeX2HTML (and pdfTeX, for that matter) doesn't
> have to carry around twice the baggage whenever \screenshot
> is used.
> 
> 
> > i am foxed and wonder what the problem is. any siggestions?
> 
> I'm surprised that using \graphicspath was not enough.
> You could try setting paths directly, using  $GRAPHICS_PATH  .
> 
> 
> Hope this helps,
> 
> 	Ross Moore
>  
> > prabhakar
> > 
> > 
> > 
> > On Sat, 8 Feb 2003, Ross Moore wrote:
> > 
> > > > hi,
> > > > 
> > > > all except the inline-math images are already there in the
> > > > the directories images/ and icons/. 
> > > > 
> > > > i want the the image src in html to point to these directories, but they
> > > > are instead copying the images into the root html directory. so i have two
> > > > copies of the images and the html directory had all the clutter of .jpg
> > > > and .png. ofcourse the inline images are generated and planted in the same
> > > > directory. that is fine. 
> > > > 
> > > > infact the previous version had the images linked and i installed the new
> > > > version bevcause the lot and lof files were not linking to appropriate
> > > > images. now the link works but the images are duplicated. there has been
> > > > discussion on these issues on the list before. and no solution seems to
> > > > work for me!
> > > 
> > > Have you tried using the  \graphicspath  command ?
> > > 
> > > For example, put this into the document preamble:
> > >   \graphicspath{{icons}{images}}   
> > >  
> > > > below are the commnands that matter:
> > > > 
> > > > \newcommand{\screenshot}[2]{
> > > >     \begin{center}
> > > >     \begin{figure}[H]
> > > >     \includegraphics{#1}
> > > >     \caption{#2}
> > > >     \end{figure}
> > > >     \end{center}
> > > >     }
> > > > 
> > > > \screenshot{images/custom_script.jpg}{Custom Script Interface}
> > > 
> > >  ... and don't use the directory (or suffix) in the body of the document:
> > > e.g.
> > >  \screenshot{custom_script}{Custom Script Interface}
> > > 
> > > Now both LaTeX and LaTeX2HTML should be able to find whatever image
> > > exists already, with an appropriate suffix.
> > > 
> > > 
> > > The module that should be being used is called:  graphics_support.perl
> > > There is a fair bit of commentary on what can be done.
> > > 
> > > 
> > > Hope this helps,
> > > 
> > > 	Ross Moore
> > > 
> > > > 
> > > > thanks
> > > > 
> > > > prabhakar
> > > > 
> > > > 
> > > > 
> > > 
> > 
> 



More information about the latex2html mailing list