ASCIIMathML.js demo

## ASCIIMathML.js: Try it yourself (HTML version)

This page requires Internet Explorer 6+MathPlayer or Mozilla/Firefox/Netscape 7+.

Edit the formulas below (the display updates dynamically). If you know (La)TeX formula syntax, you can try some of that as well (LaTeX formulas work best when enclosed in $-signs). The "amath" token switches on the new auto-math-recognize mode.

amath Let's try some interesting formulas: E=m c^2 and e^(i pi)=-1 and AA x in CC (sin^2x+cos^2x=1) and one more: sum_(i=1)^n i^3=((n(n+1))/2)^2 (add your own -- note that text-tokens are only recognized if separated by spaces)

Note that this is dynamic XHTML running locally on your machine!
Right-click on an output formula to copy or view the MathML code.

(Copy and paste the following lines to see what symbols they produce)
You can use the following ASCIIMathML constructs: ``(x+1)/(x-1) x^(i+j) x_(ij) sqrt(x) root(n)(x) stackrel(+)(->) text(any) "any"``
Operation symbols ``+ - * ** // \\ xx -: @ o+ ox sum prod ^^ ^^^ vv vvv nn nnn uu uuu``
Relation symbols ``= != < <= > >= -< >- in !in sub sup sube supe -= ~= ~~ prop``
Logical symbols``\and \or \not => if iff AA EE _|_ TT |-- |==``
Miscellaneous symbols ``int oint del grad +- O/ oo aleph ... cdots \ quad qquad diamond square |__ __| |~ ~| CC NN QQ RR ZZ``
Standard functions ``sin cos tan csc sec cot sinh cosh tanh log ln det dim lim mod gcd lcm``
Grouping brackets``( ) [ ] { } (: :) {: :}`` Arrows``uarr darr rarr -> larr harr rArr lArr hArr``
Accents``hatx barx ulx vecx dotx ddotx`` Font commands``bbA bbbA ccA ttA frA sfA`` Matrices``[[a,b],[c,d]] ((1,0),(0,1))``
Greek letters``alpha beta chi delta Delta epsi eta gamma Gamma iota kappa lambda Lambda mu nu omega Omega phi Phi pi Pi psi rho sigma Sigma tau theta Theta upsilon xi Xi zeta``

This demo page shows that ASCIIMathML.js can be used easily to dynamically preview mathematical formulas (client-side). E.g. here is a (beta) webpage that can be used to write and read mathematical emails and discussion group articles. Since most email communication is still done with ASCII text (or at least not yet with XHTML), this is a reasonable (and inexpensive) solution for communicating with students in online math courses.

Peter Jipsen, Chapman University, September 2007