This action might not be possible to undo. Are you sure you want to continue?

(Version 2.0)

American Mathematical Society

1999-12-13 (revised 2002-02-25)

ii CONTENTS

Contents

1 Introduction 1

2 Options for the amsmath package 2

3 Displayed equations 3

3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.2 Single equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.3 Split equations without alignment . . . . . . . . . . . . . . . . . 5

3.4 Split equations with alignment . . . . . . . . . . . . . . . . . . . 5

3.5 Equation groups without alignment . . . . . . . . . . . . . . . . . 6

3.6 Equation groups with mutual alignment . . . . . . . . . . . . . . 6

3.7 Alignment building blocks . . . . . . . . . . . . . . . . . . . . . . 7

3.8 Adjusting tag placement . . . . . . . . . . . . . . . . . . . . . . . 8

3.9 Vertical spacing and page breaks in multiline displays . . . . . . 8

3.10 Interrupting a display . . . . . . . . . . . . . . . . . . . . . . . . 9

3.11 Equation numbering . . . . . . . . . . . . . . . . . . . . . . . . . 9

4 Miscellaneous mathematical features 10

4.1 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.2 Math spacing commands . . . . . . . . . . . . . . . . . . . . . . . 11

4.3 Dots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.4 Nonbreaking dashes . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.5 Accents in math . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.6 Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.7 Boxed formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.8 Over and under arrows . . . . . . . . . . . . . . . . . . . . . . . . 13

4.9 Extensible arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.10 Aﬃxing symbols to other symbols . . . . . . . . . . . . . . . . . 13

4.11 Fractions and related constructions . . . . . . . . . . . . . . . . . 14

4.12 Continued fractions . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.13 Smash options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.14 Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5 Operator names 17

5.1 Deﬁning new operator names . . . . . . . . . . . . . . . . . . . . 17

5.2 \mod and its relatives . . . . . . . . . . . . . . . . . . . . . . . . . 18

6 The \text command 18

CONTENTS iii

7 Integrals and sums 19

7.1 Multiline subscripts and superscripts . . . . . . . . . . . . . . . . 19

7.2 The \sideset command . . . . . . . . . . . . . . . . . . . . . . . 19

7.3 Placement of subscripts and limits . . . . . . . . . . . . . . . . . 20

7.4 Multiple integral signs . . . . . . . . . . . . . . . . . . . . . . . . 20

8 Commutative diagrams 20

9 Using math fonts 21

9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

9.2 Recommended use of math font commands . . . . . . . . . . . . 21

9.3 Bold math symbols . . . . . . . . . . . . . . . . . . . . . . . . . . 22

9.4 Italic Greek letters . . . . . . . . . . . . . . . . . . . . . . . . . . 23

10 Error messages and output problems 23

10.1 General remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

10.2 Error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

10.3 Warning messages . . . . . . . . . . . . . . . . . . . . . . . . . . 29

10.4 Wrong output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

11 Additional information 30

11.1 Converting existing documents . . . . . . . . . . . . . . . . . . . 30

11.2 Technical notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

11.3 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

11.4 Of possible interest . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Bibliography 31

Index 33

iv CONTENTS

1

—1—

Introduction

The amsmath package is a L

A

T

E

X package that provides miscellaneous enhance-

ments for improving the information structure and printed output of documents

that contain mathematical formulas. Readers unfamiliar with L

A

T

E

X should refer

to [7]. If you have an up-to-date version of L

A

T

E

X, the amsmath package is nor-

mally provided along with it. Upgrading when a newer version of the amsmath

package is released can be done via http://www.ams.org/tex/amsmath.html

or ftp://ftp.ams.org/pub/tex/.

This documentation describes the features of the amsmath package and dis-

cusses how they are intended to be used. It also covers some ancillary packages:

amsbsy amstext

amscd amsxtra

amsopn

These all have something to do with the contents of math formulas. For infor-

mation on extra math symbols and math fonts, see [1] and http://www.ams.

org/tex/amsfonts.html. For documentation of the amsthm package or AMS

document classes (amsart, amsbook, etc.) see [3] or [2] and http://www.ams.

org/tex/author-info.html.

If you are a long-time L

A

T

E

X user and have lots of mathematics in what you

write, then you may recognize solutions for some familiar problems in this list

of amsmath features:

• A convenient way to deﬁne new ‘operator name’ commands analogous to

\sin and \lim, including proper side spacing and automatic selection of

the correct font style and size (even when used in sub- or superscripts).

• Multiple substitutes for the eqnarray environment to make various kinds

of equation arrangements easier to write.

• Equation numbers automatically adjust up or down to avoid overprinting

on the equation contents (unlike eqnarray).

• Spacing around equals signs matches the normal spacing in the equation

environment (unlike eqnarray).

• A way to produce multiline subscripts as are often used with summation

or product symbols.

• An easy way to substitute a variant equation number for a given equation

instead of the automatically supplied number.

• An easy way to produce subordinate equation numbers of the form (1.3a)

(1.3b) (1.3c) for selected groups of equations.

The amsmath package is distributed together with some small auxiliary pack-

ages:

amsmath Primary package, provides various features for displayed equations and

other mathematical constructs.

2 2. OPTIONS FOR THE AMSMATH PACKAGE

amstext Provides a \text command for typesetting a fragment of text inside

a display.

amsopn Provides \DeclareMathOperator for deﬁning new ‘operator names’ like

\sin and \lim.

amsbsy For backward compatibility this package continues to exist but use of

the newer bm package that comes with L

A

T

E

X is recommended instead.

amscd Provides a CD environment for simple commutative diagrams (no support

for diagonal arrows).

amsxtra Provides certain odds and ends such as \fracwithdelims and \ac-

centedsymbol, for compatibility with documents created using version

1.1.

The amsmath package incorporates amstext, amsopn, and amsbsy. The fea-

tures of amscd and amsxtra, however, are available only by invoking those

packages separately.

—2—

Options for the amsmath package

The amsmath package has the following options:

centertags (default) For a split equation, place equation numbers vertically

centered on the total height of the equation.

tbtags ‘Top-or-bottom tags’: For a split equation, place equation numbers level

with the last (resp. ﬁrst) line, if numbers are on the right (resp. left).

sumlimits (default) Place the subscripts and superscripts of summation sym-

bols above and below, in displayed equations. This option also aﬀects

other symbols of the same type—

,

,

,

, and so forth—but exclud-

ing integrals (see below).

nosumlimits Always place the subscripts and superscripts of summation-type

symbols to the side, even in displayed equations.

intlimits Like sumlimits, but for integral symbols.

nointlimits (default) Opposite of intlimits.

namelimits (default) Like sumlimits, but for certain ‘operator names’ such as

det, inf, lim, max, min, that traditionally have subscripts placed under-

neath when they occur in a displayed equation.

nonamelimits Opposite of namelimits.

To use one of these package options, put the option name in the optional ar-

gument of the \usepackage command—e.g., \usepackage[intlimits]{amsmath}.

The amsmath package also recognizes the following options which are nor-

mally selected (implicitly or explicitly) through the \documentclass command,

and thus need not be repeated in the option list of the \usepackage{amsmath}

statement.

3.2. SINGLE EQUATIONS 3

leqno Place equation numbers on the left.

reqno Place equation numbers on the right.

fleqn Position equations at a ﬁxed indent from the left margin rather than

centered in the text column.

—3—

Displayed equations

3.1 Introduction

The amsmath package provides a number of additional displayed equation struc-

tures beyond the ones provided in basic L

A

T

E

X. The augmented set includes:

equation equation* align align*

gather gather* flalign flalign*

multline multline* alignat alignat*

split

(Although the standard eqnarray environment remains available, it is better to

use align or equation+split instead.)

Except for split, each environment has both starred and unstarred forms,

where the unstarred forms have automatic numbering using L

A

T

E

X’s equation

counter. You can suppress the number on any particular line by putting \notag

before the \\; you can also override it with a tag of your own using \tag{¸label )},

where ¸label ) means arbitrary text such as $*$ or ii used to “number” the

equation. There is also a \tag* command that causes the text you supply to

be typeset literally, without adding parentheses around it. \tag and \tag*

can also be used within the unnumbered versions of all the amsmath alignment

structures. Some examples of the use of \tag may be found in the sample ﬁles

testmath.tex and subeqn.tex provided with the amsmath package.

The split environment is a special subordinate form that is used only inside

one of the others. It cannot be used inside multline, however.

In the structures that do alignment (split, align and variants), relation

symbols have an & before them but not after—unlike eqnarray. Putting the

& after the relation symbol will interfere with the normal spacing; it has to go

before.

3.2 Single equations

The equation environment is for a single equation with an automatically gen-

erated number. The equation* environment is the same except for omitting

the number.

1

1

Basic L

A

T

E

X doesn’t provide an equation* environment, but rather a functionally equiv-

alent environment named displaymath.

4 3. DISPLAYED EQUATIONS

Table 3.1. Comparison of displayed equation environments (vertical lines in-

dicating nominal margins)

\begin{equation*}

a=b

\end{equation*}

a = b

\begin{equation}

a=b

\end{equation}

(1) a = b

\begin{equation}\label{xx}

\begin{split}

a& =b+c-d\\

& \quad +e-f\\

& =g+h\\

& =i

\end{split}

\end{equation}

a = b +c −d

+e −f

= g +h

= i

(2)

\begin{multline}

a+b+c+d+e+f\\

+i+j+k+l+m+n

\end{multline}

(3) a +b +c +d +e +f

+i +j +k +l +m+n

\begin{gather}

a_1=b_1+c_1\\

a_2=b_2+c_2-d_2+e_2

\end{gather}

a

1

= b

1

+c

1

(4)

a

2

= b

2

+c

2

−d

2

+e

2

(5)

\begin{align}

a_1& =b_1+c_1\\

a_2& =b_2+c_2-d_2+e_2

\end{align}

a

1

= b

1

+c

1

(6)

a

2

= b

2

+c

2

−d

2

+e

2

(7)

\begin{align}

a_{11}& =b_{11}&

a_{12}& =b_{12}\\

a_{21}& =b_{21}&

a_{22}& =b_{22}+c_{22}

\end{align}

a

11

= b

11

a

12

= b

12

(8)

a

21

= b

21

a

22

= b

22

+c

22

(9)

\begin{flalign*}

a_{11}& =b_{11}&

a_{12}& =b_{12}\\

a_{21}& =b_{21}&

a_{22}& =b_{22}+c_{22}

\end{flalign*}

a

11

= b

11

a

12

= b

12

a

21

= b

21

a

22

= b

22

+c

22

3.4. SPLIT EQUATIONS WITH ALIGNMENT 5

3.3 Split equations without alignment

The multline environment is a variation of the equation environment used for

equations that don’t ﬁt on a single line. The ﬁrst line of a multline will be at

the left margin and the last line at the right margin, except for an indention on

both sides in the amount of \multlinegap. Any additional lines in between will

be centered independently within the display width (unless the fleqn option is

in eﬀect).

Like equation, multline has only a single equation number (thus, none

of the individual lines should be marked with \notag). The equation number

is placed on the last line (reqno option) or ﬁrst line (leqno option); vertical

centering as for split is not supported by multline.

It’s possible to force one of the middle lines to the left or right with com-

mands \shoveleft, \shoveright. These commands take the entire line as an

argument, up to but not including the ﬁnal \\; for example

(3.10) A

B

C

D

\begin{multline}

\framebox[.65\columnwidth]{A}\\

\framebox[.5\columnwidth]{B}\\

\shoveright{\framebox[.55\columnwidth]{C}}\\

\framebox[.65\columnwidth]{D}

\end{multline}

The value of \multlinegap can be changed with the usual L

A

T

E

X commands

\setlength or \addtolength.

3.4 Split equations with alignment

Like multline, the split environment is for single equations that are too long

to ﬁt on one line and hence must be split into multiple lines. Unlike multline,

however, the split environment provides for alignment among the split lines,

using & to mark alignment points. Unlike the other amsmath equation structures,

the split environment provides no numbering, because it is intended to be used

only inside some other displayed equation structure, usually an equation, align,

or gather environment, which provides the numbering. For example:

H

c

=

1

2n

n

l=0

(−1)

l

(n −l)

p−2

l1+···+lp=l

p

i=1

_

n

i

l

i

_

[(n −l) −(n

i

−l

i

)]

ni−li

_

(n −l)

2

−

p

j=1

(n

i

−l

i

)

2

_

.

(3.11)

6 3. DISPLAYED EQUATIONS

\begin{equation}\label{e:barwq}\begin{split}

H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}

\sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\

&\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot

\Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].

\end{split}\end{equation}

The split structure should constitute the entire body of the enclosing struc-

ture, apart from commands like \label that produce no visible material.

3.5 Equation groups without alignment

The gather environment is used for a group of consecutive equations when there

is no alignment desired among them; each one is centered separately within

the text width (see Table 3.1). Equations inside gather are separated by a

\bslash command. Any equation in a gather may consist of a \begin{split}

. . . \end{split} structure—for example:

\begin{gather}

first equation\\

\begin{split}

second & equation\\

& on two lines

\end{split}

\\

third equation

\end{gather}

3.6 Equation groups with mutual alignment

The align environment is used for two or more equations when vertical align-

ment is desired; usually binary relations such as equal signs are aligned (see

Table 3.1).

To have several equation columns side-by-side, use extra ampersands to sep-

arate the columns:

x = y X = Y a = b +c (3.12)

x

= y

X

= Y

a

= b (3.13)

x +x

= y +y

X +X

= Y +Y

a

b = c

b (3.14)

\begin{align}

x&=y & X&=Y & a&=b+c\\

x’&=y’ & X’&=Y’ & a’&=b\\

x+x’&=y+y’ & X+X’&=Y+Y’ & a’b&=c’b

\end{align}

Line-by-line annotations on an equation can be done by judicious application of

3.7. ALIGNMENT BUILDING BLOCKS 7

\text inside an align environment:

x = y

1

−y

2

+y

3

−y

5

+y

8

−. . . by (3.21) (3.15)

= y

◦ y

∗

by (4.1) (3.16)

= y(0)y

by Axiom 1. (3.17)

\begin{align}

x& = y_1-y_2+y_3-y_5+y_8-\dots

&& \text{by \eqref{eq:C}}\\

& = y’\circ y^* && \text{by \eqref{eq:D}}\\

& = y(0) y’ && \text {by Axiom 1.}

\end{align}

A variant environment alignat allows the horizontal space between equations

to be explicitly speciﬁed. This environment takes one argument, the number of

“equation columns”: count the maximum number of &s in any row, add 1 and

divide by 2.

x = y

1

−y

2

+y

3

−y

5

+y

8

−. . . by (3.21) (3.18)

= y

◦ y

∗

by (4.1) (3.19)

= y(0)y

by Axiom 1. (3.20)

\begin{alignat}{2}

x& = y_1-y_2+y_3-y_5+y_8-\dots

&\quad& \text{by \eqref{eq:C}}\\

& = y’\circ y^* && \text{by \eqref{eq:D}}\\

& = y(0) y’ && \text {by Axiom 1.}

\end{alignat}

3.7 Alignment building blocks

Like equation, the multi-equation environments gather, align, and alignat

are designed to produce a structure whose width is the full line width. This

means, for example, that one cannot readily add parentheses around the entire

structure. But variants gathered, aligned, and alignedat are provided whose

total width is the actual width of the contents; thus they can be used as a

component in a containing expression. E.g.,

B

= −∂ E,

E

= ∂ B −4πj,

_

Maxwell’s equations

\begin{equation*}

\left.\begin{aligned}

B’&=-\partial\times E,\\

E’&=\partial\times B - 4\pi j,

\end{aligned}

\right\}

\qquad \text{Maxwell’s equations}

\end{equation*}

8 3. DISPLAYED EQUATIONS

Like the array environment, these -ed variants also take an optional [t] or

[b] argument to specify vertical positioning.

“Cases” constructions like the following are common in mathematics:

(3.21) P

r−j

=

_

0 if r −j is odd,

r! (−1)

(r−j)/2

if r −j is even.

and in the amsmath package there is a cases environment to make them easy

to write:

P_{r-j}=\begin{cases}

0& \text{if $r-j$ is odd},\\

r!\,(-1)^{(r-j)/2}& \text{if $r-j$ is even}.

\end{cases}

Notice the use of \text (cf. ¸6) and the nested math formulas.

3.8 Adjusting tag placement

Placing equation numbers can be a rather complex problem in multiline displays.

The environments of the amsmath package try hard to avoid overprinting an

equation number on the equation contents, if necessary moving the number

down or up to a separate line. Diﬃculties in accurately calculating the proﬁle of

an equation can occasionally result in number movement that doesn’t look right.

There is a \raisetag command provided to adjust the vertical position of the

current equation number, if it has been shifted away from its normal position.

To move a particular number up by six points, write \raisetag{6pt}. This

kind of adjustment is ﬁne tuning like line breaks and page breaks, and should

therefore be left undone until your document is nearly ﬁnalized, or you may end

up redoing the ﬁne tuning several times to keep up with changing document

contents.

3.9 Vertical spacing and page breaks in multiline displays

You can use the \\[¸dimension)] command to get extra vertical space be-

tween lines in all the amsmath displayed equation environments, as is usual

in L

A

T

E

X. When the amsmath package is in use page breaks between equa-

tion lines are normally disallowed; the philosophy is that page breaks in such

material should receive individual attention from the author. To get an in-

dividual page break inside a particular displayed equation, a \displaybreak

command is provided. \displaybreak is best placed immediately before the

\\ where it is to take eﬀect. Like L

A

T

E

X’s \pagebreak, \displaybreak takes

