In my MathML 3.0 post, I noted that several things were postponed for future consideration. The present post lists math document properties and equation numbers. Other members of the MathML Working Group can undoubtedly add to the list.

Default Document Math Properties

A number of math display properties have document defaults. They are the ones used if explicit attributes do not appear. The properties generally pertain to “displayed” math zones, that is, math zones that begin either at the start of the document or at a hard/shift Enter (CR/VT) and end at the following hard/shift Enter. The options determine math indents and things such as whether integral limits are positioned below and above the integral or as subscript and superscript. In Russia, for example, it is common to see integral limits below and above the integral, while in the United States integral limits are displayed as subscript and superscript. MathML does not formalize document defaults for math, but MathML math zones can inherit them depending on the implementation. Therefore, such defaults are compatible with MathML and currently need to be expressed in some way outside of MathML.

The feeling of the MathML 3.0 working group is that these concepts belong to the document container in which the MathML <math> elements reside. However, presumably the MathML specification should list math document properties along with recommendations for default values, since they’re important and no other W3C group offers such information. An example of a current problem is that one browser currently left aligns equations by default, whereas the common convention is to center equations. An earlier blog post gives a detailed discussion of math document properties.

A possible syntax would be to express default math properties as new attributes in a leading, empty MathML <math> element. In principle, this could work today, since MathML allows undefined attributes to be added with the caveat to ignore them if you do not know what they mean. The following table gives math document properties with default values for the United States listed first and possible attributes for use with the MathML <math> element. The values listed are the same as for the OMML <mathPr> element.

 

Parameter

Values

Attribute

Math font

Cambria Math, STIX

mathFont

Equation alignment (justification)

Center as a group, left, right, center

defJc

Display n-ary limit placement

Over/under, subscript/superscript

naryLim

Display integral limit placement

Subscript/superscript, over/under

intLim

Break on operator

Before, after, duplicate

brkBin

Break on - duplicate

--, -+, +-

brkBinSub

Reduce nested-fraction size

Current text size, up 1 script level

smallFrac

Use math display spacings

True (false: use para spacings)

dispDef

Display left margin indent

0

lMargin

Display right margin indent

0

rMargin

Display left margin wrapped indent

1"

wrapIndent

Right align wrapped display equations

false

wrapRight

Space before set of equations

0

preSp

Space after set of equations

0

postSp

Intraequation spacing between  lines in an equation

0

intraSp

Spacing between equations

0

interSp

Style for  differential d and related characters (U+2145..U+2149)

Math italic, upright, open slant

ddStyle

What to display for invisible times (U+2063) if line break occurs at invisible times

× (U+00D7)

visiTimes

Equation number alignment (justification)

right, left

eqnoJc

 

Equation Numbering

The current number one feature request for Microsoft Office math is native equation numbering. Clearly, equation numbering is a very important part of technical documents and should be part of a math specification like MathML. Hang ups in implementing equation numbers seem to be that people want all the generality of section numbering and want a user interface consistent with other numbering features. Such wants are not trivial to implement.

One approach that handles the vast majority of cases would be to use a <math> element with an “eqno” attribute. The content of the <math> element could include a <semantics> tag that has both what a basic Presentation MathML renderer would display along with an <annotation> element containing what the parent application would display. Attributes could be included to specify that section/chapter numbers should appear as prefixes, etc. CSS could also be useful in such specifications.

By default the equation number would be right aligned relative to the display <math> element that precedes it. Additional attributes could specify other alignments, such as left-aligned and/or vertically centered relative to a consecutive set of equations (display <math> elements).  A reference to an equation number could be inline empty <math> element with the same eqno attribute.

This approach to equation numbering is similar to the one described in an earlier post. There an equation (display <math> element) contains a simple unused construct (noop phantom) instead of an eqno attribute, since OMML is not as friendly toward undefined attributes as MathML is.