LaTeXCommands
LaTeXCommands
If you know the shape of a symbol use Detexify to find the name of the
corresponding LaTeX command
To enter a LaTeX command press the ESC key or \ to enter LaTeX editing
mode Press ESC to exit LaTeX editing mode You can examine the LaTeX code for
an expression by selecting it then pressing ESC
Math Mode
When in Math Mode the content is laid out using typesetting rules specific to
math For example variables are displayed in italics an appropriate amount of
space is inserted around some letters such as f to improve their legibility and
white spaces are ignored
In Math Mode the layout and size of some math elements is adjusted based on
the context in which they are used For example superscripts and subscripts are
displayed in a smaller font
Math Style
\displaystyle \displaystyle For equations in their own
\sum_{i=0}^n \frac{a_i} paragraph
{1+x}
n
∑
ai
i=0
1+x
Text Mode
To include some textual comments use the \text{} command to switch to Text
Mode
The \text{} command will use the font defined by the font-family attribute of
the enclosing mathfield The size of the text will adjust depending on the current
math style smaller in superscript/subscript
The \textrm{} command works like \text{} but will use a serif roman font
The \mbox{} command uses the same font as \text but its size does not
account for the current math style
The \textnormal{} command works like \text{} But its longer to type
When in Text Mode use $##...$ to switch back to Math Mode Text Style inline
math or \\[##...\\] to switch to Math Mode Display Style
\frac{}{} \dfrac{}{}
\tfrac{}{}
The \dfrac command typesets its numerator and denominator in Display Style
The \tfrac command uses Text Style inline math
[ [
]1x + 1 \cfrac[l]{1}{x+1} ]1x + 1 \cfrac[r]{1}{x+1}
l r
∂
\pdiff{}{}
∂
( ) \binom{}{} ( ) \dbinom{}{}
( ) \tbinom{}{}
The following commands are supported but their usage is generally discouraged when creating
modern LaTeX content
a a
a \over b a \atop b
b b
( ) { }
n
n \choose k
k
\overwithdelims\lbrace\rbrace
{ }
\atopwithdelims\lbrace\rbrace
Binary Operators
Some binary operators can also be used as a unary operator + - etc… Their
spacing is adjusted accordingly For example in −1 − 2 there is less space
between - and 1 than there is between - and 2
+ + − -
± \pm ∓ \mp
∗ * ⋅ \cdot
× \times a/b a / b
3
/4 \nicefrac{3}{4} macro ÷ \div
∣ \divides √ \sqrt{}
√ \sqrt[]{} √ \surd{}
⋉ \ltimes ⋊ \rtimes
⋋ \leftthreetimes ⋌ \rightthreetimes
⊺ \intercal ∔ \dotplus
⩞ \doublebarwedge ⋇ \divideontimes
⊟ \boxminus ⊞ \boxplus
⊠ \boxtimes ⊡ \boxdot
⊖ \ominus ⊕ \oplus
⊗ \otimes ⊙ \odot
∘ \circ ⋅ \centerdot
∙ \bullet ⊝ \circleddash
⊛ \circledast ⊚ \circledcirc
⊘ \oslash
∗ \ast ⋆ \star
Functions
plim \plim
Trigonometry
tg \tg th \th
Bounds
Projections
Modulo
n (mod 3)
n \pmod{3}
n mod 3
n \mod{3}
n mod 3
n \bmod 3
Custom Functions
Use \operatorname{} to define a custom function it will be display in upright font
and will have the appropriate spacing
\operatorname{argth}(\theta)
argth(θ)
Unicode
Command
\unicode{} The argument is a Unicode codepoint expressed as a
number To use a hexadecimal number start the argument
with x or " and use uppercase A F for hexadecimal
digits
⨗ \unicode{10775}
⨗ \unicode{"2A17}
⨗ \unicode{x2A17}
⨗ \char"2A17
J ^^4a
⨗ ^^^^2a17
Large Operators
Large operators display their limits above and below or adjacent to the operator
depending on the math style Display Style or Text Style and on the operator
∞ ∞ ∞
∫
∫ 0 ∫
0 0
In Display Style the \intop and \ointop commands display their limits above
and below by default while the \int command display its limit adjacent
∞ ∞
∑ \sum ∏ \prod
n=0 n=0
∞ ∞
∐ \coprod ∫ \int
0
n=0
∞ ∞
∬ \iint Double integral
∫ \intop 0
0
∞
∭ \iiint Tripe integral ∮ \oint Contour integral
0 C
⋂ \bigcap ⋁ \bigvee
⋀ \bigwedge ⨄ \biguplus
⨂ \bigotimes ⨁ \bigoplus
⨀ \bigodot ⨆ \bigsqcup
∱ \intclockwise ∲ \varointclockwise
∳ \ointctrclockwise ⨑ \intctrclockwise
⋒ \Cap ⋓ \Cup
⋒ \doublecap ⋓ \doublecup
⊔ \sqcup ⊓ \sqcap
⊎ \uplus ≀ \wr
⨿ \amalg
Logic
Quantifiers
∀ \forall ∃ \exists
∄ \nexists
Unary/Binary Operators
∧ \land ∧ \wedge
∨ \lor ∨ \vee
⊼ \barwedge ⊻ \veebar
⊻ \nor ⋏ \curlywedge
⋎ \curlyvee ¬ \lnot
¬ \neg
Relational Operators
→ \to ← \gets
⟹ \implies ⟸ \impliedby
⟷ \biconditional ∴ \therefore
∵ \because ↔ \leftrightarrow
⇔ \Leftrightarrow ⥰ \roundimplies
⊨ \models ⊢ \vdash
⊣ \dashv
Arrows
→ \rightarrow ← \leftarrow
↠ \twoheadrightarrow ↞
\twoheadleftarrow
↣ \rightarrowtail ↢
\leftarrowtail
⇢ \dashrightarrow ⇠
\dashleftarrow
\longrightarrow
\longleftarrow \longleftrightarrow
⇒ \Rightarrow ⇐ \Leftarrow
⟹ \Longrightarrow ⟸ ⟺
\Longleftarrow \Longleftrightarrow
⇀ \rightharpoonup ↼
\leftharpoonup
⇁ \rightharpoondown ↽
\leftharpoondown
⇌ \rightleftharpoons ⇋
\leftrightharpoons
↘ \searrow ↗ \nearrow
↙ \swarrow ↖ \nwarrow
⇛ \Rrightarrow ⇚ \Lleftarrow
⇆ \leftrightarrows ⇄
\rightleftarrows
↷ \curvearrowright ↶
\curvearrowleft
↪ \hookrightarrow ↩
\hookleftarrow
↬ \looparrowright ↫
\looparrowleft
↻ \circlearrowright ↺
\circlearrowleft
⇉ \rightrightarrows ⇇
\leftleftarrows
⇈ \upuparrows ⇊
\downdownarrows
↱ \Rsh ↰ \Lsh
↾ \upharpoonright ↿
\upharpoonleft
⇂ \downharpoonright ⇃
\downharpoonleft
↾ \restriction
⇝ \rightsquigarrow ↭
\leftrightsquigarrow
⇝ \leadsto
Negated Arrows
↛ \nrightarrow ↚ \nleftarrow ↮
\nleftrightarrow
⇏ \nRightarrow ⇍ \nLeftarrow ⇎
\nLeftrightarrow
Extensible Arrows
The width of the arrow commands above is fixed The width of the commands
below is determined by the length of the content above and below the arrows
which is specified as an argument and optional argument
above
\xlongequal[]{}
below
above above
\xrightarrow[]{} \xleftarrow[]{}
below below
above
\xleftrightarrow[]{}
below
above above
\xtwoheadrightarrow[]{} \xtwoheadleftarrow[]{}
below below
above above
\xRightarrow[]{} \xLeftarrow[]{}
below below
above above
\xrightharpoonup[]{} \xleftharpoonup[]{}
below below
above above
\xrightharpoondown[]{} \xleftharpoondown[]{}
below below
above above
\xrightleftharpoons[]{} \xLeftrightarrow[]{}
below below
above
\xleftrightharpoons[]{}
below
above above
\xhookrightarrow[]{} \xhookleftarrow[]{}
below below
above
\xmapsto[]{}
below
above
\xtofrom[]{}
below
Accents
Regular accents have a fixed width and do not stretch For example compare
⃗
ABC
\vec{ABC}
and
ABC
\overrightarrow{ABC}
The following commands are supported for compatibility with existing content but their use is
generally discouraged when creating new LaTeX content if there is an equivalent Unicode
character available
For example use é rather than \'{e}
ˊ \acute{} ˋ \grave{}
˙ \dot{} ¨ \ddot{}
˚ ~
\mathring{} \tilde{}
ˉ \bar{} ˘ \breve{}
ˇ \check{} ^ \hat{}
⃗ \vec{} ê \^{e}
è `{e} é \'{e}
ä \"{a} ā \={a}
ç \c{c} ñ \~{n}
Extensible Accents
Relational Operators
To display a vertical stack of two symbols as a relational operator use the
\stackrel command
?
a= b
a\stackrel{?}{=}b
= = < <
≤ \leq ≥ \ge
≥ \geq ∥ \shortparallel
⩽ \leqslant ⩾ \geqslant
≳ \gtrsim ≊ \approxeq
≈ \thickapprox ⪅ \lessapprox
⪆ \gtrapprox ⪷ \precapprox
⪸ \succapprox ∼ \thicksim
≿ \succsim ≾ \precsim
∽ \backsim ≂ \eqsim
⋍ \backsimeq ≲ \lesssim
⌣ \smallsmile ⌢ \smallfrown
≦ \leqq ⪕ \eqslantless
⋘ \lll ≶ \lessgtr
⋚ \lesseqgtr ⪋ \lesseqqgtr
≓ \risingdotseq ≒ \fallingdotseq
≼ \preccurlyeq ⋞ \curlyeqprec
⊨ \vDash ⊪ \Vvdash
≏ \bumpeq ≎ \Bumpeq
≧ \geqq ⪖ \eqslantgtr
⋙ \ggg ≷ \gtrless
⋛ \gtreqless ⪌ \gtreqqless
≽ \succcurlyeq ⋟ \curlyeqsucc
⊩ \Vdash ∣ \shortmid
≬ \between ⋔ \pitchfork
∝ \varpropto ⋘ \llless
⋙ \gggtr ≑ \doteqdot
≑ \Doteq ≖ \eqcirc
≗ \circeq ⊲ \lhd
⊳ \rhd ⋖ \lessdot
⋗ \gtrdot ≪ \ll
≫ \gg :− \coloneq
≝ \measeq ≞ \eqdef
≟ \questeq ≅ \cong
≡ \equiv ≺ \prec
⪯ \preceq ≻ \succ
⪰ \succeq ⊥ \perp
∝ \propto ⌣ \smile
⌢ \frown ∼ \sim
≐ \doteq ⋈ \bowtie
⋈ \Join ≍ \asymp
≈ \approx ∥ \parallel
≃ \simeq : \ratio
∷ \coloncolon :− \colonequals
∷− \coloncolonequals ∹ \equalscolon
−∷ \equalscoloncolon :− \colonminus
∷− \coloncolonminus −: \minuscolon
−∷ \minuscoloncolon ∷≈ \coloncolonapprox
∷∼ \coloncolonsim ∼: \simcolon
∼∷ \simcoloncolon ≈∷ \approxcoloncolon
: \vcentcolon ∷ \dblcolon
≔ \coloneqq ∷= \Coloneqq
:− \coloneq ∷− \Coloneq
≕ \eqqcolon =∷ \Eqqcolon
∹ \eqcolon −∷ \Eqcolon
:≈ \colonapprox ∷≈ \Colonapprox
:∼ \colonsim ∷∼ \Colonsim
= \ne
= \neq
= \not= \not{}
≮ \nless ≰ \nleq
⪇ \lneq ≨ \lneqq
\nleqq \nleqslant
≱ \ngeq \lvertneqq
⋦ \lnsim ⪉ \lnapprox
⊀ \nprec ⋠ \npreceq
⋨ \precnsim ⪹ \precnapprox
≁ \nsim \nshortmid
∤ \nmid ⊬ \nvdash
⊭ \nvDash ≯ \ngtr
\ngeqslant \ngeqq
⪈ \gneq ≩ \gneqq
\gvertneqq ⋧ \gnsim
⪊ \gnapprox ⊁ \nsucc
⋡ \nsucceq ⋩ \succnsim
⪺ \succnapprox ≆ \ncong
\nshortparallel ∦ \nparallel
⊯ \nVDash ⊮ \nVdash
⪵ \precneqq ⪶ \succneqq
⊴ \unlhd ⊵ \unrhd
Sets
∅ \emptyset ∅ \varnothing
N \N R \R
Q \Q C \C
Z \Z P \P
N \doubleStruckCapitalN R \doubleStruckCapitalR
macro macro
Q \doubleStruckCapitalQ Z \doubleStruckCapitalZ
macro macro
P \doubleStruckCapitalP
macro
Set Operators
∩ \cap ∪ \cup
∖ \setminus ∖ \smallsetminus
∁ \complement
\varsupsetneq ⫌ \supsetneqq
\varsupsetneqq \nsubseteqq
⫅ \subseteqq ⋐ \Subset
⊏ \sqsubset ⫆ \supseteqq
⋑ \Supset ⊐ \sqsupset
⊑ \sqsubseteq ⊒ \sqsupseteq
∈ \in ∉ \notin
∋ \ni ∋ \owns
∍ \backepsilon ⊂ \subset
⊃ \supset ⊆ \subseteq
⊇ \supseteq ⊊ \subsetneq
\varsubsetneq ⫋ \subsetneqq
\varsubsetneqq ⊄ \nsubset
⊅ \nsupset ⊈ \nsubseteq
⊉ \nsupseteq
Greek
α \alpha β \beta
γ \gamma δ \delta
ϵ \epsilon ε \varepsilon
ζ \zeta η \eta
θ \theta ϑ \vartheta
ι \iota κ \kappa
ϰ \varkappa λ \lambda
μ \mu ν \nu
ξ \xi o \omicron
π \pi ϖ \varpi
ρ \rho ϱ \varrho
σ \sigma ς \varsigma
τ \tau ϕ \phi
φ \varphi υ \upsilon
χ \chi ψ \psi
ω \omega ϝ \digamma
A \Alpha B \Beta
Γ \Gamma Γ \varGamma
Δ \Delta Δ \varDelta
E \Epsilon Z \Zeta
H \Eta Θ \Theta
Θ \varTheta I \Iota
K \Kappa Λ \Lambda
Λ \varLambda M \Mu
N \Nu Ξ \Xi
Ξ \varXi O \Omicron
Π \Pi Π \varPi
P \rho Σ \Sigma
Σ \varSigma T \Tau
Φ \Phi Φ \varPhi
Υ \Upsilon Υ \varUpsilon
X \Chi Ψ \Psi
Ψ \varPsi Ω \Omega
Ω \varOmega
Hebrew
ℵ \aleph ℶ \beth
ℷ \gimel ℸ \daleth
Letterlike Symbols
@ @ ∣ \mid
⊤ \top ⊥ \bot
∇ \nabla ∂ \partial
ℓ \ell ℏ \hbar
£ \pounds € \euro
& \And \$
\% ∆ \differencedelta
℘ \wp ℏ \hslash
Ⅎ \Finv ⅁ \Game
ð \eth ℧ \mho
k \Bbbk ¥ \yen
ı \imath ȷ \jmath
° \degree ℜ \Re
ℑ \Im
Delimiters
A delimiter also called a fence is a symbol used to group some symbols for
example parentheses brackets braces etc…
1
( ] \left\lparen \frac1x \right\rbrack
x
To omit a delimiter use .
1
( \left\lparen \frac1x \right.
x
The argument to \left \right and \middle can be one of the following
commands
( \lparen ) \rparen
{ \lbrace } \rbrace
⟨ \langle ⟩ \rangle
⌊ \lfloor ⌋ \rfloor
⌈ \lceil ⌉ \rceil
∣ \vert ∣ \lvert
∣ \rvert ∣ \|
∥ \Vert ∥ \mVert
∥ \lVert ∥ \rVert
[ \lbrack ] \rbrack
{ \{ } \}
( ( ) )
[ [ ] ]
┌ \ulcorner ┐ \urcorner
└ \llcorner ┘ \lrcorner
⟮ \lgroup ⟯ \rgroup
⎰ \lmoustache ⎱ \rmoustache
∣ \mvert
Punctuation
. . ? ?
! ! : :
∷ \Colon : \colon
, , ; ;
” "
Dots
⋅ \cdotp . \ldotp
⋮ \vdots ⋯ \cdots
⋱ \ddots … \ldots
… \mathellipsis
Shapes
⋄ \diamond ◊ \Diamond
◊ \lozenge ⧫ \blacklozenge
□ \square □ \Box
■ \blacksquare
◯ \bigcirc Ⓢ \circledS
® \circledR
◃ \triangleleft ▹ \triangleright
△ \triangle ▽ \triangledown
◀ \blacktriangleleft ▶ \blacktriangleright
▲ \blacktriangle ▼ \blacktriangledown
△ \vartriangle ⊲ \vartriangleleft
⊳ \vartriangleright
≜ \triangleq ⊴ \trianglelefteq
⊵ \trianglerighteq ⋪ \ntriangleleft
⋫ \ntriangleright ⋬ \ntrianglelefteq
⋭ \ntrianglerighteq
△ \bigtriangleup ▽ \bigtriangledown
† \dagger † \dag
‡ \ddag ‡ \ddagger
✠ \maltese
↤ \mapsfrom ⤆ \Mapsfrom
⤇ \MapsTo ⅄ \Yup
↯ \lightning ⇽ \leftarrowtriangle
⇾ \rightarrowtriangle ⇿ \leftrightarrowtriangle
⊡ \boxdot △ \bigtriangleup
▽ \bigtriangledown ◫ \boxbar
⟅ \Lbag ⟆ \Rbag
⟦ \llbracket ⟧ \rrbracket
⟻ \longmapsfrom ⟽ \Longmapsfrom
⟾ \Longmapsto ⧄ \boxslash
⧅ \boxbslash ⧆ \boxast
⧇ \boxcircle ⧈ \boxbox
⨟ \fatsemi ⪦ \leftslice
⪧ \rightslice ⫴ \interleave
⫼ \biginterleave ⫽ \sslash
⫾ \talloblong
Layout
These commands change the amount of space around a symbol \mathop{}
treats its argument as if it was a large operator \mathrel{} a relational operator
\mathbin{} a binary operator \mathopen{} and \mathclose{} an opening and
closing delimiter respectively \mathpunct{} a punctuation \mathinner{} a
fraction and \mathord{} an ordinary symbol
x = arg = \mathinner{}
0 x = arg = \mathord{}
0
arg
x=0 \overset{}{} =0
x arg \underset{}{}
arg arg
y=1 \overunderset{arg}{x=0} x=0 \stackrel[]{}{}
x=0
{y=1}
arg
x=0 \stackbin[]{}{} 0/ \rlap{}
/o \llap{} /o \mathllap{}
/0 \mathrlap{}
Spacing
› ‹ \hspace{} › ‹ \hspace*{}
›!‹ \! ›, ‹ \,
›:‹ \: ›; ‹ \;
›‹ \enskip › ‹ \enspace
› ‹ \quad › ‹ \qquad
Decorations
x+1=0 {\color{blue}
x+1=0#}}
\fcolorbox{}{}{}
1
\boxed{1+\frac{1}
1+ x
{x#}}
Notations
\enclose
The \enclose command is very flexible It accepts three arguments two of which
are required
\enclose{<notation>}![<style!>]{<body>}
x=0 box
x=0 roundedbox
x=0 circle
x=0 top
x=0 left
x=0 bottom
x=0 right
x=0 horizontalstrike
x=0 verticalstrike
x=0 updiagonalstrike
x=0 downdiagonalstrike
x=0 updiagonalarrow
x=0 phasorangle
x=0 radical
x=0 longdiv
x=0 actuarial
x=0 madruwb
in addition the style property can include a stroke style expression that
follows the shorthand syntax of the CSS border property for example
"2px solid red"
x=0
\enclose{updiagonalstrike roundedbox}[1px solid red,
mathbackground="#fbc0bd"]{x=0}
1
x
\enclose{circle}[mathbackground="#fbc0bd"]{\frac1x}
x2 + y 2
√x2 + y 2
\enclose{roundedbox}[1px dotted #cd0030]{\frac{x^2+y^2}{\sqrt{x^2+y^2#}}}
\cancel{body}
\enclose{downdiagonalstrike}{body}
\bcancel{body}
\enclose{updiagonalstrike
\xcancel{body} downdiagonalstrike}{body}
The \cancel \bcancel and \xcancel commands are part of the cancel
LaTeX package
Shortcuts
Some commands are shortcuts for common notations
body \enclose{actuarial}{body}
\angl{body}
n \enclose{actuarial}{n}
\angln
r \enclose{actuarial}{r}
\anglr
k \enclose{actuarial}{k}
\anglk
Colors
To change the foreground color use the \textcolor{}{} command
a RGB color using the standard CSS format #d7170b or rgb(240, 20, 10)
one of the colors from dvips color name CadetBlue Note that these
names are casesensitive
one of the Mathematica color from ColorData[97, "ColorList"] M0 to
M9
a color defined using the syntax from the xcolor package for example
Blue!20!Black!30!Green
To have proper legibility based on usage these color names will map to
different values when used as a foreground color and a background color To
use a specific color value use a RGB color instead
For best portability between versions of TeX limit yourself to this subset of
DVIPS colors White Black Gray Red Orange Yellow LimeGreen
Green TealBlue Blue Violet Purple and Magenta Those names are
casesensitive
Font Styling
\selectfont
Bold
Don Knuth
\fontseries{} \boldsymbol{}
DonKnuth
\bfseries \mdseries
\bm{}
DonKnuth DonKnuth
\bold{}
Don Knuth
\textbf{} Don Knuth\textmd{}
DonKnuth
\mathbf{} \mathbfit{}
Italic
\upshape \slshape
Font Family
Typewriter / Monospace
SansSerif
DonKnuth\sffamily
Math Variants
DonKnuth{\frak}
\class
\class{custom-class}{x+1}
x+1
<math-field>
<style>
#custom-class {
box-shadow: 0 0 10px #000; border-radius: 8px; padding: 8px;
}
!</style>
\class{custom-class}{\frac{1}{x+1!}}
!</math-field>
\cssId{custom-class}{Don Knuth}
DonKnuth
\htmlData
The argument of this command is a commadelimited list of key/value pairs eg
\htmlData{foo=green,bar=blue}{x=0} A corresponding data-foo and data-bar
DOM attribute is generated to the rendered DOM
Other Extensions
\error
The argument of this command is a string that will be rendered in red
\error{\text{Don Knuth!}}
Don Knuth
\texttip
The first argument is a math expression to display the second argument is the
text to display on hover
\mathtip
The first argument is a math expression to display the second argument is the a
math expression to display on hover
\mathtip{e^{i\pi!}}{-1}
eiπ
Others
Deprecated
The following commands are supported for compatibility with existing content
but their use is generally discouraged when creating new LaTeX content
Sizing
In LaTeX using the sizing commands below may not always achieve the expected
result In MathLive the sizing commands are applied consistently to text and math
mode
eiπ + 1 = 0
\tiny
eiπ + 1 = 0 \scriptsize
eiπ + 1 = 0 \footnotesize
eiπ + 1 = 0 \small
eiπ + 1 = 0 \normalsize
e +1=0
iπ \large
e +1=0 iπ \Large
e +1=0 iπ \LARGE
e +1=0
\huge
iπ
e +1=0
\Huge
iπ
The size of delimiters can be controlled manually with the commands below The
\left##...\right##... commands calculate automatically the size of the delimiters
based on the content
∣
(∣) \Bigl( \Bigm\| \Bigr)
∣
∣
(∣∣) \biggl( \biggm\| \biggr)
∣
∣
(∣)
∣ \Biggl( \Biggm\| \Biggr)
∣
∣
Various
/ / ♯ \sharp
♭ \flat ♮ \natural
# \# & \&
♣ \clubsuit ♡ \heartsuit
♠ \spadesuit ♢ \diamondsuit
\ \backslash ∞ \infty
′ \prime ″ \doubleprime
∠ \angle \_
✓ \checkmark ╱ \diagup
∡ \measuredangle ∢ \sphericalangle
‵ \backprime ‶ \backdoubleprime
/ \/ ∣ |
’ ' ⊶ \originalof
⊶ \laplace ⊷ \imageof
⊷ \Laplace − −
‘ ``` ~
\space \smash[]{}
\vphantom{} \hphantom{}
\phantom{}
↓ \darr ⇓ \dArr
⇓ \Darr ⟨ \lang
⟩ \rang ↑ \uarr
⇑ \uArr ⇑ \Uarr
N \N R \R
Z \Z ℵ \alef
ℵ \alefsym A \Alpha
B \Beta ∙ \bull
X \Chi ♣ \clubs
C \cnums C \Complex
‡ \Dagger ♢ \diamonds
∅ \empty E \Epsilon
H \Eta ∃ \exist
↔ \harr ⇔ \hArr
⇔ \Harr ♡ \hearts
ℑ \image ∞ \infin
I \Iota ∈ \isin
K \Kappa ← \larr
⇐ \lArr ⇐ \Larr
↔ \lrarr ⇔ \lrArr
⇔ \Lrarr M \Mu
N \natnums N \Nu
O \Omicron ± \plusmn
→ \rarr ⇒ \rArr
⇒ \Rarr ℜ \real
R \reals R \Reals
P \Rho ⋅ \sdot
\S \sect ♠ \spades
⊂ \sub ⊆ \sube
⊇ \supe T \Tau
ϑ \thetasym ℘ \weierp
Z \Zeta
Physics
Braket Notation
MathLive supports the braket package
Chemical Formulae
Charges
CrO4 2− \ce{CrO4^2-}
Stoichiometric numbers
1
0.5 H2 O \ce{0.5 H2O} 2
H2 O \ce{1/2 H2O}
Isotopes
227 + 227 +
90 Th \ce{^{227}_{90}Th+} 90 Th \ce{^227_90Th+}
0 − 0 −
−1n \ce{^{0}_{-1}n^{-}} −1n \ce{^0_-1n-}
Complex Examples
\ce{CO2 + C !-> 2 CO}
CO2 + C 2 CO
\ce{$K = \ce{\frac{[Hg^2+][Hg]}{[Hg2^2+]!}}$}
[Hg2+ ][Hg]
K=
[Hg2 2+ ]
I− I−
Hg 2+
HgI2 [HgII I4 ]2−
red red
Macros
d \rd D \rD
E \scriptCapitalE H \scriptCapitalH
L \scriptCapitalL C \gothicCapitalC
H \gothicCapitalH I \gothicCapitalI
R \gothicCapitalR i \imaginaryI
j \imaginaryJ e \exponentialE
d \differentialD D \capitalDifferentialD
Environments / Matrixes
Environements are used to typeset a set of related items for examples cells in a
matrix or multiline equations
Matrixes
array
A simple table with no delimiters
The {lc} argument specifies how many columns there are and how they should
be formated
l leftaligned
c centered
r rightaligned
\begin{array}{l|c}
a+1 b+1 a + 1 & b + 1 \\
c & \frac{1}{d}
1
c d \end{array}
To add a double vertical line separating columns add two | characters in the
column format
\begin{array}{l!||c}
a+1 b+1 a + 1 & b + 1 \\
c & \frac{1}{d}
1
c d \end{array}
\begin{array}{l:c}
a+1 b+1 a + 1 & b + 1 \\
c & \frac{1}{d}
1
c d \end{array}
matrix
The matrix environment is very similar to array but it does not have an
argument to specify the format of the columns
To specify the format of the columns use the starred version and an optional
argument This applies to all the other matrix environments
\begin{matrix*}[l|r]
a+1 b+1 a + 1 & b + 1 \\
c & \frac{1}{d}
1
c d \end{matrix*}
pmatrix
A matrix with parentheses as delimiters
⎛a b⎞ \begin{pmatrix}
a + 1 & b + 1 \\
⎝c 1⎠ c & \frac{1}{d}
d
\end{pmatrix}
bmatrix
A matrix with square brackets as delimiters
⎡a b⎤ \begin{bmatrix}
a + 1 & b + 1 \\
⎣c 1⎦ c & \frac{1}{d}
d
\end{bmatrix}
Bmatrix
A matrix with braces curly brackets as delimiters
⎧a b⎫ \begin{Bmatrix}
⎨ ⎬ a + 1 & b + 1 \\
⎩ 1⎭ c & \frac{1}{d}
c d
\end{Bmatrix}
vmatrix
A matrix with single bars as delimiters
∣a b ∣∣ \begin{vmatrix}
∣
∣ ∣ a + 1 & b + 1 \\
∣ ∣
∣c 1∣ c & \frac{1}{d}
∣ d∣
\end{vmatrix}
Vmatrix
A matrix with double bars as delimiters
∥a b∥ \begin{Vmatrix}
∥ ∥
∥ ∥ a + 1 & b + 1 \\
∥ ∥
∥c 1∥ c & \frac{1}{d}
∥ d∥
\end{Vmatrix}
matrix*
An array a matrix without delimiters
a b \begin{matrix*}
a + 1 & b + 1 \\
c 1 c & \frac{1}{d}
d
\end{matrix*}
smallmatrix
A matrix typeset in a way that may be suitable on the same line as text
a b
\begin{smallmatrix} a & b \\ c &
1
c \frac{1}{d} \end{smallmatrix}
d
Other Environments
⎧1
⎪ if n = 0 f(n) = \begin{cases}
f (n) = ⎨ 1 & \text{if } n = 0 \\
⎪f (n − 1) + f (n − 2)
⎩ if n ≥ 2
f(n-1) + f(n-2) & \text{if } n \ge 2
\end{cases}
⎧1
⎪
f(n) = \begin{dcases}
⎪
if n = 0
1 & \text{if } n = 0 \\
f (n) = ⎨
⎪
f(n-1) + f(n-2) & \text{if } n \ge 2
⎪f (n − 1) + f (n − 2)
⎩ if n ≥ 2 \end{dcases}
if n = 0⎫
⎪
\begin{rcases}
⎪
1
1 & \text{if } n = 0 \\
⎬ = f (n)
⎪
f(n-1) + f(n-2) & \text{if } n \ge 2
f (n − 1) + f (n − 2) if n ≥ 2⎭
⎪ \end{rcases} = f(n)
gather
Consecutive equations without alignment
3(a − x) = 3.5x + a − 1
\begin{gather}
3(a-x) = 3.5x + a - 1 \\
3a − 3x = 3.5x + a − 1
3a - 3x = 3.5x + a - 1 \\
a = \frac{13}{4}x - \frac{1}{2}
a = 13 x − 1 \end{gather}
4 2
multline
The first line is left aligned the last line is right aligned and all the intermediate
lines are centered
3(a − x) = 3.5x + a − 1
\begin{multline}
3(a-x) = 3.5x + a - 1 \\
3a − 3x = 3.5x + a − 1
3a - 3x = 3.5x + a - 1 \\
a = \frac{13}{4}x - \frac{1}{2}
a = 13 x − 1 \end{multline}
4 2
align
2 \begin{align}
f (x) = (a + b) f(x) & = (a+b)^2 \\
= a2 + 2ab + b2 & = a^2+2ab+b^2 \\
\end{align}
Others
\begin{math}
1
x+ 2 x+\frac12
\end{math}
\begin{displaymath}
1
x+ 2 x+\frac12
\end{displaymath}
\begin{equation}
x+ 1 x+\frac12
2
\end{equation}
\begin{subequations}
x+ 1 x+\frac12
2
\end{subequations}
ab
c1 \begin{eqnarray}!!...\end{eqnarray}
d
Avoid use align instead
\begin{center}
first \text{first}
\end{center}
3(a − x) = 3.5x + a − 1
3a − 3x = 3.5x + a − 1
\begin{gathered}!!...\end{gathered}
a = 13 x − 1
4 2
3(a − x) = 3.5x + a − 1
3a − 3x = 3.5x + a − 1
\begin{split}!!...\end{split}
a = 13 x − 1
4 2
3(a − x) = 3.5x + a − 1
3a − 3x = 3.5x + a − 1
\begin{aligned}!!...\end{aligned}
a = 13 x − 1
4 2
TeX Registers
The math typesetting is influenced by some constants that are stored in
registers Those registers can be set globally on a mathfield using the
registers option
Register Purpose
arrayrulewidth Width of separator lines in array environments
delimitershortfall
jot Vertical space between the lines for all math expressions
which allow multiple lines
TeX Primitives
The commands below are TeX primitives Most are only useful when writing TeX
packages or macros
Command
% Anything after a % character and an end of line character is
interpreted as a comment and ignored
\limits
\nolimits
\relax
\noexpand
\string