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

Mark Duke mark.duke at simpack.de
Wed Jan 20 20:27:58 CET 2010


Hi All,

I use pdflatex and latex2html to convert my tex files into pdf and html 
. My goal is to use exactly the same tex files for both programs and to 
keep the use of the environments {latexonly} and {htmlonly} to a 
minimum. I use a lot of screenshots which are in png (fine for pdflatex) 
format to avoid having to convert them during the latexh2mtl run. I 
previously used eps files, but the conversion quality was not great and 
seeing as I have them in png format then there is no need to convert 
them during a latex2html run. 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. I want to access my png files by 
adding the respective directories via the $TEXINPUTS variable. If the 
files are accessed in this way, i.e. not in the same directory as the 
tex files, then latex2html tries to convert them and fails. Does anyone 
know why it tries to convert them? With eps files they were converted to 
png's with names such as img1.png, img2.png etc. Is it possible to 
access png files via the $TEXINPUTS or do they have to be placed into 
the directory where the tex files are located?

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? Is there a latex2html option which I haven't seen? The icons 
(relative path in the variable $ICONSERVER) and converted equations are 
accessed how I want them via relative paths, e.g.:
node2.html: SRC="../icons/crossref.png"></A>.
node2.html: SRC="img1.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 would be similar to how the 
translator behaves with eps files, but obviously without having to 
convert them from eps to png using the tool 'pstoimg'. Do you know if 
this is possible? The translator I am using is not the newest, 'This is 
LaTeX2HTML Version 2K.1beta (1.62)'. Maybe a newer translator has this 
functionality?

Thank you very much for your help.

Best regards,

Mark



More information about the latex2html mailing list