[l2h] images in a separate directory

R. Prabhakar prabha at strandgenomics.com
Mon Feb 10 10:35:03 CET 2003


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. 

i am foxed and wonder what the problem is. any siggestions?

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