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
http://www-texdev.mpce.mq.edu.au/l2h/docs/manual/ The official manual provided by the primary LATEX2HTML author, Ross MooreClick on the link above, and then choose: A Postscript version available (which is linked to: http://www-texdev.mpce.mq.edu.au/l2h/docs/manual.ps.gz) and download it. Keep it, and print it sometime later when you are ready to use latex2html. The installation instructions in the PostScript manual do not refer to the version which you have right now. However, manual has a lot of important information on proficient use of the software, so you will need it when you are ready to use the software.
latex2html-99.2beta6.tar.gz 14-Apr-2000 07:15 1.0Mi.e., the URL: http://saftsack.fs.uni-bayreuth.de/~latex2ht/current/latex2html-99.2beta6.tar.gz. I am providing the local copies of these two files here:
manual.ps.gz latex2html-99.2beta6.tar.gzbut you should check the original sites, since they may have some newer, better version.
cd /usr/local/tempjkl gtar zxvf latex2html-99.2beta6.tar.gzCarefully read the INSTALL file (/usr/local/tempjkl/latex2html-99.2beta6/INSTALL).
cd /usr/local/tempjkl/latex2html-99.2beta6 ./configure --helpThis will list all options defined in the configure script. you should have all the software installed (and available in the PATH which is listed in the lines:
--with-somesoftware=PATHNow, use which or whence (depending on the shell you are using) and check if you can access the codes. For example, in my case, I could:
which gs /usr/bin/gs .... which giftrans /usr/local/bin/giftransNote that I do not use giftool. If one or more programs are not found, you need to install them. Go to http://rufus.w3.org and retrieve needed RPM pachages. Once you have them, it is a snap to install them (but you must be a root:
rpm -Uhv some_package.rpmBe careful, you actually may have the package installed, but your PATH variable is not set correctly. You may need to do something like this:
PATH=${PATH}:/usr/local/bin export PATHif you are using the Bourne type shell (e.g., ksh, sh), or
setenv PATH ${PATH}:/usr/local/binof you are using csh or tcsh.
cd /usr/local/tempjkl/latex2html-99.2beta6 ./configure --prefix=/usr/local/latex2htmlIf you did not get complaints like: not found, or something, you are ready to compile. If it complains, give it what it wants. For example, on one of my boxes it said:
checking for ghostscript library and font paths... no Warning: Could not determine GS_LIB path. Ghostscript may not work due to missing startup files. You need to set the value of GS_LIB manually in cfgcache.pm. Hint: Search for the file 'gs_init.ps'. This directory and the 'fonts' directory (usually same level) should be set in GS_LIB. Separate the entries with the ":" character. The current directory "." should be included, too.I edited cfgcache.pm and changed there:
$cfg{'GS_LIB'} = q'';to
$cfg{'GS_LIB'} = q'/usr/share/ghostscript/5.10';and it was happy.
cd /usr/local/tempjkl/latex2html-99.2beta6 make make checkif no horrors, you are ready to install latex2html. First, edit the file l2hconf.pm in the top directory, by and changing LOCAL_ICONS from 0 to 1, i.e., to be:$LOCAL_ICONS = 1;. While it will waste some disk space (the common icons will be added to each translated document), the advantage is that you are not in any way dependent on where you put your document in the Web tree. Otherwise, you would have to have a special directory for icons, which would hold common icons. If you wanted to give your friend your paper to put on his web site, or view it as a file:///someting on the laptop, there would be unsatisfied images on your pages. Now, put the files where they belong:
cd /usr/local/tempjkl/latex2html-99.2beta6 make install
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 [ "$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_PATHor 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.texIf 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: