TEX Cookbook

1-Nov-1989

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1989 by MathPro Press, Inc. (http://www.mathpro.com/math/MathPro.html) Individuals may make copies for their own personal use. Inquiries to stan@MathPro.com.

Dashes

to get you type notes
a-b  a-b  hyphen
a–b  a--b  dash
a—b a---b  long dash
galaxy gal\-axy discretionary hyphen

Standard ligatures (handled automatically)

to get you type notes

 ff  ff
 fi  fi
 fl  fl
 ffi  ffi
 ffl  ffl

Accents

to get you type notes
é  \'e  acute accent
à  \`a  grave accent
ê  \^e  circumflex
ü  \"u  umlaut
ñ  \~n  tilde
ā  \=a  macron
ȧ  \.a  dot accent
ğ  \u g  breve accent
ǎ  \v a  háček
ő  \H o  long Hungarian umlaut
oo  \t oo  tie-after accent
ç  \c c  cedilla accent
a.  \d a  dot under accent
ā  \b a  bar-under accent

Special Characters

to get you type notes
œ  \oe  French ligature oe
Œ  \OE  French ligature OE
æ  \ae  Scandinavian ligature ae
Æ  \AE  Scandinavian ligature AE
å  \aa  Scandinavian a-with-circle
Å  \AA  Scandinavian A-with-circle
ø  \o  Scandinavian o-with-slash
Ø  \O  Scandinavian O-with-slash
ł  \l  Polish suppressed-l
Ł  \L  Polish suppressed-L
ß  \ss  German sharp S
ı  \i  dotless i
ȷ  \j  dotless j

Punctuation

to get  you type  notes
“text”  ``text''  quotation marks
¡Wow!  !`Wow!  open exclamation
¿Huh?  ?`Huh?  open question
$24.00  \$24.00  dollar sign
36/ c  36\cents  cent sign
£16  \sterling 16 pounds sterling
item #2 item \#2 number sign
95% pure 95\% pure  percent sign
H&R Block H\&R Block  ampersand

Special symbols

to get you type  notes
†  \dag  dagger
‡  \ddag  double dagger
§  \S  section number sign
¶  \P  paragraph symbol
\begin{matrix}c \\ ◯ \end{matrix}  \copyright  copyright symbol

  TEX \TeX

…  \dots  ellipsis

Fonts

to get  you type  notes
A roman font.  A {\rm roman} font.  default font

An italic font.  An {\it italic} font.
A slanted font.  A {\sl slanted} font.
A bold font.  A {\bf bold} font.
A typewriter font.  A {\tt typewriter} font.

A CALLIGRAPHIC font. A $\cal CALLIGRAPHIC$ font.  caps only

Oldstyle digits 0123456789. Oldstyle digits {\oldstyle 0123456789}.

Breakable (horizontal) spaces

to get  you type  notes
This much.  This much.  normal space
This much.  This\ much.  same as above

This much.  This\enskip much.
This much.  This\quad much.
This  much. This\qquad much.
This  much. hskip <dim>

Unbreakable (horizontal) spaces

to get  you type  notes
This much.  This~much.  tie

This much.  This\enspace much.
This much.  This\thinspace much.
Thismuch.  This\negthinspace much.
italic correction. {\it italic\/} correction.
This  much. kern <dim>

Math accents

to get you type  notes
x́  $\acute x$  corresponds to \'
x̀  $\grave x$  corresponds to \`
x̂  $\hat x$  corresponds to \^
ẍ  $\ddot x$  corresponds to \"
x̃  $\tilde x$  corresponds to \~
x̄  $\bar x$  corresponds to \=
ẋ  $\dot x$  corresponds to \.
x̆  $\breve x$  corresponds to \u
x̌  $\check x$  corresponds to \v

           x⃗  $\vec x$  vector

ı  $\imath $  dotless i
ȷ  $\jmath $  dotless j

           x̂yz  $\widehat {xyz}$
           x̃yz  $\widetilde {xyz}$

Greek letters

lower case  variant  upper case
to get you type  to get you type  to get you type  name

α  $\alpha $  A  {\rm A}  alpha
β  $\beta $  B  {\rm B}  beta
γ  $\gamma $  Γ  $\Gamma $ gamma
δ  $\delta $  Δ  $\Delta $ delta
ϵ  $\epsilon $ ε  $\varepsilon $ E  {\rm E}  epsilon
ζ  $\zeta $  Z  {\rm Z}  zeta
η  $\eta $  H  {\rm H}  eta
θ  $\theta $ ϑ  $\vartheta $ Θ  $\Theta $ theta
ι  $\iota $  I  {\rm I}  iota
κ  $\kappa $  K  {\rm K}  kappa
λ  $\lambda $  Λ  $\Lambda $ lambda
μ  $\mu $  M  {\rm M}  mu
ν  $\nu $  N  {\rm N}  nu
ξ  $\xi $  Ξ  $\Xi $  xi
o  {\rm o}  O  {\rm O}  omicron
π  $\pi $  ϖ  $\varpi $  Π  $\Pi $  pi
ρ  $\rho $  ϱ  $\varrho $  P  {\rm P}  rho
σ  $\sigma $ ς  $\varsigma $ Σ  $\Sigma $ sigma
τ  $\tau $  T  {\rm T}  tau
υ  $\upsilon $  Υ  $\Upsilon $ upsilon
ϕ  $\phi $  φ  $\varphi $  Φ  $\Phi $  phi
χ  $\chi $  X  {\rm X}  chi
ψ  $\psi $  Ψ  $\Psi $  psi
ω  $\omega $  Ω  $\Omega $ omega

Math spaces

to get you type  notes
x y  $x\,y$  thin space (1/6 quad)
x y  $x\>y$  medium space (2/9 quad)
x y  $x\;y$  thick space (5/18 quad)
xy  $x\!y$  negative thin space (-1/6 quad)

   \thinmuskip  3mu

\medmuskip  4mu plus 2mu minus 4mu

   \thickmuskip  5mu plus 5mu
   mkern <muglue> unbreakable
   mskip <muglue> breakable

Ordinary math symbols

to get you type  notes

ℵ  $\aleph $  aleph
h̄  $\hbar $  h-bar

ℓ  $\ell $  script l
℘  $\wp $  Weierstrass function
ℜ  $\Re $  real part
ℑ  $\Im $  imaginary part
∂  $\partial $  partial derivative

∞  $\infty $  infinity
′  $\prime $  prime
∅  $\emptyset $  null set
∇  $\nabla $  nabla

⊤  $\top $  T symbol
⊥  $\bot $  upside down T
|  $|$  divides

|  $\vert $  same as |

∥  $\|$  parallel

∥  $\Vert $  same as \|
$\angle $  angle
△  $\triangle $  triangle
\  $\backslash $  backslash
∀  $\forall $  for all

∃  $\exists $  there exists
¬  $\neg $  negation symbol

♭  $\flat $  flat
♮  $\natural $  natural
♯  $\sharp $  sharp
♣  $\clubsuit $  club suit
♢  $\diamondsuit $ diamond suit
♡  $\heartsuit $  heart suit
♠  $\spadesuit $  spadesuit

Subscripts and superscripts

to get  you type  notes

x_{1}  $x_1$
x_{+}  $x_+$
x_{α}  $x_\alpha $
x_{12}  $x_{12}$
u_{−2}  $u_{-2}$
x_{a+b}  $x_{a+b}$
x^{5}  $x^5$
x^{−}  $x^-$
x^{♯}  $x^\sharp $
x^{#}  $x^\#$
a^{∗}  $a^*$
x^{100}  $x^{100}$
sin^{−1} ϕ  $\sin ^{-1}\phi $
(a + b)^{sin θ}  $(a+b)^{\sin \theta }$
x_{3}^{7}  $x_3^7$
x_{12}^{n−1}  $x_{12}^{n-1}$
x_{i_{5}}  $x_{i_5}$
e^{x^{2}}  $e^{x^2}$
x^{y_{2}}  $x^{y_2}$
x^{(a+b)^{2^{17}}}  $x^{(a+b)^{2^{17}}}$
x_{a_{3}+7}  $x_{a_3+7}$
x_{a_{3}} + 7  $x_{a_3}+7$
x_{a}^{b}  $x_a^b$
x_{a}^{b}  $x_a{}^b$
x_{a^{2}}  $x_{a^2}$
x^{r_{10}}  $x^{r_{10}}$
x_{b^{2}}^{r_{1}}  $x_{b^2}^{r_1}$
x_{a_{1}^{2}}^{b_{3}^{4}}  $x_{a_1^2}^{b_3^4}$
sin 10^{∘}  $\sin 10\degrees $
x′  $x'$
a′′_{3}  $a_3''$
2F_{1}x  ${}_2F_1x$
The n^{th} word. The $n^{\rm th}$ word.

Binary operations

to get you type  notes
±  $\pm $  plus or minus
∓  $\mp $  minus or plus

\  $\setminus $  set minus

·  $\cdot $  centered dot
+  $+$  plus
−  $-$  minus

×  $\times $  times

$\*$  discretionary times
÷  $\div $  divide
∗  $\ast $  asterisk
⋆  $\star $  five-pointed star

⋄  $\diamond $  diamond

∘  $\circ $  small circle

•  $\bullet $  bullet

∩  $\cap $  cap (intersection)
∪  $\cup $  cup (union)
⊎  $\uplus $  plus inside cup
⊓  $\sqcap $  square cap
⊔  $\sqcup $  square cup
◁  $\triangleleft $  triangle pointing left
▷  $\triangleright $  triangle pointing right
≀  $\wr $  wreath product
◯  $\bigcirc $  large circle

△  $\bigtriangleup $
▽  $\bigtriangledown $
∨  $\vee $  vee

∨  $\lor $  logical or (same as \vee )

∧  $\wedge $  wedge

∧  $\land $  logical and (same as \wedge )
⊕  $\oplus $  circled plus
⊖  $\ominus $  circled minus
⊗  $\otimes $  circled times
⊘  $\oslash $  circled divide
⊙  $\odot $  circled dot

†  $\dagger $  dagger

‡  $\ddagger $  double dagger

⨿  $\amalg $

Order relations

to get you type  name  to get you type  name
<  $<$  less than  >  $>$  greater than
≤  $\leq $  less than or equal  ≥  $\geq $  greater than or equal

≤  $\le $  same as \leq  ≥  $\ge $  same as \geq

≺  $\prec $  precedes  ≻  $\succ $  succeeds
⪯  $\preceq $  precedes or equal  ⪰  $\succeq $  succeeds or equal
≪  $\ll $  much less than  ≫  $\gg $  much greater than
⊂  $\subset $  contained in  ⊃  $\supset $  contains
⊆  $\subseteq $ subset or equal  ⊇  $\supseteq $ superset or equal
⊑  $\sqsubseteq $ square subset or equal ⊒  $\sqsupseteq $ square superset or equal

Negated relations

to get you type  notes
≮  $\not <$  not less than
≯  $\not >$  not greater than
≰  $\not \leq $  not less than or equal to
≱  $\not \geq $  not greater than or equal
⊀  $\not \prec $  does not precede
⊁  $\not \succ $  does not succeed
⪯̸  $\not \preceq $  does not precede or equal
⪰̸  $\not \succeq $  does not succeed or equal
⊄  $\not \subset $  not contained in
⊅  $\not \supset $  does not contain
⊈  $\not \subseteq $  not subset or equal
⊉  $\not \supseteq $  not superset or equal
⋢  $\not \sqsubseteq $ not square subset or equal
⋣  $\not \sqsupseteq $ not square superset or equal
≠  $\not =$  not equal to

≠  $\neq $  same as \not =

≢  $\not \equiv $  not equivalent to
≁  $\not \sim $  not similar to
≄  $\not \simeq $  not similar or equal to
≉  $\not \approx $  not approximately equal to
≅  $\not \cong $  not congruent to
≭  $\not \asymp $  not asymptotic to
∉  $\notin $  not a member of

Equivalence relations

to get you type  notes
=  $=$  equals
≡  $\equiv $  equivalent to
∼  $\sim $  similar to
≃  $\simeq $  similar or equals
≍  $\asymp $  asymptotic to
≈  $\approx $  approximately equal to
≅  $\cong $  congruent to

      ▷◁  $\bowtie $  bowtie

≐  $\doteq $  dot equal
∥  $\parallel $ is parallel to
⊥  $\perp $  is perpendicular to

Other binary relations

to get you type  notes
|  $\mid $  divides

          ⌣  $\smile $
          ⌢  $\frown $

∈  $\in $  belongs to
∋  $\ni $  contains

          ⊢  $\vdash $
          ⊣  $\dashv $
          ⊧  $\models $

∝  $\propto $ proportional to

Stacking

to get  you type  notes
\frac{x}{y}  $x\over y$  fraction

\frac{a+b}{c+d}  $a+b\over c+d$
x + \frac{a+b}{c+d} − y $x+\{a+b\over c+d\}-y$

{x \atop y}  $x\atop y$  stacking
\binom{x}{y}  $x\choose y$  binomial coefficient
\frac{x}{y}  $x\above 2pt y$  thicker fraction line

\left[{x \atop y}\right]  $x\brack y$
\left⟨{x \atop y}\right⟩  $x\atopwithdelims <> y$
(\frac{x}{y})  $x\overwithdelims () y$  Legendre symbol
(\frac{x}{y})  $x\abovewithdelims ()1pt y$

Roots and radicals

to get  you type  notes
\sqrt{x}  $\sqrt x$  square root

       \sqrt{x + y}  $\sqrt \{x+y\}$
        \sqrt[3]{x + y}  $\root 3 \of \{x+y\}$
        \sqrt[n]{3}  $\root n \of 3$
        \sqrt[n+1]{x + y} $\root n+1 \of \{x+y\}$
       x^{2/3}  $x^{2/3}$

grouping

to get you type  notes

             \underline{x}  $\underline x$
             \underline{x + y} $\underline \{x+y\}$
             \overline{x}  $\overline x$
             \overline{x + y} $\overline \{x+y\}$

Dots

to get  you type  notes

x_{1}, x_{2}, . . ., x_{n}  $x_1$, $x_2$, $\ldots $, $x_n$ lower dots

f(x_{1}, x_{2}, …, x_{n})  $f(x_1,x_2,\ldots ,x_n)$  lower dots
x_{1} + x_{2} + ⋯ + x_{n}  $x_1+x_2+\cdots +x_n$  centered dots
x · y  $x\cdot y$  centered dot
x ∘ y  $x\circ y$  centered circle
⋮  $\vdots $  vertical dots
...  $\ddots $  diagonal dots
ẋ  $\dot x$  dot math accent
ẍ  $\ddot x$  double dot math accent

x ≐ y  $x\doteq y$

x ⊙ y  $x\odot y$  circled dot

x • y  $x\bullet y$  bullet

x ⨀ y  $x\bigodot y$  big circle with dot

sin 30^{∘}  $\sin 30\degrees $  degrees

and not in math mode … and not in math mode \dots  ellipsis
A period ends a sentence. A period ends a sentence.  period
ȧ  \.a  dot accent
ä  \"a  umlaut
a.  \d a  dot under accent
ő  \H o  long Hungarian umlaut

Arrows

to get  you type  to get you type

         ←  $\leftarrow $  →  $\rightarrow $
         ←  $\gets $  →  $\to $
         ⇐  $\Leftarrow $  ⇒  $\Rightarrow $
         ⟵  $\longleftarrow $  ⟶ $\longrightarrow $
         ⟸  $\Longleftarrow $  ⟹ $\Longrightarrow $
         ↩  $\hookleftarrow $  ↪  $\hookrightarrow $
         ↼  $\leftharpoonup $  ⇀  $\rightharpoonup $
         ↽  $\leftharpoondown $ ⇁  $\rightharpoondown $
         ⟺  $\iff $               ⇀ ↽  $\rightleftharpoons $
         ↦  $\mapsto $  ⟼ $\longmapsto $
         ↔  $\leftrightarrow $  ⟷ $\longleftrightarrow $
         ⇔  $\Leftrightarrow $  ⟺ $\Longleftrightarrow $
         ↑  $\uparrow $  ⇑  $\Uparrow $
         ↓  $\downarrow $  ⇓  $\Downarrow $
         ↕  $\updownarrow $  ⇕  $\Updownarrow $
         ↗  $\nearrow $  ↖  $\nwarrow $
         ↘  $\searrow $  ↙  $\swarrow $
         \overleftarrow{xy}  $\overleftarrow \{xy\}$ \overrightarrow{xy}  $\overrightarrow \{xy\}$
         f: A → B $f\colon A\to B$      x⃗y  $\vec {xy}$

Delimiters

to get you type  notes
(x + y) $(x+y)$  parentheses
[x + y] $[x+y]$  square brackets
{x + y} $\{x+y\}$  curly braces

{x + y} $\lbrace x+y\rbrace $ same as \{ and \}

⌈x + y⌉ $\lceil x+y\rceil $  ceiling function

⌊x + y⌋ $\lfloor x+y\rfloor $ floor function
⟨x + y⟩ $\langle x+y\rangle $ angle brackets

A/B  $A/B$  slash

A\B  $A\backslash B$  backslash

|x + y| $|x+y|$  vertical bar

|x + y| $\vert x+y\vert $  same as |

∥x + y∥ $\|x+y\|$  double vertical bar

∥x + y∥ $\Vert x+y\Vert $  same as \|

x ↑ y  $x\uparrow y$  upward arrow
x ⇑ y  $x\Uparrow y$  upward arrow
x ↓ y  $x\downarrow y$  downward arrow
x ⇓ y  $x\Downarrow y$  downward arrow
x ↕ y  $x\updownarrow y$  up-and-down arrow
x ⇕ y  $x\Updownarrow y$  up-and-down arrow

Delimiters

to get  precede the delimiter by notes
( ) [ ] { } ⌈ ⌉ ⌊ ⌋ ⟨ ⟩ / \ | ∥ ↑ ⇑ ↓ ⇓ ↕ ⇕  normal size
( ) [ ] { } ⌈ ⌉ ⌊ ⌋ ⟨ ⟩ / \ | ∥ ↑ ⇑ ↓ ⇓ ↕ ⇕  \bigl or \bigr  slightly larger
( ) [ ] { } ⌈ ⌉ ⌊ ⌋ ⟨ ⟩ / \ | ∥ ↑ ⇑ ↓ ⇓ ↕ ⇕  \Bigl or \Bigr  50% taller than \big
( ) [ ] { } ⌈ ⌉ ⌊ ⌋ ⟨ ⟩ / \ | ∥ ↑ ⇑ ↓ ⇓ ↕ ⇕  \biggl or \biggr  twice as tall as \big

( ) [ ] { } ⌈ ⌉ ⌊ ⌋ ⟨ ⟩ / \ | ∥ ↑ ⇑ ↓ ⇓ ↕ ⇕ \Biggl or \Biggr  2.5 times as tall as \big

Use \bigl, \Bigl, \biggl or \Biggl for left delimiters. Use \bigr, \Bigr, \biggr or \Biggr for right delimiters. Use \big, \Big, \bigg or \Bigg for delimiters with no space around them. Use \bigm, \Bigm, \biggm or \Biggm for relational delimiters with space on both sides.

To get matching delimiters the right size for a portion of text, precede the left delimiter of the text by \left and precede the right delimiter by \right. (An unmatched delimiter can be matched with a period delimiter.)

Large operators

to get you type  notes
∑  $\sum $  summation
∏  $\prod $  product
∐  $\coprod $  coproduct
∫  $\int $  integral
∮  $\oint $  contour integral
⋂  $\bigcap $  intersection

                  ⋃  $\bigcup $  union
                  ⨆  $\bigsqcup $  square cup

⋁  $\bigvee $  disjunction
⋀  $\bigwedge $  conjunction
⨁  $\bigoplus $  circled plus

                  ⨄  $\biguplus $  plus in U

⨂  $\bigotimes $ circled times
⨀  $\bigodot $  circled dot

Limits on large operators

to get  you type  in a display, looks like

∑_{1}^{n} x^{i}  $\sum _1^n x^i$                         ∑_{1}^{n} x^{i}
∑_{k=1}^{n−1} x^{k+1}  $\sum _{k=1}^{n-1}x^{k+1}$              ∑_{k=1}^{n−1} x^{k+1}
∏_{k=1}^{∞} \frac{x_{k}}{k!}  $\prod _\{k=1\}^\infty \{x_k\over k!\}$     ∏_{k=1}^{∞} ^{\frac{x_{k}}{k!}}
∫_{0}^{1} x^{n} dx  $\int _0^1x^n\,dx$  ∫_{0}^{1} x^{n} dx
∫_{−4}^{r^{2}+1} \frac{x+1}{x+2} dx  $\int _\{-4\}^\{r^2+1\}\{x+1\over x+2\}\,dx$ ∫_{−4}^{r^{2}+1} \frac{x+1}{x+2} dx
∫_{A} f(θ) dθ  $\int _Af(\theta )\,d\theta $  ∫_{A} f(θ) dθ
⋂_{r=1}^{5} A_{r}  $\bigcap _{r=1}^5A_r$                   ⋂_{r=1}^{5} A_{r}
⋃_{α∈S} B_{α}  $\bigcup _{\alpha \in S}B_\alpha $      ⋃_{α∈S} B_{α}
⋀_{gcd(n,m)=1} P_{m,n} $\bigwedge _{\gcd (n,m)=1}P_{m,n}$      ⋀_{gcd(n,m)=1} P_{m,n}

gcd_{i=1}^{7} n_{i}  $\gcd _{i=1}^7n_i$                      gcd_{i=1}^{7} n_{i}

inf_{x→∞} A_{x}  $\inf _{x\to \infty }A_x$               inf_{x→∞} A_{x}
lim_{x↓0} e^{x^{−1}}  $\lim _{x\downarrow 0}e^{x^{-1}}$       lim_{x↓0} e^{x^{−1}}

lim inf_{y→1} f(y) $\liminf _{y\to 1}f(y)$                 lim inf_{y→1} f(y)

lim sup_{y↑6} g(y) $\limsup _{y\uparrow 6}g(y)$            lim sup_{y↑6} g(y)

max_{j=1}^{f(n)} P_{j}(x)  $\max _{j=1}^{f(n)}P_j(x)$              max_{j=1}^{f(n)} P_{j}(x)

min_{1≤n≤m} G_{n}  $\min _{1\leq n\leq m}G_n$              min_{1≤n≤m} G_{n}

Pr_{x} f(x)  $\Pr _x f(x)$                           Pr_{x} f(x)
sup_{k}(a_{k} + b_{k})  $\sup _k(a_k+b_k)$                      sup_{k}(a_{k} + b_{k})
det_{n} M_{n}  $\det _n M_n$                           det_{n} M_{n}

Functions

to get you type  notes

arccos $\arccos $
arcsin $\arcsin $
arctan $\arctan $

arg  $\arg $  argument
cos  $\cos $  cosine
cosh  $\cosh $  hyperbolic cosine
cot  $\cot $  cotangent
coth  $\coth $  hyperbolic cotangent
csc  $\csc $  cosecant
csch  $\csch $  hyperbolic cosecant
deg  $\deg $  degree
det  $\det $  determinant
dim  $\dim $  dimension
exp  $\exp $  exponential
gcd  $\gcd $  greatest common divisor

hom  $\hom $

inf  $\inf $  infinum
ker  $\ker $  kernel
lg  $\lg $  log base 2
lim  $\lim $  limit

lim inf $\liminf $
lim sup $\limsup $

ln  $\ln $  natural log
log  $\log $  common log (base 10)
max  $\max $  maximum
min  $\min $  minimum
mod  $\mod $  modulo
Pr  $\Pr $  probability
sec  $\sec $  secant
sech  $\sech $  hyperbolic secant
sin  $\sin $  sine
sinh  $\sinh $  hyperbolic sine
sup  $\sup $  supremum
tan  $\tan $  tangent
tanh  $\tanh $  hyperbolic tangent