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.
PlasTeX: http://plastex.sourceforge.net/
MathJax: http://www.mathjax.org/
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:
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/
Backup files:
> cd plastex > mv setup.py setup.py-bak > cd plasTeX/Base/LaTeX > mv Definitions.py Definitions.py-bak
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/
In the directory plastex execute
python setup.py install
Use of PlasTeX requires no special directory structure or setup. The command is simply run in the directory in which the LaTeX file file.tex resides.
> plastex --renderer=MathJax --imager=gspdfpng file.tex
A subdirectory file will be created. The document is broken into parts in this format so most of the files and subdirectories are required. To view the output open the file index.html in any modern browser. You will need an Internet connection for the equations to load. See section 3.4 for information on how to get the most out of MathJax.