Syntax help for LaTeX Equations

Repository

Overview

This document lists the LaTeX syntax required for adding or editing Mathematical Equations in Rich Text Fields.

Important

You can copy and paste LaTeX syntax from any external source into Rich Text Field.

Examples

Formula LaTeX Syntax
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example1.png x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example2.png F(x) = \int^a_b \frac{1}{3}x^3
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example3.png |x| =
\begin{cases}
x & \text{ if } x\ge 0 \\
-x & \text{ if } x \lt 0
\end{cases}
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example4.png \left( \sum_{k=1}^n a_k b_k \right)^2
\leq
\left( \sum_{k=1}^n a_k^2 \right)
\left( \sum_{k=1}^n b_k^2 \right)
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example5.png A = \pmatrix{
a_{11} & a_{12} & \ldots & a_{1n} \cr
a_{21} & a_{22} & \ldots & a_{2n} \cr
\vdots & \vdots & \ddots & \vdots \cr
a_{m1} & a_{m2} & \ldots & a_{mn} \cr
}
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example6.png \begin{align}
\sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] \\
\sin A \sin B = \frac{1}{2}\left[ \sin(A-B)-\cos(A+B) \right] \\
\cos A \cos B = \frac{1}{2}\left[ \cos(A-B)+\cos(A+B) \right]
\end{align}
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example7.png \frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x)
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example8.png {\frac {d}{dx}}\arctan(\sin({x}^{2}))=-2\,{\frac {\cos({x}^{2})x}
{-2+\left (\cos({x}^{2})\right )^{2}}}
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example9.png \begin{cases}
\lim\limits_{x \to \infty} \exp(-x) = 0\\
k_{n+1} = n^2 + k_n^2 – k_{n-1}\\
a \bmod b,x \equiv a \pmod{b}\\
\frac{n!}{k!(n-k)!} = \binom{n}{k}\\
\end{cases}
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example10.png \frac{
\begin{array}[b]{r}
\left( x_1 x_2 \right)\\
\times \left( x’_1 x’_2 \right)
\end{array}
}{ \left( y_1y_2y_3y_4 \right) }
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example11.png \int\limits_a^bP\left(A=2\middle|\frac{A^2}
{B}>4\right)>\int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example12.png \left\{\frac{x^2}{y^3}\right\}\to
\left.\frac{x^3}{3}\right|_0^1\to
\big( \Big( \bigg( \Bigg(
\frac{\mathrm d}{\mathrm d x} \left( k g(x) \right)
\Bigg) \bigg) \Big) \big)
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example13.png M = \begin{bmatrix}
\frac{5}{6} & \frac{1}{6} & 0 \\[0.3em]
\frac{5}{6} & 0 & \frac{1}{6} \\[0.3em]
0 & \frac{5}{6} & \frac{1}{6}
\end{bmatrix}
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example14.png \left(
\begin{array}{c} n \\ r
\end{array}
\right) = \frac{n!}{r!(n-r)!}
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example15.png \begin{bmatrix} xz & xw \\ yz & yw \end{bmatrix} = \left[
\begin{array}{c} x \\ y \end{array} \right] \times \left[
\begin{array}{cc} z & w \end{array} \right]
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example16.png f(x) = \int_{-\infty}^\infty \hat f(\xi),e^{2 \pi i \xi x} \,d\xi
https://almdemo.polarion.com/polarion/help/topic/com.polarion.xray.doc.user/graphics/graphicLibrary/Help/formulas/formula_example17.png \begin{cases}
B’=-\nabla \times E,\\
E’=\nabla \times B – 4\pi j,\\
F\colon X \rightarrow Y \\
x \mapsto 2x
\end{cases}

Symbols and Usage

Command Output How to Use Note
#
~ a~b non-breaking space
f'(x)
% a + b % comment single-line comment
& \begin{matrix} -1 & 2 \\ 3 & -4\end{matrix} column separation
^ a^b superscript
_ a_b subscript
{ \frac{1}{2}
} \frac{1}{3}
\ a\ b
\! a^2\!/b negative thin space
\#
\$
\%
\&
\, a\,b thin space
\: a\:b medium space
\; a\;b thick space
\> a\>b alternate medium space
\\ line separator
\_
\{
\|
\}

The following commands are listed alphabetically

A

