TeX4ht is a configurable converter capable of translatingTeX and LaTeX documents to HTML and certain XML formats. Most notably, TeX4ht serves for converting TeX documents to formats used by word processors. It was developed by Eitan M. Gurari. The program is published under the LaTeX Project Public License.
History
TeX4ht was developed in the 1990s to convert TeX to HTML, helping to publish scientific documents that were written in TeX on the world wide web for display in a web browser. Particularly, hypertext features were supported, so it became possible to include hyperlinks in the web version of documents. More XML-based formats were supported gradually. As of 2019, HTML5, XHTML, MathML, OpenDocument, DocBook, and TEI are supported. JavaHelp can also be generated. TeX4ht is now included preconfigured with all TeX distributions. Since Eitan M. Gurari's death the program has been maintained by Radhakrishnan CV, Karl Berry, and Michal Hoftich, with contributions from many others.
Function
TeX4ht does not directly transform TeX or LaTeX markup into the output markup language Instead, an ordinary TeX run compiles a DVI file from the source first. TeX4ht subsequently processes the DVI file. Other converters, most notably LaTeX2HTML or TtHoperate in a single pass. TeX4ht essentially can deal with any successfully compiling TeX document source. TeX4ht can also incorporate support publicly available macro packages or user-made commands to process features that transcend standard TeX formats, such as for managing bibliography with BibTeX, because these extensions do not need corresponding implementations in the converter. Mathematical formulae and other characters or symbols that cannot be displayed as text are converted into graphics. Mathematics can also be converted into MathML or form suitable for processing with MathJax. TeX4ht can convert LaTeX documents into Microsoft Word's doc format via the OpenDocument format, ODT.
Literature
Translating LaTeX to HTML using TeX4ht, in: Michel Goossens, Sebastian Rahtz, Eitan M. Gurari, Ross Moore, Robert S. Sutor. The LaTeX Web Companion. Integrating TeX, HTML, and XML. 1999. 8th printing January 2006. pp. 155–194.