The W3C announced October 21, 2010 that the MathML 3.0 specification is a W3C Recommendation. This post describes some of the features added to MathML in version 3.0. The specification also includes numerous clarifications that are helpful for people wanting to implement MathML 3.0. The specification’s introductory section “Status of this Document” concludes with a summary of the features.
Improved Unicode Alignment
In February 2001 when the “first edition” of MathML 2.0 became a W3C Recommendation, Unicode/ISO 10646 was still officially missing many math symbols. Unicode 3.1 (May, 2001) added the Unicode math alphanumerics (U+1D400.U+1D7FF) and the differential-d set (U+2145..U+2149). Unicode 3.2 (March, 2002) added the lion’s share of remaining math symbols in the STIX set, including the arrows and math operators in the range U+2900..U+2AFF. The “second and current edition” of MathML 2.0 was released in October 2003 partly to re-align with Unicode and to include math character blocks instead of private use area code points. The operator dictionary did not include Unicode code points.
MathML 3.0 is fully aligned with Unicode 6.0+. In addition to the discussions of the Unicode math character sets in Chapter 15 of The Unicode Standard, Unicode Technical Report #25, and Unicode Technical Note #28, MathML 3.0 adds a thoroughly revamped math operator dictionary featuring Unicode and giving basic operator properties. Complementing this is the new W3C Recommendation XML Entity Definitions for Characters, which incorporates all standard entities used for mathematics. In particular, Section 3 of this document features Unicode blocks of characters that you can mouse over to see relevant math properties. Each character is displayed twice, once with a STIX font and once with a png.
The earlier posts Tailoring the Unicode Bidi Algorithm and Directionality in Math Zones discuss right-to-left (RtL) math and give useful references for further study, notably Arabic mathematical notation. MathML 3.0 includes full support for RtL math zones, including a directionality attribute, dir, which can appear on most elements. If the dir attribute does not appear, the directionality of the <math> element and children is inherited from the current Bidi embedding. Adil Allawi of Diwan Software Limited notes (in a private communication) that the right-to-left features of MathML 3.0 make “it possible, for the first time, to build standards-based and truly interoperable electronic maths books for students in the Arab countries.”
People write long division and multiplication in various ways around the world. Particularly for educational purposes, it is desirable to have an interchangeable format to represent such conventions on the web and in other electronic media. Accordingly, MathML 3.0 defines elements to handle many such conventions. The facility allows special alignments as well as borrow/carry annotations.
MathML is supported by various accessibility tools and has been incorporated into the DAISY Standard. Adding MathML 3.0’s elementary math capabilities widens the range for accessible math.
CSS for math
In a companion specification, a subset of MathML 3.0 is described that can be rendered with CSS. This allows browsers that do not have sophisticated math layout engines to display many mathematical formulas.
MathML 3.0 includes a very rich set of attributes. Office 2010 implements a subset that handles the most common scenarios, including options to display duplicated operator as ++, +-, –, but it is not nearly as general. For example, MathML 3.0 allows breaking at an arbitrary character position with a wealth of possible indents/alignments for the wrapped line(s).
You can put an href (hyperlink) attribute on most any element in MathML 3.0. This makes it easy, for example, to provide links on a fraction numerator or denominator. Such links can aid the teaching of mathematics as well as to define the meanings of expressions.
The <mpadded> element has been generalized and clarified. This can be useful for tweaking the positioning of arguments for printing. Caveat emptor: since math layout engines often differ in their spacing choices, tweaking for one engine may spoil the spacing for another engine. The elements <mglyph> and <maction> are also motivated and described more thoroughly.
A substantial effort has gone into improving Content MathML, notably in allowing a rigorous correspondence to OpenMath with its content dictionaries. This work is valuable for symbolic and numerical computations.
One reason Microsoft Office went with its own “Office MathML”, that is, OMML, was to be able to combine a math XML with parent namespaces, such as WordProcessingML. MathML 3.0 has generalized the <semantics> element and clarified various scenarios to make such mixing of namespaces more convenient.
What’s not yet done
A number of things were postponed for future consideration. Document math defaults have not been specified. These include the default math font, equation alignment(s), space before/after, breaking conventions, n-ary/integral limit placements, all of which are specified in the OMML <mathPr> element. The power of the OMML math paragraph is also missing, although to some degree it can be emulated by the <mtable> element. Equation numbering is not represented, nor is it in OMML. The feeling of the MathML working group is that these concepts belong to the document container in which the MathML <math> elements reside. However, I think that some discussion should be given to lend a degree of interoperability to these concepts, which are clearly very important for the electronic representation of mathematical text. An example of the problem is that one browser currently left aligns equations by default, whereas the common convention is to center equations.
What becomes of WG?
When the MathML 2.0 Working Group finished the MathML 2.0 specification, the group dissolved. It took some time to put it back together for MathML 3.0. Therefore, the plan for the future is to keep the group active with no specific agenda other than to maintain the spec, answer questions, and dream about the future. Something as complex and important as MathML needs a live pool of expertise.
See also Neil Soiffer’s blog about MathML 3.0.