Typesetting Math

Mathematics presents a number of special challenges for typesetting.

We can typeset a few simple things simply in HTML using the <sub> and <sup> tags: e.g.
f(x) = f(x0) + f'(x0)(x-x0) + (f''(x0)/2)(x-x0)2 + ...
= ∑n=0 (1/n!)f(n)(x0)(x-x0)n.                 
However, we cannot even make a fraction in HTML, let alone a matrix equation. It is possible to use CSS to fix up some things for math typesetting, but it is quite awkward, and not ready for prime time.

In the 1990s, the W3C put forth a standard for Math Markup Language (MathML) with the idea of supporting mathematical typesetting using the Extensible Markup Language (XML) standard. When HTML5 was formulated, it included MathML as part of the standard. Using MathML, the above equations could appear as follows: fx = fx0 + fx0 + f x0 2 x-x0 2 = n=0 fn x0 n! x-x0 n We can see that this looks better... in Firefox. No other browsers implemented the standard - they just ignored it. Moreover, if you look at the code, it will be clear that it would only be reasonable to create using some specialized editor. For these and other reasons, MathML is largely an interesting historical artifact now.

In the second decade of the 21st century, we use MathJax to typeset math on-line. MathJax is a Javascript suite together with a collection of fonts that allow various markup languages to be presented. MathJax is an example of a polyfill. MathJax can interpret MathML, but it can also translate LaTeX, which is easy to create. Thus, the only remaining reason to use MathML is for the structure it provides.