You are on page 1of 12

TEX Cookbook

1-Nov-1989

c 1989 by MathPro Press, Inc. (http://www.mathpro.com/math/MathPro.html)


Copyright
Individuals may make copies for their own personal use. Inquiries to stan@MathPro.com.
Dashes
to get
a-b
ab
ab
galaxy

you type
a-b
a--b
a---b
gal\-axy

notes
hyphen
dash
long dash
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
e
\e
`a
\a
e
\^e
u

\"u
n

\~n
a
\=a
a
\.a
g
\u g
a
\v a
o
\H o
o o
\t oo
c
\c c
a.
\d a
a
\b a

Special
to get

l
L

Characters
you type
\oe
\OE
\ae
\AE
\aa
\AA
\o
\O
\l
\L
\ss
\i
\j

notes
acute accent
grave accent
circumflex
umlaut
tilde
macron
dot accent
breve accent
hacek
long Hungarian umlaut
tie-after accent
cedilla accent
dot under accent
bar-under accent

notes
French ligature oe
French ligature OE
Scandinavian ligature ae
Scandinavian ligature AE
Scandinavian a-with-circle
Scandinavian A-with-circle
Scandinavian o-with-slash
Scandinavian O-with-slash
Polish suppressed-l
Polish suppressed-L
German sharp S
dotless i
dotless j
1

Punctuation
to get
text
Wow!
Huh?
$24.00
36/c
16
item #2
95% pure
H&R Block
Special
to get

TEX
...
Fonts
to get
A roman font.
An italic font.
A slanted font.
A bold font.
A typewriter font.
A CALLIGRAPHIC font.
Oldstyle digits .

you type
text
!Wow!
?Huh?
\$24.00
36\cents
\sterling 16
item \#2
95\% pure
H\&R Block

symbols
you type
\dag
\ddag
\S
\P
\copyright
\TeX
\dots

notes
quotation marks
open exclamation
open question
dollar sign
cent sign
pounds sterling
number sign
percent sign
ampersand

notes
dagger
double dagger
section number sign
paragraph symbol
copyright symbol
ellipsis

you type
A {\rm roman} font.
An {\it italic} font.
A {\sl slanted} font.
A {\bf bold} font.
A {\tt typewriter} font.
A $\cal CALLIGRAPHIC$ font.
Oldstyle digits {\oldstyle 0123456789}.

Breakable (horizontal) spaces


to get
you type
This much.
This much.
This much.
This\ much.
This much.
This\enskip much.
This much.
This\quad much.
This
much. This\qquad much.
This
much. hskip <dim>

notes
normal space
same as above

Unbreakable (horizontal) spaces


to get
you type
This much.
This~much.
This much.
This\enspace much.
This much.
This\thinspace much.
Thismuch.
This\negthinspace much.
italic correction. {\it italic\/} correction.
This
much. kern <dim>

notes
tie

notes
default font

caps only

Math accents
to get you type
x

$\acute x$
x
`
$\grave x$
x

$\hat x$
x

$\ddot x$
x

$\tilde x$
x

$\bar x$
x
$\dot x$
x

$\breve x$
x

$\check x$
~x
$\vec x$

$\imath $

$\jmath $
xd
yz
$\widehat {xyz}$
xg
yz
$\widetilde {xyz}$
Greek letters
lower case
to get you type

$\alpha $

$\beta $

$\gamma $

$\delta $

$\epsilon $

$\zeta $

$\eta $

$\theta $

$\iota $

$\kappa $

$\lambda $

$\mu $

$\nu $

$\xi $
o
{\rm o}

$\pi $

$\rho $

$\sigma $

$\tau $

$\upsilon $

$\phi $

$\chi $

$\psi $

$\omega $

variant
to get you type

$
%

notes
corresponds
corresponds
corresponds
corresponds
corresponds
corresponds
corresponds
corresponds
corresponds
vector
dotless i
dotless j

to
to
to
to
to
to
to
to
to

\
\
\^
\"
\~
\=
\.
\u
\v

upper case
to get you type
name
A
{\rm A}
alpha
B
{\rm B}
beta

$\Gamma $
gamma

$\Delta $
delta
$\varepsilon $ E
{\rm E}
epsilon
Z
{\rm Z}
zeta
H
{\rm H}
eta
$\vartheta $

$\Theta $
theta
I
{\rm I}
iota
K
{\rm K}
kappa

$\Lambda $ lambda
M
{\rm M}
mu
N
{\rm N}
nu

$\Xi $
xi
O
{\rm O}
omicron
$\varpi $

$\Pi $
pi
$\varrho $
P
{\rm P}
rho
$\varsigma $

$\Sigma $
sigma
T
{\rm T}
tau

$\Upsilon $ upsilon
$\varphi $

$\Phi $
phi
X
{\rm X}
chi

$\Psi $
psi

$\Omega $
omega

Math spaces
to get you type
xy
$x\,y$
xy
$x\>y$
xy
$x\;y$
xy
$x\!y$
\thinmuskip
\medmuskip
\thickmuskip
mkern <muglue>
mskip <muglue>

notes
thin space (1/6 quad)
medium space (2/9 quad)
thick space (5/18 quad)
negative thin space (-1/6 quad)
3mu
4mu plus 2mu minus 4mu
5mu plus 5mu
unbreakable
breakable

Ordinary math symbols


to get you type

$\aleph $
h
$\hbar $
`
$\ell $

$\wp $
<
$\Re $
=
$\Im $

$\partial $

$\infty $
0
$\prime $

$\emptyset $

$\nabla $
>
$\top $

$\bot $
|
$|$
|
$\vert $
k
$\|$
k
$\Vert $
6
$\angle $
4
$\triangle $
\
$\backslash $

$\forall $

$\exists $

$\neg $
[
$\flat $
\
$\natural $
]
$\sharp $

$\clubsuit $

$\diamondsuit $

$\heartsuit $

$\spadesuit $

notes
aleph
h-bar
script l
Weierstrass function
real part
imaginary part
partial derivative
infinity
prime
null set
nabla
T symbol
upside down T
divides
same as |
parallel
same as \|
angle
triangle
backslash
for all
there exists
negation symbol
flat
natural
sharp
club suit
diamond suit
heart suit
spadesuit

Subscripts and superscripts


to get
you type
x1
$x_1$
x+
$x_+$
x
$x_\alpha $
x12
$x_{12}$
u2
$u_{-2}$
xa+b
$x_{a+b}$
x5
$x^5$
x
$x^-$
x]
$x^\sharp $
x#
$x^\#$
a
$a^*$
x100
$x^{100}$
sin1
$\sin ^{-1}\phi $
(a + b)sin
$(a+b)^{\sin \theta }$
x73
$x_3^7$
n1
x12
$x_{12}^{n-1}$
xi5
$x_{i_5}$
2
ex
$e^{x^2}$
xy2
$x^{y_2}$
217

x(a+b)
xa3 +7
xa3 + 7
xba
xa b
xa2
xr10
xrb21

$x^{(a+b)^{2^{17}}}$
$x_{a_3+7}$
$x_{a_3}+7$
$x_a^b$
$x_a{}^b$
$x_{a^2}$
$x^{r_{10}}$
$x_{b^2}^{r_1}$

xa32
1
sin 10
x0
a003
2 F1 x
The nth word.

$x_{a_1^2}^{b_3^4}$
$\sin 10\degrees $
$x$
$a_3$
${}_2F_1x$
The $n^{\rm th}$ word.

b4

notes

Binary
to get

]
u
t
/
.
o

4
5

q
Order
to get
<

relations
you type
$<$
$\leq $
$\le $
$\prec $
$\preceq $
$\ll $
$\subset $
$\subseteq $
$\sqsubseteq $

operations
you type
$\pm $
$\mp $
$\setminus $
$\cdot $
$+$
$-$
$\times $
$\*$
$\div $
$\ast $
$\star $
$\diamond $
$\circ $
$\bullet $
$\cap $
$\cup $
$\uplus $
$\sqcap $
$\sqcup $
$\triangleleft $
$\triangleright $
$\wr $
$\bigcirc $
$\bigtriangleup $
$\bigtriangledown $
$\vee $
$\lor $
$\wedge $
$\land $
$\oplus $
$\ominus $
$\otimes $
$\oslash $
$\odot $
$\dagger $
$\ddagger $
$\amalg $

notes
plus or minus
minus or plus
set minus
centered dot
plus
minus
times
discretionary times
divide
asterisk
five-pointed star
diamond
small circle
bullet
cap (intersection)
cup (union)
plus inside cup
square cap
square cup
triangle pointing left
triangle pointing right
wreath product
large circle

vee
logical or (same as \vee )
wedge
logical and (same as \wedge )
circled plus
circled minus
circled times
circled divide
circled dot
dagger
double dagger

name
less than
less than or equal
same as \leq
precedes
precedes or equal
much less than
contained in
subset or equal
square subset or equal

to get
>

you type
$>$
$\geq $
$\ge $
$\succ $
$\succeq $
$\gg $
$\supset $
$\supseteq $
$\sqsupseteq $

name
greater than
greater than or equal
same as \geq
succeeds
succeeds or equal
much greater than
contains
superset or equal
square superset or equal

Negated relations
to get you type
6<
$\not <$
6>
$\not >$
6
$\not \leq $
6
$\not \geq $
6
$\not \prec $
6
$\not \succ $
6
$\not \preceq $
6
$\not \succeq $
6
$\not \subset $
6
$\not \supset $
6
$\not \subseteq $
6
$\not \supseteq $
6v
$\not \sqsubseteq $
6w
$\not \sqsupseteq $
6=
$\not =$
6=
$\neq $
6
$\not \equiv $
6
$\not \sim $
6'
$\not \simeq $
6
$\not \approx $

6=
$\not \cong $
6
$\not \asymp $

/
$\notin $
Equivalence relations
to get you type
=
$=$

$\equiv $

$\sim $
'
$\simeq $

$\asymp $

$\approx $

$\cong $
=
./
$\bowtie $
.
=
$\doteq $
k
$\parallel $

$\perp $

notes
not less than
not greater than
not less than or equal to
not greater than or equal
does not precede
does not succeed
does not precede or equal
does not succeed or equal
not contained in
does not contain
not subset or equal
not superset or equal
not square subset or equal
not square superset or equal
not equal to
same as \not =
not equivalent to
not similar to
not similar or equal to
not approximately equal to
not congruent to
not asymptotic to
not a member of

notes
equals
equivalent to
similar to
similar or equals
asymptotic to
approximately equal to
congruent to
bowtie
dot equal
is parallel to
is perpendicular to

Other binary relations


to get you type
|
$\mid $
^
$\smile $
_
$\frown $

$\in $
3
$\ni $
`
$\vdash $
a
$\dashv $
|=
$\models $

$\propto $

notes
divides

belongs to
contains

proportional to

Stacking
to get
x
y
a+b
c+d

x+
x
yx
y
x
y
x
yx
xy
xy
y

a+b
c+d

you type
$x\over y$
$a+b\over c+d$
$x+{a+b\over c+d}-y$
$x\atop y$
$x\choose y$
$x\above 2pt y$
$x\brack y$
$x\atopwithdelims <> y$
$x\overwithdelims () y$
$x\abovewithdelims ()1pt y$

Roots and
to get

x
x+y

3
x+y

n
3

n+1
x+y
x2/3

radicals
you type
$\sqrt x$
$\sqrt {x+y}$
$\root 3 \of {x+y}$
$\root n \of 3$
$\root n+1 \of {x+y}$
$x^{2/3}$

grouping
to get you type
x
$\underline x$
x + y $\underline {x+y}$
x
$\overline x$
x + y $\overline {x+y}$

notes
fraction

stacking
binomial coefficient
thicker fraction line

Legendre symbol

notes
square root

notes

Dots
to get
x1 , x2 , . . ., xn
f (x1 , x2 , . . . , xn )
x1 + x2 + + xn
xy
xy
..
.
..

.
x
x

.
x=y
xy
xJ
y
x y
sin 30
and not in math mode . . .
A period ends a sentence.
a
a
a.
o
Arrows
to get

=
(
)

l
%
&

xy
f: A B

you type
$x_1$, $x_2$, $\ldots $, $x_n$
$f(x_1,x_2,\ldots ,x_n)$
$x_1+x_2+\cdots +x_n$
$x\cdot y$
$x\circ y$

notes
lower dots
lower dots
centered dots
centered dot
centered circle

$\vdots $

vertical dots

$\ddots $
$\dot x$
$\ddot x$
$x\doteq y$
$x\odot y$
$x\bullet y$
$x\bigodot y$
$\sin 30\degrees $
and not in math mode \dots
A period ends a sentence.
\.a
\"a
\d a
\H o

diagonal dots
dot math accent
double dot math accent

you type
$\leftarrow $
$\gets $
$\Leftarrow $
$\longleftarrow $
$\Longleftarrow $
$\hookleftarrow $
$\leftharpoonup $
$\leftharpoondown $
$\iff $
$\mapsto $
$\leftrightarrow $
$\Leftrightarrow $
$\uparrow $
$\downarrow $
$\updownarrow $
$\nearrow $
$\searrow $
$\overleftarrow {xy}$
$f\colon A\to B$

to get

=
,
*
+
*
)
7

