[l2h] Relative/Absolute paths of images and failure when the images are accessed by the variable $TEXINPUTS

Mark Duke mark.duke at simpack.de
Thu Jan 21 17:34:59 CET 2010


Hi Ross and Nasser and community,

Thanks first of all for your help!

@Ross - the idea with the symbolic links would be fine, but the 
generated files are not on the web, but should be machine independent 
and be accessible on any machine independent of the web, which is why 
all paths have to be relative.


I have effectively the same problem as addressed by the following 2 threads:
http://www.mail-archive.com/latex2html@tug.org/msg01914.html
http://www.mail-archive.com/latex2html@tug.org/msg01915.html

The second answer with modifying $COPY_GRAPHICS=1 in graphicx.perl has 
helped me a lot. The files are now copied to the html output directory 
and are referenced relatively :-) . This only works, however, if the 
path to the images are entered directly in the includegrpahics command:
\includegraphics{./mypics/install_lic_webfront_mypics}
If I try and access the files via either the $TEXINPUTS (which 
previously worked with my eps files) or with the 
\graphicspath{{./mypics/}} then the translator tries to convert the 
pictures and the converted picture (conversion is not necessary; it's 
only needs to be copied) is a corrupted png :(((((

If I could just get the $TEXINPUTS or \graphicspath to work then things 
would be great. Do you have any other ideas? Or has anyone else had this 
problem?

Thanks loads in advance,

Mark


>    
>> Hi All,
>>
>> I have managed to generate html files using the png files as input, but
>> only when the png files were located in the same directory as the tex
>> files.
>>      
>
> The way I include my png files is as follows
>
> \usepackage{graphicx}
> \begin{document}
> \includegraphics[]{file.png}
>
> So, if the file.png is NOT in the same folder as the tex file, you could
> change the above to
>
> \includegraphics[]{full_path_name_of_file.png}
>
> You should be able to use either relative file path or absolute file path in
> the above.
>
>
>    
>> I want to access my png files by adding the respective directories via the
>> $TEXINPUTS variable.
>>      
>
> I do not think $TEXINPUTS is meant to be used to locate where the images
> are. I think it is used by the latex engine to help it find where the latex
> packages are if they can't be found in the standard locations.
>
> $TEXINPUTS might also used to locate latex input files which are included
> using \input{file} in the main latex document. But I am not sure about that.
>
> The point is, I do not think it is used to tell \includegraphics[] where the
> images are.
>
>    
>> The other question I had is to do with the paths to the images. When the
>> png files are parallel to tex files then the translator works fine with
>> the exception that the paths to the images which are included are
>> absolute, e.g in the generated html the pictures are referenced as
>> follows:
>> node2.html:
>> SRC="/scratch/simdoc_build/pdflatex_8904/develop/extern/install/all_in_one//install_lic_install_configure_ini_tab.png"
>>
>> Is it possible somehow to tell the translator that the paths should be
>> relative?
>>      
>
> Relative should work. may be try this:
>
> \usepackage{graphicx}
> \begin{document}
> \includegraphics[]{..\..\file.png}
>
>    
>> The best solution for me would be if the translator copied the png files
>> directly into the directory where the html is generated and they were
>> given the names img1.png, img2.png etc.
>>      
>
> This is what it does in my case. it copies all the images to one folder
> where the final .html is. This is the command I use:
>
> latex2html  -no_reuse -subdir -local_icons  foo.tex
>
>
> --Nasser
>
> _______________________________________________
> latex2html mailing list
> latex2html at tug.org
> http://tug.org/mailman/listinfo/latex2html
> .
>
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/latex2html/attachments/20100121/2bfe2e1e/attachment.html>
-------------- next part --------------
An embedded message was scrubbed...
From: Ross Moore <ross at ics.mq.edu.au>
Subject: Re: [l2h] Relative/Absolute paths of images and failure when the
	images are accessed by the variable $TEXINPUTS
Date: Wed, 20 Jan 2010 23:02:32 +0100
Size: 5777
URL: <http://tug.org/pipermail/latex2html/attachments/20100121/2bfe2e1e/attachment.mht>


More information about the latex2html mailing list