an optional argument between 0 and 4 denoting the desirability of the page-

break. \displaybreak[0] means “it is permissible to break here” without

encouraging a break; \displaybreak with no optional argument is the same as

\displaybreak[4] and forces a break.

If you prefer a strategy of letting page breaks fall where they may, even in the

middle of a multi-line equation, then you might put \allowdisplaybreaks[1]

in the preamble of your document. An optional argument 1–4 can be used for

3.11. EQUATION NUMBERING 9

ﬁner control: [1] means allow page breaks, but avoid them as much as possi-

ble; values of 2,3,4 mean increasing permissiveness. When display breaks are

enabled with \allowdisplaybreaks, the \\* command can be used to prohibit

a pagebreak after a given line, as usual.

Note: Certain equation environments wrap their contents in an

unbreakable box, with the consequence that neither \displaybreak

nor \allowdisplaybreaks will have any eﬀect on them. These include

split, aligned, gathered, and alignedat.

3.10 Interrupting a display

The command \intertext is used for a short interjection of one or two lines

of text in the middle of a multiple-line display structure (see also the \text

command in ¸6). Its salient feature is preservation of the alignment, which

would not happen if you simply ended the display and then started it up again

afterwards. \intertext may only appear right after a \\ or \\* command.

Notice the position of the word “and” in this example.

A

1

= N

0

(λ; Ω

) −φ(λ; Ω

), (3.22)

A

2

= φ(λ; Ω

) −φ(λ; Ω), (3.23)

and

A

3

= ^(λ; ω). (3.24)

\begin{align}

A_1&=N_0(\lambda;\Omega’)-\phi(\lambda;\Omega’),\\

A_2&=\phi(\lambda;\Omega’)-\phi(\lambda;\Omega),\\

\intertext{and}

A_3&=\mathcal{N}(\lambda;\omega).

\end{align}

3.11 Equation numbering

3.11.1 Numbering hierarchy

In L

A

T

E

X if you wanted to have equations numbered within sections—that is,

have equation numbers (1.1), (1.2), . . . , (2.1), (2.2), . . . , in sections 1, 2, and so

forth—you could redeﬁne \theequation as suggested in the L

A

T

E

X manual [7,

¸6.3, ¸C.8.4]:

\renewcommand{\theequation}{\thesection.\arabic{equation}}

This works pretty well, except that the equation counter won’t be reset to

zero at the beginning of a new section or chapter, unless you do it yourself using

\setcounter. To make this a little more convenient, the amsmath package pro-

vides a command \numberwithin. To have equation numbering tied to section

numbering, with automatic reset of the equation counter, write

\numberwithin{equation}{section}

As its name implies, the \numberwithin command can be applied to any counter,

not just the equation counter.

10 4. MISCELLANEOUS MATHEMATICAL FEATURES

3.11.2 Cross references to equation numbers

To make cross-references to equations easier, an \eqref command is provided.

This automatically supplies the parentheses around the equation number. I.e.,

if \ref{abc} produces 3.2 then \eqref{abc} produces (3.2).

3.11.3 Subordinate numbering sequences

The amsmath package provides also a subequations environment to make it

easy to number equations in a particular group with a subordinate numbering

scheme. For example

\begin{subequations}

...

\end{subequations}

causes all numbered equations within that part of the document to be numbered

(4.9a) (4.9b) (4.9c) . . . , if the preceding numbered equation was (4.8). A \label

command immediately after \begin{subequations} will produce a \ref of the

parent number 4.9, not 4.9a. The counters used by the subequations environ-

ment are parentequation and equation and \addtocounter, \setcounter,

\value, etc., can be applied as usual to those counter names. To get anything

other than lowercase letters for the subordinate numbers, use standard L

A

T

E

X

methods for changing numbering style [7, ¸6.3, ¸C.8.4]. For example, redeﬁning

\theequation as follows will produce roman numerals.

\begin{subequations}

\renewcommand{\theequation}{\theparentequation \roman{equation}}

...

—4—

Miscellaneous mathematical features

4.1 Matrices

The amsmath package provides some environments for matrices beyond the basic

array environment of L

A

T

E

X. The pmatrix, bmatrix, Bmatrix, vmatrix and

Vmatrix have (respectively) ( ), [ ], ¦ ¦, [ [, and | | delimiters built in. For

naming consistency there is a matrix environment sans delimiters. This is not

entirely redundant with the array environment; the matrix environments all

use more economical horizontal spacing than the rather prodigal spacing of the

array environment. Also, unlike the array environment, you don’t have to

give column speciﬁcations for any of the matrix environments; by default you

can have up to 10 centered columns.

2

(If you need left or right alignment in a

column or other special formats you must resort to array.)

2

More precisely: The maximum number of columns in a matrix is determined by the

counter MaxMatrixCols (normal value = 10), which you can change if necessary using L

A

T

E

X’s

\setcounter or \addtocounter commands.

4.3. DOTS 11

To produce a small matrix suitable for use in text, there is a smallmatrix

environment (e.g.,

_

a b

c d

_

) that comes closer to ﬁtting within a single text line

than a normal matrix. Delimiters must be provided; there are no p,b,B,v,V

versions of smallmatrix. The above example was produced by

\bigl( \begin{smallmatrix}

a&b\\ c&d

\end{smallmatrix} \bigr)

\hdotsfor{¸number)} produces a row of dots in a matrix spanning the given

number of columns. For example,

a b c d

e . . . . . . .

\begin{matrix} a&b&c&d\\

e&\hdotsfor{3} \end{matrix}

The spacing of the dots can be varied through use of a square-bracket option,

for example, \hdotsfor[1.5]{3}. The number in square brackets will be used

as a multiplier (i.e., the normal value is 1.0).

(4.1)

_

_

_

_

D

1

t −a

12

t

2

. . . −a

1n

t

n

−a

21

t

1

D

2

t . . . −a

2n

t

n

. . . . . . . . . . . . . . . . . . . . . .

−a

n1

t

1

−a

n2

t

2

. . . D

n

t

_

_

_

_

,

\begin{pmatrix} D_1t&-a_{12}t_2&\dots&-a_{1n}t_n\\

-a_{21}t_1&D_2t&\dots&-a_{2n}t_n\\

\hdotsfor[2]{4}\\

-a_{n1}t_1&-a_{n2}t_2&\dots&D_nt\end{pmatrix}

4.2 Math spacing commands

The amsmath package slightly extends the set of math spacing commands, as

shown below. Both the spelled-out and abbreviated forms of these commands

are robust, and they can also be used outside of math.

Abbrev. Spelled out Example Abbrev. Spelled out Example

no space ⇒⇐ no space ⇒⇐

\, \thinspace ⇒⇐ \! \negthinspace ⇒⇐

\: \medspace ⇒⇐ \negmedspace ⇒⇐

\; \thickspace ⇒⇐ \negthickspace ⇒⇐

\quad ⇒ ⇐

\qquad ⇒ ⇐

For the greatest possible control over math spacing, use \mspace and ‘math

units’. One math unit, or mu, is equal to 1/18 em. Thus to get a negative \quad

you could write \mspace{-18.0mu}.

4.3 Dots

For preferred placement of ellipsis dots (raised or on-line) in various contexts

there is no general consensus. It may therefore be considered a matter of taste.

By using the semantically oriented commands

12 4. MISCELLANEOUS MATHEMATICAL FEATURES

• \dotsc for “dots with commas”

• \dotsb for “dots with binary operators/relations”

• \dotsm for “multiplication dots”

• \dotsi for “dots with integrals”

• \dotso for “other dots” (none of the above)

instead of \ldots and \cdots, you make it possible for your document to be

adapted to diﬀerent conventions on the ﬂy, in case (for example) you have to

submit it to a publisher who insists on following house tradition in this respect.

The default treatment for the various kinds follows American Mathematical

Society conventions:

Then we have the series $A_1, A_2,

\dotsc$, the regional sum $A_1

+A_2 +\dotsb $, the orthogonal

product $A_1 A_2 \dotsm $, and

the infinite integral

\[\int_{A_1}\int_{A_2}\dotsi\].

Then we have the series A

1

, A

2

, . . . ,

the regional sum A

1

+A

2

+ , the

orthogonal product A

1

A

2

, and

the inﬁnite integral

_

A1

_

A2

.

4.4 Nonbreaking dashes

A command \nobreakdash is provided to suppress the possibility of a linebreak

after the following hyphen or dash. For example, if you write ‘pages 1–9’ as

pages 1\nobreakdash--9 then a linebreak will never occur between the dash

and the 9. You can also use \nobreakdash to prevent undesirable hyphen-

ations in combinations like $p$-adic. For frequent use, it’s advisable to make

abbreviations, e.g.,

\newcommand{\p}{$p$\nobreakdash}% for "\p-adic"

\newcommand{\Ndash}{\nobreakdash--}% for "pages 1\Ndash 9"

% For "\n dimensional" ("n-dimensional"):

\newcommand{\n}[1]{$n$\nobreakdash-\hspace{0pt}}

The last example shows how to prohibit a linebreak after the hyphen but allow

normal hyphenation in the following word. (It suﬃces to add a zero-width space

after the hyphen.)

4.5 Accents in math

In ordinary L

A

T

E

X the placement of the second accent in doubled math accents

is often poor. With the amsmath package you will get improved placement of

the second accent:

ˆ

ˆ

A (\hat{\hat{A}}).

The commands \dddot and \ddddot are available to produce triple and

quadruple dot accents in addition to the \dot and \ddot accents already avail-

able in L

A

T

E

X.

To get a superscripted hat or tilde character, load the amsxtra package and

use \sphat or \sptilde. Usage is A\sphat (note the absence of the ^ character).

To place an arbitrary symbol in math accent position, or to get under accents,

see the accents package by Javier Bezos.

4.10. AFFIXING SYMBOLS TO OTHER SYMBOLS 13

4.6 Roots

In ordinary L

A

T

E

X the placement of root indices is sometimes not so good:

β

√

k

(\sqrt[\beta]{k}). In the amsmath package \leftroot and \uproot allow

you to adjust the position of the root:

\sqrt[\leftroot{-2}\uproot{2}\beta]{k}

will move the beta up and to the right:

β

√

k. The negative argument used with

\leftroot moves the β to the right. The units are a small amount that is a

useful size for such adjustments.

4.7 Boxed formulas

The command \boxed puts a box around its argument, like \fbox except that

the contents are in math mode:

(4.2) η ≤ C(δ(η) + Λ

M

(0, δ))

\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}

4.8 Over and under arrows

Basic L

A

T

E

X provides \overrightarrow and \overleftarrow commands. Some

additional over and under arrow commands are provided by the amsmath package

to extend the set:

\overleftarrow \underleftarrow

\overrightarrow \underrightarrow

\overleftrightarrow \underleftrightarrow

4.9 Extensible arrows

\xleftarrow and \xrightarrow produce arrows that extend automatically to

accommodate unusually wide subscripts or superscripts. These commands take

one optional argument (the subscript) and one mandatory argument (the su-

perscript, possibly empty):

(4.3) A

n+µ−1

←−−−−− B

n±i−1

−−−−→

T

C

\xleftarrow{n+\mu-1}\quad \xrightarrow[T]{n\pm i-1}

4.10 Aﬃxing symbols to other symbols

L

A

T

E

X provides \stackrel for placing a superscript above a binary relation. In

the amsmath package there are somewhat more general commands, \overset

and \underset, that can be used to place one symbol above or below another

symbol, whether it’s a relation or something else. The input \overset{*}{X}

will place a superscript-size ∗ above the X:

∗

X; \underset is the analog for

adding a symbol underneath.

See also the description of \sideset in ¸7.2.

14 4. MISCELLANEOUS MATHEMATICAL FEATURES

4.11 Fractions and related constructions

4.11.1 The \frac, \dfrac, and \tfrac commands

The \frac command, which is in the basic command set of L

A

T

E

X, takes two

arguments—numerator and denominator—and typesets them in normal fraction

form. The amsmath package provides also \dfrac and \tfrac as convenient

abbreviations for {\displaystyle\frac ... } and {\textstyle\frac ... }.

(4.4)

1

k

log

2

c(f)

1

k

log

2

c(f)

_

1

k

log

2

c(f)

_

1

k

log

2

c(f)

\begin{equation}

\frac{1}{k}\log_2 c(f)\;\tfrac{1}{k}\log_2 c(f)\;

\sqrt{\frac{1}{k}\log_2 c(f)}\;\sqrt{\dfrac{1}{k}\log_2 c(f)}

\end{equation}

4.11.2 The \binom, \dbinom, and \tbinom commands

For binomial expressions such as

_

n

k

_

amsmath has \binom, \dbinom and \tbinom:

(4.5) 2

k

−

_

k

1

_

2

k−1

+

_

k

2

_

2

k−2

2^k-\binom{k}{1}2^{k-1}+\binom{k}{2}2^{k-2}

4.11.3 The \genfrac command

The capabilities of \frac, \binom, and their variants are subsumed by a general-

ized fraction command \genfrac with six arguments. The last two correspond

to \frac’s numerator and denominator; the ﬁrst two are optional delimiters

(as seen in \binom); the third is a line thickness override (\binom uses this to

set the fraction line thickness to 0—i.e., invisible); and the fourth argument

is a mathstyle override: integer values 0–3 select respectively \displaystyle,

\textstyle, \scriptstyle, and \scriptscriptstyle. If the third argument

is left empty, the line thickness defaults to ‘normal’.

\genfrac{left-delim}{right-delim}{thickness}{mathstyle}

{numerator}{denominator}

To illustrate, here is how \frac, \tfrac, and \binom might be deﬁned.

