The primary benefit of creating this port is that, rather than streaming the output to a browser, the function can run entirely on the server side and save its MathML output to a file. This output can then be passed to other scripts as part of an automated process, to perform further tasks using the math content (such as generating a PDF file).
Some examples (view the page sources to see the LaTeXMathML and MathML code):
The LaTeXMathML Guide - converted into MathML with the Perl port
MathML Torture Tests - converted into MathML with the Perl port
You are welcome to download a copy of the LaTeXMathML Perl port for your own use. This Perl port is released under the GNU General Public License (version 2 or later). Unfortunately, due to constraints in the Odyssey/Pillars project, we are unable to provide ongoing maintenance for this script at this time. It is provided on an as-is basis only.
Using the LaTeXMathML Perl Port:
The LaTeXMathML Perl port requires a working copy of the XML::LibXML module and, naturally, Perl. Don't forget to assign execute permissions to your copy. It can then be used either from the command line, with a command such as:
# perl ./LaTeXMathML.pl inputfile ./latexmathmlguide.xhtml outputfile ./latexmathmlguide2.xhtml
Or it can be called from another script, with a syntax such as:
&LaTeXMathML("inputfile", "./latexmathmlguide.xhtml", "outputfile", "./latexmathmlguide2.xhtml");
See the script itself for a few more configuration options.
This Perl port was developed by Peter Williams for the University of Pittsburgh's Department of Chemical Engineering, as part of the Odyssey/Pillars project (supported by the National Science Foundation under grant number EEC-0342713).
This page is available online at http://pillars.che.pitt.edu/LaTeXMathML/
Copyright © 2008 University of Pittsburgh