m
.

xy
xy
~

circled dot
bullet
big circle with dot
degrees
ellipsis
period
dot accent
umlaut
dot under accent
long Hungarian umlaut

you type
$\rightarrow $
$\to $
$\Rightarrow $
$\longrightarrow $
$\Longrightarrow $
$\hookrightarrow $
$\rightharpoonup $
$\rightharpoondown $
$\rightleftharpoons $
$\longmapsto $
$\longleftrightarrow $
$\Longleftrightarrow $
$\Uparrow $
$\Downarrow $
$\Updownarrow $
$\nwarrow $
$\swarrow $
$\overrightarrow {xy}$
$\vec {xy}$

Delimiters
to get
you type
(x + y) $(x+y)$
[x + y] $[x+y]$
{x + y} $\{x+y\}$
{x + y} $\lbrace x+y\rbrace $
dx + ye $\lceil x+y\rceil $
bx + yc $\lfloor x+y\rfloor $
hx + yi $\langle x+y\rangle $
A/B
$A/B$
A\B
$A\backslash B$
|x + y| $|x+y|$
|x + y| $\vert x+y\vert $
kx + yk $\|x+y\|$
kx + yk $\Vert x+y\Vert $
xy
$x\uparrow y$
xy
$x\Uparrow y$
xy
$x\downarrow y$
xy
$x\Downarrow y$
xly
$x\updownarrow y$
xmy
$x\Updownarrow y$
Delimiters
to get
()[]{}debchi/\|k lm
x~wx~
wyy
hinolmjkDE./x~wx~
www
wyy
x~wx~
www
www
wyy
!"#()&'$%*+,-x~wx~
www
www
www
wyy
Use
Use
Use
Use