\newcommand{\frac}[2]{\genfrac{}{}{}{}{#1}{#2}}

\newcommand{\tfrac}[2]{\genfrac{}{}{}{1}{#1}{#2}}

\newcommand{\binom}[2]{\genfrac{(}{)}{0pt}{}{#1}{#2}}

If you ﬁnd yourself repeatedly using \genfrac throughout a document for a

particular notation, you will do yourself a favor (and your publisher) if you

deﬁne a meaningfully-named abbreviation for that notation, along the lines of

\frac and \binom.

The primitive generalized fraction commands \over, \overwithdelims, \atop,

\atopwithdelims, \above, \abovewithdelims produce warning messages if

used with the amsmath package, for reasons discussed in technote.tex.

4.14. DELIMITERS 15

4.12 Continued fractions

The continued fraction

(4.6)

1

√

2 +

1

√

2 +

1

√

2 +

can be obtained by typing

\cfrac{1}{\sqrt{2}+

\cfrac{1}{\sqrt{2}+

\cfrac{1}{\sqrt{2}+\dotsb

}}}

This produces better-looking results than straightforward use of \frac. Left

or right placement of any of the numerators is accomplished by using \cfrac[l]

or \cfrac[r] instead of \cfrac.

4.13 Smash options

The command \smash is used to typeset a subformula with an eﬀective height

and depth of zero, which is sometimes useful in adjusting the subformula’s

position with respect to adjacent symbols. With the amsmath package \smash

has optional arguments t and b, because occasionally it is advantageous to be

able to “smash” only the top or only the bottom of something while retaining

the natural depth or height. For example, when adjacent radical symbols are

unevenly sized or positioned because of diﬀerences in the height and depth of

their contents, \smash can be employed to make them more consistent. Compare

√

x+

√

y +

√

z and

√

x+

√

y +

√

z, where the latter was produced by $\sqrt{x}

+ \sqrt{\smash[b]{y}} + \sqrt{z}$.

4.14 Delimiters

4.14.1 Delimiter sizes

The automatic delimiter sizing done by \left and \right has two limitations:

First, it is applied mechanically to produce delimiters large enough to encompass

the largest contained item, and second, the range of sizes is not even approxi-

mately continuous but has fairly large quantum jumps. This means that a math

fragment that is inﬁnitesimally too large for a given delimiter size will get the

next larger size, a jump of 3pt or so in normal-sized text. There are two or

three situations where the delimiter size is commonly adjusted, using a set of

commands that have ‘big’ in their names.

Delimiter text \left \bigl \Bigl \biggl \Biggl

size size \right \bigr \Bigr \biggr \Biggr

Result (b)(

c

d

) (b)

_

c

d

_

_

b

__

c

d

_

_

b

__

c

d

_

_

b

__

c

d

_

_

b

__

c

d

_

16 4. MISCELLANEOUS MATHEMATICAL FEATURES

The ﬁrst kind of situation is a cumulative operator with limits above and below.

With \left and \right the delimiters usually turn out larger than necessary,

and using the Big or bigg sizes instead gives better results:

_

_

i

a

i

¸

¸

¸

¸

¸

¸

j

x

ij

¸

¸

¸

¸

¸

¸

p

_

_

1/p

versus

_

i

a

i

¸

¸

¸

j

x

ij

¸

¸

¸

p

_

1/p

\biggl[\sum_i a_i\Bigl\lvert\sum_j x_{ij}\Bigr\rvert^p\biggr]^{1/p}

The second kind of situation is clustered pairs of delimiters where \left and

\right make them all the same size (because that is adequate to cover the en-

compassed material) but what you really want is to make some of the delimiters

slightly larger to make the nesting easier to see.

((a

1

b

1

) −(a

2

b

2

)) ((a

2

b

1

) + (a

1

b

2

)) versus

_

(a

1

b

1

) −(a

2

b

2

)

__

(a

2

b

1

) + (a

1

b

2

)

_

\left((a_1 b_1) - (a_2 b_2)\right)

\left((a_2 b_1) + (a_1 b_2)\right)

\quad\text{versus}\quad

\bigl((a_1 b_1) - (a_2 b_2)\bigr)

\bigl((a_2 b_1) + (a_1 b_2)\bigr)

The third kind of situation is a slightly oversize object in running text, such as

¸

¸

¸

b

d

¸

¸

¸ where the delimiters produced by \left and \right cause too much line

spreading. In that case \bigl and \bigr can be used to produce delimiters that

are slightly larger than the base size but still able to ﬁt within the normal line

spacing:

¸

¸

b

d

¸

¸

.

In ordinary L

A

T

E

X \big, \bigg, \Big, and \Bigg delimiters aren’t scaled

properly over the full range of L

A

T

E

X font sizes. With the amsmath package they

are.

4.14.2 Vertical bar notations

The amsmath package provides commands \lvert, \rvert, \lVert, \rVert

(compare \langle, \rangle) to address the problem of overloading for the

vert bar character |. This character is currently used in L

A

T

E

X documents to

represent a wide variety of mathematical objects: the ‘divides’ relation in a

number-theory expression like p[q, or the absolute-value operation [z[, or the

‘such that’ condition in set notation, or the ‘evaluated at’ notation f

ζ

(t)

¸

¸

t=0

.

The multiplicity of uses in itself is not so bad; what is bad, however, is that fact

that not all of the uses take the same typographical treatment, and that the

complex discriminatory powers of a knowledgeable reader cannot be replicated

in computer processing of mathematical documents. It is recommended there-

fore that there should be a one-to-one correspondence in any given document

between the vert bar character | and a selected mathematical notation, and

similarly for the double-bar command \|. This immediately rules out the use

of | and \| for delimiters, because left and right delimiters are distinct usages

5.1. DEFINING NEW OPERATOR NAMES 17

that do not relate in the same way to adjacent symbols; recommended prac-

tice is therefore to deﬁne suitable commands in the document preamble for any

paired-delimiter use of vert bar symbols:

\providecommand{\abs}[1]{\lvert#1\rvert}

\providecommand{\norm}[1]{\lVert#1\rVert}

whereupon the document would contain \abs{z} to produce [z[ and \norm{v}

to produce |v|.

—5—

Operator names

5.1 Deﬁning new operator names

Math functions such as log, sin, and lim are traditionally typeset in roman type

to make them visually more distinct from one-letter math variables, which are

set in math italic. The more common ones have predeﬁned names, \log, \sin,

\lim, and so forth, but new ones come up all the time in mathematical papers,

so the amsmath package provides a general mechanism for deﬁning new ‘operator

names’. To deﬁne a math function \xxx to work like \sin, you write

\DeclareMathOperator{\xxx}{xxx}

whereupon ensuing uses of \xxx will produce xxx in the proper font and au-

tomatically add proper spacing on either side when necessary, so that you get

Axxx B instead of AxxxB. In the second argument of \DeclareMathOperator

(the name text), a pseudo-text mode prevails: the hyphen character - will print

as a text hyphen rather than a minus sign and an asterisk * will print as a raised

text asterisk instead of a centered math star. (Compare a-b*c and a − b ∗ c.)

But otherwise the name text is printed in math mode, so that you can use, e.g.,

subscripts and superscripts there.

If the new operator should have subscripts and superscripts placed in ‘limits’

position above and below as with lim, sup, or max, use the * form of the

\DeclareMathOperator command:

\DeclareMathOperator*{\Lim}{Lim}

See also the discussion of subscript placement in Section 7.3.

The following operator names are predeﬁned:

18 6. THE \TEXT COMMAND

\arccos arccos \deg deg \lg lg \projlim proj lim

\arcsin arcsin \det det \lim lim \sec sec

\arctan arctan \dim dim \liminf liminf \sin sin

\arg arg \exp exp \limsup limsup \sinh sinh

\cos cos \gcd gcd \ln ln \sup sup

\cosh cosh \hom hom \log log \tan tan

\cot cot \inf inf \max max \tanh tanh

\coth coth \injlim inj lim \min min

\csc csc \ker ker \Pr Pr

\varlimsup lim \varinjlim lim

−→

\varliminf lim \varprojlim lim

←−

There is also a command \operatorname such that using

\operatorname{abc}

in a math formula is equivalent to a use of \abc deﬁned by \DeclareMathOperator.

This may be occasionally useful for constructing more complex notation or other

purposes. (Use the variant \operatorname* to get limits.)

5.2 \mod and its relatives

Commands \mod, \bmod, \pmod, \pod are provided to deal with the special

spacing conventions of “mod” notation. \bmod and \pmod are available in L

A

T

E

X,

but with the amsmath package the spacing of \pmod will adjust to a smaller value

if it’s used in a non-display-mode formula. \mod and \pod are variants of \pmod

preferred by some authors; \mod omits the parentheses, whereas \pod omits the

“mod” and retains the parentheses.

(5.1) gcd(n, m mod n); x ≡ y (mod b); x ≡ y mod c; x ≡ y (d)

\gcd(n,m\bmod n);\quad x\equiv y\pmod b;

\quad x\equiv y\mod c;\quad x\equiv y\pod d

—6—

The \text command

The main use of the command \text is for words or phrases in a display. It

is very similar to the L

A

T

E

X command \mbox in its eﬀects, but has a couple

of advantages. If you want a word or phrase of text in a subscript, you can

type ..._{\text{word or phrase}}, which is slightly easier than the \mbox

equivalent: ..._{\mbox{\scriptsize word or phrase}}. The other advantage

is the more descriptive name.

(6.1) f

[xi−1,xi]

is monotonic, i = 1, . . . , c + 1

7.2. THE \SIDESET COMMAND 19

f_{[x_{i-1},x_i]} \text{ is monotonic,}

\quad i = 1,\dots,c+1

—7—

Integrals and sums

7.1 Multiline subscripts and superscripts

The \substack command can be used to produce a multiline subscript or su-

perscript: for example

\sum_{\substack{

0\le i\le m\\

0<j<n}}

P(i,j)

0≤i≤m

0<j<n

P(i, j)

A slightly more generalized form is the subarray environment which allows you

to specify that each line should be left-aligned instead of centered, as here:

\sum_{\begin{subarray}{l}

i\in\Lambda\\ 0<j<n

\end{subarray}}

P(i,j)

i∈Λ

0<j<n

P(i, j)

7.2 The \sideset command

There’s also a command called \sideset, for a rather special purpose: putting

symbols at the subscript and superscript corners of a large operator symbol such

as

or

. Note: this command is not designed to be applied to anything other

than sum-class symbols. The prime example is the case when you want to put

a prime on a sum symbol. If there are no limits above or below the sum, you

could just use \nolimits: here’s \sum\nolimits’ E_n in display mode:

(7.1)

E

n

If, however, you want not only the prime but also something below or above the

sum symbol, it’s not so easy—indeed, without \sideset, it would be downright

diﬃcult. With \sideset, you can write

\sideset{}{’}

\sum_{n<k,\;\text{$n$ odd}} nE_n

n<k, n odd

nE

n

The extra pair of empty braces is explained by the fact that \sideset has

the capability of putting an extra symbol or symbols at each corner of a large

operator; to put an asterisk at each corner of a product symbol, you would type

\sideset{_*^*}{_*^*}\prod

∗

∗

∗

∗

20 8. COMMUTATIVE DIAGRAMS

7.3 Placement of subscripts and limits

The default positioning for subscripts depends on the base symbol involved. The

default for sum-class symbols is ‘displaylimits’ positioning: When a sum-class

symbol appears in a displayed formula, subscript and superscript are placed in

‘limits’ position above and below, but in an inline formula, they are placed to

the side, to avoid unsightly and wasteful spreading of the surrounding text lines.

The default for integral-class symbols is to have sub- and superscripts always to

the side, even in displayed formulas. (See the discussion of the intlimits and

related options in Section 2.)

Operator names such as sin or lim may have either ‘displaylimits’ or ‘limits’

positioning depending on how they were deﬁned. The standard operator names

are deﬁned according to normal mathematical usage.

The commands \limits and \nolimits can be used to override the normal

behavior of a base symbol:

X

,

__

A

, lim

n→∞

To deﬁne a command whose subscripts follow the same ‘displaylimits’ behavior

as \sum, put \displaylimits at the tail end of the deﬁnition. When multiple

instances of \limits, \nolimits, or \displaylimits occur consecutively, the

last one takes precedence.

7.4 Multiple integral signs

\iint, \iiint, and \iiiint give multiple integral signs with the spacing be-

tween them nicely adjusted, in both text and display style. \idotsint is an

extension of the same idea that gives two integral signs with dots between them.

__

A

f(x, y) dxdy

___

A

f(x, y, z) dxdy dz (7.2)

____

A

f(w, x, y, z) dwdxdy dz

_

_

A

f(x

1

, . . . , x

k

) (7.3)

—8—

Commutative diagrams

Some commutative diagram commands like the ones in /

/

o-T

E

X are available

as a separate package, amscd. For complex commutative diagrams authors will

need to turn to more comprehensive packages like kuvio or XY-pic, but for

simple diagrams without diagonal arrows the amscd commands may be more

9.2. RECOMMENDED USE OF MATH FONT COMMANDS 21

convenient. Here is one example.

S

WΛ

⊗T

j

−−−−→ T

¸

¸

_

¸

¸

_End P

(S ⊗T)/I (Z ⊗T)/J

\begin{CD}

S^{{\mathcal{W}}_\Lambda}\otimes T @>j>> T\\

@VVV @VV{\End P}V\\

(S\otimes T)/I @= (Z\otimes T)/J

\end{CD}

In the CD environment the commands @>>>, @<<<, @VVV, and @AAA give respec-

tively right, left, down, and up arrows. For the horizontal arrows, material

between the ﬁrst and second > or < symbols will be typeset as a superscript,

and material between the second and third will be typeset as a subscript. Sim-

ilarly, material between the ﬁrst and second or second and third As or Vs of

vertical arrows will be typeset as left or right “sidescripts”. The commands @=

and @| give horizontal and vertical double lines. A “null arrow” command @.

can be used instead of a visible arrow to ﬁll out an array where needed.

—9—

Using math fonts

9.1 Introduction

For more comprehensive information on font use in L

A

T

E

X, see the L

A

T

E

X font

guide (fntguide.tex) or The L

A

T

E

X Companion [4]. The basic set of math font

commands in L

A

T

E

X includes \mathbf, \mathrm, \mathcal, \mathsf, \mathtt,

\mathit. Additional math alphabet commands such as \mathbb for black-

board bold, \mathfrak for Fraktur, and \mathscr for Euler script are available

through the packages amsfonts and euscript (distributed separately).

9.2 Recommended use of math font commands

If you ﬁnd yourself employing math font commands frequently in your document,

you might wish that they had shorter names, such as \mb instead of \mathbf.

Of course, there is nothing to keep you from providing such abbreviations for

yourself by suitable \newcommand statements. But for L

A

T

E

X to provide shorter

names would actually be a disservice to authors, as that would obscure a much

better alternative: deﬁning custom command names derived from the names of

the underlying mathematical objects, rather than from the names of the fonts

used to distinguish the objects. For example, if you are using bold to indicate

vectors, then you will be better served in the long run if you deﬁne a ‘vector’

command instead of a ‘math-bold’ command:

22 9. USING MATH FONTS

\newcommand{\vect}[1]{\mathbf{#1}}

you can write \vect{a} + \vect{b} to produce a + b. If you decide several

months down the road that you want to use the bold font for some other purpose,

and mark vectors by a small over-arrow instead, then you can put the change

into eﬀect merely by changing the deﬁnition of \vect; otherwise you would have

to replace all occurrences of \mathbf throughout your document, perhaps even

needing to inspect each one to see whether it is indeed an instance of a vector.

It can also be useful to assign distinct command names for diﬀerent letters

of a particular font:

\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}% or use amsfonts package

\DeclareMathSymbol{\C}{\mathalpha}{AMSb}{"43}

\DeclareMathSymbol{\R}{\mathalpha}{AMSb}{"52}

These statements would deﬁne the commands \C and \R to produce blackboard-

bold letters from the ‘AMSb’ math symbols font. If you refer often to the

complex numbers or real numbers in your document, you might ﬁnd this method

more convenient than (let’s say) deﬁning a \field command and writing

\field{C}, \field{R}. But for maximum ﬂexibility and control, deﬁne such a

\field command and then deﬁne \C and \R in terms of that command:

\usepackage{amsfonts}% to get the \mathbb alphabet

\newcommand{\field}[1]{\mathbb{#1}}

\newcommand{\C}{\field{C}}

\newcommand{\R}{\field{R}}

9.3 Bold math symbols

The \mathbf command is commonly used to obtain bold Latin letters in math,

but for most other kinds of math symbols it has no eﬀect, or its eﬀects depend

unreliably on the set of math fonts that are in use. For example, writing

\Delta \mathbf{\Delta}\mathbf{+}\delta \mathbf{\delta}

produces ∆∆+δδ; the \mathbf has no eﬀect on the plus sign or the small delta.

The amsmath package therefore provides two additional commands, \boldsymbol

and \pmb, that can be applied to other kinds of math symbols. \boldsymbol can

be used for a math symbol that remains unaﬀected by \mathbf if (and only if)

your current math font set includes a bold version of that symbol. \pmb can be

used as a last resort for any math symbols that do not have a true bold version

provided by your set of math fonts; “pmb” stands for “poor man’s bold” and

the command works by typesetting multiple copies of the symbol with slight

oﬀsets. The quality of the output is inferior, especially for symbols that contain

any hairline strokes. When the standard default set of L

A

T

E

X math fonts are in

use (Computer Modern), the only symbols that are likely to require \pmb are

large operator symbols like \sum, extended delimiter symbols, or the extra math

symbols provided by the amssymb package [1].

The following formula shows some of the results that are possible:

A_\infty + \pi A_0

\sim \mathbf{A}_{\boldsymbol{\infty}} \boldsymbol{+}

10.2. ERROR MESSAGES 23

\boldsymbol{\pi} \mathbf{A}_{\boldsymbol{0}}

\sim\pmb{A}_{\pmb{\infty}} \pmb{+}\pmb{\pi} \pmb{A}_{\pmb{0}}

A

∞

+πA

0

∼ A

∞

+πA

0

∼ AAA

∞∞∞

+++πππAAA

000

If you want to use only the \boldsymbol command without loading the whole

amsmath package, the bm package is recommended (this is a standard L

A

T

E

X

package, not an AMS package; you probably have it already if you have a 1997

or newer version of L

A

T

E

X).

9.4 Italic Greek letters

For italic versions of the capital Greek letters, the following commands are

provided:

\varGamma Γ \varSigma Σ

\varDelta ∆ \varUpsilon Υ

\varTheta Θ \varPhi Φ

\varLambda Λ \varPsi Ψ

\varXi Ξ \varOmega Ω

\varPi Π

—10—

Error messages and output problems

10.1 General remarks

This is a supplement to Chapter 8 of the L

A

T

E

X manual [7] (ﬁrst edition: Chap-

ter 6). For the reader’s convenience, the set of error messages discussed here

overlaps somewhat with the set in that chapter, but please be aware that we

don’t provide exhaustive coverage here. The error messages are arranged in

alphabetical order, disregarding unimportant text such as ! LaTeX Error: at

the beginning, and nonalphabetical characters such as \. Where examples are

given, we show also the help messages that appear on screen when you respond

to an error message prompt by entering h.

There is also a section discussing some output errors, i.e., instances where

the printed document has something wrong but there was no L

A

T

E

X error during

typesetting.

10.2 Error messages

\begin{split} won’t work here.

Example:

! Package amsmath Error: \begin{split} won’t work here.

...

l.8 \begin{split}

24 10. ERROR MESSAGES AND OUTPUT PROBLEMS

? h

\Did you forget a preceding \begin{equation}?

If not, perhaps the ‘aligned’ environment is what you want.

?

Explanation: The split environment does not construct a stand-alone displayed

equation; it needs to be used within some other environment such as equation

or gather.

Extra & on this line

Example:

! Package amsmath Error: Extra & on this line.

See the amsmath package documentation for explanation.

Type H <return> for immediate help.

...

l.9 \end{alignat}

? h

\An extra & here is so disastrous that you should probably exit

and fix things up.

?

Explanation: In an alignat structure the number of alignment points per line

is dictated by the numeric argument given after \begin{alignat}. If you use

more alignment points in a line it is assumed that you accidentally left out a

newline command \\ and the above error is issued.

Improper argument for math accent

Example:

! Package amsmath Error: Improper argument for math accent:

(amsmath) Extra braces must be added to

(amsmath) prevent wrong output.

See the amsmath package documentation for explanation.

Type H <return> for immediate help.

...

l.415 \tilde k_{\lambda_j} = P_{\tilde \mathcal

{M}}

?

Explanation: Non-simple arguments for any L

A

T

E

X command should be enclosed

in braces. In this example extra braces are needed as follows:

... P_{\tilde{\mathcal{M}}}

Font OMX/cmex/m/n/7=cmex7 not loadable ...

Example:

10.2. ERROR MESSAGES 25

! Font OMX/cmex/m/n/7=cmex7 not loadable: Metric (TFM) file not found.

<to be read again>

relax

l.8 $a

b+b^2$

? h

I wasn’t able to read the size data for this font,

so I will ignore the font specification.

[Wizards can fix TFM files using TFtoPL/PLtoTF.]

You might try inserting a different font spec;

e.g., type ‘I\font<same font id>=<substitute font name>’.

?

Explanation: Certain extra sizes of some Computer Modern fonts that were

formerly available mainly through the AMSFonts distribution are considered

part of standard L

A

T

E

X (as of June 1994): cmex7–9, cmmib5–9, and cmbsy5–9.

If these extra sizes are missing on your system, you should try ﬁrst to get

them from the source where you obtained L

A

T

E

X. If that fails, you could try

getting the fonts from CTAN (e.g., in the form of Metafont source ﬁles, direc-

tory /tex-archive/fonts/latex/mf, or in PostScript Type 1 format, directory

/tex-archive/fonts/cm/ps-type1/bakoma).

If the font name begins with cmex, there is a special option cmex10 for

the amsmath package that provides a temporary workaround. I.e., change the

\usepackage to

\usepackage[cmex10]{amsmath}

This will force the use of the 10-point size of the cmex font in all cases. Depend-

ing on the contents of your document this may be adequate.

Math formula deleted: Insufficient extension fonts

Example:

! Math formula deleted: Insufficient extension fonts.

l.8 $ab+b^2$

?

Explanation: This usually follows a previous error Font ... not loadable; see

the discussion of that error (above) for solutions.

Missing number, treated as zero

Example:

! Missing number, treated as zero.

<to be read again>

a

l.100 \end{alignat}

? h

A number should have been here; I inserted ‘0’.

26 10. ERROR MESSAGES AND OUTPUT PROBLEMS

(If you can’t figure out why I needed to see a number,

look up ‘weird error’ in the index to The TeXbook.)

?

Explanation: There are many possibilities that can lead to this error. However,

one possibility that is relevant for the amsmath package is that you forgot to

give the number argument of an alignat environment, as in:

\begin{alignat}

a& =b& c& =d\\

a’& =b’& c’& =d’

\end{alignat}

where the ﬁrst line should read instead

\begin{alignat}{2}

Another possibility is that you have a left bracket character [ following a

linebreak command \\ in a multiline construction such as array, tabular, or

eqnarray. This will be interpreted by L

A

T

E

X as the beginning of an ‘additional

vertical space’ request [7, ¸C.1.6], even if it occurs on the following line and is

intended to be part of the contents. For example

\begin{array}

a+b\\

[f,g]\\

m+n

\end{array}

To prevent the error message in such a case, you can add braces as discussed in

the L

A

T

E

X manual [7, ¸C.1.1]:

\begin{array}

a+b\\

{[f,g]}\\

m+n

\end{array}

Missing \right. inserted

Example:

! Missing \right. inserted.

<inserted text>

\right .

l.10 \end{multline}

? h

I’ve inserted something that you may have forgotten.

(See the <inserted text> above.)

With luck, this will get me unwedged. But if you

really didn’t forget anything, try typing ‘2’ now; then

my insertion and my current dilemma will both disappear.

10.2. ERROR MESSAGES 27

Explanation: This error typically arises when you try to insert a linebreak inside

a \left-\right pair of delimiters in a multline or split environment:

\begin{multline}

AAA\left(BBB\\

CCC\right)

\end{multline}

There are two possible solutions: (1) instead of using \left and \right, use

‘big’ delimiters of ﬁxed size (\bigl \bigr \biggl \biggr . . . ; see ¸4.14.1); or

(2) use null delimiters to break up the \left-\right pair into parts for each

line:

AAA\left(BBB\right.\\

\left.CCC\right)

The latter solution may result in mismatched delimiter sizes; ensuring that they

match requires using \vphantom in the line that has the smaller delimiter (or

possibly \smash in the line that has the larger delimiter). In the argument of

\vphantom put a copy of the tallest element that occurs in the other line, e.g.,

xxx \left(\int_t yyy\right.\\

\left.\vphantom{\int_t} zzz ... \right)

Paragraph ended before \xxx was complete

Example:

Runaway argument?

! Paragraph ended before \multline was complete.

<to be read again>

\par

l.100

? h

I suspect you’ve forgotten a ‘}’, causing me to apply this

control sequence to too much text. How can we recover?

My plan is to forget the whole thing and hope for the best.

?

Explanation: This might be produced by a misspelling in the \end{multline}

command, e.g.,

\begin{multline}

...

\end{multiline}

or by using abbreviations for certain environments, such as \bal and \eal for

\begin{align} and \end{align}:

\bal

...

\eal

28 10. ERROR MESSAGES AND OUTPUT PROBLEMS

For technical reasons that kind of abbreviation does not work with the more

complex displayed equation environments of the amsmath package (gather,

align, split, etc.; cf. technote.tex).

Runaway argument?

See the discussion for the error message Paragraph ended before \xxx

was complete.

Unknown option ‘xxx’ for package ‘yyy’

Example:

! LaTeX Error: Unknown option ‘intlim’ for package ‘amsmath’.

...

? h

The option ‘intlim’ was not declared in package ‘amsmath’, perhaps you

misspelled its name. Try typing <return> to proceed.

?

Explanation: This means that you misspelled the option name, or the package

simply does not have an option that you expected it to have. Consult the

documentation for the given package.

Old form ‘\pmatrix’ should be \begin{pmatrix}.

Example:

! Package amsmath Error: Old form ‘\pmatrix’ should be

\begin{pmatrix}.

See the amsmath package documentation for explanation.

Type H <return> for immediate help.

...

\pmatrix ->\left (\matrix@check \pmatrix

\env@matrix

l.16 \pmatrix

{a&b\cr c&d\cr}

? h

‘\pmatrix{...}’ is old Plain-TeX syntax whose use is

ill-advised in LaTeX.

?

Explanation: When the amsmath package is used, the old forms of \pmatrix,

\matrix, and \cases cannot be used any longer because of naming conﬂicts.

Their syntax did not conform with standard L

A

T

E

X syntax in any case.

Erroneous nesting of equation structures

Example:

! Package amsmath Error: Erroneous nesting of equation structures;

(amsmath) trying to recover with ‘aligned’.

See the amsmath package documentation for explanation.

10.4. WRONG OUTPUT 29

Type H <return> for immediate help.

...

l.260 \end{alignat*}

\end{equation*}

Explanation: The structures align, alignat, etc., are designed for top-level use

and for the most part cannot be nested inside some other displayed equation

structure. The chief exception is that align and most of its variants can be

used inside the gather environment.

10.3 Warning messages

Foreign command \over [or \atop or \above]

Example:

Package amsmath Warning: Foreign command \over; \frac or \genfrac

(amsmath) should be used instead.

Explanation: The primitive generalized fraction commands of T

E

X—\over, \atop,

\above—are deprecated when the amsmath package is used because their syn-

tax is foreign to L

A

T

E

X and amsmath provides native L

A

T

E

X equivalents. See

technote.tex for further information.

Cannot use ‘split’ here

Example:

Package amsmath Warning: Cannot use ‘split’ here;

(amsmath) trying to recover with ‘aligned’

Explanation: The split environment is designed to serve as the entire body of

an equation, or an entire line of an align or gather environment. There cannot

be any printed material before or after it within the same enclosing structure:

\begin{equation}

\left\{ % <-- Not allowed

\begin{split}

...

\end{split}

\right. % <-- Not allowed

\end{equation}

10.4 Wrong output

10.4.1 Section numbers 0.1, 5.1, 8.1 instead of 1, 2, 3

This most likely means that you have the arguments for \numberwithin in

reverse order:

\numberwithin{section}{equation}

That means ‘print the section number as equation number.section number and

reset to 1 every time an equation occurs’ when what you probably wanted was

the inverse

\numberwithin{equation}{section}

30 11. ADDITIONAL INFORMATION

10.4.2 The \numberwithin command had no eﬀect on equation num-

bers

Are you looking at the ﬁrst section in your document? Check the section num-

bers elsewhere to see if the problem is the one described in ¸10.4.1.

—11—

Additional information

11.1 Converting existing documents

11.1.1 Converting from plain L

A

T

E

X

A L

A

T

E

X document will typically continue to work the same in most respects if

\usepackage{amsmath} is added in the document preamble. By default, how-

ever, the amsmath package suppresses page breaks inside multiple-line displayed

equation structures such as eqnarray, align, and gather. To continue allowing

page breaks inside eqnarray after switching to amsmath, you will need to add

the following line in your document preamble:

\allowdisplaybreaks[1]

To ensure normal spacing around relation symbols, you might also want to

change eqnarray to align, multline, or equation/split as appropriate.

Most of the other diﬀerences in amsmath usage can be considered optional

reﬁnements, e.g., using

\DeclareMathOperator{\Hom}{Hom}

instead of \newcommand{\Hom}{\mbox{Hom}}.

11.1.2 Converting from /

/

o-L

A

T

E

X 1.1

See diffs-m.txt.

11.2 Technical notes

The ﬁle technote.tex contains some remarks on miscellaneous technical ques-

tions that are less likely to be of general interest.

11.3 Getting help

Questions or comments regarding amsmath and related packages should be sent

to:

American Mathematical Society

Technical Support

Electronic Products and Services

P. O. Box 6248

Providence, RI 02940

Phone: 800-321-4AMS (321-4267) or 401-455-4080

Internet: tech-support@ams.org

BIBLIOGRAPHY 31

If you are reporting a problem you should include the following information to

make proper investigation possible:

1. The source ﬁle where the problem occurred, preferably reduced to mini-

mum size by removing any material that can be removed without aﬀecting

the observed problem.

2. A L

A

T

E

X log ﬁle showing the error message (if applicable) and the version

numbers of the document class and option ﬁles being used.

11.4 Of possible interest

Information about obtaining AMSFonts or other T

E

X-related software from the

AMS Internet archive e-math.ams.org can be obtained by sending a request

through electronic mail to: webmaster@ams.org.

Information about obtaining the amsmath distribution on diskette from the

AMS is available from:

American Mathematical Society

Customer Services

P. O. Box 6248

Providence, RI 02940

Phone: 800-321-4AMS (321-4267) or 401-455-4000

Internet: cust-serv@ams.org

The T

E

X Users Group is a nonproﬁt organization that publishes a journal

(TUGboat), holds meetings, and serves as a clearing-house of general informa-

tion about T

E

X and T

E

X-related software.

T

E

X Users Group

PO Box 2311

Portland, OR 97208-2311

USA

Phone: +1-503-223-9994

Email: office@tug.org

Membership in the T

E

X Users Group is a good way to support continued de-

velopment of free T

E

X-related software. There are also many local T

E

X user

groups in other countries; information about contacting a local user group can

be gotten from the T

E

X Users Group.

There is a Usenet newsgroup called comp.text.tex that is a fairly good

source of information about L

A

T

E

X and T

E

X in general. If you don’t know

about reading newsgroups, check with your local system administrator to see if

newsgroup service is available at your site.

Bibliography

[1] AMSFonts version 2.2—user’s guide, Amer. Math. Soc., Providence, RI,

1994; distributed with the AMSFonts package.

32 BIBLIOGRAPHY

[2] Instructions for preparation of papers and monographs—/

/

o-L

A

T

E

X, Amer.

Math. Soc., Providence, RI, 1996, 1999.

[3] Using the amsthm Package, Amer. Math. Soc., Providence, RI, 1999.

[4] Michel Goossens, Frank Mittelbach, and Alexander Samarin, The L

A

T

E

X

companion, Addison-Wesley, Reading, MA, 1994. [Note: The 1994 edition

is not a reliable guide for the amsmath package unless you refer to the errata

for Chapter 8—ﬁle compan.err, distributed with L

A

T

E

X.]

[5] G. Gr¨atzer, Math into L

A

T

E

X: An Introduction to L

A

T

E

X and AMS-L

A

T

E

X

http://www.ams.org/cgi-bin/bookstore/bookpromo?fn=91&arg1=

bookvideo&itmc=MLTEX, Birkh¨auser, Boston, 1995.

[6] Donald E. Knuth, The T

E

Xbook, Addison-Wesley, Reading, MA, 1984.

[7] Leslie Lamport, L

A

T

E

X: A document preparation system, 2nd revised ed.,

Addison-Wesley, Reading, MA, 1994.

[8] Frank Mittelbach and Rainer Sch¨opf, The new font family selection—user

interface to standard L

A

T

E

X, TUGboat 11, no. 2 (June 1990), pp. 297–305.

[9] Michael Spivak, The joy of T

E

X, 2nd revised ed., Amer. Math. Soc., Provi-

dence, RI, 1990.

Index

\!, 11

\,, 11

\:, 11

\;, 11

\\, 3, 5, 8, 9, 24, 26

\\*, 9

\|, 16

\above, 14, 29

\abovewithdelims, 14

\accentedsymbol, 2

accents package, 12

\addtocounter, 10

\addtolength, 5

align environment, 3, 5–7, 28–30

alignat environment, 7, 24, 26, 29

aligned environment, 7, 9

alignedat environment, 7, 9

\allowdisplaybreaks, 8, 9

amsart class, 1

amsbook class, 1

amsbsy package, 1, 2

amscd package, 1, 2, 20

amsfonts package, 21

AMSFonts collection, 25

amsmath package, i, 1–3, 5, 8–18, 22,

23, 25, 26, 28–32

amsopn package, 1, 2

amssymb package, 22

amstext package, 1, 2

amsthm package, 1, 32

amsxtra package, 1, 2, 12

\arccos, 18

\arcsin, 18

\arctan, 18

\arg, 18

array environment, 8, 10, 26

arrows

extensible, 13

in commutative diagrams, 20

\atop, 14, 29

\atopwithdelims, 14

BaKoMa fonts, 25

\big, \Big, \bigg, . . . delimiters,

16

\biggl, 27

\biggr, 27

\bigl, 27

\bigr, 27

\binom, 14

binomials, 14

bm package, 2, 23

Bmatrix environment, 10

bmatrix environment, 10

\bmod, 18

\boldsymbol, 22, 23

\boxed, 13

\bslash, 6

\C, 22

\cases, 28

cases environment, 8

CD environment, 2, 21

\cdots, 12

centertags option, 2

\cfrac, 15

cmbsy5, 25

cmex, 25

cmex10, 25

cmex7, 25

cmmib5, 25

comp.text.tex, 31

compan.err, 32

continued fractions, 15

\cos, 18

\cosh, 18

\cot, 18

\coth, 18

\csc, 18

\dbinom, 14

\ddddot, 12

\dddot, 12

\ddot, 12

\DeclareMathOperator, 2, 17, 18

33

34 INDEX

\deg, 18

\det, 18

\dfrac, 14

diffs-m.txt, 30

\dim, 18

\displaybreak, 8, 9

displayed equations, 3

displayed equations

centering, 3

\displaylimits, 20

displaymath environment, 3

\displaystyle, 14

\documentclass, 2

\dot, 12

dots, see ellipsis dots

\dotsb, 12

\dotsc, 12

\dotsi, 12

\dotsm, 12

\dotso, 12

e-math.ams.org, 31

ellipsis dots

in matrices, 11

eqnarray environment, 1, 3, 26, 30

\eqref, 10

equation environment, 1, 3, 5, 7,

24, 30

equation numbers

cross-references, 10

hierarchy, 9

left or right placement, 3

overriding, 3

subordinate numbering, 10

vertical placement, 2

equation* environment, 3

equations, see displayed equations

euscript package, 21

\exp, 18

\fbox, 13

fleqn option, 3, 5

fntguide.tex, 21

\frac, 14, 15

fractions, 14

\fracwithdelims, 2

function names, see operator names

gather environment, 5–7, 24, 28–30

gathered environment, 7, 9

\gcd, 18

\genfrac, 14

\hat, 12

\hdotsfor, 11

\hom, 18

horizontal space

around operator names, 17

in math mode, 11

\idotsint, 20

\iiiint, 20

\iiint, 20

\iint, 20

\inf, 18

\injlim, 18

integrals

multiple, 20

placement of limits, 2

\intertext, 9

intlimits option, 2, 20

\ker, 18

kuvio package, 20

\label, 6, 10

\langle, 16

\ldots, 12

\left, 15, 16, 27

\leftroot, 13

leqno option, 3, 5

\lg, 18

\lim, 1, 2, 17, 18

\liminf, 18

limits, see subscripts and superscripts

\limits, 20

\limsup, 18

\ln, 18

\log, 17, 18

\lVert, 16

\lvert, 16

math fonts, 21

INDEX 35

math symbols, see math fonts

\mathbb, 21, 22

\mathbf, 21, 22

\mathcal, 21

\mathfrak, 21

\mathit, 21

\mathrm, 21

\mathscr, 21

\mathsf, 21

\mathtt, 21

matrices, 10

ellipsis dots, 11

\matrix, 28

matrix environment, 10

\max, 18

\mbox, 18

\medspace, 11

Metafont source ﬁles, 25

\min, 18

\mod, 18

\mspace, 11

multline environment, 3, 5, 27, 30

\multlinegap, 5

namelimits option, 2

\negmedspace, 11

\negthickspace, 11

\negthinspace, 11

\newcommand, 21

\nobreakdash, 12

nointlimits option, 2

\nolimits, 19, 20

nonamelimits option, 2

nosumlimits option, 2

\notag, 3, 5

\numberwithin, 9, 29, 30

operator names, 17

\operatorname, 18

\operatorname*, 18

\over, 14, 29

\overleftarrow, 13

\overleftrightarrow, 13

\overrightarrow, 13

\overset, 13

\overwithdelims, 14

page breaks, 8

\pagebreak, 8

\pmatrix, 28

pmatrix environment, 10

\pmb, 22

\pmod, 18

\pod, 18

PostScript fonts, 25

\Pr, 18

\projlim, 18

\qquad, 11

\quad, 11

\R, 22

\raisetag, 8

\rangle, 16

\ref, 10

reqno option, 3, 5

\right, 15, 16, 27

\rVert, 16

\rvert, 16

\scriptscriptstyle, 14

\scriptstyle, 14

\sec, 18

\setcounter, 9, 10

\setlength, 5

\shoveleft, 5

\shoveright, 5

\sideset, 13, 19

\sin, 1, 2, 17, 18

\sinh, 18

smallmatrix environment, 11

\smash, 15, 27

\sphat, 12

split environment, 3, 5, 6, 9, 24,

27–30

\sptilde, 12

\stackrel, 13

subarray environment, 19

subeqn.tex, 3

subequations environment, 10

subscripts and superscripts, 13

multi-line, 19

on sums, 19

36 INDEX

placement, 2

\substack, 19

\sum, 20, 22

sumlimits option, 2

\sup, 18

superscripts, see subscripts and su-

perscripts

tabular environment, 26

\tag, 3

\tag*, 3

\tan, 18

\tanh, 18

\tbinom, 14

tbtags option, 2

technote.tex, 14, 28–30

testmath.tex, 3

T

E

X Users Group, 31

\text, 2, 7–9, 18

text fragments inside math, 9, 18

\textstyle, 14

\tfrac, 14

\theequation, 9, 10

\thickspace, 11

\thinspace, 11

TUGboat, 31

\underleftarrow, 13

\underleftrightarrow, 13

\underrightarrow, 13

\underset, 13

\uproot, 13

\usepackage, 2, 25

\value, 10

\varDelta, 23

\varGamma, 23

\varinjlim, 18

\varLambda, 23

\varliminf, 18

\varlimsup, 18

\varOmega, 23

\varPhi, 23

\varPi, 23

\varprojlim, 18

\varPsi, 23

\varSigma, 23

\varTheta, 23

\varUpsilon, 23

\varXi, 23

Vmatrix environment, 10

vmatrix environment, 10

\vphantom, 27

\xleftarrow, 13

\xrightarrow, 13

ii

CONTENTS

Contents

1 Introduction 2 Options for the amsmath package 3 Displayed equations 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Single equations . . . . . . . . . . . . . . . . . . . . . 3.3 Split equations without alignment . . . . . . . . . . . 3.4 Split equations with alignment . . . . . . . . . . . . . 3.5 Equation groups without alignment . . . . . . . . . . . 3.6 Equation groups with mutual alignment . . . . . . . . 3.7 Alignment building blocks . . . . . . . . . . . . . . . . 3.8 Adjusting tag placement . . . . . . . . . . . . . . . . . 3.9 Vertical spacing and page breaks in multiline displays 3.10 Interrupting a display . . . . . . . . . . . . . . . . . . 3.11 Equation numbering . . . . . . . . . . . . . . . . . . . 4 Miscellaneous mathematical features 4.1 Matrices . . . . . . . . . . . . . . . . 4.2 Math spacing commands . . . . . . . 4.3 Dots . . . . . . . . . . . . . . . . . . 4.4 Nonbreaking dashes . . . . . . . . . 4.5 Accents in math . . . . . . . . . . . 4.6 Roots . . . . . . . . . . . . . . . . . 4.7 Boxed formulas . . . . . . . . . . . . 4.8 Over and under arrows . . . . . . . . 4.9 Extensible arrows . . . . . . . . . . . 4.10 Aﬃxing symbols to other symbols . 4.11 Fractions and related constructions . 4.12 Continued fractions . . . . . . . . . . 4.13 Smash options . . . . . . . . . . . . 4.14 Delimiters . . . . . . . . . . . . . . . 1 2 3 3 3 5 5 6 6 7 8 8 9 9 10 10 11 11 12 12 13 13 13 13 13 14 15 15 15

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

5 Operator names 17 5.1 Deﬁning new operator names . . . . . . . . . . . . . . . . . . . . 17 5.2 \mod and its relatives . . . . . . . . . . . . . . . . . . . . . . . . . 18 6 The \text command 18

CONTENTS

iii 19 19 19 20 20 20 21 21 21 22 23 23 23 23 29 29 30 30 30 30 31 31 33

7 Integrals and sums 7.1 Multiline subscripts and superscripts 7.2 The \sideset command . . . . . . . 7.3 Placement of subscripts and limits . 7.4 Multiple integral signs . . . . . . . . 8 Commutative diagrams 9 Using math fonts 9.1 Introduction . . . . . 9.2 Recommended use of 9.3 Bold math symbols . 9.4 Italic Greek letters .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . . . . math font . . . . . . . . . . . .

. . . . . . . commands . . . . . . . . . . . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

10 Error messages and output problems 10.1 General remarks . . . . . . . . . . . 10.2 Error messages . . . . . . . . . . . . 10.3 Warning messages . . . . . . . . . . 10.4 Wrong output . . . . . . . . . . . . . 11 Additional information 11.1 Converting existing documents 11.2 Technical notes . . . . . . . . . 11.3 Getting help . . . . . . . . . . . 11.4 Of possible interest . . . . . . . Bibliography Index

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

iv

CONTENTS

html. For information on extra math symbols and math fonts. provides various features for displayed equations and other mathematical constructs. • Spacing around equals signs matches the normal spacing in the equation environment (unlike eqnarray). org/tex/amsfonts.1 —1— Introduction A The amsmath package is a L TEX package that provides miscellaneous enhancements for improving the information structure and printed output of documents A that contain mathematical formulas. see [1] and http://www.org/pub/tex/. • An easy way to substitute a variant equation number for a given equation instead of the automatically supplied number. It also covers some ancillary packages: amsbsy amscd amsopn amstext amsxtra These all have something to do with the contents of math formulas.org/tex/amsmath. Readers unfamiliar with L TEX should refer A X. • An easy way to produce subordinate equation numbers of the form (1. For documentation of the amsthm package or AMS document classes (amsart. A If you are a long-time L TEX user and have lots of mathematics in what you write.3c) for selected groups of equations.) see [3] or [2] and http://www. including proper side spacing and automatic selection of the correct font style and size (even when used in sub. Upgrading when a newer version of the amsmath package is released can be done via http://www.ams. The amsmath package is distributed together with some small auxiliary packages: amsmath Primary package. • Equation numbers automatically adjust up or down to avoid overprinting on the equation contents (unlike eqnarray).html.html or ftp://ftp.ams.3b) (1. org/tex/author-info.or superscripts).ams. then you may recognize solutions for some familiar problems in this list of amsmath features: • A convenient way to deﬁne new ‘operator name’ commands analogous to \sin and \lim. This documentation describes the features of the amsmath package and discusses how they are intended to be used. amsbook. . • Multiple substitutes for the eqnarray environment to make various kinds of equation arrangements easier to write. the amsmath package is norto [7]. • A way to produce multiline subscripts as are often used with summation or product symbols.3a) (1.ams. If you have an up-to-date version of L TE mally provided along with it. etc.

1. and thus need not be repeated in the option list of the \usepackage{amsmath} statement. tbtags ‘Top-or-bottom tags’: For a split equation. max. nosumlimits Always place the subscripts and superscripts of summation-type symbols to the side. inf. nointlimits (default) Opposite of intlimits. place equation numbers level with the last (resp. and so forth—but excluding integrals (see below). . for compatibility with documents created using version 1. amsbsy For backward compatibility this package continues to exist but use of A the newer bm package that comes with L TEX is recommended instead. and amsbsy. The features of amscd and amsxtra. left). nonamelimits Opposite of namelimits. ﬁrst) line.g. lim. are available only by invoking those packages separately. —2— Options for the amsmath package The amsmath package has the following options: centertags (default) For a split equation. The amsmath package incorporates amstext. amscd Provides a CD environment for simple commutative diagrams (no support for diagonal arrows). amsxtra Provides certain odds and ends such as \fracwithdelims and \accentedsymbol. \usepackage[intlimits]{amsmath}. . The amsmath package also recognizes the following options which are normally selected (implicitly or explicitly) through the \documentclass command. but for integral symbols. amsopn Provides \DeclareMathOperator for deﬁning new ‘operator names’ like \sin and \lim. sumlimits (default) Place the subscripts and superscripts of summation symbols above and below. if numbers are on the right (resp. namelimits (default) Like sumlimits. put the option name in the optional argument of the \usepackage command—e. that traditionally have subscripts placed underneath when they occur in a displayed equation. ..2 2. however. but for certain ‘operator names’ such as det. in displayed equations. . amsopn. intlimits Like sumlimits. place equation numbers vertically centered on the total height of the equation. This option also aﬀects other symbols of the same type— . OPTIONS FOR THE AMSMATH PACKAGE amstext Provides a \text command for typesetting a fragment of text inside a display. min. even in displayed equations. To use one of these package options.

\tag and \tag* can also be used within the unnumbered versions of all the amsmath alignment structures. you can also override it with a tag of your own using \tag{ label }. It cannot be used inside multline. Some examples of the use of \tag may be found in the sample ﬁles testmath.) Except for split. SINGLE EQUATIONS 3 leqno Place equation numbers on the left. Putting the & after the relation symbol will interfere with the normal spacing. You can suppress the number on any particular line by putting \notag before the \\. The augmented set includes: equation gather multline split equation* gather* multline* align flalign alignat align* flalign* alignat* (Although the standard eqnarray environment remains available. where label means arbitrary text such as $*$ or ii used to “number” the equation. In the structures that do alignment (split. . fleqn Position equations at a ﬁxed indent from the left margin rather than centered in the text column. however.3. it has to go before.2 Single equations The equation environment is for a single equation with an automatically generated number. but rather a functionally equivA E alent environment named displaymath. each environment has both starred and unstarred forms.1 1 Basic L T X doesn’t provide an equation* environment. align and variants). without adding parentheses around it. —3— Displayed equations 3. A where the unstarred forms have automatic numbering using L TEX’s equation counter.2.tex provided with the amsmath package.1 Introduction The amsmath package provides a number of additional displayed equation strucA tures beyond the ones provided in basic L TEX.tex and subeqn. The equation* environment is the same except for omitting the number. relation symbols have an & before them but not after—unlike eqnarray. reqno Place equation numbers on the right. it is better to use align or equation+split instead. There is also a \tag* command that causes the text you supply to be typeset literally. The split environment is a special subordinate form that is used only inside one of the others. 3.

1. DISPLAYED EQUATIONS Table 3.4 3. Comparison of displayed equation environments (vertical lines indicating nominal margins) \begin{equation*} a=b \end{equation*} \begin{equation} a=b \end{equation} \begin{equation}\label{xx} \begin{split} a& =b+c-d\\ & \quad +e-f\\ & =g+h\\ & =i \end{split} \end{equation} \begin{multline} a+b+c+d+e+f\\ +i+j+k+l+m+n \end{multline} \begin{gather} a_1=b_1+c_1\\ a_2=b_2+c_2-d_2+e_2 \end{gather} \begin{align} a_1& =b_1+c_1\\ a_2& =b_2+c_2-d_2+e_2 \end{align} \begin{align} a_{11}& =b_{11}& a_{12}& =b_{12}\\ a_{21}& =b_{21}& a_{22}& =b_{22}+c_{22} \end{align} \begin{flalign*} a_{11}& =b_{11}& a_{12}& =b_{12}\\ a_{21}& =b_{21}& a_{22}& =b_{22}+c_{22} \end{flalign*} (1) a=b a=b (2) a=b+c−d +e−f =g+h =i (3) a + b + c + d + e + f +i+j+k+l+m+n (4) (5) a1 = b1 + c1 a2 = b2 + c2 − d2 + e2 (6) (7) a1 = b1 + c1 a2 = b2 + c2 − d2 + e2 (8) (9) a11 = b11 a21 = b21 a12 = b12 a22 = b22 + c22 a11 = b11 a21 = b21 a12 = b12 a22 = b22 + c22 .

3 Split equations without alignment The multline environment is a variation of the equation environment used for equations that don’t ﬁt on a single line. none of the individual lines should be marked with \notag). For example: Hc = (3. . which provides the numbering. usually an equation.4 Split equations with alignment Like multline. except for an indention on both sides in the amount of \multlinegap. \shoveright.5\columnwidth]{B}\\ \shoveright{\framebox[.10) A B C D \begin{multline} \framebox[. SPLIT EQUATIONS WITH ALIGNMENT 5 3. however. The ﬁrst line of a multline will be at the left margin and the last line at the right margin. It’s possible to force one of the middle lines to the left or right with commands \shoveleft. or gather environment.65\columnwidth]{A}\\ \framebox[. the split environment is for single equations that are too long to ﬁt on one line and hence must be split into multiple lines.11) 1 2n n p (−1)l (n − l)p−2 l=0 l1 +···+lp =l i=1 ni li p · [(n − l) − (ni − li )]ni −li · (n − l)2 − j=1 (ni − li )2 . up to but not including the ﬁnal \\. the split environment provides no numbering. for example (3. Unlike multline. Any additional lines in between will be centered independently within the display width (unless the fleqn option is in eﬀect). These commands take the entire line as an argument. multline has only a single equation number (thus. align.55\columnwidth]{C}}\\ \framebox[. because it is intended to be used only inside some other displayed equation structure.3. vertical centering as for split is not supported by multline. Like equation. using & to mark alignment points.65\columnwidth]{D} \end{multline} A The value of \multlinegap can be changed with the usual L TEX commands \setlength or \addtolength. The equation number is placed on the last line (reqno option) or ﬁrst line (leqno option). 3.4. Unlike the other amsmath equation structures. the split environment provides for alignment among the split lines.

6 3.12) (3.1). \end{split}\end{equation} The split structure should constitute the entire body of the enclosing structure. DISPLAYED EQUATIONS \begin{equation}\label{e:barwq}\begin{split} H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2} \sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\ &\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot \Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr]. To have several equation columns side-by-side. 3.1). Equations inside gather are separated by a \bslash command.14) x=y x =y x+x =y+y X=Y X =Y X +X =Y +Y a=b+c a =b ab=cb \begin{align} x&=y & X&=Y & a&=b+c\\ x’&=y’ & X’&=Y’ & a’&=b\\ x+x’&=y+y’ & X+X’&=Y+Y’ & a’b&=c’b \end{align} Line-by-line annotations on an equation can be done by judicious application of . . each one is centered separately within the text width (see Table 3. usually binary relations such as equal signs are aligned (see Table 3. use extra ampersands to separate the columns: (3. Any equation in a gather may consist of a \begin{split} . .6 Equation groups with mutual alignment The align environment is used for two or more equations when vertical alignment is desired.5 Equation groups without alignment The gather environment is used for a group of consecutive equations when there is no alignment desired among them. \end{split} structure—for example: \begin{gather} first equation\\ \begin{split} second & equation\\ & on two lines \end{split} \\ third equation \end{gather} 3.13) (3. apart from commands like \label that produce no visible material.

7. and alignat are designed to produce a structure whose width is the full line width.15) (3.17) x = y 1 − y2 + y 3 − y 5 + y8 − . thus they can be used as a component in a containing expression. aligned. E = ∂ × B − 4πj.21) = y ◦ y∗ by (4. This means. . .18) (3. B = −∂ × E. \begin{equation*} \left. ALIGNMENT BUILDING BLOCKS 7 \text inside an align environment: (3. = y ◦ y∗ = y(0)y by (3.. \begin{alignat}{2} x& = y_1-y_2+y_3-y_5+y_8-\dots &\quad& \text{by \eqref{eq:C}}\\ & = y’\circ y^* && \text{by \eqref{eq:D}}\\ & = y(0) y’ && \text {by Axiom 1.4\pi j.16) (3.19) (3.1) = y(0)y by Axiom 1. the number of “equation columns”: count the maximum number of &s in any row. \begin{align} x& = y_1-y_2+y_3-y_5+y_8-\dots && \text{by \eqref{eq:C}}\\ & = y’\circ y^* && \text{by \eqref{eq:D}}\\ & = y(0) y’ && \text {by Axiom 1. add 1 and divide by 2.1) by Axiom 1. E. the multi-equation environments gather. (3. This environment takes one argument. by (3.20) x = y1 − y2 + y3 − y5 + y8 − . and alignedat are provided whose total width is the actual width of the contents.\\ E’&=\partial\times B .} \end{align} A variant environment alignat allows the horizontal space between equations to be explicitly speciﬁed. that one cannot readily add parentheses around the entire structure.3.g. .} \end{alignat} 3. . align.\begin{aligned} B’&=-\partial\times E. But variants gathered.7 Alignment building blocks Like equation. \end{aligned} \right\} \qquad \text{Maxwell’s equations} \end{equation*} Maxwell’s equations .21) by (4. for example.

There is a \raisetag command provided to adjust the vertical position of the current equation number. a \displaybreak command is provided. write \raisetag{6pt}. then you might put \allowdisplaybreaks[1] in the preamble of your document. If you prefer a strategy of letting page breaks fall where they may. Diﬃculties in accurately calculating the proﬁle of an equation can occasionally result in number movement that doesn’t look right. \displaybreak is best placed immediately before the A \\ where it is to take eﬀect. “Cases” constructions like the following are common in mathematics: (3.(-1)^{(r-j)/2}& \text{if $r-j$ is even}. and should therefore be left undone until your document is nearly ﬁnalized. An optional argument 1–4 can be used for . \displaybreak[0] means “it is permissible to break here” without encouraging a break. 3.8 3. The environments of the amsmath package try hard to avoid overprinting an equation number on the equation contents. \displaybreak with no optional argument is the same as \displaybreak[4] and forces a break. Like L TEX’s \pagebreak. these -ed variants also take an optional [t] or [b] argument to specify vertical positioning. DISPLAYED EQUATIONS Like the array environment. the philosophy is that page breaks in such material should receive individual attention from the author.21) Pr−j = 0 r! (−1)(r−j)/2 if r − j is odd. \end{cases} Notice the use of \text (cf. as is usual A in L TEX. When the amsmath package is in use page breaks between equation lines are normally disallowed. and in the amsmath package there is a cases environment to make them easy to write: P_{r-j}=\begin{cases} 0& \text{if $r-j$ is odd}. To get an individual page break inside a particular displayed equation. if r − j is even. if necessary moving the number down or up to a separate line. §6) and the nested math formulas. 3.9 Vertical spacing and page breaks in multiline displays You can use the \\[ dimension ] command to get extra vertical space between lines in all the amsmath displayed equation environments. even in the middle of a multi-line equation. \displaybreak takes an optional argument between 0 and 4 denoting the desirability of the pagebreak. To move a particular number up by six points. This kind of adjustment is ﬁne tuning like line breaks and page breaks. or you may end up redoing the ﬁne tuning several times to keep up with changing document contents.\\ r!\. if it has been shifted away from its normal position.8 Adjusting tag placement Placing equation numbers can be a rather complex problem in multiline displays.

gathered. Ω). not just the equation counter. Note: Certain equation environments wrap their contents in an unbreakable box. \end{align} 3.8.23) and (3. When display breaks are enabled with \allowdisplaybreaks.22) (3. . (2.11 Equation numbering 3. and so A forth—you could redeﬁne \theequation as suggested in the L TEX manual [7. §6.4]: \renewcommand{\theequation}{\thesection. §C. Ω ) − φ(λ. 3. except that the equation counter won’t be reset to zero at the beginning of a new section or chapter.\arabic{equation}} This works pretty well. (2.2). unless you do it yourself using \setcounter. in sections 1.1). which would not happen if you simply ended the display and then started it up again afterwards. with automatic reset of the equation counter. the amsmath package provides a command \numberwithin. and alignedat.\omega). . the \numberwithin command can be applied to any counter. A2 = φ(λ.\\ \intertext{and} A_3&=\mathcal{N}(\lambda. EQUATION NUMBERING 9 ﬁner control: [1] means allow page breaks. have equation numbers (1. with the consequence that neither \displaybreak nor \allowdisplaybreaks will have any eﬀect on them. These include split. (3.10 Interrupting a display The command \intertext is used for a short interjection of one or two lines of text in the middle of a multiple-line display structure (see also the \text command in §6). the \\* command can be used to prohibit a pagebreak after a given line.\Omega’)-\phi(\lambda. To make this a little more convenient. but avoid them as much as possible. \intertext may only appear right after a \\ or \\* command. . . (1. Notice the position of the word “and” in this example. . write \numberwithin{equation}{section} As its name implies.11. .2).3.11. Ω ). To have equation numbering tied to section numbering. . Its salient feature is preservation of the alignment.\Omega’)-\phi(\lambda. aligned.3.\Omega’).1 Numbering hierarchy A In L TEX if you wanted to have equations numbered within sections—that is. . values of 2. ω). \begin{align} A_1&=N_0(\lambda.3. A1 = N0 (λ.4 mean increasing permissiveness.1). . 2. as usual.\Omega).\\ A_2&=\phi(\lambda. Ω ) − φ(λ.24) A3 = N (λ.

This automatically supplies the parentheses around the equation number.9a. if the preceding numbered equation was (4. \setcounter.2 (If you need left or right alignment in a column or other special formats you must resort to array. vmatrix and Vmatrix have (respectively) ( ). Also. The counters used by the subequations environment are parentequation and equation and \addtocounter.4].8. A \label command immediately after \begin{subequations} will produce a \ref of the parent number 4. This is not entirely redundant with the array environment. { }. . 3. | |.8). . I.2). not 4. and delimiters built in. redeﬁning \theequation as follows will produce roman numerals. an \eqref command is provided. To get anything A other than lowercase letters for the subordinate numbers. [ ]. For example \begin{subequations} . unlike the array environment. \begin{subequations} \renewcommand{\theequation}{\theparentequation \roman{equation}} ..2 4. use standard L TEX methods for changing numbering style [7.3 Subordinate numbering sequences The amsmath package provides also a subequations environment to make it easy to number equations in a particular group with a subordinate numbering scheme.e.9a) (4.1 Matrices The amsmath package provides some environments for matrices beyond the basic A array environment of L TEX. For naming consistency there is a matrix environment sans delimiters. For example. MISCELLANEOUS MATHEMATICAL FEATURES Cross references to equation numbers To make cross-references to equations easier. can be applied as usual to those counter names. Bmatrix. by default you can have up to 10 centered columns. The pmatrix..11.) 2 More precisely: The maximum number of columns in a matrix is determined by the A counter MaxMatrixCols (normal value = 10). you don’t have to give column speciﬁcations for any of the matrix environments.9b) (4... which you can change if necessary using L TEX’s \setcounter or \addtocounter commands. §C.10 3.2 then \eqref{abc} produces (3. if \ref{abc} produces 3. the matrix environments all use more economical horizontal spacing than the rather prodigal spacing of the array environment. \end{subequations} causes all numbered equations within that part of the document to be numbered (4.9. §6. .3. .. —4— Miscellaneous mathematical features 4.11.9c) . etc.. bmatrix. \value.

use \mspace and ‘math units’. . \: \.g. DOTS 11 To produce a small matrix suitable for use in text. . or mu. the normal value is 1. −a2n tn (4. .. Abbrev.1) .0mu}.. 4. a b c d \begin{matrix} a&b&c&d\\ e . −a1n tn −a21 t1 D2 t . The number in square brackets will be used as a multiplier (i. . It may therefore be considered a matter of taste.e. . . \! Spelled out no space \negthinspace \negmedspace \negthickspace Example ⇒⇐ ⇒ ⇐ ⇒ ⇐ ⇒ ⇐ For the greatest possible control over math spacing. ... . . . −an1 t1 −an2 t2 .B.. there is a smallmatrix b environment (e. . \. .V versions of smallmatrix. By using the semantically oriented commands . ..4.. Thus to get a negative \quad you could write \mspace{-18. \hdotsfor[1.5]{3}.3. . . . . e&\hdotsfor{3} \end{matrix} The spacing of the dots can be varied through use of a square-bracket option. and they can also be used outside of math.0).2 Math spacing commands The amsmath package slightly extends the set of math spacing commands. . .b. The above example was produced by \bigl( \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr) \hdotsfor{ number } produces a row of dots in a matrix spanning the given number of columns. Spelled out no space \thinspace \medspace \thickspace \quad \qquad Example ⇒⇐ ⇒⇐ ⇒⇐ ⇒⇐ ⇒ ⇐ ⇒ ⇐ Abbrev. there are no p. D1 t −a12 t2 .3 Dots For preferred placement of ellipsis dots (raised or on-line) in various contexts there is no general consensus. . . Delimiters must be provided. a d ) that comes closer to ﬁtting within a single text line c than a normal matrix. is equal to 1/18 em. Dn t \begin{pmatrix} D_1t&-a_{12}t_2&\dots&-a_{1n}t_n\\ -a_{21}t_1&D_2t&\dots&-a_{2n}t_n\\ \hdotsfor[2]{4}\\ -a_{n1}t_1&-a_{n2}t_2&\dots&D_nt\end{pmatrix} 4. One math unit. for example. .. For example. as shown below. . . . Both the spelled-out and abbreviated forms of these commands are robust.v. . . .

\newcommand{\p}{$p$\nobreakdash}% for "\p-adic" \newcommand{\Ndash}{\nobreakdash--}% for "pages 1\Ndash 9" % For "\n dimensional" ("n-dimensional"): \newcommand{\n}[1]{$n$\nobreakdash-\hspace{0pt}} The last example shows how to prohibit a linebreak after the hyphen but allow normal hyphenation in the following word. . . To get a superscripted hat or tilde character. A_2. or to get under accents. You can also use \nobreakdash to prevent undesirable hyphenations in combinations like $p$-adic. A2 . and product $A_1 A_2 \dotsm $.. and the inﬁnite integral the infinite integral \[\int_{A_1}\int_{A_2}\dotsi\]. ···. Usage is A\sphat (note the absence of the ^ character). \dotsc$. e. if you write ‘pages 1–9’ as pages 1\nobreakdash--9 then a linebreak will never occur between the dash and the 9.g. (It suﬃces to add a zero-width space after the hyphen. Then we have the series A1 . the +A_2 +\dotsb $. you make it possible for your document to be adapted to diﬀerent conventions on the ﬂy. see the accents package by Javier Bezos.12 • • • • • \dotsc \dotsb \dotsm \dotsi \dotso for for for for for 4. it’s advisable to make abbreviations. in case (for example) you have to submit it to a publisher who insists on following house tradition in this respect. the regional sum $A_1 the regional sum A1 + A2 + · · · . . . A1 A2 4. . The default treatment for the various kinds follows American Mathematical Society conventions: Then we have the series $A_1.5 Accents in math A In ordinary L TEX the placement of the second accent in doubled math accents is often poor. With the amsmath package you will get improved placement of ˆ ˆ the second accent: A (\hat{\hat{A}}).) 4. load the amsxtra package and use \sphat or \sptilde. For frequent use. The commands \dddot and \ddddot are available to produce triple and quadruple dot accents in addition to the \dot and \ddot accents already availA able in L TEX. the orthogonal orthogonal product A1 A2 · · · . For example. MISCELLANEOUS MATHEMATICAL FEATURES “dots with commas” “dots with binary operators/relations” “multiplication dots” “dots with integrals” “other dots” (none of the above) instead of \ldots and \cdots.4 Nonbreaking dashes A command \nobreakdash is provided to suppress the possibility of a linebreak after the following hyphen or dash. To place an arbitrary symbol in math accent position.

\delta))} 4. whether it’s a relation or something else.8 Over and under arrows A Basic L TEX provides \overrightarrow and \overleftarrow commands. In the amsmath package there are somewhat more general commands. The units are a small amount that is a useful size for such adjustments. 4. Some additional over and under arrow commands are provided by the amsmath package to extend the set: \overleftarrow \overrightarrow \overleftrightarrow 4. In the amsmath package \leftroot and \uproot allow you to adjust the position of the root: \sqrt[\leftroot{-2}\uproot{2}\beta]{k} √ β will move the beta up and to the right: k. See also the description of \sideset in §7.4.10.6 Roots The command \boxed puts a box around its argument. ∗ .10 Aﬃxing symbols to other symbols A L TEX provides \stackrel for placing a superscript above a binary relation. δ)) \boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0.2) η ≤ C(δ(η) + ΛM (0. AFFIXING SYMBOLS TO OTHER SYMBOLS 13 √ A In ordinary L TEX the placement of root indices is sometimes not so good: β k (\sqrt[\beta]{k}). that can be used to place one symbol above or below another symbol. The negative argument used with \leftroot moves the β to the right. \underset is the analog for adding a symbol underneath.3) A ←− − B − − → C − −− −− T n+µ−1 n±i−1 \xleftarrow{n+\mu-1}\quad \xrightarrow[T]{n\pm i-1} 4.9 Extensible arrows \underleftarrow \underrightarrow \underleftrightarrow \xleftarrow and \xrightarrow produce arrows that extend automatically to accommodate unusually wide subscripts or superscripts. The input \overset{*}{X} will place a superscript-size ∗ above the X: X. possibly empty): (4.2. These commands take one optional argument (the subscript) and one mandatory argument (the superscript.7 Boxed formulas 4. like \fbox except that the contents are in math mode: (4. \overset and \underset.

\genfrac{left-delim}{right-delim}{thickness}{mathstyle} {numerator}{denominator} To illustrate. (4. }.11 4. for reasons discussed in technote. invisible). and \scriptscriptstyle. The last two correspond to \frac’s numerator and denominator. and their variants are subsumed by a generalized fraction command \genfrac with six arguments.tex. \atopwithdelims.. the ﬁrst two are optional delimiters (as seen in \binom). \dbinom.2 The \binom. If the third argument is left empty.11. and \tfrac commands A The \frac command. \above. here is how \frac. \dbinom and \tbinom: k (4. the line thickness defaults to ‘normal’. \tfrac. \newcommand{\frac}[2]{\genfrac{}{}{}{}{#1}{#2}} \newcommand{\tfrac}[2]{\genfrac{}{}{}{1}{#1}{#2}} \newcommand{\binom}[2]{\genfrac{(}{)}{0pt}{}{#1}{#2}} If you ﬁnd yourself repeatedly using \genfrac throughout a document for a particular notation.. and \binom might be deﬁned. takes two arguments—numerator and denominator—and typesets them in normal fraction form..1 The \frac. } and {\textstyle\frac . The amsmath package provides also \dfrac and \tfrac as convenient abbreviations for {\displaystyle\frac .\sqrt{\dfrac{1}{k}\log_2 c(f)} \end{equation} 4.3 The \genfrac command The capabilities of \frac. \sqrt{\frac{1}{k}\log_2 c(f)}\. which is in the basic command set of L TEX.e. \scriptstyle.5) 2k − k k−1 k k−2 2 + 2 1 2 2^k-\binom{k}{1}2^{k-1}+\binom{k}{2}2^{k-2} 4. \textstyle. The primitive generalized fraction commands \over. along the lines of \frac and \binom. you will do yourself a favor (and your publisher) if you deﬁne a meaningfully-named abbreviation for that notation. \dfrac.14 4. and \tbinom commands For binomial expressions such as n amsmath has \binom. \binom. and the fourth argument is a mathstyle override: integer values 0–3 select respectively \displaystyle. MISCELLANEOUS MATHEMATICAL FEATURES Fractions and related constructions 4.. the third is a line thickness override (\binom uses this to set the fraction line thickness to 0—i. \overwithdelims. \abovewithdelims produce warning messages if used with the amsmath package..4) 1 log2 c(f ) k 1 k log2 c(f ) 1 log2 c(f ) k 1 log2 c(f ) k \begin{equation} \frac{1}{k}\log_2 c(f)\.\tfrac{1}{k}\log_2 c(f)\.11. \atop.11. .

14 Delimiters 4. 4.14. the range of sizes is not even approximately continuous but has fairly large quantum jumps. when adjacent radical symbols are unevenly sized or positioned because of diﬀerences in the height and depth of their contents.4. Delimiter size Result text size c (b)( ) d \left \right (b) c d \bigl \bigr b c d \Bigl \Bigr b c d \biggl \biggr b c d \Biggl \Biggr b c d . which is sometimes useful in adjusting the subformula’s position with respect to adjacent symbols. Left or right placement of any of the numerators is accomplished by using \cfrac[l] or \cfrac[r] instead of \cfrac. Compare √ √ √ √ √ √ x + y + z and x + y + z. 4.12 Continued fractions The continued fraction (4. using a set of commands that have ‘big’ in their names. With the amsmath package \smash has optional arguments t and b.1 Delimiter sizes The automatic delimiter sizing done by \left and \right has two limitations: First. DELIMITERS 15 4. and second. There are two or three situations where the delimiter size is commonly adjusted. where the latter was produced by $\sqrt{x} + \sqrt{\smash[b]{y}} + \sqrt{z}$. a jump of 3pt or so in normal-sized text. This means that a math fragment that is inﬁnitesimally too large for a given delimiter size will get the next larger size. \smash can be employed to make them more consistent.14.13 Smash options The command \smash is used to typeset a subformula with an eﬀective height and depth of zero. it is applied mechanically to produce delimiters large enough to encompass the largest contained item. because occasionally it is advantageous to be able to “smash” only the top or only the bottom of something while retaining the natural depth or height.6) 1 √ 2+ 1 √ 2+ √ 1 2 + ··· can be obtained by typing \cfrac{1}{\sqrt{2}+ \cfrac{1}{\sqrt{2}+ \cfrac{1}{\sqrt{2}+\dotsb }}} This produces better-looking results than straightforward use of \frac. For example.

or the ‘evaluated at’ notation fζ (t) t=0 . because left and right delimiters are distinct usages . or the absolute-value operation |z|. With the amsmath package they are. \bigg. It is recommended therefore that there should be a one-to-one correspondence in any given document between the vert bar character | and a selected mathematical notation. and \Bigg delimiters aren’t scaled A properly over the full range of L TEX font sizes. With \left and \right the delimiters usually turn out larger than necessary. MISCELLANEOUS MATHEMATICAL FEATURES The ﬁrst kind of situation is a cumulative operator with limits above and below.16 4. \rvert. \rVert (compare \langle.14. such as b where the delimiters produced by \left and \right cause too much line d spreading. and using the Big or bigg sizes instead gives better results: i p 1/p p 1/p ai j xij versus i ai j xij \biggl[\sum_i a_i\Bigl\lvert\sum_j x_{ij}\Bigr\rvert^p\biggr]^{1/p} The second kind of situation is clustered pairs of delimiters where \left and \right make them all the same size (because that is adequate to cover the encompassed material) but what you really want is to make some of the delimiters slightly larger to make the nesting easier to see. and that the complex discriminatory powers of a knowledgeable reader cannot be replicated in computer processing of mathematical documents.(a_2 b_2)\bigr) \bigl((a_2 b_1) + (a_1 b_2)\bigr) The third kind of situation is a slightly oversize object in running text. A In ordinary L TEX \big. This immediately rules out the use of | and \| for delimiters. 4.2 Vertical bar notations The amsmath package provides commands \lvert. what is bad. \rangle) to address the problem of overloading for the A vert bar character |. This character is currently used in L TEX documents to represent a wide variety of mathematical objects: the ‘divides’ relation in a number-theory expression like p|q. In that case \bigl and \bigr can be used to produce delimiters that are slightly larger than the base size but still able to ﬁt within the normal line b spacing: d . is that fact that not all of the uses take the same typographical treatment. or the ‘such that’ condition in set notation. \lVert. \Big. and similarly for the double-bar command \|. The multiplicity of uses in itself is not so bad. however.(a_2 b_2)\right) \left((a_2 b_1) + (a_1 b_2)\right) \quad\text{versus}\quad \bigl((a_1 b_1) . ((a1 b1 ) − (a2 b2 )) ((a2 b1 ) + (a1 b2 )) versus (a1 b1 ) − (a2 b2 ) (a2 b1 ) + (a1 b2 ) \left((a_1 b_1) .

sin. —5— Operator names 5.) But otherwise the name text is printed in math mode. sup. e. which are set in math italic. The more common ones have predeﬁned names. If the new operator should have subscripts and superscripts placed in ‘limits’ position above and below as with lim.will print as a text hyphen rather than a minus sign and an asterisk * will print as a raised text asterisk instead of a centered math star. or max. recommended practice is therefore to deﬁne suitable commands in the document preamble for any paired-delimiter use of vert bar symbols: \providecommand{\abs}[1]{\lvert#1\rvert} \providecommand{\norm}[1]{\lVert#1\rVert} whereupon the document would contain \abs{z} to produce |z| and \norm{v} to produce v . (Compare a-b*c and a − b ∗ c. subscripts and superscripts there.. DEFINING NEW OPERATOR NAMES 17 that do not relate in the same way to adjacent symbols.3. and so forth. and lim are traditionally typeset in roman type to make them visually more distinct from one-letter math variables. a pseudo-text mode prevails: the hyphen character . \sin.g.1 Deﬁning new operator names Math functions such as log.1. so that you can use. In the second argument of \DeclareMathOperator (the name text). use the * form of the \DeclareMathOperator command: \DeclareMathOperator*{\Lim}{Lim} See also the discussion of subscript placement in Section 7. so the amsmath package provides a general mechanism for deﬁning new ‘operator names’. To deﬁne a math function \xxx to work like \sin.5. but new ones come up all the time in mathematical papers. so that you get A xxx B instead of AxxxB. The following operator names are predeﬁned: . you write \DeclareMathOperator{\xxx}{xxx} whereupon ensuing uses of \xxx will produce xxx in the proper font and automatically add proper spacing on either side when necessary. \log. \lim.

\pmod.2 \mod and its relatives Commands \mod. \mod and \pod are variants of \pmod preferred by some authors. but with the amsmath package the spacing of \pmod will adjust to a smaller value if it’s used in a non-display-mode formula. THE \TEXT COMMAND \arccos \arcsin \arctan \arg \cos \cosh \cot \coth \csc arccos arcsin arctan arg cos cosh cot coth csc \deg \det \dim \exp \gcd \hom \inf \injlim \ker \varlimsup \varliminf deg det dim exp gcd hom inf inj lim ker lim lim \lg \lim \liminf \limsup \ln \log \max \min \Pr lg lim lim inf lim sup ln log max min Pr lim − → lim ← − \projlim \sec \sin \sinh \sup \tan \tanh proj lim sec sin sinh sup tan tanh \varinjlim \varprojlim There is also a command \operatorname such that using \operatorname{abc} in a math formula is equivalent to a use of \abc deﬁned by \DeclareMathOperator. \bmod.\quad x\equiv y\pod d —6— The \text command The main use of the command \text is for words or phrases in a display. \mod omits the parentheses. If you want a word or phrase of text in a subscript. i = 1.. c + 1 . (5. x≡y mod c. which is slightly easier than the \mbox equivalent: .m\bmod n).18 6. . (6. . . \quad x\equiv y\mod c.) 5. but has a couple of advantages... . The other advantage is the more descriptive name.1) f[xi−1 . This may be occasionally useful for constructing more complex notation or other purposes. \pod are provided to deal with the special A spacing conventions of “mod” notation._{\mbox{\scriptsize word or phrase}}.1) gcd(n._{\text{word or phrase}}. x≡y (mod b). \bmod and \pmod are available in L TEX. x≡y (d) \gcd(n. It A is very similar to the L TEX command \mbox in its eﬀects.\quad x\equiv y\pmod b. you can type .. (Use the variant \operatorname* to get limits. whereas \pod omits the “mod” and retains the parentheses.xi ] is monotonic. m mod n).

\dots.1 Multiline subscripts and superscripts The \substack command can be used to produce a multiline subscript or superscript: for example \sum_{\substack{ 0\le i\le m\\ 0<j<n}} P(i.\. With \sideset. THE \SIDESET COMMAND 19 f_{[x_{i-1}.c+1 —7— Integrals and sums 7. n odd The extra pair of empty braces is explained by the fact that \sideset has the capability of putting an extra symbol or symbols at each corner of a large operator. The prime example is the case when you want to put a prime on a sum symbol. you would type ∗ ∗ ∗ \sideset{_*^*}{_*^*}\prod ∗ . for a rather special purpose: putting symbols at the subscript and superscript corners of a large operator symbol such as or . If there are no limits above or below the sum. you want not only the prime but also something below or above the sum symbol. to put an asterisk at each corner of a product symbol.x_i]} \text{ is monotonic. it would be downright diﬃcult. as here: \sum_{\begin{subarray}{l} i\in\Lambda\\ 0<j<n \end{subarray}} P(i.2 The \sideset command P (i. without \sideset.1) En If. j) i∈Λ 0<j<n There’s also a command called \sideset.j) P (i. Note: this command is not designed to be applied to anything other than sum-class symbols. however.2. you could just use \nolimits: here’s \sum\nolimits’ E_n in display mode: (7. you can write \sideset{}{’} \sum_{n<k. it’s not so easy—indeed. j) 0≤i≤m 0<j<n A slightly more generalized form is the subarray environment which allows you to specify that each line should be left-aligned instead of centered.} \quad i = 1.\text{$n$ odd}} nE_n nEn n<k.j) 7.7.

The commands \limits and \nolimits can be used to override the normal behavior of a base symbol: .) Operator names such as sin or lim may have either ‘displaylimits’ or ‘limits’ positioning depending on how they were deﬁned. \idotsint is an extension of the same idea that gives two integral signs with dots between them. \nolimits. amscd.3) A f (w. . For complex commutative diagrams authors will need to turn to more comprehensive packages like kuvio or XY-pic. The default for sum-class symbols is ‘displaylimits’ positioning: When a sum-class symbol appears in a displayed formula. the last one takes precedence. A X . or \displaylimits occur consecutively. .2) A f (x. (See the discussion of the intlimits and related options in Section 2. in both text and display style. xk ) —8— Commutative diagrams Some commutative diagram commands like the ones in AMS-TEX are available as a separate package. z) dx dy dz ··· A (7. subscript and superscript are placed in ‘limits’ position above and below.3 Placement of subscripts and limits 8.4 Multiple integral signs \iint. and \iiiint give multiple integral signs with the spacing between them nicely adjusted. even in displayed formulas. The standard operator names are deﬁned according to normal mathematical usage. y. The default for integral-class symbols is to have sub. 7. y. x. y) dx dy A f (x. COMMUTATIVE DIAGRAMS The default positioning for subscripts depends on the base symbol involved. but in an inline formula.and superscripts always to the side. to avoid unsightly and wasteful spreading of the surrounding text lines. When multiple instances of \limits.20 7. put \displaylimits at the tail end of the deﬁnition. but for simple diagrams without diagonal arrows the amscd commands may be more . . they are placed to the side. (7. z) dw dx dy dz f (x1 . \iiint. . limn→∞ To deﬁne a command whose subscripts follow the same ‘displaylimits’ behavior as \sum.

there is nothing to keep you from providing such abbreviations for A yourself by suitable \newcommand statements. S WΛ ⊗ T − − → −− (S ⊗ T )/I \begin{CD} S^{{\mathcal{W}}_\Lambda}\otimes T @VVV (S\otimes T)/I @= \end{CD} j T End P (Z ⊗ T )/J @>j>> T\\ @VV{\End P}V\\ (Z\otimes T)/J In the CD environment the commands @>>>. and up arrows. Of course. and material between the second and third will be typeset as a subscript.tex) or The L TEX Companion [4]. A “null arrow” command @. 9. and \mathscr for Euler script are available through the packages amsfonts and euscript (distributed separately). you might wish that they had shorter names. \mathfrak for Fraktur. \mathsf. —9— Using math fonts 9. down. @VVV. \mathtt.9. left.1 Introduction A A For more comprehensive information on font use in L TEX. \mathrm. The basic set of math font A commands in L TEX includes \mathbf. Similarly.2. But for L TEX to provide shorter names would actually be a disservice to authors. Here is one example. if you are using bold to indicate vectors. \mathcal. and @AAA give respectively right. @<<<. For example. see the L TEX font A guide (fntguide. then you will be better served in the long run if you deﬁne a ‘vector’ command instead of a ‘math-bold’ command: . Additional math alphabet commands such as \mathbb for blackboard bold. can be used instead of a visible arrow to ﬁll out an array where needed. RECOMMENDED USE OF MATH FONT COMMANDS 21 convenient. as that would obscure a much better alternative: deﬁning custom command names derived from the names of the underlying mathematical objects. rather than from the names of the fonts used to distinguish the objects. \mathit. such as \mb instead of \mathbf.2 Recommended use of math font commands If you ﬁnd yourself employing math font commands frequently in your document. material between the ﬁrst and second > or < symbols will be typeset as a superscript. material between the ﬁrst and second or second and third As or Vs of vertical arrows will be typeset as left or right “sidescripts”. The commands @= and @| give horizontal and vertical double lines. For the horizontal arrows.

When the standard default set of L TEX math fonts are in use (Computer Modern).22 \newcommand{\vect}[1]{\mathbf{#1}} 9. you might ﬁnd this method more convenient than (let’s say) deﬁning a \field command and writing \field{C}. or its eﬀects depend unreliably on the set of math fonts that are in use. \pmb can be used as a last resort for any math symbols that do not have a true bold version provided by your set of math fonts.3 Bold math symbols The \mathbf command is commonly used to obtain bold Latin letters in math. otherwise you would have to replace all occurrences of \mathbf throughout your document. “pmb” stands for “poor man’s bold” and the command works by typesetting multiple copies of the symbol with slight oﬀsets. that can be applied to other kinds of math symbols. deﬁne such a \field command and then deﬁne \C and \R in terms of that command: \usepackage{amsfonts}% to get the \mathbb alphabet \newcommand{\field}[1]{\mathbb{#1}} \newcommand{\C}{\field{C}} \newcommand{\R}{\field{R}} 9. but for most other kinds of math symbols it has no eﬀect. and mark vectors by a small over-arrow instead. writing \Delta \mathbf{\Delta}\mathbf{+}\delta \mathbf{\delta} produces ∆∆+δδ. If you decide several months down the road that you want to use the bold font for some other purpose. If you refer often to the complex numbers or real numbers in your document. then you can put the change into eﬀect merely by changing the deﬁnition of \vect. The following formula shows some of the results that are possible: A_\infty + \pi A_0 \sim \mathbf{A}_{\boldsymbol{\infty}} \boldsymbol{+} . extended delimiter symbols. But for maximum ﬂexibility and control. USING MATH FONTS you can write \vect{a} + \vect{b} to produce a + b. \field{R}. perhaps even needing to inspect each one to see whether it is indeed an instance of a vector. \boldsymbol can be used for a math symbol that remains unaﬀected by \mathbf if (and only if) your current math font set includes a bold version of that symbol. the \mathbf has no eﬀect on the plus sign or the small delta. For example. The quality of the output is inferior. It can also be useful to assign distinct command names for diﬀerent letters of a particular font: \DeclareSymbolFont{AMSb}{U}{msb}{m}{n}% or use amsfonts package \DeclareMathSymbol{\C}{\mathalpha}{AMSb}{"43} \DeclareMathSymbol{\R}{\mathalpha}{AMSb}{"52} These statements would deﬁne the commands \C and \R to produce blackboardbold letters from the ‘AMSb’ math symbols font. especially for symbols that contain A any hairline strokes. The amsmath package therefore provides two additional commands. the only symbols that are likely to require \pmb are large operator symbols like \sum. \boldsymbol and \pmb. or the extra math symbols provided by the amssymb package [1].

the bm package is recommended (this is a standard L TEX package. Example: ! Package amsmath Error: \begin{split} won’t work here. and nonalphabetical characters such as \. i.10. the set of error messages discussed here overlaps somewhat with the set in that chapter.e. . but please be aware that we don’t provide exhaustive coverage here. ERROR MESSAGES 23 \boldsymbol{\pi} \mathbf{A}_{\boldsymbol{0}} \sim\pmb{A}_{\pmb{\infty}} \pmb{+}\pmb{\pi} \pmb{A}_{\pmb{0}} A∞ + πA0 ∼ A∞ + πA0 ∼ A∞ + π A0 If you want to use only the \boldsymbol command without loading the whole A amsmath package. Where examples are given. we show also the help messages that appear on screen when you respond to an error message prompt by entering h.4 Italic Greek letters For italic versions of the capital Greek letters.8 \begin{split} . The error messages are arranged in alphabetical order.. disregarding unimportant text such as ! LaTeX Error: at the beginning.. For the reader’s convenience. the following commands are provided: \varGamma \varDelta \varTheta \varLambda \varXi \varPi Γ ∆ Θ Λ Ξ Π \varSigma \varUpsilon \varPhi \varPsi \varOmega Σ Υ Φ Ψ Ω —10— Error messages and output problems 10. There is also a section discussing some output errors. 9. you probably have it already if you have a 1997 A or newer version of L TEX). l.2 Error messages \begin{split} won’t work here.2. not an AMS package.. instances where A the printed document has something wrong but there was no L TEX error during typesetting. 10.1 General remarks A This is a supplement to Chapter 8 of the L TEX manual [7] (ﬁrst edition: Chapter 6).

Type H <return> for immediate help. Type H <return> for immediate help. . l... ? Explanation: The split environment does not construct a stand-alone displayed equation.24 10.. ? Explanation: In an alignat structure the number of alignment points per line is dictated by the numeric argument given after \begin{alignat}...415 \tilde k_{\lambda_j} = P_{\tilde \mathcal {M}} ? A Explanation: Non-simple arguments for any L TEX command should be enclosed in braces.. ERROR MESSAGES AND OUTPUT PROBLEMS ? h \Did you forget a preceding \begin{equation}? If not. Extra & on this line Example: ! Package amsmath Error: Extra & on this line. Example: . Improper argument for math accent Example: ! Package amsmath Error: Improper argument for math accent: (amsmath) Extra braces must be added to (amsmath) prevent wrong output. . See the amsmath package documentation for explanation. P_{\tilde{\mathcal{M}}} Font OMX/cmex/m/n/7=cmex7 not loadable . l..9 \end{alignat} ? h \An extra & here is so disastrous that you should probably exit and fix things up. In this example extra braces are needed as follows: .. perhaps the ‘aligned’ environment is what you want. it needs to be used within some other environment such as equation or gather. If you use more alignment points in a line it is assumed that you accidentally left out a newline command \\ and the above error is issued. See the amsmath package documentation for explanation.

treated as zero. directory /tex-archive/fonts/latex/mf.g..8 $ab+b^2$ ? Explanation: This usually follows a previous error Font . you could try getting the fonts from CTAN (e. <to be read again> a l. so I will ignore the font specification. cmmib5–9. . [Wizards can fix TFM files using TFtoPL/PLtoTF. see the discussion of that error (above) for solutions. or in PostScript Type 1 format. ? Explanation: Certain extra sizes of some Computer Modern fonts that were formerly available mainly through the AMSFonts distribution are considered A part of standard L TEX (as of June 1994): cmex7–9.. I.] You might try inserting a different font spec. ERROR MESSAGES 25 ! Font OMX/cmex/m/n/7=cmex7 not loadable: Metric (TFM) file not found.10. <to be read again> relax l. I inserted ‘0’. Missing number. Math formula deleted: Insufficient extension fonts Example: ! Math formula deleted: Insufficient extension fonts. e. type ‘I\font<same font id>=<substitute font name>’.. you should try ﬁrst to get A them from the source where you obtained L TEX. If the font name begins with cmex. there is a special option cmex10 for the amsmath package that provides a temporary workaround.e. Depending on the contents of your document this may be adequate.8 $a b+b^2$ ? h I wasn’t able to read the size data for this font. and cmbsy5–9. in the form of Metafont source ﬁles. directory /tex-archive/fonts/cm/ps-type1/bakoma).. change the \usepackage to \usepackage[cmex10]{amsmath} This will force the use of the 10-point size of the cmex font in all cases. not loadable. If these extra sizes are missing on your system.g. If that fails. l.100 \end{alignat} ? h A number should have been here.2.. treated as zero Example: ! Missing number.

10 \end{multline} ? h I’ve inserted something that you may have forgotten. inserted Example: ! Missing \right. inserted. then my insertion and my current dilemma will both disappear. For example \begin{array} a+b\\ [f.g]\\ m+n \end{array} To prevent the error message in such a case. ERROR MESSAGES AND OUTPUT PROBLEMS (If you can’t figure out why I needed to see a number.g]}\\ m+n \end{array} Missing \right. . this will get me unwedged. (See the <inserted text> above. This will be interpreted by L TEX as the beginning of an ‘additional vertical space’ request [7. <inserted text> \right . look up ‘weird error’ in the index to The TeXbook. as in: \begin{alignat} a& =b& c& =d\\ a’& =b’& c’& =d’ \end{alignat} where the ﬁrst line should read instead \begin{alignat}{2} Another possibility is that you have a left bracket character [ following a linebreak command \\ in a multiline construction such as array. l. even if it occurs on the following line and is intended to be part of the contents. tabular.6].1]: \begin{array} a+b\\ {[f. §C. However. one possibility that is relevant for the amsmath package is that you forgot to give the number argument of an alignat environment.1. But if you really didn’t forget anything.) ? Explanation: There are many possibilities that can lead to this error. you can add braces as discussed in A the L TEX manual [7.) With luck.1.26 10. or A eqnarray. try typing ‘2’ now. §C.

..CCC\right) The latter solution may result in mismatched delimiter sizes. .. \right) Paragraph ended before \xxx was complete Example: Runaway argument? ! Paragraph ended before \multline was complete.g..\\ \left. . \begin{multline} . e. In the argument of \vphantom put a copy of the tallest element that occurs in the other line.g..\vphantom{\int_t} zzz . causing me to apply this control sequence to too much text. or (2) use null delimiters to break up the \left-\right pair into parts for each line: AAA\left(BBB\right.. ? Explanation: This might be produced by a misspelling in the \end{multline} command.10. xxx \left(\int_t yyy\right.100 ? h I suspect you’ve forgotten a ‘}’. ensuring that they match requires using \vphantom in the line that has the smaller delimiter (or possibly \smash in the line that has the larger delimiter). such as \bal and \eal for \begin{align} and \end{align}: \bal .2.14. ERROR MESSAGES 27 Explanation: This error typically arises when you try to insert a linebreak inside a \left-\right pair of delimiters in a multline or split environment: \begin{multline} AAA\left(BBB\\ CCC\right) \end{multline} There are two possible solutions: (1) instead of using \left and \right. <to be read again> \par l.. \eal . How can we recover? My plan is to forget the whole thing and hope for the best.\\ \left. e..1). \end{multiline} or by using abbreviations for certain environments. see §4. use ‘big’ delimiters of ﬁxed size (\bigl \bigr \biggl \biggr ..

align. Consult the documentation for the given package. ERROR MESSAGES AND OUTPUT PROBLEMS For technical reasons that kind of abbreviation does not work with the more complex displayed equation environments of the amsmath package (gather. . (amsmath) trying to recover with ‘aligned’. \pmatrix ->\left (\matrix@check \pmatrix \env@matrix l.. etc. Example: ! Package amsmath Error: Old form ‘\pmatrix’ should be \begin{pmatrix}.. A Their syntax did not conform with standard L TEX syntax in any case. \matrix. the old forms of \pmatrix.. cf.16 \pmatrix {a&b\cr c&d\cr} ? h ‘\pmatrix{. ? h The option ‘intlim’ was not declared in package ‘amsmath’. ? Explanation: This means that you misspelled the option name. and \cases cannot be used any longer because of naming conﬂicts.}’ is old Plain-TeX syntax whose use is ill-advised in LaTeX. ? Explanation: When the amsmath package is used. Type H <return> for immediate help. See the amsmath package documentation for explanation. Unknown option ‘xxx’ for package ‘yyy’ Example: ! LaTeX Error: Unknown option ‘intlim’ for package ‘amsmath’.tex). . split.. See the amsmath package documentation for explanation. perhaps you misspelled its name. Old form ‘\pmatrix’ should be \begin{pmatrix}.. or the package simply does not have an option that you expected it to have. technote. Erroneous nesting of equation structures Example: ! Package amsmath Error: Erroneous nesting of equation structures. Try typing <return> to proceed.28 10. Runaway argument? See the discussion for the error message Paragraph ended before \xxx was complete.. ..

Cannot use ‘split’ here Example: Package amsmath Warning: Cannot use ‘split’ here. or an entire line of an align or gather environment.1.10. \above—are deprecated when the amsmath package is used because their synA A tax is foreign to L TEX and amsmath provides native L TEX equivalents.tex for further information.1 instead of 1. The chief exception is that align and most of its variants can be used inside the gather environment. 2. alignat. \end{split} \right. Explanation: The primitive generalized fraction commands of TEX—\over..260 \end{alignat*} \end{equation*} Explanation: The structures align.4. etc...Not allowed \begin{split} .Not allowed \end{equation} 10.3 Warning messages Foreign command \over [or \atop or \above] Example: Package amsmath Warning: Foreign command \over. are designed for top-level use and for the most part cannot be nested inside some other displayed equation structure.1 Section numbers 0. % <-. (amsmath) trying to recover with ‘aligned’ Explanation: The split environment is designed to serve as the entire body of an equation. l.section number and reset to 1 every time an equation occurs’ when what you probably wanted was the inverse \numberwithin{equation}{section} . 3 This most likely means that you have the arguments for \numberwithin in reverse order: \numberwithin{section}{equation} That means ‘print the section number as equation number. \frac or \genfrac (amsmath) should be used instead. 5.. See technote. There cannot be any printed material before or after it within the same enclosing structure: \begin{equation} \left\{ % <-.4. WRONG OUTPUT 29 Type .1.4 Wrong output 10. 8. 10. H <return> for immediate help.. \atop.

you will need to add the following line in your document preamble: \allowdisplaybreaks[1] To ensure normal spacing around relation symbols.1.1. —11— Additional information 11. and gather. e.g. To continue allowing page breaks inside eqnarray after switching to amsmath. Most of the other diﬀerences in amsmath usage can be considered optional reﬁnements.2 Technical notes The ﬁle technote.3 Getting help Questions or comments regarding amsmath and related packages should be sent to: American Mathematical Society Technical Support Electronic Products and Services P. the amsmath package suppresses page breaks inside multiple-line displayed equation structures such as eqnarray.tex contains some remarks on miscellaneous technical questions that are less likely to be of general interest. 11. Box 6248 Providence. or equation/split as appropriate.2 Converting from AMS-L TEX 1.4. align. A 11. 11.txt. however.4..1 See diffs-m. you might also want to change eqnarray to align.2 11.30 10. RI 02940 Phone: 800-321-4AMS (321-4267) Internet: tech-support@ams.1 Converting from plain L TEX A X document will typically continue to work the same in most respects if A L TE \usepackage{amsmath} is added in the document preamble.1. By default. using \DeclareMathOperator{\Hom}{Hom} instead of \newcommand{\Hom}{\mbox{Hom}}. O.org or 401-455-4080 . ADDITIONAL INFORMATION The \numberwithin command had no eﬀect on equation numbers Are you looking at the ﬁrst section in your document? Check the section numbers elsewhere to see if the problem is the one described in §10.1 Converting existing documents A 11. multline.

and serves as a clearing-house of general information about TEX and TEX-related software. A 2. Bibliography [1] AMSFonts version 2. RI.org or 401-455-4000 The TEX Users Group is a nonproﬁt organization that publishes a journal (TUGboat). preferably reduced to minimum size by removing any material that can be removed without aﬀecting the observed problem.ams. There is a Usenet newsgroup called comp. 11. .text. Math. There are also many local TEX user groups in other countries. TEX Users Group PO Box 2311 Portland. Amer.org.tex that is a fairly good A source of information about L TEX and TEX in general. Soc.2—user’s guide. OR 97208-2311 USA Phone: +1-503-223-9994 Email: office@tug. If you don’t know about reading newsgroups. A L TEX log ﬁle showing the error message (if applicable) and the version numbers of the document class and option ﬁles being used.BIBLIOGRAPHY 31 If you are reporting a problem you should include the following information to make proper investigation possible: 1.. information about contacting a local user group can be gotten from the TEX Users Group.org can be obtained by sending a request through electronic mail to: webmaster@ams. Box 6248 Providence. The source ﬁle where the problem occurred. 1994.org Membership in the TEX Users Group is a good way to support continued development of free TEX-related software. Providence. RI 02940 Phone: 800-321-4AMS (321-4267) Internet: cust-serv@ams. O. Information about obtaining the amsmath distribution on diskette from the AMS is available from: American Mathematical Society Customer Services P.4 Of possible interest Information about obtaining AMSFonts or other TEX-related software from the AMS Internet archive e-math. holds meetings. distributed with the AMSFonts package. check with your local system administrator to see if newsgroup service is available at your site.

Math.. Amer. Soc. distributed with L TEX. Addison-Wesley. A [4] Michel Goossens. 1999. no.ams. 1996.. Math into L TEX: An Introduction to L TEX and AMS-L TEX a http://www. Providence. The TEXbook. RI. Soc. Boston. [9] Michael Spivak. MA.32 BIBLIOGRAPHY A [2] Instructions for preparation of papers and monographs—AMS-L TEX. Amer. [8] Frank Mittelbach and Rainer Sch¨pf. Knuth. 1984. Reading. Providence. 1995. Math. Reading. Providence. 1994.err. RI... 2 (June 1990). Amer. pp. 1990. 1994. 1999. [Note: The 1994 edition is not a reliable guide for the amsmath package unless you refer to the errata A for Chapter 8—ﬁle compan. Gr¨tzer. The L TEX companion. RI. a [6] Donald E. 297–305. Reading. Math. A [7] Leslie Lamport. [3] Using the amsthm Package. MA. Frank Mittelbach. 2nd revised ed. The joy of TEX.] A A A [5] G.. .org/cgi-bin/bookstore/bookpromo?fn=91&arg1= bookvideo&itmc=MLTEX. MA. TUGboat 11. The new font family selection—user o A interface to standard L TEX. Birkh¨user. and Alexander Samarin. L TEX: A document preparation system. Addison-Wesley. 2nd revised ed. Addison-Wesley. Soc.

\bigg. 1. 14. 22. 1. 9 \allowdisplaybreaks. 2 amssymb package. 25 cmex. . 11 \:. 29 \abovewithdelims. 21 \cdots. 18 \arctan. 14. 24. 25 cmex10. 5. 20 \atop. 17. 2. 14 \ddddot. 22 \cases. 18 \arg. 22. 18 \cosh. 14 bm package. 18 \csc. \Big. 25 cmex7. 18 \arcsin. 15 cmbsy5. 28–32 amsopn package. 18 \cot. 31 compan. 8. 8–18. 18 \dbinom. 12 \DeclareMathOperator. 11 \. 28–30 alignat environment. 1. 22 amstext package. 9.Index \!. 13 in commutative diagrams. 1–3. 5 align environment. 1. 23 Bmatrix environment.text. 2 amscd package. 1. . 6 \C. 13 \bslash. 11 \\. 2 amsthm package. 27 \bigl. 23. 2 accents package. 14 binomials. 26 \\*. 9 \|. 1 amsbsy package. 2. 25 comp. 7. 8. delimiters. 27 \biggr. 10 \addtolength. . 23 \boxed. 16 \above. 10 bmatrix environment. 21 AMSFonts collection.. 32 amsxtra package. 25 cmmib5. i. 3. 18 \boldsymbol. 7. 12 centertags option. 29 aligned environment. 18 . 1. 29 \atopwithdelims. 11 \. 1 amsbook class. 26 arrows extensible. 27 \binom. 20 amsfonts package. 26. 16 \biggl. 12 \arccos. 9 amsart class..tex. 18 \coth. 2 \cfrac. 5. 25 \big. 14 33 BaKoMa fonts. 2. 12 \ddot. 9 alignedat environment. 24. 2. 12 \addtocounter. 8. 28 cases environment. 2.err. 14 \accentedsymbol. 3. 10. 12 \dddot. 18 array environment. 25 amsmath package. 5–7. 26. 7. 32 continued fractions. 15 \cos. 8 CD environment. 27 \bigr. 25. 10 \bmod.

2 INDEX function names. 14 diffs-m. 3 displayed equations centering. 9 \gcd. 10 hierarchy. 24. 20 \ker. 2 \intertext. 8. 15. 3. 18 kuvio package. 11 \idotsint. 3. 20 \inf. 31 ellipsis dots in matrices. 16 \lvert. 18 \displaybreak. 5 \lg. 3 subordinate numbering.txt. see subscripts and superscripts \limits. 18 \dfrac. 3 overriding. 16 \ldots. 20 \limsup. 20 \label. 26. 9 left or right placement. 18 limits. 9 displayed equations. 11 \hom. 1. 7. 18 \log. see ellipsis dots \dotsb. 3 equations. 6. 20 \iiiint.org. 17. 18 horizontal space around operator names.34 \deg. see operator names gather environment.tex. 21 \exp. see displayed equations euscript package. 21 \frac. 18 \injlim. 2 \dot. 16. 1. 18 integrals multiple. 5 fntguide. 12 e-math. 12 \hdotsfor. 2. 17 in math mode. 18 \liminf. 10 \langle. 11 eqnarray environment. 9 intlimits option. 12 \dotsm. 13 fleqn option. 28–30 gathered environment. 15 fractions. 20 \iiint. 21 . 18 \fbox. 10 equation environment. 30 \dim.ams. 14 \fracwithdelims. 20 \iint. 16 math fonts. 30 \eqref. 12 \dotsc. 18 \genfrac. 12 dots. 12 \left. 24. 5. 10 vertical placement. 18 \lim. 12 \dotsi. 12 \dotso. 13 leqno option. 14 \documentclass. 18 \ln. 5–7. 20 displaymath environment. 20 placement of limits. 14 \hat. 3. 27 \leftroot. 2 equation* environment. 17. 1. 18 \lVert. 3 \displaystyle. 3 \displaylimits. 18 \det. 7. 2. 3. 14. 30 equation numbers cross-references.

20 nonamelimits option. 9. 21 matrices. 6. 11 \smash. 28 pmatrix environment. 11 multline environment. 18 \setcounter. 14 \sec. 27 \rVert. 18 \over. 21. 18 \operatorname*. 13. 5 \right. 10 subscripts and superscripts. 14 \scriptstyle. 18 \medspace. 1. 2 \notag. 18 \mbox. 11 \negthinspace. 29. 17 \operatorname. 17. 5 namelimits option. 5. 19 \sin. 14. 9. 10 \setlength. 25 \min. 5 \numberwithin. 12 split environment. 21 \mathscr. 13 \overset. 2 nosumlimits option. 9. 8 \pagebreak. 11 \negthickspace. 21 \mathfrak. 18 \qquad. 21 \mathit. 13 \overrightarrow. 13 multi-line. 22 \raisetag. 21 \mathrm. 22 \mathbf. see math fonts \mathbb. 24. 18 \sinh. 13 \overwithdelims. 5 \sideset. 2. 18 \pod. 22 \pmod. 27. 3. 27–30 \sptilde. 16. 12 nointlimits option. 10 \max. 19. 30 \multlinegap. 15. 14 . 3. 19 on sums. 22 \mathcal. 19 subeqn. 15. 21 \mathsf. 13 subarray environment. 16 \scriptscriptstyle. 2 \nolimits. 16 \ref. 5 \shoveright.tex. 10 reqno option. 18 smallmatrix environment. 18 \projlim. 16 \rvert. 12 \stackrel. 19 math symbols. 21. 30 operator names. 2 \negmedspace. 27 \sphat. 11 \newcommand. 21 \mathtt. 11 \R. 11 \quad. 28 matrix environment. 5. 29 \overleftarrow. 10 ellipsis dots. 5 \shoveleft. 8 \rangle. 18 \mspace. 3 subequations environment.INDEX 35 page breaks. 25 \Pr. 3. 18 PostScript fonts. 10 \pmb. 11 Metafont source ﬁles. 3. 8 \pmatrix. 21 \nobreakdash. 11 \matrix. 18 \mod. 13 \overleftrightarrow.

13 INDEX . 14 \theequation. 18 \varOmega. 19 \sum. 10 \vphantom. 23 \varprojlim. 27 \xleftarrow. 23 \varSigma. 13 \uproot. 2. 2 \sup. 22 sumlimits option. 14 tbtags option. 18 \tanh. 2 technote. 23 \varGamma. 18 \textstyle. 31 \text.36 placement. 20.tex. 11 \thinspace. 23 \varXi. 13 \usepackage. 23 \varinjlim. 13 \underset. 11 TUGboat. 25 \value. 13 \underleftrightarrow. 10 vmatrix environment. 14 \tfrac. 13 \xrightarrow. 23 \varliminf. 23 \varPhi. 23 Vmatrix environment. 26 \tag. 23 \varPi. 9. 3 \tag*. 9. 18 text fragments inside math. 2. 18 \varLambda.tex. 10 \varDelta. 18 superscripts. 18 \tbinom. 10 \thickspace. 7–9. 31 \underleftarrow. 3 TEX Users Group. 2 \substack. 23 \varTheta. 18 \varPsi. 14. 28–30 testmath. 13 \underrightarrow. 23 \varUpsilon. 3 \tan. 18 \varlimsup. see subscripts and superscripts tabular environment.

- 1exy1s
- amsldoc
- amsldoc
- Math Pack Latex
- math.ce1
- latextut4
- Matrices
- Tutorial2_3
- Combined MS - FP1 Edexcel
- Tutorial 2-Answer Scheme
- Matrices Gauss Jordan Method _ Basic Math Tutor
- Maths for Management
- mathgen-1244771386
- matrics modul
- Matrix Analysis, Bellman
- 1 Linear Eqs
- Unit 2
- Operator Theory Systems Theory and Scattering Theory Multidimensional Generalizations
- MATHEMATICS FOR ECONOMICS AND BUSINESS(IAN JACQUES ).pdf
- On the Solvability of Real Rings
- Ch 04 Determinants.cracked
- 1930-4417-3-PB
- Cambridge - Mathematical Tripos
- Chapter 4 Determinants
- Information Andrei Okounkov Nguyenthanhnam1210.Wordpress
- Fin118 Unit 0
- Daniel Alpay, Victor Vinnikov Operator Theory, Systems Theory and Scattering Theory. Multidimensional Generalizations 2005
- Lecture1_18
- 7.1 Introduction to Matrices
- Cambridge sche
- User’s Guide for the Amsmath Package (Version 2.0)

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd