Version 5.9.7

Math

since version 5.9.2

Typeset a mathematical formula. The child elements are interpreted as MathML. The MathML root element <math> and the MathML namespace may be given, but both are optional; several child elements are treated as an implicit mrow. Supported are the token elements mi (with mathvariant="normal" for upright single letters), mn, mo, mtext and mspace, the layout elements mrow, mfrac (with linethickness), msqrt, mroot, msup, msub, msubsup, munder, mover, munderover and mstyle (with displaystyle and scriptlevel). Operators get the spacing of their class (binary operators, relations, parentheses, large operators such as sums and integrals), accents are placed with the metrics of the font. The formula takes the color of the paragraph. Not yet supported are stretchy delimiters, mtable and the other values of mathvariant. Experimental, implementation in progress.

Child elements

MathML elements

Parent elements

A, B, Case, Color, Fontface, ForAll, I, Li, Loop, NoBreak, Otherwise, Paragraph, Span, U, URL, Until, While

Attributes

display (yes or no, optional)
If yes, the formula is set in display style (more generous spacing, for example in fractions). If no (default), the formula is set in text style for inline use.
fontfamily (text, optional)
Name of the font family (defined with DefineFontfamily) whose regular font provides the OpenType MATH table. The first Math element must set this attribute; later elements reuse the registered math font. Only one math font per document is supported, a different family on a later element is ignored with a warning.

Example

<Paragraph>
  The Pythagorean theorem:
  <Math fontfamily="mathfont">
    <msup><mi>a</mi><mn>2</mn></msup>
    <mo>+</mo>
    <msup><mi>b</mi><mn>2</mn></msup>
    <mo>=</mo>
    <msup><mi>c</mi><mn>2</mn></msup>
  </Math>
</Paragraph>