latex2sep

latex2sep is a very basic script which converts a LaTeX file into (something close to) HTML in the house style of the Stanford Encyclopedia of Philosophy. It uses latex2html and sed. I wrote it because I wanted to be able to use LaTeX's powerfull cross-referencing mechanisms and my BibTeX databases. The script is not perfect, and has only been tested (a w couple of years ago!)on my setup (latex2html 1.62, natbib 6.9 etc. running on a RedHat 9.0 machine). You might find it useful; then again, it may very well blow up in your face. The code here is provided AS IS without warranty express or implied blah blah blah.

latex2sep

This is the actual script. Called as latex2sep <entry-name> it will process <entry-name>.tex and generate <entry-name>/index.html. It assumes that you've already gone through the latex/bibtex/latex/latex cycle to generate bibliography, table of contents, cross references, etc.

The script first calls latex2html, and then does lots of manipulations on the resulting file to clean up the HTML generated by latex2html.

sep.bst

This is a bibliography style file that generates bibliographies in the SEP style. It works with Patrick Daly's natbib package. latex2html seems to work best with natbib, but you might be able to use other author-year citation style packages (harvard.sty etc). sep.bst was generated using Daly's custom-bib package (makebst).

sep-sample.tex

This is a sample entry. If you're going to use the script, you should probably use this as a starting-point. It loads all the required styles at the beginning and redefines a bunch of symbols so that latex2html puts in <img> tags pointing to the SEP's images instead of generating images for formulas.

sep-sample.tex needs the bibliography file sep-sample.bib and produces sep-sample.pdf if compiled with pdflatex; "latex2sep sep-sample" will produce sep-sample/index.html.

Leave a Reply

Your email address will not be published. Required fields are marked *