notes
parentheses
square brackets
curly braces
same as \{ and \}
ceiling function
floor function
angle brackets
slash
backslash
vertical bar
same as |
double vertical bar
same as \|
upward arrow
upward arrow
downward arrow
downward arrow
up-and-down arrow
up-and-down arrow

precede the delimiter by

notes

\bigl or \bigr

normal size
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

\bigl, \Bigl, \biggl or \Biggl for left delimiters.


\bigr, \Bigr, \biggr or \Biggr for right delimiters.
\big, \Big, \bigg or \Bigg for delimiters with no space around them.
\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.)

10

Large operators
to
P get you type
$\sum $
Q
$\prod $
`
$\coprod $
R
$\int $
H
$\oint $
T
$\bigcap $
S
$\bigcup $
F
$\bigsqcup $
W
$\bigvee $
V
$\bigwedge $
L
$\bigoplus $
U
$\biguplus $
N
$\bigotimes $
J
$\bigodot $

notes
summation
product
coproduct
integral
contour integral
intersection
union
square cup
disjunction
conjunction
circled plus
plus in U
circled times
circled dot

Limits on large operators


to get
you type
Pn i
$\sum _1^n x^i$
1 x
Pn1
k=1

k+1

xk
k=1 k!

in a display, looks like


n
P
xi

$\sum _{k=1}^{n-1}x^{k+1}$
$\prod _{k=1}^\infty {x_k\over k!}$

R1

xn dx
R0r2 +1 x+1
R4 x+2 dx
f () d
A
T5
r=1 Ar
S
S B
V
gcd(n,m)=1 Pm,n

$\int _0^1x^n\,dx$

gcd7i=1 ni

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

inf x Ax

$\inf _{x\to \infty }A_x$

limx0 e

x1

$\int _{-4}^{r^2+1}{x+1\over x+2}\,dx$


$\int _Af(\theta )\,d\theta $
$\bigcap _{r=1}^5A_r$
$\bigcup _{\alpha \in S}B_\alpha $
$\bigwedge _{\gcd (n,m)=1}P_{m,n}$

$\lim _{x\downarrow 0}e^{x^{-1}}$

1
n1
P

xk+1

k=1

xk
k!
k=1
R1 n
x dx
R0r2 +1 x+1
R4 x+2

f () d
A
5
T
Ar
r=1
S
B
S V

dx

Pm,n

gcd(n,m)=1
7
gcd ni
i=1

inf Ax
x
1
lim ex
x0

lim inf y1 f (y)

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

lim inf f (y)

lim supy6 g(y)

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

lim sup g(y)

f (n)
maxj=1

Pj (x)

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

min1nm Gn

$\min _{1\leq n\leq m}G_n$

Prx f (x)

$\Pr _x f(x)$

Pr f (x)

supk (ak + bk )

$\sup _k(a_k+b_k)$

sup(ak + bk )

detn Mn

$\det _n M_n$

det Mn

y1

y6
f (n)

max Pj (x)
j=1

min Gn

1nm
x

11

Functions
to get
you type
arccos $\arccos
arcsin
$\arcsin
arctan $\arctan
arg
$\arg $
cos
$\cos $
cosh
$\cosh $
cot
$\cot $
coth
$\coth $
csc
$\csc $
csch
$\csch $
deg
$\deg $
det
$\det $
dim
$\dim $
exp
$\exp $
gcd
$\gcd $
hom
$\hom $
inf
$\inf $
ker
$\ker $
lg
$\lg $
lim
$\lim $
lim inf $\liminf
lim sup $\limsup
ln
$\ln $
log
$\log $
max
$\max $
min
$\min $
mod
$\mod $
Pr
$\Pr $
sec
$\sec $
sech
$\sech $
sin
$\sin $
sinh
$\sinh $
sup
$\sup $
tan
$\tan $
tanh
$\tanh $

notes
$
$
$
argument
cosine
hyperbolic cosine
cotangent
hyperbolic cotangent
cosecant
hyperbolic cosecant
degree
determinant
dimension
exponential
greatest common divisor
infinum
kernel
log base 2
limit
$
$
natural log
common log (base 10)
maximum
minimum
modulo
probability
secant
hyperbolic secant
sine
hyperbolic sine
supremum
tangent
hyperbolic tangent

12

You might also like