Programming in Mathematical Notation

The Program

The conversion program is written in Python (I'm using 2.4).

This tar file contains the following files: Warning: It's only guaranteed to work on the examples given so far.

To use the program, run file.xml (or python input_file.xml). It will output the text form on stdout, and produce the files file.xhtml and file.cpp.

Using XML for input

The input file as XML can be quite verbose, and be unwieldy to handle, as seen in the input file for the integration example. One solution is to use a simpler notation, probably similar to the text output.

The cycle of edit, translate, refresh the browser to see the results is acceptable for some, but ultimately it would be good to have an editor that allowed direct entry and rendering of the symbols.

Previous page: Example using random sampling to approximate an integral.

Written by Mark Dewing on July 20, 2005. Last updated on September 21, 2005.