Virtual University Design and Technology, ANGEL Tips & Techniques
Previous Page
Next Page

ASCIIMathML

ASCIIMathML.js is a "script which allows incorporating mathematical formulas on webpages with a minimum of fuss (just add one line to a webpage to load the script)".

The Setup:

The script is already on the MSU ANGEL LMS, you just have to include it in your page text.

<script type="text/javascript" src="/msu_jscript/ASCIIMathML.js"></script>

I don't recommend using the ANGEL equation editor that is built into the HTML editor. It uses tables and standard HTML code that can render inconsistently in various browsers. ASCIIMathML uses creates W3C recommended MathML code for you and is, in my opinion, easier and better.

Then type your formula...you can edit the formulas below and see the results immediately to the right.

Type This: See This:

Note: remember to enclose your equations in the tick marks shown in the examples above. This character can be found on your keyboard above the tab button. Forgetting them will have unexpected results!

System Requirements:

Display of ASCIIMathML elements requires a few special fonts to be installed:

Further Reading:

Other Tools and Uses:

Give Your Equations Some Style (Firefox only):

The default color is red. You can change the color and other attributes using CSS. Here are some styles that make equations green and bigger. Just paste it into the top of the pages that you use ASCIIMathML in.

<style>
mstyle {
    font-size:1.2em;
    color: #006634;
}
</style>

To Use ASCIIMathML Outside of ANGEL:

  1. Download the ASCIIMathML.js file and place it on the server where your website is located.
  2. Call the script in your pages:
    --Use the script above as a template, but manipulate the file path to reflect the file's location on your server
Previous Page
Next Page

Last updated: January 17, 2008
This website is maintained by vuDAT
Copyright © 2008 Michigan State University Board of Trustees
MSU is an affirmative-action, equal-opportunity employer. East Lansing, MI 48824 USA
Michigan State University