Command Output How to Use
\above a \above 1pt b
\abovewithdelims a \abovewithdelims [ ] 1pt b
\acute \acute a
\aleph
\alpha
\amalg
\And
\angle
\approx
\approxeq
\arccos
\arcsin
\arctan
\arg
\array \array{ a & b \cr c & d }
\Arrowvert
\arrowvert
\ast
\asymp
\atop a \atop b
\atopwithdelims a \atopwithdelims [ ] b

B

Command Output How it’s used
\backepsilon
\backprime
\backsim
\backsimeq
\backslash
\bar \bar{a}
\barwedge
\Bbb \Bbb Q
\Bbbk
\bbox \bbox[10px]{math}
\bcancel \bcancel{X^2}
\because
\begin \begin{matrix} -1 & 3 \\ 2 & -4\end{matrix}
\begingroup
\beta
\beth
\between
\bf
\Big \Big(x\Big)
\big \big(x\big)
\bigcap
\bigcirc
\bigcup
\Bigg \Bigg {\uparrow}a
\bigg \bigg {\uparrow}a
\Biggl
\biggl
\Biggm
\biggm
\Biggr
\biggr
\Bigl \Bigl(x\Bigr)
\bigl \bigl(x\bigr)
\Bigm
\bigm
\bigodot
\bigoplus
\bigotimes
\Bigr \Bigl(x\Bigr)
\bigr \bigl(x\bigr)
\bigsqcup
\bigstar
\bigtriangledown
\bigtriangleup
\biguplus
\bigvee
\bigwedge
\binom \binom a b
\blacklozenge
\blacksquare
\blacktriangle
\blacktriangledown
\blacktriangleleft
\blacktriangleright
\bmod
\boldsymbol \boldsymbol{x}
\bot
\bowtie
\Box
\boxdot
\boxed \boxed{x}
\boxminus
\boxplus
\boxtimes
\brace
\bracevert
\brack
\breve \breve{x}
\buildrel \buildrel \rm {def} \over {=}
\bullet
\Bumpeq
\bumpeq

C

Command Output How it’s used
\cal
\cancel \cancel{=}
\cancelto \cancelto{some}{text}
\cap
\Cap
\cases \cases{ x^2+2y+6=1 \cr x^2-7y+13=-9 }
\cdot
\cdotp
\cdots
\ce \ce{x}
\cee \cee{x}
\centerdot
\cf \cf{x}
\cfrac \cfrac{x}{y}
\check \check{X}
\checkmark
\chi
\choose
\circ
\circeq
\circlearrowleft
\circlearrowright
\circledast
\circledcirc
\circleddash
\circledR
\circledS
\class
\clubsuit
\colon
\color \color{red}{\text{red text}}
\colorbox \require{color}\colorbox{yellow}{$\sigma$}
\complement
\cong
\coprod
\cos
\cosh
\cot
\coth
\cr \cases{ x^2-1=y \cr x^2-7y-3=0 }
\csc
\cssId
\cup
\Cup
\curlyeqprec
\curlyeqsucc
\curlyvee
\curlywedge
\curvearrowleft
\curvearrowright

D

Command Output How it’s used
\dagger
\daleth
\dashleftarrow
\dashrightarrow
\dashv
\dbinom \dbinom{2}{3}
\ddagger
\ddddot \ddddot a
\dddot \dddot a
\ddot \ddot a
\ddots
\DeclareMathOperator \DeclareMathOperator{\dec}{\int} \dec_a^b
\definecolor \require{color} \definecolor{BrightGreen}{rgb}{0.4, 1.0, 0.0} \color{BrightGreen}{text}
\def
\deg
\Delta
\delta
\det
\dfrac
\diagdown
\diagup
\diamond
\Diamond
\diamondsuit
\digamma
\dim
\displaylines \displaylines{ a + b = 0 \cr a = 1 }
\displaystyle
\div
\divideontimes
\dot \dot a
\doteq
\Doteq
\doteqdot
\dotplus
\dots
\dotsb
\dotsc
\dotsi
\dotsm
\dotso
\doublebarwedge
\doublecap
\doublecup
\Downarrow
\downarrow
\downdownarrows
\downharpoonleft
\downharpoonright

E

Command Output How it’s used Note
\ell
\emptyset
\enclose
\end
\endgroup
\enspace
\epsilon
\eqalign
\eqalignno
\eqcirc
\eqref
\eqsim
\eqslantgtr
\eqslantless
\equiv
\eta
\eth
\exists
\exp

F

Command Output How it’s used Note
\fallingdotseq
\fbox
\fcolorbox
\Finv
\flat
\forall
\frac
\frac
\frak
\frown

G

