About LaTeX and MathML support in Pages, Numbers and Keynote
Find out about using LaTeX and MathML with Pages, Numbers and Keynote, and view some sample equations.
Pages, Numbers and Keynote support LaTeX and MathML, and support all LaTeX commands that can be converted to MathML with blahtex. Additional supported LaTeX extensions are listed below.
iBooks Author also supports LaTeX and MathML, but the app is no longer updated or available.
Find out more about transitioning from iBooks Author to Pages
Pages, Numbers and Keynote on iCloud.com don’t support LaTeX and MathML.
LaTeX commands
LaTeX generally requires equations to be enclosed in maths mode commands such as the examples listed below. To make equation authoring easier, the equation editors in Pages, Numbers, Keynote and iBooks Author are in maths mode by default, so it isn’t necessary to add maths mode commands to your equations.
\begin{math} … \end{math}
\begin{displaymath} … \end{displaymath}
\begin{equation} … \end{equation}
$ … $
$$ … $$
\( … \)
\[ … \]
To add text to an equation that inherits the paragraph style, use \text{…}. Nesting equations inside \text{...} is not supported.
In maths mode, blahtex doesn't fully support non-ASCII unicode characters, but it does accept the full unicode character set in text mode. For more information on specific characters, such as the copyright symbol and characters with accent marks, see the blahtex Manual, 2.22.
Supported LaTeX commands (extensions to blahtex) and MathML elements and attributes are listed below.
LaTeX commands that Pages, Numbers and Keynote support
Command or symbol |
---|
\phantom{} |
\color |
\cancel |
\underrightarrow, \underleftarrow, \underleftrightarrow |
\lneq, \gneq, \lvertneq, \gvertneq |
\thinspace, \medspace, \thickspace, \negthinspace, \negmedspace, \negthickspace |
"\:", "\,", "\;", "\!", "\ " |
\lmoustache, \rmoustache |
\lgroup, \rgroup |
\brace, \brack |
\xleftarrow, \xrightarrow |
\dddot, \ddddot |
\copyright |
\pounds |
\diagup, \diagdown |
\dag,\ddag, \dagger, \ddagger |
\owns, \ni |
{split} |
LaTeX commands that Pages, Numbers and Keynote don’t support
Command or symbol | Notes |
---|---|
\mathring{} | |
\ae, \AE | |
\smallint | |
\idotsint | |
\euro | Unicode symbol; works in text mode only |
\varGamma | |
\cal | Use \mathcal{} |
\mathml{} | |
\center | |
[lrc] in \aligned | |
\fillin | |
\strut | |
\vphantom | |
\hphantom | |
\smash | |
\hspace | Use "\:", "\,", "\;", or \phantom{} |
\mspace | |
\centernot | |
\buildrelover | Use \overset, \underset |
\tabular-related environments | Limited support for \matrix and \aligned |
\sideset | |
\pmb, \boldmath, \unboldmath | Use \boldsymbol |
LaTeX commands that iBooks Author supports
Command or symbol |
---|
\phantom{} |
\color |
\cancel |
\underrightarrow, \underleftarrow, \underleftrightarrow |
\lneq, \gneq, \lvertneq, \gvertneq |
\thinspace, \medspace, \thickspace, \negthinspace, \negmedspace, \negthickspace |
"\:", "\,", "\;", "\!", "\ " |
\lmoustache, \rmoustache |
\lgroup, \rgroup |
\brace, \brack |
\xleftarrow, \xrightarrow |
\dddot, \ddddot |
LaTeX commands that iBooks Author doesn't support
Command or symbol | Notes |
---|---|
\mathring{} | |
\copyright | Unicode symbol; works in text mode only |
\pounds | Unicode symbol; works in text mode only |
\ae, \AE | |
\smallint | |
\diagup, \diagdown | |
\idotsint | |
\euro | Unicode symbol; works in text mode only |
\varGamma | |
\cal | Use \mathcal{} |
\mathml{} | |
\center | |
[lrc] in \aligned | |
\fillin | |
\strut | |
\vphantom | |
\hphantom | |
\smash | |
\dag, \ddag | \dagger, \ddagger supported |
{split} | |
\hspace | Use "\:", "\,", "\;", or \phantom{} |
\mspace | |
\centernot | |
\buildrelover | Use \overset, \underset |
\owns | Use \ni |
\tabular-related environments | Limited support for \matrix and \aligned |
\sideset | |
\pmb, \boldmath, \unboldmath | Use \boldsymbol |
LaTeX packages
These LaTeX packages aren't supported:
Package | Notes |
---|---|
cancel | Use \cancel |
ams | Use \underrightarrow, \underleftarrow, \underleftrightarrow |
centernot |
MathML elements
Use the tables below to find out about the MathML elements that Pages, Numbers, Keynote and iBooks Author support.
Supported MathML elements
Element | Notes |
---|---|
mo | |
mi | |
mn | |
mrow | |
menclose | Not all forms of enclosing are supported |
mtable | Not all attributes are supported |
mtr | |
mtd | |
mfrac | |
msup | |
msub | |
msubsup | |
munder | |
mover | |
munderover | |
mstack | |
msrow | |
msgroup | |
mscarries | |
mscarry | |
msline | |
mlongdiv | |
mpadded | |
mspace | |
maction | Pages, Numbers, Keynote and iBooks Author support the first MathML child and ignore the rest |
mphantom | |
mfenced | |
mroot | |
msqrt | |
none | |
mstyle | |
mtext | |
ms | |
maligngroup | |
malignmark |
Partially supported MathML elements
Element | Notes |
---|---|
mlabeledtr | Treated as |
semantics | Treated as row |
annotation | Effectively ignored |
Not supported MathML elements
Element | Notes |
---|---|
mmultiscripts | |
mprescripts | |
mglyph | |
merror | |
{ContExp} | Content MathML elements are not supported. |
MathML attributes
Use the tables below to find out about the MathML attributes that Pages, Numbers, Keynote and iBooks Author support.
Supported MathML attributes
These MathML attributes are supported by Pages, Numbers, Keynote and iBooks Author:
Element | Attribute | Default value inheritable from | Values (Value syntax if subset of spec) |
---|---|---|---|
* | mathcolor | yes | |
mstyle | scriptlevel | no | |
mstyle | display | no | |
mstyle | scriptminsize | no | |
mstyle | scriptsizemultiplier | no | |
mstyle | n/a | ||
mo | lspace | yes | |
mo | rspace | yes | |
mo | largeop | yes | |
mo | minsize | yes | |
mo | maxsize | yes | |
mo | accent | yes | |
mo | movablelimits | yes | |
mo | symmetric | yes | |
mo | stretchy | yes | |
mo | form | yes | |
mspace | width | yes | |
mspace | height | yes | |
mspace | depth | yes | |
ms | lqoute | yes | |
ms | rqoute | yes | |
mfrac | linethickness | yes | |
mfrac | numalign | yes | |
mfrac | denomalign | yes | |
mover | accent | yes | |
mover | align | yes | |
munderover | accent | yes | |
munderover | underaccent | yes | |
munder | accentunder | yes | |
munder | align | yes | |
mtable | rowalign | yes | |
mtable | columnalign | yes | |
mtable | columnspacing | yes | |
mtable | displaystyle | yes | |
mtr | rowalign | yes | |
mtr | columnalign | yes | |
mtd | rowalign | yes | |
mtd | columnalign | yes | |
mstack | align | yes | top | bottom | center | baseline | axis |
msrow | position | yes | |
msgroup | position | yes | |
msgroup | shift | yes | |
mscarries | position | yes | |
mscarries | crossout | yes | updiagonalstrike | downdiagonalstrike | horizontalstrike | verticalstrike |
mscarry | crossout | yes | updiagonalstrike | downdiagonalstrike | horizontalstrike | verticalstrike |
msline | length | yes | |
msline | position | yes | |
mpadded | height | no | |
mpadded | depth | no | |
mpadded | width | no | |
mpadded | lspace | no | |
mpadded | voffset | no | |
mfenced | open | yes | |
mfenced | close | yes | |
mfenced | separators | yes | |
maligngroup | groupalign | yes | |
malignmark | edge | yes |
Partially supported MathML attributes
These MathML attributes are partially supported by Pages, Numbers, Keynote and iBooks Author:
Element | Attribute | Default value inheritable from | Values(Value syntax if subset of spec) | Notes |
---|---|---|---|---|
mo, mn, mi | mathvariant | yes | Not supporting initial, stretched, looped, tailed | |
mtable | align | no | top | bottom | center | baseline | axis | rownumber not supported |
menclose | notation | yes | updiagonalstrike | downdiagonalstrike | horizontalstrike | verticalstrike | Learn more |
mlongdiv | longdivstyle | no | lefttop |
Not supported MathML attributes
Element | Attribute | Notes |
---|---|---|
* | mathbackground | |
mstyle | infixlinebreakstyle | |
mstyle | veryverythinmathspace, verythinmathspace, thinmathspace, mediummathspace, thickmathspace, verythickmathspace, veryverythickmathspace | Deprecated in MathML 3. |
mi, mn, mo, ms, mstyle, mtext | mathsize | |
mi, mn, mo, ms, mstyle, mtext | dir | |
mi, mn, mo, ms, mstyle, mtext | fontfamily, fontweight, fontstyle, fontsize, color, background | Deprecated in MathML 3. |
mo | linebreak | |
mo | lineleading | |
mo | linebreakstyle | |
mo | linebreakmultchar | |
mo | identalign | |
mo | identshift | |
mo | identtarget | |
mo | identalignfirst | |
mo | identshiftfirst | |
mo | identalignlast | |
mo | identshiftlast | |
mo | fence | Doesn't affect visual layout |
mo | separator | Doesn't affect visual layout |
mspace | linebreak | |
mfrac | bevelled | |
mtable | groupalign | |
mtable | alignmentscope | |
mtable | columnwidth | |
mtable | width | |
mtable | rowspacing | |
mtable | rowlines | |
mtable | columnlines | |
mtable | frame | |
mtable | framespacing | |
mtable | equalrows | |
mtable | equalcolumns | |
mtable | side | |
mtable | minlabelspacing | |
mtr | groupalign | |
mtd | rowspan | |
mtd | columnspan | |
mtd | groupalign | |
mstack | stackalign | |
mstack | charalign | |
mstack | charspacing | |
mlongdiv | position | |
mlongdiv | shift | |
mscarries | location | |
mscarries | scriptsizemultiplier | |
mscarry | location | |
msline | leftoverhang | |
msline | rightoverhang | |
msline | mslinethickness | |
msub | subscriptshift | |
msup | superscriptshift | |
msubsup | superscriptshift | |
msubsup | subscriptshift | |
mrow | ltr | |
maction | selection | |
maction | actiontype |
Sample equations
Basic maths
LaTeX | Renders as |
---|---|
| |
| |
| |
| |
|
Alignment
LaTeX | Renders as |
---|---|
| |
A nice trick for aligning equation elements is to use \mbox{\phantom{space}}. The contents inside the brackets (space) will account for the amount of white space created. In the example above, adding extra characters to =digit gives more white space in between the 10 • 9. | |
|
Colour
LaTeX | Renders as |
---|---|
| |
|
Integrals
LaTeX | Renders as |
---|---|
| |
|
\textstyle differentiates between inline and display equations.
Matrices
LaTeX | Renders as |
---|---|
| |
| |
| |
|
Common equation elements
LaTeX | Renders as |
---|---|
| |
| |
| |
|
Long form arithmetic
MathML | Renders as |
---|---|
| |
| |
|
Pages, Numbers, Keynote and iBooks Author don’t support LaTeX for long division and remainders. To work with long division and remainders, you must use MathML.
Learn more
Add mathematical equations in Pages:
Add mathematical equations in Numbers:
Add mathematical equations in Keynote:
Information about products not manufactured by Apple, or independent websites not controlled or tested by Apple, is provided without recommendation or endorsement. Apple assumes no responsibility with regard to the selection, performance or use of third-party websites or products. Apple makes no representations regarding third-party website accuracy or reliability. Contact the vendor for additional information.