Math 300: MathML Cheat Sheet (back to Math 300 notes)

Here we summarize some of the most common MathML tags and their uses. This is not a tutorial. It is simply a quick reference for those who already have some experience in typing MathML from scratch, or who need to repair damaged MathML that was generated by an editor. We have included some special characters that are not specifically MathML, but are useful in typing mathematics.

MathML Tag No. of Args. Purpose Example
&infin; 0 Make an infinity symbol <mo>&infin;</mo>
&Integral; 0 Make an integration symbol <mo>&Integral;</mo>
&sum; 0 Make a summation symbol <mo>&sum;</mo>
&alpha; 0 Make a greek alpha (other greek letters are analogous) <mi>&alpha;</mi>
<math> * Start MathML input

<math xmlns="http://www.w3.org/1998/Math/MathML">

...

</math>

<mfenced> 1 Put grouping symbols (parentheses, brackets...) around an object

<mfenced>

<mi>a</mi><mo>+</mo><mi>b</mi>

</mfenced>

<mfrac> 2 Make a fraction expression, e.g. a/b

<mfrac>

<mi>a</mi><mi>b</mi>

</mfrac>

<mi> 1 Set a character in math italic type <mi>a</mi>
<mn> 1 Typeset a number in math mode <mn>3</mn>
<mo> 1 Typeset a mathematical object (symbol) <mo>+</mo>
<mover> 2 Make an object with another above it.

<mover>

<mi>x</mi>

<mo>&Hat;</mo>

</mover>

<mrow> * Group a set of math symbols (e.g. a numerator of a fractional expression)

<mfrac>

<mrow><mo></mo><mi>a</mi></mrow>

<mn>2</mn>

</mfrac>

<msqrt> * Make a square root expression <msqrt>2</msqrt>
<mstyle> * Alter the default style of the math display e.g. whether displayed or in-line.

<mstyle displaystyle="true"> ... </mstyle>

<msub> 2 Make an expression with a subscript, e.g. x1 <msub><mi>x</mi><mn>1</mn></msub>
<msubsup> 3 Make an expression with both a subscript and a superscript; e.g. integral from zero to infinity...

<msubsup>

<mo>&Integral;</mo>

<mn>0</mn>

<mo>&infin;</mo>

</msubsup>

<msup> 2 Make an expression with a superscript; e.g. x2 <msup><mi>x</mi><mn>2</mn></msup>
<mtable> * Make a mathematical table. Useful in custom matrices <mtable><mtr><mtd>...</mtr></mtable>
<mtd> 1 Make a data entry in a math table <mtr><mtd>0</mtd><mtd>1</mtd></mtr>
<mtr> * Make a math table row <mtr><mtd>0</mtd>...</mtr>
<munder> 2 Make a symbol with text beneath it.

<munder>

<mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow>

<mo>&UnderBrace;</mo>

</munder>

<munderover> 3 Make a symbol with text beneath and above it

<munderover>

<mo>&sum;</mo>

<mrow><mi>i</mi><mo>=</mo><mn>0</mn></mrow>

<mo>&infin;</mo>

</munderover>

 

Hints