1.3 PlasTeX

PlasTeX is a second method of converting LaTeX  to other formats. PlasTeX differs from TeX4ht in that it builds a document model and supplies a collection of renderers. A document can therefore be rendered to multiple formats. However, PlasTeX is currently not able to produce a suitable format for a screenreader.

We will use PlasTeX to produce a HTML and MathJax format which, unlike the XHTML and MathML produced by TeX4ht can be viewed by any modern browser including Firefox, Chrome, Safari and many smartphone browsers. Again, unlike current TeX4ht output, MathJax permits reflow of equations and hence can be viewed on small screens or in large fonts. We do not rely on this method for large print as the hard-copy output is currently too poor. When using IE this format can also be used for speech output but the speech may not be fully correct hence it is recommended that anyone reliant on speech output does not use this format.

Installation

PlasTeX is likely to be available via your package management system however, during this project we have made additions to PlasTeX in order to produce a browser-independent output format which can be reflowed. This has been accomplished by providing a proof of concept MathJax renderer for PlasTeX. This has required some fixes to PlasTeX itself some of which are again, proof of concept only. Hence, we currently recommend that PlasTeX is installed and compiled from source. Our alterations can then be applied and PlasTeX recompiled.

Download PlasTeX from http://plastex.sourceforge.net/ then:

> tar -xvjf plastex-0.9.2.tgz
> cd plastex
> python setup.py install

To update your version of PlasTeX:

  1. Download http://www.bath.ac.uk/~cspehj/maths-access/plastex-renderers.zip

    > unzip plastex-renderers.zip
    > cd plastex-renderers
    > mv MathJax plastex/plasTeX/Renderers/
    > mv MathJaxS5 plastex/plasTeX/Renderers/
    
  2. Backup files:

    > cd plastex
    > mv setup.py setup.py-bak
    > cd plasTeX/Base/LaTeX 
    > mv Definitions.py Definitions.py-bak
    
  3. Download http://www.bath.ac.uk/~cspehj/maths-access/plastex-changes.zip

    > unzip plastex-changes.zip
    > cd plastex-changes
    > mv setup.py plastex/
    > mv Definitions.py plastex/plasTeX/Base/LaTeX/
    
  4. In the directory plastex execute

    python setup.py install
    

Usage