Troubleshooting Latex2html
I have seen many pages on the web for troubleshooting the inline inclusion of images when using latex2html. While good, they missed some essential points for me. I work in an environment where a central section maintains my Solaris environment, and people go on leave, etc. So I'm never sure what has been installed and where, and I don't have the luxury of running install scripts to try something out.So I have found out the hard way that this is what is needed to get latex2html to work properly:
- First make sure you have the latest version. As of May 2000, this is 99.1, not 98.1p1. It is available from www.go.dlr.de/fresh/unix/src/www/.warix/l2h99_1.tar.gz.html If you just follow the instructions, it should all install in 10 minutes (no compilation required!)
- Latex. Make sure you can run latex over your .tex files, and preview the results with xdvi.
- ppmtogif. Make sure that it is correctly pointed to from the locals.pm file! It will be useful for debugging to place it in your $PATH; it is not necessary to have it in $PATH for just running latex2html. Note that to use the preferred .png files, you have to find ppmtopng; if you're lazy like me, you'll just give up and choose to use gifs instead.
- Ghostscript. Again, make sure it's pointed to from locals.pm, and it is useful but not essential to have it in your path. (It will ne called something like /opt/local/gs/bin/gs).
- It probably needs everything else correct in the file local.pm in the top latex2html directory. The above 2 were the ones that stopped me.
% latex2html -debug mymaintexfileThe way that the images seem to work is that latex2html generates a file called images.tex in the same directory as your .html files. You can get some clues therefore from reading the associated images.log file, or by running latex on that file directly (note: don't change to the directory where that file is, because it will change where all the included files are relative to). Note that I had the situation where I could latex the images.tex file by hand, but not from latex2html (since latex2html thought that GhostScript was where it wasn't.) If this happens to you, it's a big clue that your path has something that latex2html/local.pm does not!
Latex is run over the resultant images.tex file, and the output is ../images.dvi (in the same directory as your .tex files). You should be able to view that file with xdvi; it should have one image per page.
If you get small square buttons instead of references to figures or to the bibliography, this is likely because you have not run latex, bibtex, then latex again (and again until it no longer says to run it again to fix labels). So the sequnce is:
latex foo bibtex foo latex foo latex foo # Perhaps more times latex2html foo