Command Output How it’s used Note
\Game
\Gamma
\gamma
\gcd
\gdef
\ge
\genfrac
\geq
\geqq
\geqslant
\gets
\gg
\ggg
\gggtr
\gimel
\global
\gnapprox
\gneq
\gneqq
\gnsim
\grave
\gt
\gtrapprox
\gtrdot
\gtreqless
\gtreqqless
\gtrless
\gtrsim
\gvertneqq

H

Command Output How it’s used Note
\hat \hat a
\hbar
\hbox
\hdashline
\heartsuit
\hline
\hom
\hookleftarrow
\hookrightarrow
\hphantom
\href
\hskip
\hslash
\hspace
\Huge
\huge
\idotsint

I

Command Output How it’s used Note
\iff
\iiiint
\iiint
\iint
\Im
\imath
\impliedby
\implies
\in
\inf
\infty
\injlim
\int
\intercal
\intop
\iota
\it

J

Command Output How it’s used Note
\jmath
\Join

K

Command Output How it’s used Note
\kappa
\ker
\kern

L

Command Output How it’s used Note
\label
\Lambda
\lambda
\land
\langle
\LARGE
\Large
\large
\LaTeX
\lbrace
\lbrack
\lceil
\ldotp
\ldots
\le
\leadsto
\left
\Leftarrow
\leftarrow
\leftarrowtail
\leftharpoondown
\leftharpoonup
\leftleftarrows
\Leftrightarrow
\leftrightarrow
\leftrightarrows
\leftrightharpoons
\leftrightsquigarrow
\leftroot
\leftthreetimes
\leq
\leqalignno
\leqq
\leqslant
\lessapprox
\lessdot
\lesseqgtr
\lesseqqgtr
\lessgtr
\lesssim
\let
\lfloor
\lg
\lgroup
\lhd
\lim
\liminf
\limits
\limsup
\ll
\llap
\llcorner
\Lleftarrow
\lll
\llless
\lmoustache
\ln
\lnapprox
\lneq
\lneqq
\lnot
\lnsim
\log
\Longleftarrow
\longleftarrow
\Longleftrightarrow
\longleftrightarrow
\longmapsto
\Longrightarrow
\longrightarrow
\looparrowleft
\looparrowright
\lor
\lower
\lozenge
\lrcorner
\Lsh
\lt
\ltimes
\lVert
\lvert
\lvertneqq

M

Command Output How it’s used Note
\maltese
\mapsto
\mathbb
\mathbf
\mathbin
\mathcal
\mathchoice
\mathclose
\mathfrak
\mathinner
\mathit
\mathop
\mathopen
\mathord
\mathpunct
\mathrel
\mathring
\mathrm
\mathscr
\mathsf
\mathstrut
\mathtip
\mathtt
\matrix \matrix{ a & b \cr c & d }
\max
\mbox
\measuredangle
\mho
\mid
\middle
\min
\mit
\mkern
\mmlToken
\mod
\models
\moveleft
\moveright
\mp
\mskip
\mspace
\mu
\multimap

N

Command Output How it’s used Note
\nabla
\natural
\ncong
\ne
\nearrow
\neg
\negmedspace
\negthickspace
\negthinspace
\neq
\newcommand
\newenvironment
\Newextarrow
\newline
\nexists
\ngeq
\ngeqq
\ngeqslant
\ngtr
\ni
\nLeftarrow
\nleftarrow
\nLeftrightarrow
\nleftrightarrow
\nleq
\nleqq
\nleqslant
\nless
\nmid
\nobreakspace
\nolimits
\normalsize
\not
\notag
\notin
\nparallel
\nprec
\npreceq
\nRightarrow
\nrightarrow
\nshortmid
\nshortparallel
\nsim
\nsubseteq
\nsubseteqq
\nsucc
\nsucceq
\nsupseteq
\nsupseteqq
\ntriangleleft
\ntrianglelefteq
\ntriangleright
\ntrianglerighteq
\nu
\nVDash
\nVdash
\nvDash
\nvdash
\nwarrow

O

Command Output How it’s used Note
\odot
\oint
\oldstyle
\Omega
\omega
\omicron
\ominus
\operatorname
\oplus
\oslash
\otimes
\over
\overbrace \overbrace{a+\cdots+a}^{n\text{ times}}
\overleftarrow \overleftarrow {ab}
\overleftrightarrow \overleftrightarrow {ab}
\overline \overline {ab}
\overrightarrow \overrightarrow {ab}
\overset \overset {a} {b}
\overwithdelims
\owns

P

