Function Support in \(\KaTeX\)

This is a list of TeX functions supported by KaTeX. It is sorted into logical groups.

Accents

\(a'\) a' \(\bar{y}\) \bar{y} \(\ddot{a}\) \ddot{a} \(\vec{F}\) \vec{F}
\(a''\) a'' \(\breve{a}\) \breve{a} \(\grave{a}\) \grave{a} \(\overline{AB}\) \overline{AB}
\(a^{\prime}\) a^{\prime} \(\check{a}\) \check{a} \(\hat{\theta}\) \hat{\theta} \(\underline{AB}\) \underline{AB}
\(\acute{a}\) \acute{a} \(\dot{a}\) \dot{a} \(\tilde{a}\) \tilde{a}

Delimiters

\((\,)\) ( ) \(\lgroup\:\rgroup\) \lgroup
\rgroup
\(\lceil\:\rceil\) \lceil
\rceil
\(\uparrow\) \uparrow
\([\:]\) [ ] \(\lbrack\:\rbrack\) \lbrack
\rbrack
\(\lfloor\:\rfloor\) \lfloor
\rfloor
\(\downarrow\) \downarrow
\(\{\,\}\) \{ \} \(\lbrace\:\rbrace\) \lbrace
\rbrace
\(\ulcorner \urcorner\) \ulcorner
\urcorner
\(\updownarrow\) \updownarrow
\(\langle\:\rangle\) \langle
\rangle
\(\lt\:\gt\) \lt
\gt
\(\llcorner \lrcorner\) \llcorner
\lrcorner
\(\Uparrow\) \Uparrow
\(|\) | \(\vert\) \vert \(\backslash\) \backslash \(\Downarrow\) \Downarrow
\(\|\) \| \(\Vert\) \Vert \(\lmoustache\:\rmoustache\) \lmoustache
\rmoustache
\(\Updownarrow\) \Updownarrow
\(\lvert\;\rvert\) \lvert
\rvert
\(\lVert\;\rVert\) \lVert
\rVert
\left. \right.

Delimiter Sizing

\(\left(\LARGE{AB}\right)\) \left( \LARGE{AB} \right) \left \big \bigl \bigr
\middle \Big \Bigl \Bigr
\(( \big( \Big( \bigg( \Bigg(\) ( \big( \Big( \bigg( \Bigg( \right \bigg \biggl \biggr
\Bigg \Biggl \Biggr

Environments

\(\begin{matrix} a & b \\ c & d \end{matrix}\)
\begin{matrix}
   a & b \\
   c & d
\end{matrix}
\(\begin{array}{c|c} a & b \\ c & d \end{array}\)
\begin{array}{c|c}
   a & b \\
   c & d
\end{array}
\(\begin{pmatrix} a & b \\ c & d \end{pmatrix}\)
\begin{pmatrix}
   a & b \\
   c & d
\end{pmatrix}
\(\begin{bmatrix} a & b \\ c & d \end{bmatrix}\)
\begin{bmatrix}
   a & b \\
   c & d
\end{bmatrix}
\(\begin{vmatrix} a & b \\ c & d \end{vmatrix}\)
\begin{vmatrix}
   a & b \\
   c & d
\end{vmatrix}
\(\begin{Vmatrix} a & b \\ c & d \end{Vmatrix}\)
\begin{Vmatrix}
   a & b \\
   c & d
\end{Vmatrix}
\(\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}\)
\begin{Bmatrix}
   a & b \\
   c & d
\end{Bmatrix}
\(x = \begin{cases} a &\text{if } b \\ c &\text{if } d \end{cases}\)
x = \begin{cases}
   a &\text{if } b  \\
   c &\text{if } d
\end{cases}
\(\begin{aligned} a&=b+c \\ d+e&=f \end{aligned}\)
\begin{aligned}
   a&=b+c \\
   d+e&=f
\end{aligned}

Acceptable line separators include: \\, \cr, and \\[distance]. Distance can be written with units of em, ex, or mu.

The {array} environment does not yet support \hline.

{darray} and {dcases} are committed to master but are not part of the latest release.

Greek Letters

Γ \Gamma Δ \Delta Θ \Theta Λ \Lambda
Ξ \Xi Π \Pi Σ \Sigma Υ \Upsilon
Φ \Phi Ψ \Psi Ω \Omega
α \alpha β \beta γ \gamma δ \delta
ϵ \epsilon ζ \zeta η \eta θ \theta
ι \iota κ \kappa λ \lambda μ \mu
ν \nu ξ \xi o \omicron π \pi
ρ \rho σ \sigma τ \tau υ \upsilon
ϕ \phi χ \chi ψ \psi ω \omega
ε \varepsilon ϰ \varkappa ϑ \vartheta ϖ \varpi
ϱ \varrho ς \varsigma φ \varphi ϝ \digamma

Other Letters

\(\imath\) \imath \(\jmath\) \jmath \aleph \beth \gimel
\daleth ð \eth \Finv \Game \ell
\hbar \hslash \Im \Re \wp
\partial \nabla

\text{…} will accept characters from Latin-1, Cyrillic, or CJK (Hiragana, Katakana, CJK ideograms, and Hangul).

Overlap

\({=}\llap{/\,}\)    {=}\llap{/\,}
\(\rlap{\,/}{=}\)    \rlap{\,/}{=}

Spacing

Function Produces
\! – ³∕₁₈ em space
\, ³∕₁₈ em space
\: ⁴∕₁₈ em space
\; ⁵∕₁₈ em space
\enspace ½ em space
\quad 1 em space
\qquad 2 em space
~ non-breaking space
\space non-breaking space
\space non-breaking space
\phantom{content} space the width and height of content
\kern{distance} space, width = distance
Accepts em, ex, or mu units.

Vertical Layout

\(x_n\) x_n \(\stackrel{!}{=}\) \stackrel{!}{=} \( a \atop b \) a \atop b
\(e^x\) e^x \overset{!}{=}
\(_u^o\) _u^o \underset{!}{=}

Also see environments.

\overset and \underset are committed to master but are not yet included in the latest release.

Logic and Set Theory

\forall \complement \therefore ¬ \neg or \lnot
\exists \subset \because \emptyset or \varnothing
\nexists \supset \mapsto
\in \mid \to \implies†
\notin \land \gets \impliedby†
\ni \lor \leftrightarrow \iff†

See also relations and binary operators.

\iff, \implies, and \impliedby have a pending pull request but are not yet included in the latest release.

Big Operators

\(\sum\) \sum \(\prod\) \prod \(\bigvee\) \bigvee \(\bigotimes\) \bigotimes
\(\int\) \int \(\coprod\) \coprod \(\bigwedge\) \bigwedge \(\bigoplus\) \bigoplus
\(\iint\) \iint \(\intop\) \intop \(\bigcap\) \bigcap \(\bigodot\) \bigodot
\(\iiint\) \iiint \(\smallint\) \smallint \(\bigcup\) \bigcup \(\biguplus\) \biguplus
\(\oint\) \oint \(\) \(\bigsqcup\) \bigsqcup \(\)

Binary Operators

+ + \cdotp \intercal \(x \pod a\) x \pod a
- \(\centerdot\) \centerdot \land \rhd
/ / \circ \leftthreetimes \rightthreetimes
* \circledast . \ldotp \rtimes
⨿ \amalg \circledcirc \lor \setminus
\ast \circleddash \lessdot \(\smallsetminus\) \smallsetminus
\barwedge \Cup \lhd \sqcap
\bigcirc \cup \ltimes \sqcup
mod \bmod \curlyvee mod \mod × \times
\boxdot \curlywedge \mp \unlhd
\boxminus ÷ \div \odot \unrhd
\boxplus \divideontimes \ominus \uplus
\boxtimes \dotplus \oplus \vee
\bullet \doublebarwedge \otimes \veebar
\Cap \doublecap \oslash \wedge
\cap \doublecup ± \pm \wr
\cdot \gtrdot \(x \pmod a\) x \pmod a

Binomial Coefficients

\(\binom{n}{k}\) \binom{n}{k} \(\dbinom{n}{k}\) \dbinom{n}{k} \(\left\langle n \atop k \right\rangle\) \left\langle
n \atop k
\right\rangle
\({n}\choose{k}\) {n}\choose{k} \(\tbinom{n}{k}\) \tbinom{n}{k}

Fractions

\(\frac{a}{b}\) \frac{a}{b} \(\dfrac{a}{b}\) \dfrac{a}{b} \({a}/{b}\) {a}/{b}
\({a}\over{b}\) {a}\over{b} \(\tfrac{a}{b}\) \tfrac{a}{b}

Math Operators

arcsin \arcsin cotg \cotg† ln \ln det \det
arccos \arccos coth \coth† log \log gcd \gcd
arctan \arctan csc \csc sec \sec inf \inf
arctg \arctg† ctg \ctg† sin \sin lim \lim
arcctg \arcctg† cth \cth† sinh \sinh liminf \liminf
arg \arg deg \deg sh \sh† limsup \limsup
ch \ch† dim \dim tan \tan max \max
cos \cos exp \exp tanh \tanh min \min
cosec \cosec hom \hom tg \tg† Pr \Pr
cosh \cosh ker \ker th \th† sup \sup
cot \cot lg \lg

Functions on the right side of this table can take \limits.
† committed to master but not in the most recent release.

Sqrt

\(\sqrt{x}\)  \sqrt{x}
\(\sqrt[3]{x}\)  \sqrt[3]{x}

Relations

= = \fallingdotseq \lll \sqsupseteq
< < \frown \llless \Subset
> > \ge < \lt \subset
: : \geq \mid \subseteq
\approx \geqq \models \subseteqq
\approxeq \geqslant \multimap \succ
\asymp \gg \owns \succapprox
\backepsilon \ggg \parallel \succcurlyeq
\backsim \gggtr \perp \succeq
\backsimeq > \gt \pitchfork \succsim
\between \gtrapprox \prec \Supset
\bowtie \gtreqless \precapprox \supset
\bumpeq \gtreqqless \preccurlyeq \supseteq
\Bumpeq \gtrless \preceq \supseteqq
\circeq \gtrsim \precsim \thickapprox
\cong \in \propto \thicksim
\curlyeqprec \Join \risingdotseq \trianglelefteq
\curlyeqsucc \le \shortmid \triangleq
\dashv \leq \shortparallel \trianglerighteq
\doteq \leqq \sim \varpropto
\Doteq \leqslant \simeq \vartriangle
\doteqdot \lessapprox \(\smallfrown\) \smallfrown \vartriangleleft
\eqcirc \lesseqgtr \(\smallsmile\) \smallsmile \vartriangleright
\eqsim \lesseqqgtr \smile \vdash
\eqslantgtr \lessgtr \sqsubset \vDash
\eqslantless \lesssim \sqsubseteq \Vdash
\equiv \ll \sqsupset \Vvdash

Negated Relations

\gnapprox \ngeqslant \nsubseteq \precneqq
\gneq \ngtr \nsubseteqq \precnsim
\gneqq \ni \nsucc \subsetneq
\gnsim \nleq \nsucceq \subsetneqq
\gvertneqq \nleqq \nsupseteq \succnapprox
\lnapprox \nleqslant \nsupseteqq \succneqq
\lneq \nless \ntriangleleft \succnsim
\lneqq \nmid \ntrianglelefteq \supsetneq
\lnsim \notin \ntriangleright \supsetneqq
\lvertneqq \nparallel \ntrianglerighteq \varsubsetneq
\ncong \nprec \nvdash \varsubsetneqq
\ne \npreceq \nvDash \varsupsetneq
\neq \nshortmid \nVDash \varsupsetneqq
\ngeq \nshortparallel \nVdash
\ngeqq \nsim \precnapprox

Arrows

\circlearrowleft \Leftarrow \looparrowright \rightrightarrows
\circlearrowright \leftarrowtail \Lsh \rightsquigarrow
\curvearrowleft \leftharpoondown \mapsto \Rrightarrow
\curvearrowright \leftharpoonup \nearrow \Rsh
\dashleftarrow \leftleftarrows \nleftarrow \searrow
\dashrightarrow \leftrightarrow \nLeftarrow \swarrow
\downarrow \Leftrightarrow \nleftrightarrow \to
\Downarrow \leftrightarrows \nLeftrightarrow \twoheadleftarrow
\downdownarrows \leftrightharpoons \nrightarrow \twoheadrightarrow
\downharpoonleft \leftrightsquigarrow \nRightarrow \uparrow
\downharpoonright \Lleftarrow \nwarrow \Uparrow
\gets \longleftarrow \restriction \updownarrow
\hookleftarrow \Longleftarrow \rightarrow \Updownarrow
\hookrightarrow \longleftrightarrow \Rightarrow \upharpoonleft
\iff \Longleftrightarrow \rightarrowtail \upharpoonright
\impliedby \longmapsto \rightharpoondown \upuparrows
\implies \longrightarrow \rightharpoonup
\leadsto \Longrightarrow \rightleftarrows
\leftarrow \looparrowleft \rightleftharpoons

Class Assignment

\mathbin \mathclose \mathinner \mathop
\mathopen \mathord \mathpunct \mathrel

Color

\(\color{blue}{F=ma}\) \color{blue}{F=ma}
\(\color{#228B22}{F=ma}\) \color{#228B22}{F=ma}

\color follows MathJax syntax and expects the affected math to be a parameter of the function, as in \color{blue}{math content}.

For color definition, \color will accept the standard HTML predefined color names. It will also accept an RGB argument in CSS hexadecimal style.

Font

\(\mathrm{AB}\) \mathrm{AB} \(\mathbf{AB}\) \mathbf{AB} \(\mathit{AB}\) \mathit{AB} \(\mathsf{AB}\) \mathsf{AB} \(\mathtt{AB}\) \mathtt{AB}
\(\textrm{AB}\) \textrm{AB} \(\textbf{AB}\) \textbf{AB} \(\textit{AB}\) \textit{AB} \(\textsf{AB}\) \textsf{AB} \(\texttt{AB}\) \texttt{AB}
\rm{AB} \bf{AB} \it{AB} \sf{AB} \tt{AB}
\(\textnormal{AB}\) \textnormal{AB} \(\bold{AB}\) \bold{AB} \(\Bbb{AB}\) \Bbb{AB} \(\frak{AB}\) \frak{AB}
\(\text{AB}\) \text{AB} \(\mathcal{AB}\) \mathcal{AB} \(\mathbb{AB}\) \mathbb{AB} \(\mathfrak{AB}\) \mathfrak{AB} \(\mathscr{AB}\) \mathscr{AB}

\rm, \bf, \it, \sf, and \tt are committed to master but are not yet part of the latest release.

Size

\(\Huge AB\) \Huge AB \(\normalsize AB\) \normalsize AB
\(\huge AB\) \huge AB \(\small AB\) \small AB
\(\LARGE AB\) \LARGE AB \(\footnotesize AB\) \footnotesize AB
\(\Large AB\) \Large AB \(\scriptsize AB\) \scriptsize AB
\(\large AB\) \large AB \(\tiny AB\) \tiny AB

Style

\(\displaystyle\sum_{i=1}^n\) \displaystyle\sum_{i=1}^n
\(\textstyle\sum_{i=1}^n\) \textstyle\sum_{i=1}^n
\(\scriptstyle x\) \scriptstyle x The size of a first sub/superscript
\(\scriptscriptstyle x\) \scriptscriptstyle x The size of subsequent sub/superscripts
\(\lim\limits_x\) \lim\limits_x
\(\lim\nolimits_x\) \lim\nolimits_x
\(\text{x}\) \text{x} \text{…} will accept characters from Latin-1, Cyrillic, or CJK (Hiragana, Katakana, CJK ideograms, and Hangul).

Symbols and Punctuation

% \% \Box \cdots \checkmark
# \# \square \ddots \dag
& \& \blacksquare \ldots \dagger
_ \_ \triangle \vdots \ddag
-- \triangledown \mathellipsis \ddagger
--- \triangleleft \textellipsis $ \$
` \triangleright \star £ \pounds
‘‘ `` \bigtriangledown \bigstar ¥ \yen
" " \bigtriangleup \flat \surd
: \colon \blacktriangle \natural ° \degree
\backprime \blacktriangledown \sharp \diagdown
\prime \blacktriangleleft ® \circledR \diagup
\angle \blacktriangleright \circledS \mho
\measuredangle \diamond \clubsuit \maltese
\sphericalangle \Diamond \diamondsuit \nabla
\top \lozenge \heartsuit \infty
\bot \blacklozenge \spadesuit
\(\KaTeX\) \KaTeX