[l2h] big problem with images in html links. Same image is used.

Nasser M. Abbasi nma at 12000.org
Tue Jan 15 08:37:11 CET 2013


I mentioned this problem long time ago.

http://comments.gmane.org/gmane.comp.tex.latex2html/505

But there is was satsfactory answer to this problem as of yet.

This is a big problem for me as I have used the same
image name in many folders in order to make it easy to automate
other things. But now when I run latex2html, and even though
the images are in different folders, l2h will use the same
image name for all the links. Here is an example:

I have foo.tex in a folder. and Below this folder, I have 2
folders A\ and B\ and each have an image called image.png

Now this is my foo.tex:

-------------------------------
\documentclass[titlepage]{article}%
\usepackage{html}
\usepackage{amssymb}
\usepackage{graphicx}%
\begin{document}
   
\htmladdnormallink{\includegraphics[scale=0.3]{folderA/image}}{folderA/image}
\htmladdnormallink{\includegraphics[scale=0.3]{folderB/image}}{folderB/image}
\end{document}
----------------------------------------

When I run this by latex2html, the html file shows this:

------------------------------
<A NAME="tex2html1"
   HREF="folderA/image"><IMG WIDTH="30" HEIGHT="20" ALIGN="BOTTOM" BORDER="0"
  SRC="./image.png"
  ALT="Image image"></A>
<A NAME="tex2html2"
   HREF="folderB/image"><IMG WIDTH="21" HEIGHT="20" ALIGN="BOTTOM" BORDER="0"
  SRC="./image.png"
  ALT="Image image"></A>
<P>

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

and what shows up in the html page as thumbnail is the same
image (it uses the first one it read which is folderA/image)
but the html link is correct. Only the thumbnail image is wrong.

What I have done in the past is to go rename every image to add the
folder name to the name of the image to that each image name
is unique.  But I do not think I can do this this time, as I
have many images done this way and I would have to change
many scripts now to rename many things.

This is a show stopper for me now, and If there is not as easy
way around it, I might have to abandon latexhthml and try to
move to text4ht as I tried this with text4ht and it had
no problem with the images.

If anyone knows a way around this, please let me know.

I am using latest latex, and latex2html from linux mint 14
(2008).

--Nasser


More information about the latex2html mailing list