(Excerpt from "The MathML Handbook" by Pavi Sandhu)

The mn element is used to represent numbers, or more precisely numeric literals. A numeric literal is any sequence of characters that represents an unsigned integer or real number. Here are some examples:


Negative numbers can be represented by including a "-" sign before the numeric literal in the same <mn> element, as shown below:


However, it is preferable to place the minus sign in a separate mo element so that you provide additional information about the meaning of the markup for use by processing applications, as shown here:


A mn element is rendered as the characters in its content with no extra spacing around them. By default, the content is rendered in an unslanted font. However, you can specify a different rendering using the style attributes available for token elements.

Not all numbers should be represented using mn. For example, fractions are represented using the mfrac element, as shown here:

Presentation markup: equation 1


A named symbolic constant, such as Pi, is represented by an entity reference enclosed in an mi element, as shown below:


Complex numbers are represented as an mrow element, which contains separate arguments for the real part, the imaginary part, and the operator between them, as shown here (note the use of the entity reference &InvisibleTimes; to denote multiplication between the imaginary part and the symbolic number i):

3.4 + 5i



<< back next >>




Tipp der data2type-Redaktion:
Zum Thema MathML bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an:


Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.

CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America