# itex2mml

(Excerpt from "The MathML Handbook" by Pavi Sandhu)

itex2mml is a freely available C program that converts mathematical formulas written in a special dialect of TeX called itex into MathML. The program was written and is maintained by Paul Gartside of the University of Pittsburgh.

itex is like WebTeX, a LaTeX-like syntax for specifying mathematical notation. itex is a superset of WebTeX; any command that you can use in WebTeX is also a valid itex command. The main difference is that itex defines some extra commands that use the natural names for some LaTeX commands. For example, in itex you can use \infinity instead of \infty to describe the ∞ symbol and \Union instead of \bigcup for the symbol.

To create a Web page that contains MathML using itex2mml, you first prepare the HTML document as you normally would and include all mathematical formulas using the itex syntax. You then process this document using the itex2mml program. This program replaces every instance of itex markup in the document into the corresponding MathML equation, leaving all other text in the document unchanged.

To convert an HTML document into an XHTML document that contains MathML, you process the document using a command like the following:

itex2MML < input.xml > output.xml

This reads input from a file called input.xml and writes the output to a file called output.xml. In order to view the document in *Mozilla*, you might need to run TIDY on the document to convert it into a well-formed XHTML document, as discussed under MathML-enabled browsers: Mozilla/Netscape.

Since itex2mml is a C program, you can easily configure it to run on a Web server and to process input submitted to it from a Web page. This type of setup has been implemented under itex2MML. This Web page contains a text area in which you can paste a sample HTML document that contains itex equations. When you click a button, the text you entered is submitted to the server, it’s processed using itex2mml, and the resulting output is returned back to the Web page. You can either see the source of the resulting HTML+MathML file or display the file in the same Web page. This process is demonstrated in the following figure.

*Figure: Submitting the text of an HTML file that contains itex equations for processing using itex2mml.*

<< back | next >> |

**Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003**

Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.

CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America