#!/bin/csh # Script to automate htmlization of the # user and programmers manuals. if ($#argv != 1) then echo usage: htmlize document echo where document.tex is the main file exit 1 endif set TMP=tmp.$$ set L2HOPT="-split 3 -bottom_navigation -show_section_numbers -image_type gif -local_icons" # works also with a list of files here but not currently # used in this fashion foreach document ($1) echo HTMLizing $document.tex # First make sure the latex builds OK echo "htmlize: Cleaning and making $document.ps" make clean >& /dev/null make $document.ps >& $document.latex.log if ($document == "user") then echo "htmlize: making userpdf.pdf" make pdf >>& $document.latex.log endif if ($status != 0) then echo "htmlize: latex errors reported in $document.latex.log" exit 1 endif # Get rid of the old directory and run latex2html if (-e $document) then echo "htmlize: Removing old $document directory" /bin/rm -rf $document endif echo "htmlize: Running latex2html on $document.tex" latex2html $L2HOPT $document.tex >& $document.latex2html.log if ($status != 0) then echo "htmlize: latex2html errors reported in $document.latex2html.log" exit 1 endif # To make the document searchable we need to make the INDEX file # and insert the link near the top of document/document.html. # We actually shove it immediately before the first unnumbered list #