LaTeX + DOM = plasTeX  

plasTeX is a LaTeX document processing framework written entirely in Python. It currently comes bundled with an XHTML renderer (including multiple themes), as well as a way to simply dump the document to a generic form of XML. Other renderers can be added as well and are planned for future releases.

Here is an example LaTeX document converted to HTML using plasTeX. For reference, the PDF version of the document is also available.

plasTeX differs from other tools like LaTeX2HTML, TeX4ht, TtH, etc. in that the parsing and rendering of the document are completely separated. This separation makes it possible to render the document in multiple output formats. It also allows the parser to create a cleaner document object, so that the rendering process is easier.

Since the renderer has complete control over which pieces of the document are rendered, it is possible that the resultant document is structured quite differently than the input document. This object actually allows you to traverse and edit the document tree.

The documentation for plasTeX is available in PDF and HTML format. Of course, the original document is written in LaTeX. The PDF version was generated using pdflatex, and the HTML version was generated using plasTeX.

The latest release with complete documentation is always available on SourceForge.

Getting Started

We are working on a series of documents for beginning plasTeX users. The first in the series is entitled Getting Started with plasTeX. It is available in both HTML and PDF format. The LaTeX source of this document is also available.

plasTeX Users

If you are interested in who else is using plasTeX, we are keeping a list of the projects that we know of right here. If you are using plasTeX, let us know so we can post your project's name as well.

  • BrlTex is an open source LaTeX to braille translator built on top of plasTeX.

  • The itools package for Python uses plasTeX for its documentation.

  • SAS is currently using plasTeX to generate HTML and DocBook for 10,000+ pages of scientific documentation nightly.

  • The German Society for Tropical Surgery is using plasTeX to post medical documentation on their Primary Surgery web site.