ASCIIMathML.js (ver 1.4.7) download page

ASCIIMathML.js is freely available under the GNU General Public License. The current version is 1.4.7 (what's new).

If the instructions on this page seem complicated, don't worry. You only have to do this the first time you want to use ASCIIMathML.js on your own webpages. If you use it on a webpage, please put a link to www.chapman.edu/~jipsen/asciimath.xml on that webpage and send me an email at jipsen@chapman.edu with the URL so that I can add a link on the users page. (Also send me an email if you have problems or would like to provide some feedback.)

Here is the script: ASCIIMathML.js (right-click on the link and choose "Save Link Target As..." if your browser does not display the JavaScript code).

To make your XHTML file work in both Internet Explorer 6+MathPlayer and Mozilla/Netscape 7+, you should also download David Carlisle's pmathml.xsl stylesheet at http://www.w3.org/Math/XSL/pmathml.xsl (right-click on the link and choose "Save Link Target As..."). Or get both files bundled together: The script, a copy of this page, and sample .html and .xml files are zipped (or tar'd) at asciimathml-1.4.7 on SourceForge.net Logo

Just save both files in a local folder on your computer or your webserver.

To write your own XHTML file that uses ASCIIMathML.js, give the file a name that ends with .xml and use the following lines at the top of your file:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://yourdomain/yourpathto/pmathml.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="http://yourdomain/yourpathto/ASCIIMathML.js"></script>
<title>your title</title>
</head>
<body>

Of course you should fill in the "yourdomain/yourpathto" part with the correct information (or delete http://yourdomain/yourpathto/ and put ASCIIMathML.js and pmathml.xsl in the same folder as your XHTML file), and end your file with

</body>
</html>

Since cross-browser MathML only works with XHTML files, remember to write all tags in lowercase, use matching opening and closing tags (like <p></p>), and write empty tags with a trailing slash (like <hr/>).

Well, actually with ASCIIMathML one can now also get cross-browser MathML rendered on HTML pages, see asciimath.html.

That's it!

Here is a sample file that you can save and modify to suit your local needs.

Finally, some information on how to extend ASCIIMathML.js with additional symbols (this method may be preferable to editing the file ASCIIMathML.js).


Peter Jipsen, Chapman University, August 2005 Valid HTML 4.01!