DSQUARED2 DSQUARED2 Bomber Bomber rgOqwr
This is a list of TeX functions supported by KaTeX. It is sorted into logical groups.
There is a similar Support Table, sorted alphabetically, that lists both supported and un-supported functions.
Accents
a' |
\tilde{a} |
\mathring{g} |
a'' |
\widetilde{ac} |
\overgroup{AB} |
a^{\prime} |
\utilde{AB} |
\undergroup{AB} |
\acute{a} |
\vec{F} |
\Overrightarrow{AB} |
\bar{y} |
\overleftarrow{AB} |
\overrightarrow{AB} |
\breve{a} |
\underleftarrow{AB} |
\underrightarrow{AB} |
\check{a} |
\overleftharpoon{ac} |
\overrightharpoon{ac} |
\dot{a} |
\overleftrightarrow{AB} |
\overbrace{AB} |
\ddot{a} |
\underleftrightarrow{AB} |
\underbrace{AB} |
\grave{a} |
\overline{AB} |
\overlinesegment{AB} |
\hat{\theta} |
\underline{AB} |
\underlinesegment{AB} |
\widehat{ac} |
\widecheck{ac} |
Accent functions inside \text{…}
\'{a} |
\~{a} |
\.{a} |
\H{a} |
\`{a} |
\={a} |
\"{a} |
\v{a} |
\^{a} |
\u{a} |
\r{a} |
See also letters
Delimiters
( ) |
\lt \gt |
⌈ ⌉ |
\lceil \rceil |
\uparrow |
[ ] |
\lbrack \rbrack |
⌊ ⌋ |
\lfloor \rfloor |
\downarrow |
\{ \} |
\lbrace \rbrace |
⎰⎱ |
\lmoustache \rmoustache |
\updownarrow |
⟨ ⟩ |
\langle \rangle |
⟮ ⟯ |
\lgroup \rgroup |
\Uparrow |
| |
\vert |
┌ ┐ |
\ulcorner \urcorner |
\Downarrow |
\| |
\Vert |
└ ┘ |
\llcorner \lrcorner |
\Updownarrow |
\lvert \rvert |
\lVert \rVert |
\left. |
\right. |
\backslash |
\lang \rang |
Delimiter Sizing
\left(\LARGE{AB}\right)
( \big( \Big( \bigg( \Bigg(
\left |
\big |
\bigl |
\bigm |
\bigr |
\middle |
\Big |
\Bigl |
\Bigm |
\Bigr |
\right |
\bigg |
\biggl |
\biggm |
\biggr |
\Bigg |
\Biggl |
\Biggm |
\Biggr |
Environments
\begin{matrix} a & b \\ c & d \end{matrix} |
\begin{array}{cc} a & b \\ c & d \end{array} |
||
\begin{pmatrix} a & b \\ c & d \end{pmatrix} |
\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{Bmatrix} a & b \\ c & d \end{Bmatrix} |
\def\arraystretch{1.5} \begin{array}{c:c:c} a & b & c \\ \hline d & e & f \\ \hdashline g & h & i \end{array} |
||
\begin{aligned} a&=b+c \\ d+e&=f \end{aligned} |
\begin{alignedat}{2} 10&x+ &3&y = 2 \\ 3&x+&13&y = 4 \end{alignedat} |
||
\begin{gathered} a=b \\ e=b+c \end{gathered} |
x = \begin{cases} a &\text{if } b \\ c &\text{if } d \end{cases} |
KaTeX also supports darray
and dcases
.
Acceptable line separators include: \\
, \cr
, \\[distance]
, and \cr[distance]
. Distance can be written with any of the KaTeX units.
The {array}
environment supports |
and :
vertical separators.
The {array}
environment does not yet support Bomber Bomber DSQUARED2 DSQUARED2 \cline
or \multicolumn
.
Casual and Max Boutique Dress Cleo winter x6ZSSIqUHTML
\href{https://katex.org/}{\KaTeX} |
|
\url{https://katex.org/} |
Leisure winter Cargo Room Shorts Club grn06gLetters and Unicode
Greek Letters
Direct Input:
\Alpha |
\Beta |
\Gamma |
\Delta |
\Epsilon |
\Zeta |
\Eta |
\Theta |
\Iota |
\Kappa |
\Lambda |
\Mu |
\Nu |
\Xi |
\Omicron |
\Pi |
\Sigma |
\Tau |
\Upsilon |
\Phi |
\Chi |
\Psi |
\Omega |
|
\varGamma |
\varDelta |
\varTheta |
\varLambda |
\varXi |
\varPi |
\varSigma |
\varUpsilon |
\varPhi |
\varPsi |
\varOmega |
|
\alpha |
\beta |
\gamma |
\delta |
\epsilon |
\zeta |
\eta |
\theta |
\iota |
\kappa |
\lambda |
\mu |
\nu |
\xi |
\omicron |
\pi |
\rho |
\sigma |
\tau |
\upsilon |
\phi |
\chi |
\psi |
\omega |
\varepsilon |
\varkappa |
\vartheta |
\thetasym |
\varpi |
\varrho |
\varsigma |
\varphi |
\digamma |
Other Letters
\imath |
\nabla |
\Im |
\Reals |
\text{\OE} |
\jmath |
\partial |
\image |
\wp |
\text{\o} |
\aleph |
\Game |
\Bbbk |
\weierp |
\text{\O} |
\alef |
\Finv |
\N |
\Z |
\text{\ss} |
\alefsym |
\cnums |
\natnums |
\text{\aa} |
\text{\i} |
\beth |
\Complex |
\R |
\text{\AA} |
\text{\j} |
\gimel |
\ell |
\Re |
\text{\ae} |
|
\daleth |
\hbar |
\real |
\text{\AE} |
|
\eth |
\hslash |
\reals |
\text{\oe} |
Direct Input: ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåçèéêëìíîïðñòóôöùúûüýþÿ
Unicode Mathematical Alphanumeric Symbols
Item | Range | Item | Range |
---|---|---|---|
Bold | Double-struck | ||
Italic | Sans serif | ||
Bold Italic | Sans serif bold | ||
Script | Sans serif italic | ||
Fractur | Monospace |
Unicode
The letters listed above will render in any KaTeX rendering mode.
If the KaTeX rendering mode is set to strict: false
or strict:"warn"
(default), then KaTeX will accept all Unicode letters. The letters not listed above will be rendered from system fonts, not KaTeX-supplied fonts, so their typography may clash. They may also cause small vertical alignment issues. KaTeX has detailed metrics for glyphs in Latin, Greek, and Cyrillic, but other glyphs are treated as if they are each as tall as the letter M.
For Persian composite characters, a user-supplied plug-in is under development.
Layout
Annotation
\cancel{5} |
\overbrace{a+b+c}^{\text{note}} |
\bcancel{5} |
\underbrace{a+b+c}_{\text{note}} |
\xcancel{ABC} |
\not = |
\sout{abc} |
\boxed{\pi=\frac c d} |
\tag{hi} x+y^{2x}
\tag*{hi} x+y^{2x}
Line Breaks
KaTeX 0.10.0+ will insert automatic line breaks in inline math after relations or binary operators such as “=” or “+”. These can be suppressed by \nobreak
or by placing math inside a pair of braces, as in {F=ma}
. \allowbreak
will allow automatic line breaks at locations other than relations or operators.
Hard line breaks are \\
and \newline
.
In display math, KaTeX does not insert automatic line breaks. It ignores display math hard line breaks when rendering option strict: true
.
Vertical Layout
x_n |
\stackrel{!}{=} |
a \atop b |
e^x |
\overset{!}{=} |
a\raisebox{0.25em}{b}c |
_u^o |
\underset{!}{=} |
The second argument of \raisebox
can contain math if it is nested within $…$
delimiters, as in \raisebox{0.25em}{$\frac a b$}
Overlap and Spacing
{=}\mathllap{/\,} |
\left(x^{\smash{2}}\right) |
\mathrlap{\,/}{=} |
\sqrt{\smash[b]{y}} |
\sum_{\mathclap{1\le i\le j\le n}} x_{ij}
KaTeX also supports \llap
, \rlap
, and \clap
, but they will take only text, not math, as arguments.
Spacing
Function | Produces | Function | Produces |
---|---|---|---|
\, |
³∕₁₈ em space | \kern{distance} |
space, width = distance |
\thinspace |
³∕₁₈ em space | \mkern{distance} |
space, width = distance |
\: |
⁴∕₁₈ em space | \mskip{distance} |
space, width = distance |
\medspace |
⁴∕₁₈ em space | \hskip{distance} |
space, width = distance |
\; |
⁵∕₁₈ em space | \hspace{distance} |
space, width = distance |
\thickspace |
⁵∕₁₈ em space | \hspace*{distance} |
space, width = distance |
\enspace |
½ em space | \phantom{content} |
space the width and height of content |
\quad |
1 em space | \hphantom{content} |
space the width of content |
\qquad |
2 em space | \vphantom{content} |
a strut the height of content |
~ |
non-breaking space | \! |
– ³∕₁₈ em space |
\ |
space | \negthinspace |
– ³∕₁₈ em space |
\nobreakspace |
non-breaking space | \negmedspace |
– ⁴∕₁₈ em space |
\space |
space | \negthickspace |
– ⁵∕₁₈ em space |
Notes:
distance
will accept any of the KaTeX units.
\kern
, \mkern
, \mskip
, and \hspace
accept unbraced distances, as in: \kern1em
.
\mkern
and \mskip
will not work in text mode and both will write a console warning for any unit except mu
.
Contrast Contrast Contrast bomber jacket jacket edges edges edges bomber bomber RHIrCRqwGap winter Leisure Leisure Trenchcoat Gap winter Gap Trenchcoat winter Trenchcoat Leisure Gap winter Leisure BXdnCwqFxLogic and Set Theory
\forall |
\complement |
\therefore |
\emptyset |
\exists |
\subset |
\because |
\empty |
\exist |
\supset |
\mapsto |
\varnothing |
\nexists |
\mid |
\to |
\implies |
\in |
\land |
\gets |
\impliedby |
\isin |
\lor |
\leftrightarrow |
\iff |
\notin |
\ni |
\notni |
\neg or \lnot |
Direct Input: ℂ ℍ ℕ ℙ ℚ ℝ
Macros
\def\foo{x^2} \foo + \foo |
|
\gdef\bar#1{#1^2} \bar{y} + \bar{y} |
|
\global\def\macroname#1#2…{definition} |
|
\newcommand\macroname[numargs]{definition} |
|
\renewcommand\macroname[numargs]{definition} |
|
\providecommand\macroname[numargs]{definition} |
Macros can also be defined in the KaTeX rendering options.
Macros accept up to nine arguments: #1, #2, etc.
\gdef
and \global\def
macros will persist between math expressions.
Available functions include:
\char
\mathchoice
\TextOrMath
\@ifstar
\@ifnextchar
\@firstoftwo
\@secondoftwo
\relax
@ is a valid character for commands, as if \makeatletter
were in effect.
Operators
Big Operators
\sum |
\prod |
\bigotimes |
\bigvee |
\int |
\coprod |
\bigoplus |
\bigwedge |
\iint |
\intop |
\bigodot |
\bigcap |
\iiint |
\smallint |
\biguplus |
\bigcup |
\oint |
\oiint |
\oiiint |
\bigsqcup |
Direct Input:
Binary Operators
+ |
\cdot |
\gtrdot |
x \pmod a |
- |
\cdotp |
\intercal |
x \pod a |
/ |
\centerdot |
\land |
\rhd |
* |
\circ |
\leftthreetimes |
\rightthreetimes |
\amalg |
\circledast |
\ldotp |
\rtimes |
\And |
\circledcirc |
\lor |
\setminus |
\ast |
\circleddash |
\lessdot |
\smallsetminus |
\barwedge |
\Cup |
Boutique The Dress winter Casual Limited rqxrT5B \lhd |
\sqcap |
\bigcirc |
\cup |
\ltimes |
\sqcup |
\bmod |
\curlyvee |
x\mod a |
\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 or \plusmn |
\wr |
Direct Input:
Boutique leisure Skirt leisure Wool Talbots Boutique rUrqwFZf6Fractions and Binomials
\frac{a}{b} |
\tfrac{a}{b} |
\genfrac ( ] {2pt}{1}a{a+1} |
{a \over b} |
\dfrac{a}{b} |
{a \above{2pt} b+1} |
a/b |
\cfrac{a}{1 + \cfrac{1}{b}} |
\binom{n}{k} |
\dbinom{n}{k} |
{n\brace k} |
{n \choose k} |
\tbinom{n}{k} |
{n\brack k} |
Khakis Ann Boutique leisure LOFT Taylor xBIXUIMath Operators
\arcsin |
\cotg |
\ln |
\det |
\arccos |
\coth |
\log |
\gcd |
\arctan |
\csc |
\sec |
\inf |
\arctg |
\ctg |
\sin |
\lim |
\arcctg |
\cth |
\sinh |
\liminf |
\arg |
\deg |
\sh |
\limsup |
\ch |
\dim |
\tan |
\max |
\cos |
\exp |
\tanh |
\min |
\cosec |
\hom |
\tg |
\Pr |
\cosh |
\ker |
\th |
\sup |
\cot |
\lg |
\operatorname{f} |
Functions on the right column of this table can take \limits
.
\sqrt
\sqrt{x}
\sqrt[3]{x}
Relations
KaTeX Unit | Value | KaTeX Unit | Value |
---|---|---|---|
em | CSS em | bp | 1/72 inch × F × G |
ex | CSS ex | pc | 12 KaTeX pt |
mu | 1/18 CSS em | dd | 1238/1157 KaTeX pt |
pt | 1/72.27 inch × F × G | cc | 14856/1157 KaTeX pt |
mm | 1 mm × F × G | nd | 685/642 KaTeX pt |
cm | 1 cm × F × G | nc | 1370/107 KaTeX pt |
in | 1 inch × F × G | sp | DSQUARED2 Bomber DSQUARED2 Bomber 1/65536 KaTeX pt |
where:
F = (font size of surrounding HTML text)/(10 pt)
G = 1.21 by default, because KaTeX font-size is normally 1.21 × the surrounding font size. This value can be overridden by the CSS of an HTML page.
The effect of style and size:
Unit | textstyle | scriptscript | huge |
---|---|---|---|
em or ex |
|
|
|
mu |
|
|
|
others |
|
|
|