Introduction to MathML
From Wiki
The Mathematical Markup Language (MathML) provides the structure of mathematical expressions in the form capable to display and utilize them over the Internet. It was first as a recommendation in 1998 by the W3C Math Working Group which described MathML as: "an XML application for describing mathematical notation and capturing both its structure and content." The objective of MathML is to make possible to utilize the field of mathematics for scientific use over the Internet, similar to the use of HTML and its implementation of text functionalities.
Contents |
Presentation and Content Encoding
MathML provides two styles of encoding: content encoding and presentation encoding.
- Content encoding tries to "catch" the meaning of mathematical expression presented with MathML, being not concerned with the notation.
- Presentation encoding put the emphasis on the notation, so looking at the mathematical expression, the user can understand the meaning. There are some 30 MathML presentation elements that accept about 50 attributes. The elements encode the notation of mathematical expressions. For instance,
msqrtelement forms square roots. Attributes provide additional optional information about the element. For instance,msqrtelement may have the attributelinethickness=2.
Presentation elements control the way how mathematical expressions appear in browsers. Since MathML performs also as a markup language, it is quite easy to obtain the mathematical expression to look correct, without paying attention on the correct mathematical structure behind the presentation in the browser.
For facilitating precisely encoded mathematical expression the content encoding is proposed. For content encoding, there are about 100 elements. Many of these 100 elements belong to the families, such as relation family, and represent mathematical operations and functions, such as plus, sin or vector. As a consequence of the use of content encoding, it is more difficult to directly control how a mathematical expression will be displayed.
Basic MathML Presentation Elements
The most common MathML presentation elements are the token elements mi, mn and mo, which are the only elements that directly contain character data, so each single identifier, operator, and number that appears in the mathematical expression has to be enclosed in the following MathML presentation token elements:
-
<mi> </mi>(math identifier) element indicates that its content, such as variable, function, name or constant, is to be displayed as an identifier. Its attributes include font properties such asfontweight,fontfamilyandfontstyleas well as general properties such ascolor. -
<mn> </mn>(math number) element indicates that its content is to be displayed as numbers. Its attributes are the same as formi -
<mo> </mo>(math operator) element indicates that its content, such as summation, fence or accent, is to be displayed as operators. Additionally, attributes of operators include properties likelspace,rspace,stretchy, andmovablelimitsthat assist in controlling of displaying the operators.
Expression Trees
Layout Boxes
Basic MathML Content Elements
Containers and Operators
Summary of Presentation Elements (MathML 2.0)
Tools which have support for MathML
See also: Combining XHTML and MathML