Command Output How it’s used Note
\parallel
\partial
\perp
\phantom
\Phi
\phi
\Pi
\pi
\pitchfork
\pm
\pmatrix \pmatrix{a & b \cr c & d}
\pmb
\pmod
\pod
\Pr
\prec
\precapprox
\preccurlyeq
\preceq
\precnapprox
\precneqq
\precnsim
\precsim
\prime
\prod
\projlim
\propto
\Psi
\psi

Q

Command Output How it’s used Note
\qquad
\quad

R

Command Output How it’s used Note
\raise
\rangle
\rbrace
\rbrack
\rceil
\Re
\ref
\renewcommand
\renewenvironment
\require
\restriction
\rfloor
\rgroup
\rhd
\rho
\right
\Rightarrow
\rightarrow
\rightarrowtail
\rightharpoondown
\rightharpoonup
\rightleftarrows
\rightleftharpoons
\rightleftharpoons
\rightrightarrows
\rightsquigarrow
\rightthreetimes
\risingdotseq
\rlap
\rm
\rmoustache
\root \root a \of b
\Rrightarrow
\Rsh
\rtimes
\Rule
\rVert
\rvert

S

Command Output How it’s used Note
\S ?
\scr
\scriptscriptstyle
\scriptsize
\scriptstyle
\searrow
\sec
\setminus
\sf
\sharp
\shortmid
\shortparallel
\shoveleft
\shoveright
\sideset
\Sigma
\sigma
\sim
\simeq
\sin
\sinh
\skew
\small
\smallfrown
\smallint
\smallsetminus
\smallsmile
\smash
\smile
\Space
\space
\spadesuit
\sphericalangle
\sqcap
\sqcup
\sqrt
\sqsubset
\sqsubseteq
\sqsupset
\sqsupseteq
\square
\stackrel
\star
\strut
\style
\subset
\Subset
\subseteq
\subseteqq
\subsetneq
\subsetneqq
\substack
\succ
\succapprox
\succcurlyeq
\succeq
\succnapprox
\succneqq
\succnsim
\succsim
\sum
\sup
\supset
\Supset
\supseteq
\supseteqq
\supsetneq
\supsetneqq
\surd
\swarrow

T

Command Output How it’s used Note
\tag
\tan
\tanh
\tau
\tbinom
\TeX
\text
\textbf
\textit
\textrm
\textsf
\textstyle
\texttt
\texttip
\tfrac
\therefore
\Theta
\theta
\thickapprox
\thicksim
\thinspace
\tilde \tilde a
\times
\tiny
\Tiny
\to
\toggle
\top
\triangle
\triangledown
\triangleleft
\trianglelefteq
\triangleq
\triangleright
\trianglerighteq
\tt
\twoheadleftarrow
\twoheadrightarrow

U

Command Output How it’s used Note
\ulcorner
\underbrace \underbrace{a+\cdots+a}_{n\text{ times}}
\underleftarrow
\underleftrightarrow
\underline
\underrightarrow
\underset
\unicode
\unlhd
\unrhd
\Uparrow
\uparrow
\Updownarrow
\updownarrow
\upharpoonleft
\upharpoonright
\uplus
\uproot
\Upsilon
\upsilon
\upuparrows
\urcorner

V

Command Output How it’s used Note
\varDelta
\varepsilon
\varGamma
\varinjlim
\varkappa
\varLambda
\varliminf
\varlimsup
\varnothing
\varOmega
\varphi
\varPhi
\varpi
\varPi
\varprojlim
\varpropto
\varPsi
\varrho
\varsigma
\varSigma
\varsubsetneq
\varsubsetneqq
\varsupsetneq
\varsupsetneqq
\vartheta
\varTheta
\vartriangle
\vartriangleleft
\vartriangleright
\varUpsilon
\varXi
\vcenter
\vdash
\Vdash
\vDash
\vdots
\vec
\vee
\veebar
\verb
\Vert
\vert
\vphantom
\Vvdash

W

Command Output How it’s used Note
\wedge
\widehat
\widetilde
\wp
\wr

X

Command Output How it’s used Note
\Xi
\xi
\xcancel
\xleftarrow
\xlongequal
\xmapsto
\xrightarrow
\xtofrom
\xtwoheadleftarrow
\xtwoheadrightarrow

Y

Command Output How it’s used Note
\yen

Z

Command Output How it’s used Note
\zeta

Related Articles

Inserting or Editing Mathematical Equations in a Rich Text Field

Revised: May 11th, 2021