Function Support in KaTeX

Ron Kok edited this page Jan 16, 2017 · 57 revisions
Clone this wiki locally

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

Environments

arraymatrix bmatrix Bmatrix pmatrix vmatrix Vmatrix cases aligned darraydcases

Extraneous functions

\sqrt \text \color\overline \pod \underline \rule\KaTeX

Delimiter sizing functions

\bigl \Bigl \biggl \Biggl \bigr \Bigr \biggr \Biggr \bigm \Bigm \biggm \Biggm \big \Big \bigg \Bigg \left \right \middle

Math operators

\arcsin \arccos \arctan \arg \cos \cosh \cot \coth \csc \deg \dim \exp \hom \ker \lg \ln \log \sec \sin \sinh \tan \tanh \det \gcd \inf \lim \liminf \limsup \max \min \Pr \sup \int \iint \iiint \oint \coprod \bigvee \bigwedge \biguplus \bigcap \bigcup \intop \prod \sum \bigotimes \bigoplus \bigodot \bigsqcup \smallint

Logic operators

\forall \exists \nexists \therefore \because

Fraction functions

/ \over \frac \dfrac \tfrac

Binomial functions

\choose \binom \dbinom \tbinom

Vertical Layout

\atop \stackrel

Overlap functions

\rlap \llap

Sizing functions

\tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge

Style change functions

\displaystyle \textstyle \scriptstyle \scriptscriptstyle \limits \nolimits

Accent functions

\acute \grave \ddot \tilde \bar \breve \check \hat \vec \dot

Escaped characters

\$ \% \# \& \_ \colon

    Also: -- --- ` ' `` '' will render as – — ‘ ’ “ ”

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 \omicron \pi \rho \sigma \tau \upsilon \phi \chi \psi \omega \varepsilon \varkappa \vartheta \varpi \varrho \varsigma \varphi \digamma

Other alphabetic symbols

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

Binary math operations

+ - \amalg \ast \barwedge \bigcirc \bmod \boxdot \boxminus \boxplus \boxtimes \bullet \Cap \cap \cdot \cdotp \centerdot \circ \Cup \cup \curlyvee \curlywedge \div \divideontimes \dotplus \doublebarwedge \doublecap \doublecup \gtrdot \intercal \land \leftthreetimes \ldotp \lor \lessdot \lhd \ltimes \mod \mp \ominus \pm \pmod \rhd \rightthreetimes \rtimes \setminus \sqcap \sqcup \times \unlhd \unrhd \uplus \vee \veebar \wedge \wr

Relations

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

Negated Relations

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

Arrows

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

Font functions

\mathrm \mathit \mathbf \mathsf \mathtt \mathbb \mathcal \mathfrak \mathscr
\textrm \textit \textbf \textsf \texttt \textnormal \Bbb \bold \frak

Spacing functions

~ \! \ \, \: \; \enspace \qquad \quad \space \phantom \kern \mkern

Circled Symbols

\circledast \circledcirc \circleddash \circledS \circledR \odot \oplus \otimes \oslash

Assorted Symbols

' \angle \backprime \bigstar \bigtriangledown \bigtriangleup \blacklozenge \blacksquare \blacktriangle \blacktriangledown \bot \Box \cdots \checkmark \clubsuit \complement \dag \dagger \ddag \ddagger \ddots \degree \diagdown \diagup \diamond \Diamond \diamondsuit \emptyset \Finv \flat \heartsuit \infty \ldots \lnot \lozenge \maltese \mathellipsis \measuredangle \mho \natural \neg \pounds \prime \sharp \spadesuit \sphericalangle \square \star \surd \textellipsis \top \triangle \triangledown \triangleleft \triangleright \varnothing \vdots \yen

Delimiters

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

Class Assignment

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


† Committed to master but not part of the most current release.

‡ Indicates an item whose behavior extends or differs from AMS-LaTeX. Such as:

  • The {array} environment does not yet recognize the \hline command.

  • \color follows MathJax syntax and expects the affected math to be a parameter of the function, as in \color{blue}{math content}. In contrast, LaTeX’s \color is a switch, as in \color{blue} math content.

    For color definition, \color will accept the standard predefined color names. It will also accept an RGB argument in CSS hexadecimal style. Thus, for blue content, one can write \color{#0000FF}{content}. \color does not recognize the \color[RGB]{…} syntax.

  • \gt can be used in place of the HTML reserved character >.

  • \KaTeX renders the KaTeX logo.

  • \lt can be used in place of the HTML reserved character <.

  • Unit of measure: KaTeX accepts em or ex only. This applies to: \rule and the \\[distance] row separator

  • In pages that use auto-render.min.js or Markdown, KaTeX will render only the math content between math delimiters, such as \(…\) or $ …$. This differs from LaTeX or MathJax, which will also render math content between certain environment delimiters, such as \begin{matrix}…\end{matrix}.