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.

See which elements are covered by {ContExp}.

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

0.15 \cdot \frac{1}{8}

No alt supplied for Image

-22 \div 11

No alt supplied for Image

2x + 3y \ge -21

No alt supplied for Image

3(b-5) < -6(b+5)

No alt supplied for Image

\left \{ 6 \tfrac{4}{5}, \, \sqrt{49}, \, 6.\overline{3}, \, 7\sqrt{5} \right \}

No alt supplied for Image

Alignment

LaTeX

Renders as

\begin{aligned} 9 && < && 15 && < && 16 \\ \sqrt{9} && < && \sqrt{15} && < && \sqrt16 \\ 3 && < && \sqrt{15} && < && 4 \end{aligned}

No alt supplied for Image

\begin{aligned} \text{first number} & & \text{second number} \\ 10 \mbox{\phantom{=digit}} & \cdot & 9 \mbox{\phantom{=digit}} \end{aligned}

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.

No alt supplied for Image

\begin{aligned} N &= 0.555\ldots \\ {\color{red}10}N &= {\color{red} 10}(0.555\ldots) \\ 10N &= 5.555\ldots \end{aligned}

No alt supplied for Image

Color

LaTeX

Renders As

\begin{aligned} N &= 0.555\ldots \\ {\color{red}10}N &= {\color{red} 10}(0.555\ldots) \\ 10N &= 5.555\ldots \end{aligned}

No alt supplied for Image

\sum_{\color{0A7C10}n=0}^{\color{red}\infty} a_n x^n

No alt supplied for Image

Integrals

LaTeX

Renders As

\textstyle \int_{-N}^{N} e^x\, dx

No alt supplied for Image

\int_{-N}^{N} e^x\, dx

No alt supplied for Image

\textstyle differentiates between inline and display equations.

Matrices

LaTeX

Renders As

\begin{matrix} a & b \\ c & d \\ \end{matrix}

No alt supplied for Image

\begin{matrix} c(1)^{n-1} & \dots & c(1)^2 & c(1) & 1 \\ c(2)^{n-1} & \dots & c(2)^2 & c(2) & 1 \\ \vdots & \ddots & \vdots & \vdots & \vdots \\ c(n)^{n-1} & \dots & 1 & 0 & 0 \end{matrix}

No alt supplied for Image

|x| = \begin{cases} \phantom{-} x& \text{if } x \geq 0 \\ -x & \text{if } x<0 \end{cases}

No alt supplied for Image

R_\theta = \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \phantom{-} \cos \theta \end{bmatrix}

No alt supplied for Image

Common equation elements

LaTeX

Renders as

\(\Delta S^\circ=\sum S^{\circ }\text{products} - \sum S^{\circ }\text{reactants}\)

No alt supplied for Image

HF(aq) +H_{2}O(l) \rightleftharpoons H_{3}O^{+} (aq) +F_{-}(aq)

No alt supplied for Image

\nabla \times \overrightarrow{\mathbf{B}} - \frac{1}{C} \frac{\delta \overrightarrow{\mathbf{E}}}{\delta t} = 4\pi \rho

No alt supplied for Image

x = \frac{- b\pm\sqrt{b^2-4a c}}{2a}

No alt supplied for Image

Long form arithmetic

MathML

Renders as

2 1 2,327 - 1,156 1,171

No alt supplied for Image

12 16.5 198 12 78 72 6.0 6.0 0

No alt supplied for Image

1 1 2 435 × 25 1 2175 870 10875

No alt supplied for Image

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

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.

Published Date: