HtmlTeX Home Page

What is HtmlTeX?

HtmlTeX is a small hack for converting LaTeX (and possibly TeX) into HTML.  It consists of a TeX style file called html.sty, a small Perl script to convert the resulting logfile into html called grabout, and a shell script to do it all.

What is the current state of HtmlTeX?

HtmlTeX is currently very primitive.  It is only intended to be a simple little hack.  It cannot handle tables, figures, and math very well.  I am making it available so people can use it and improve it.

How do I use HtmlTeX?

First download the following three files: html.sty, htmltex, and grabout.
Put htmltex and grabout somewhere in your path.  Put html.sty where it can be found by latex (for initial tests you can simply put it in the directory with the document).

To convert a document, add html.sty to its list of styles; i.e.
\documentstyle[epsfig, 11pt, ..., html]{article}
Now run
htmltex foo.tex
This should produce foo.html.  Note that you may need to rerun latex after this to get your dvi file back to its original state (note that html.sty is harmless if it is not run with htmltex).

In principle the short script htmltex should be able to force html.sty to be included.  I haven't figured out how to do this yet.


I welcome any feedback.  Please send comments, fixes, and enhancements to me at

HtmlTeX was developed by and is  (sometimes) maintained by Sergey Brin.