<mml:math>

Math (MathML 2.0 Tag Set)

Use documentation for the Mathematical Markup Language (MathML) 2.0 Tag Set. (http://www.w3.org/TR/MathML2/)

Remarks

The top-level element for math tagged according to the MathML Tag Set.

With one exception, the various elements and attributes of MathML used inside <mml:math> are not documented here, and the reader should refer to online documentation from the W3C and Design Science. The one exception is the <mml_annotation-xml> element. The content model for the <mml_annotation-xml> is normally “ ANY ”, but this causes difficulties in many editing tools, so this Tag Set has reduced the content model to one or more paragraphs: (p+).

The vast majority of users of this Tag Set use the DTDs as their primary (or only) model, so this Tag Set is maintained to ensure that users of DTDs and DTD-based tools will work well. Because DTDs do not “play well” with namespaces, and most DTD-based tools are not namespace aware, the MathML namespace has been hardcoded to the prefix “ mml ” in the DTDs. This means that the element name, in the DTDs, really is <mml:math>. While this was the usual prefix when this Tag Set was originally established, the more frequently seen prefix is now “ m ”. Since XSD and RNG use “real” namespaces, this makes no difference to them, as to a namespace-aware processor a namespace prefix is only a placeholder. For DTD users, the element names in the MathML will need to be “ mml ” (for example, <mml:mfrac>), but tools can be set to provide that prefix and the essence of namespaces is that prefixes do not matter, so no harm is done.

Attributes

altimg Alternate Image (MathML 2.0 Tag Set)
alttext Alternate Text (MathML 2.0 Tag Set)
baseline Baseline (MathML 2.0 Tag Set)
class Class (MathML 2.0 Tag Set)
display Display (MathML 2.0 Tag Set)
height Height (MathML 2.0 Tag Set)
id Identifier
macros Macros (MathML 2.0 Tag Set)
mode Mode (MathML 2.0 Tag Set)
name Name
other Other (MathML 2.0 Tag Set)
overflow Overflow (MathML 2.0 Tag Set)
style Style (XHTML table model; MathML 2.0 Tag Set)
type Type
width Width (XHTML table model; MathML 2.0 Tag Set)
xlink:href Href (Linking Mechanism)
xlink:type Type of Link
xmlns:mml MathML Namespace Declaration
xref Cross-Reference (MathML 2.0 Tag Set)
xsi:schemaLocation Schema Location (MathML 2.0 Tag Set)

Model Description

Use MathML 2.0 documentation.

This element may be contained in:

<ack>, <alternatives>, <app>, <app-group>, <article-title>, <attrib>, <bio>, <body>, <bold>, <boxed-text>, <chem-struct>, <comment>, <compl>, <def-head>, <disp-formula>, <disp-quote>, <full>, <glossary>, <inline-formula>, <intro>, <italic>, <license-p>, <main>, <meta-value>, <monospace>, <named-content>, <non-normative-example>, <non-normative-note>, <notes>, <overline>, <p>, <ref-list>, <roman>, <sans-serif>, <sc>, <sec>, <strike>, <styled-content>, <sub>, <subtitle>, <sup>, <td>, <term>, <term-display>, <term-head>, <term-sec>, <textual-form>, <th>, <title>, <trans-title>, <underline>

Example

In the following example, the <alternatives> element is used to wrap a mathematical expression encoded in MathML with a graphic image of the same expression for use in environments where MathML is not supported.

...
    <p>The following discussion makes use of
      some properties of the three-by-three identity matrix:</p>
    <disp-formula>
    <alternatives>
    <mml:math>
      <mml:mrow>
	<mml:mo> ( </mml:mo>
	<mml:mtable>
	  <mml:mtr>
	    <mml:mtd> <mml:mn>1</mml:mn> </mml:mtd>
	    <mml:mtd> <mml:mn>0</mml:mn> </mml:mtd>
	    <mml:mtd> <mml:mn>0</mml:mn> </mml:mtd>
	  </mml:mtr>
	  <mml:mtr>
	    <mml:mtd> <mml:mn>0</mml:mn> </mml:mtd>
	    <mml:mtd> <mml:mn>1</mml:mn> </mml:mtd>
	    <mml:mtd> <mml:mn>0</mml:mn> </mml:mtd>
	  </mml:mtr>
	  <mml:mtr>
	    <mml:mtd> <mml:mn>0</mml:mn> </mml:mtd>
	    <mml:mtd> <mml:mn>0</mml:mn> </mml:mtd>
	    <mml:mtd> <mml:mn>1</mml:mn> </mml:mtd>
	  </mml:mtr>
	</mml:mtable>
	<mml:mo> ) </mml:mo>
      </mml:mrow>
    </mml:math>
      <graphic xlink:href="images/identity-matrix">
	<alt-text>A three-by-three identity matrix.</alt-text>
	<permissions>
	  <copyright-statement>&copy; 1998-2003 W3C &reg; (MIT, ERCIM,
	  Keio); used by permission</copyright-statement>
	  <copyright-year>1998-2003</copyright-year>
	  <copyright-holder>W3C &reg; (MIT, ERCIM,
	  Keio)</copyright-holder>
	</permissions>
      </graphic>
    </alternatives>
    </disp-formula>
    <p>
      Analogous observations hold for identity matrices of different sizes.
    </p>
   ...

The graphic rendering of the mathematical expression is:

(MathML example and graphic from Mathematical Markup Language (MathML) Version 2.0 (Second Edition), W3C Recommendation 21 October 2003, ed. David Carlisle et al., © 1998-2003 W3C® (MIT, ERCIM, Keio), all rights reserved. Used by permission.)

Module

mathml2.dtd