Installing latex2html on PC under RH6.1 Linux

latex2html is a well known software package which converts LATEX documents into HTML documents. It was developed by Nikos Drakos with Ross Moore joining development a few years ago. Here is a detailed log of latex2html installation on PC running Linux RH6.1. Dislaimer for lawyers: What follows is a nonsense. I warned you, didn't I? You have to be a root to do it.
This document was committed by Jan K. Labanowski jkl@ccl.net. Do not trust anything here... I do not know what I am talking about... Last modified: April 17, 2000.

Getting necessary pieces

latex2html uses a lot of other tools and libraries, which have to be installed, before you can install latex2html. But the good news is that most (or all) of these packages are installed if you choose to install Linux as a server, or when you chose most pakages to install from the CD. You may missing giftrans though.
giftrans -- converts regular GIF to GIF with transparent background.
   wget http://ftp.sunet.se/ftp/pub/www/utilities/www-tools_uni-karlsruhe/giftrans/giftrans.1
   wget http://ftp.sunet.se/ftp/pub/www/utilities/www-tools_uni-karlsruhe/giftrans/giftrans.c
   gcc -o giftrans giftrans.c
   cp giftrans /usr/local/bin
   cp giftrans.1 /usr/local/man/man1

Installing latex2html

You installed latex2html and now what?

You need to remember to add latex2html and other programs which it uses to the PATH. It is a good idea to check what is actually your PATH, since you really should not add the same directory twice in PATH. Just do:
  echo ${PATH}
  echo ${LD_LIBRARY_PATH}
You usually do not have problems under Linux with the library search path LD_LIBRARY_PATH. On Linux the libraries are usually dumped into /usr/lib.
If you are the Bourne type shell fanatic, you need to edit your .profile:
   if [ "$PATH".r = ".r" ]; then
     PATH=/usr/local/bin:/usr/local/latex2html/bin 
   else
     PATH=${PATH}:/usr/local/bin:/usr/local/latex2html/bin 
   fi
   export PATH
   if [ "$LD_LIBRARY_PATH".r = ".r" ]; then
     LD_LIBRARY_PATH=/usr/local/lib
   else
     LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
   fi
   export LD_LIBRARY_PATH
or in your .cshrc add:
   if ( ${?PATH} == 1 ) then
     if ( ${PATH} == "" ) then
       setenv PATH /usr/local/bin/:usr/local/latex2html/bin
     else
       setenv PATH ${PATH}:/usr/local/bin:/usr/local/latex2html/bin
     endif
   else
     setenv PATH /usr/local/bin:/usr/local/latex2html/bin
   endif
   if ( ${?LD_LIBRARY_PATH} == 1 ) then
     if ( ${LD_LIBRARY_PATH} == "" ) then
       setenv LD_LIBRARY_PATH /usr/local/lib
     else 
       setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/local/lib
     endif 
   else
     setenv LD_LIBRARY_PATH /usr/local/lib
   endif

Of course, you can be nice, and do it for everybody by adding it to the end of /etc/profile, and /etc/.login; respectively (but make them simpler, since here you know what is set an what is not set in these files by looking at them).

Now try it...
If LATEX document is called mypaper.tex, you just do:

   latex mypaper.tex
   latex mypaper.tex
   latex2html mypaper.tex
(you can skip extensions .tex). As a result, in the directory mypaper you will have your paper converted to HTML.

This is a version which does not use GIF images by default, but uses a new (better) format, called PBM (Portable BitMap). While this format is supported by all newer browsers, you may still want to use GIFs to by portable. In this case, you may force latex2html to produce transparent GIFS as output:

   latex2html -image_type gif -transparent mypaper.tex
If your images representing equations, etc. come white, and the rest of the page is blue or gray, you need to find the <BODY> tag at the beginning of your newly created HTML file and change it to:
<BODY BGCOLOR="white"> and your background will also become white.

I think, it is time to print manual.ps...