Update LuaTeX testfiles for ^@ change
[latex2e.git] / latex2e-20170101 / required / amsmath / amsldoc.tex
blobd787f87c55fb56c0f1d8b85bb118be61527a74c6
2 % Copyright 1995, 2000, 2013 American Mathematical Society.
3 % Copyright 2016 LaTeX3 Project and American Mathematical Society.
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either version 1.3c
7 % of this license or (at your option) any later version.
8 % The latest version of this license is in
9 % http://www.latex-project.org/lppl.txt
10 % and version 1.3c or later is part of all distributions of LaTeX
11 % version 2005/12/01 or later.
13 % This work has the LPPL maintenance status `maintained'.
15 % The Current Maintainer of this work is the LaTeX3 Project.
17 \documentclass[leqno,titlepage,openany]{amsldoc}[1999/12/13]
19 \def\MaintainedByLaTeXTeam#1{%
20 \begin{center}%
21 \fbox{\fbox{\begin{tabular}{@{}l@{}}%
22 This file is maintained by the \LaTeX{} Project team.\\%
23 Bug reports can be opened (category \texttt{#1}) at\\%
24 \url{http://latex-project.org/bugs.html}.\end{tabular}}}\end{center}}
26 \ifx\UndEfiNed\url
27 \ClassError{amsldoc}{%
28 This version of amsldoc.tex must be processed\MessageBreak
29 with a newer version of amsldoc.cls (2.02 or later)}{}
30 \fi
32 \title{User's Guide for the \pkg{amsmath} Package (Version~2.0)}
33 \author{American Mathematical Society, \LaTeX3 Project}
34 \date{1999-12-13 (revised 2002-02-25, 2016-11-14)}
35 \makeatletter
36 \def\@thanks{\bigskip\MaintainedByLaTeXTeam{amslatex}}
37 \makeatother
39 % Use the amsmath package and amscd package in order to print
40 % examples.
41 \usepackage{amsmath}
42 \usepackage{amscd}
44 \makeindex % generate index data
45 \providecommand{\see}[2]{\textit{see} #1}
47 % The amsldoc class includes a number of features useful for
48 % documentation about TeX, including:
50 % ---Commands \tex/, \amstex/, \latex/, ... for uniform treatment
51 % of the various logos and easy handling of following spaces.
53 % ---Commands for printing various common elements: \cn for command
54 % names, \fn for file names (including font-file names), \env for
55 % environments, \pkg and \cls for packages and classes, etc.
57 % Many of the command names used here are rather long and will
58 % contribute to poor linebreaking if we follow the \latex/ practice
59 % of not hyphenating anything set in tt font; instead we selectively
60 % allow some hyphenation.
61 \allowtthyphens % defined in amsldoc.cls
63 \hyphenation{ac-cent-ed-sym-bol add-to-counter add-to-length align-at
64 aligned-at allow-dis-play-breaks ams-art ams-cd ams-la-tex amsl-doc
65 ams-symb ams-tex ams-text ams-xtra bmatrix bold-sym-bol cen-ter-tags
66 eqn-ar-ray idots-int int-lim-its latex med-space neg-med-space
67 neg-thick-space neg-thin-space no-int-lim-its no-name-lim-its
68 over-left-arrow over-left-right-arrow over-right-arrow pmatrix
69 qed-sym-bol set-length side-set small-er tbinom the-equa-tion
70 thick-space thin-space un-der-left-arrow un-der-left-right-arrow
71 un-der-right-arrow use-pack-age var-inj-lim var-proj-lim vmatrix
72 xalign-at xx-align-at}
74 % Prepare for illustrating the \vec example
75 \newcommand{\vect}[1]{\mathbf{#1}}
77 \newcommand{\booktitle}[1]{\textit{#1}}
78 \newcommand{\journalname}[1]{\textit{#1}}
79 \newcommand{\seriesname}[1]{\textit{#1}}
81 % Command to insert and index a particular phrase. Doesn't work for
82 % certain kinds of special characters in the argument.
83 \newcommand{\ii}[1]{#1\index{#1}}
85 \newcommand{\vstrut}[1]{\vrule width0pt height#1\relax}
87 % An environment for presenting comprehensive address information:
88 \newenvironment{infoaddress}{%
89 \par\topsep\medskipamount
90 \trivlist\centering
91 \item[]%
92 \begin{minipage}{.7\columnwidth}%
93 \raggedright
94 }{%
95 \end{minipage}%
96 \endtrivlist
99 \newenvironment{eqxample}{%
100 \par\addvspace\medskipamount
101 \noindent\begin{minipage}{.5\columnwidth}%
102 \def\producing{\end{minipage}\begin{minipage}{.5\columnwidth}%
103 \hbox\bgroup\kern-.2pt\vrule width.2pt%
104 \vbox\bgroup\parindent0pt\relax
105 % The 3pt is to cancel the -\lineskip from \displ@y
106 \abovedisplayskip3pt \abovedisplayshortskip\abovedisplayskip
107 \belowdisplayskip0pt \belowdisplayshortskip\belowdisplayskip
108 \noindent}
110 \par
111 % Ensure that a lonely \[\] structure doesn't take up width less than
112 % \hsize.
113 \hrule height0pt width\hsize
114 \egroup\vrule width.2pt\kern-.2pt\egroup
115 \end{minipage}%
116 \par\addvspace\medskipamount
119 % The chapters are so short, perhaps we shouldn't call them by the
120 % name `Chapter'. We make \chaptername read an argument in order to
121 % remove a following \space or "{} " (both possibilities are present
122 % in book.cls).
124 \renewcommand{\chaptername}[1]{}
125 \newcommand{\chapnum}[1]{\mdash #1\mdash }
126 \makeatletter
127 \def\@makechapterhead#1{%
128 \vspace{1.5\baselineskip}%
129 {\parindent \z@ \raggedright \reset@font
130 \ifnum \c@secnumdepth >\m@ne
131 \large\bfseries \chapnum{\thechapter}%
132 \par\nobreak
133 \vskip.5\baselineskip\relax
135 #1\par\nobreak
136 \vskip\baselineskip
138 \makeatother
140 % A command for ragged-right parbox in a tabular.
141 \newcommand{\rp}{\let\PBS\\\raggedright\let\\\PBS}
143 % Non-indexed file name
144 \newcommand{\nfn}[1]{\texttt{#1}}
146 % For the examples in the math spacing table.
147 %%\newcommand{\lspx}{\mbox{\rule{5pt}{.6pt}\rule{.6pt}{6pt}}}
148 %%\newcommand{\rspx}{\mbox{\rule[-1pt]{.6pt}{7pt}%
149 %% \rule[-1pt]{5pt}{.6pt}}}
150 \newcommand{\lspx}{\mathord{\Rightarrow\mkern-1mu}}
151 \newcommand{\rspx}{\mathord{\mkern-1mu\Leftarrow}}
152 \newcommand{\spx}[1]{$\lspx #1\rspx$}
154 % For a list of characters representing document input.
155 \newcommand{\clist}[1]{%
156 \mbox{\ntt\spaceskip.2em plus.1em \xspaceskip\spaceskip#1}}
158 % Fix weird \latex/ definition of rightmark.
159 \makeatletter
160 \def\rightmark{\expandafter\@rightmark\botmark{}{}}
161 % Also turn off section marks.
162 \let\sectionmark\@gobble
163 \renewcommand{\chaptermark}[1]{%
164 \uppercase{\markboth{\rhcn#1}{\rhcn#1}}}
165 \newcommand{\rhcn}{\thechapter. }
166 \makeatother
168 % Include down to \section but not \subsection, in toc:
169 \setcounter{tocdepth}{1}
171 \DeclareMathOperator{\ix}{ix}
172 \DeclareMathOperator{\nul}{nul}
173 \DeclareMathOperator{\End}{End}
174 \DeclareMathOperator{\xxx}{xxx}
176 \usepackage{hyperref}
177 \hypersetup{pdfborder=0 0 0}
178 \makeatletter
179 \let\oldcs\cs
180 \def\cs#1{\texorpdfstring{\oldcs{#1}}{\@backslashchar\@backslashchar#1}}
181 \let\cn\cs
182 \makeatother
183 \begin{document}
185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
186 \frontmatter
188 \maketitle
190 \pagestyle{headings}
191 \tableofcontents
192 \cleardoublepage % for better page number placement
194 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195 \mainmatter
196 \chapter{Introduction}
198 The \pkg{amsmath} package is a \LaTeX{} package that provides
199 miscellaneous enhancements for improving the information structure and
200 printed output of documents that contain mathematical formulas. Readers
201 unfamiliar with \LaTeX{} should refer to \cite{lamport}. If you have an
202 up-to-date version of \LaTeX{}, the \pkg{amsmath} package is normally
203 provided along with it. Upgrading when a newer version of the
204 \pkg{amsmath} package is released can be done via
205 \url{http://www.ams.org/tex/amsmath.html} or
206 \url{ftp://ftp.ams.org/pub/tex/}.
208 This documentation describes the features of the \pkg{amsmath} package
209 and discusses how they are intended to be used. It also covers some
210 ancillary packages:
211 \begin{ctab}{ll}
212 \pkg{amsbsy}& \pkg{amstext}\\
213 \pkg{amscd}& \pkg{amsxtra}\\
214 \pkg{amsopn}
215 \end{ctab}
216 These all have something to do with the contents of math formulas. For
217 information on extra math symbols and math fonts, see \cite{amsfonts}
218 and \url{http://www.ams.org/tex/amsfonts.html}. For documentation of the
219 \pkg{amsthm} package or AMS document classes (\cls{amsart},
220 \cls{amsbook}, etc.\@) see \cite{amsthdoc} or \cite{instr-l} and
221 \url{http://www.ams.org/tex/author-info.html}.
223 If you are a long-time \latex/ user and have lots of mathematics in what
224 you write, then you may recognize solutions for some familiar problems
225 in this list of \pkg{amsmath} features:
226 \begin{itemize}
228 \item A convenient way to define new `operator name' commands analogous
229 to \cn{sin} and \cn{lim}, including proper side spacing and automatic
230 selection of the correct font style and size (even when used in
231 sub- or superscripts).
233 \item Multiple substitutes for the \env{eqnarray} environment to make
234 various kinds of equation arrangements easier to write.
236 \item Equation numbers automatically adjust up or down to avoid
237 overprinting on the equation contents (unlike \env{eqnarray}).
239 \item Spacing around equals signs matches the normal spacing in the
240 \env{equation} environment (unlike \env{eqnarray}).
242 \item A way to produce multiline subscripts as are often used with
243 summation or product symbols.
245 \item An easy way to substitute a variant equation number for a given
246 equation instead of the automatically supplied number.
248 \item An easy way to produce subordinate equation numbers of the form
249 (1.3a) (1.3b) (1.3c) for selected groups of equations.
251 \end{itemize}
253 The \pkg{amsmath} package is distributed together with some small
254 auxiliary packages:
255 \begin{description}
256 \item[\pkg{amsmath}] Primary package, provides various features for
257 displayed equations and other mathematical constructs.
259 \item[\pkg{amstext}] Provides a \cn{text} command for
260 typesetting a fragment of text inside a display.
262 \item[\pkg{amsopn}] Provides \cn{DeclareMathOperator} for defining new
263 `operator names' like \cn{sin} and \cn{lim}.
265 \item[\pkg{amsbsy}] For backward compatibility this package continues
266 to exist but use of the newer \pkg{bm} package that comes with \LaTeX{}
267 is recommended instead.
269 \item[\pkg{amscd}] Provides a \env{CD} environment for simple
270 commutative diagrams (no support for diagonal arrows).
272 \item[\pkg{amsxtra}] Provides certain odds and ends such as
273 \cn{fracwithdelims} and \cn{accentedsymbol}, for compatibility with
274 documents created using version 1.1.
276 \end{description}
278 The \pkg{amsmath} package incorporates \pkg{amstext}, \pkg{amsopn}, and
279 \pkg{amsbsy}. The features of \pkg{amscd} and \pkg{amsxtra}, however,
280 are available only by invoking those packages separately.
282 \chapter{Options for the \pkg{amsmath} package}\label{options}
284 The \pkg{amsmath} package has the following options:
285 \begin{description}
287 \item[\opt{centertags}] (default) For a split equation, place equation
288 numbers\index{equation numbers!vertical placement} vertically centered
289 on the total height of the equation.
291 \item[\opt{tbtags}] `Top-or-bottom tags': For a split equation, place
292 equation numbers\index{equation numbers!vertical placement} level with
293 the last (resp.\@ first) line, if numbers are on the right (resp.\@
294 left).
296 \item[\opt{sumlimits}] (default) Place the subscripts and
297 superscripts\index{subscripts and superscripts!placement}\relax
298 \index{limits|see{subscripts and superscripts}} of summation symbols
299 above and below, in displayed equations. This option also affects other
300 symbols of the same type\mdash $\prod$, $\coprod$, $\bigotimes$,
301 $\bigoplus$, and so forth\mdash but excluding integrals (see below).
303 \item[\opt{nosumlimits}] Always place the subscripts and superscripts of
304 summation-type symbols to the side, even in displayed equations.
306 \item[\opt{intlimits}] Like \opt{sumlimits}, but for
307 integral\index{integrals!placement of limits} symbols.
309 \item[\opt{nointlimits}] (default) Opposite of \opt{intlimits}.
311 \item[\opt{namelimits}] (default) Like \opt{sumlimits}, but for certain
312 `operator names' such as $\det$, $\inf$, $\lim$, $\max$, $\min$, that
313 traditionally have subscripts \index{subscripts and
314 superscripts!placement} placed underneath when they occur in a displayed
315 equation.
317 \item[\opt{nonamelimits}] Opposite of \opt{namelimits}.
319 \end{description}
321 \begin{description}
322 \item[\opt{alignedleftspaceyes}]
323 \item[\opt{alignedleftspaceno}]
324 \item[\opt{alignedleftspaceyesifneg}]
325 \end{description}
327 To use one of these package options, put the option name in the optional
328 argument of the \cn{usepackage} command\mdash e.g.,
329 \verb"\usepackage[intlimits]{amsmath}".
331 The \pkg{amsmath} package also recognizes the following options which
332 are normally selected (implicitly or explicitly) through the
333 \cn{documentclass} command, and thus need not be repeated in the option
334 list of the \cn{usepackage}|{amsmath}| statement.
335 \begin{description}
337 \item[\opt{leqno}] Place equation numbers on the left.\index{equation
338 numbers!left or right placement}
340 \item[\opt{reqno}] Place equation numbers on the right.
342 \item[\opt{fleqn}] Position equations at a fixed indent from the left
343 margin rather than centered in the text column.\index{displayed
344 equations!centering}
346 \end{description}
348 Three options have been added to control the space to the left of
349 \env{aligned} and \env{gathered} environments. Prior to the 2017 release
350 a thin space was added to the left but not the right of these constructs.
351 This appears to have been an accidental feature of the implementation and
352 was typically corrected by prefixing the environments with \cn{\!}.
354 The new default behavior is aimed to ensure that the environments do
355 not have a thin space added in most cases, and that existing documents
356 using |\!\begin{aligned}| continue to work as before.
358 \begin{description}
359 \item[\opt{alignedleftspaceyes}] Always add \cn{\,} to the left of \env{aligned} and \env{gathered}.
360 \item[\opt{alignedleftspaceno}] Never add \cn{\,} to the left of \env{aligned} and \env{gathered}.
361 \item[\opt{alignedleftspaceyesifneg}] Only add \cn{\,} if the environment is prefixed by negative space. (New default behavior.)
362 \end{description}
367 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
368 \chapter{Displayed equations}
370 \section{Introduction}
371 The \pkg{amsmath} package provides a number of additional displayed
372 equation structures\index{displayed
373 equations}\index{equations|see{displayed equations}} beyond the ones
374 provided in basic \latex/. The augmented set includes:
375 \begin{verbatim}
376 equation equation* align align*
377 gather gather* flalign flalign*
378 multline multline* alignat alignat*
379 split
380 \end{verbatim}
381 (Although the standard \env{eqnarray} environment remains available,
382 it is better to use \env{align} or \env{equation}+\env{split} instead.)
384 Except for \env{split}, each environment has both starred and unstarred
385 forms, where the unstarred forms have automatic numbering using
386 \latex/'s \env{equation} counter. You can suppress the number on any
387 particular line by putting \cn{notag} before the \cn{\\}; you can also
388 override\index{equation numbers!overriding} it with a tag of your own
389 using \cn{tag}|{|\<label>|}|, where \<label> means arbitrary text such
390 as |$*$| or |ii| used to \qq{number} the equation. There is also a
391 \cn{tag*} command that causes the text you supply to be typeset
392 literally, without adding parentheses around it. \cn{tag} and \cn{tag*}
393 can also be used within the unnumbered versions of all the \pkg{amsmath}
394 alignment structures. Some examples of the use of \cn{tag} may be found
395 in the sample files \fn{testmath.tex} and \fn{subeqn.tex} provided with
396 the \pkg{amsmath} package.
398 The \env{split} environment is a special subordinate form that is used
399 only \emph{inside} one of the others. It cannot be used inside
400 \env{multline}, however.
402 In the structures that do alignment (\env{split}, \env{align} and
403 variants), relation symbols have an \verb'&' before them but not
404 after\mdash unlike \env{eqnarray}. Putting the \verb'&' after the
405 relation symbol will interfere with the normal spacing; it has to go
406 before.
408 \begin{table}[p]
409 \caption[]{Comparison of displayed equation environments (vertical lines
410 indicating nominal margins)}\label{displays}
411 \renewcommand{\theequation}{\arabic{equation}}
412 \begin{eqxample}
413 \begin{verbatim}
414 \begin{equation*}
416 \end{equation*}
417 \end{verbatim}
418 \producing
419 \begin{equation*}
421 \end{equation*}
422 \end{eqxample}
424 \begin{eqxample}
425 \begin{verbatim}
426 \begin{equation}
428 \end{equation}
429 \end{verbatim}
430 \producing
431 \begin{equation}
433 \end{equation}
434 \end{eqxample}
436 \begin{eqxample}
437 \begin{verbatim}
438 \begin{equation}\label{xx}
439 \begin{split}
440 a& =b+c-d\\
441 & \quad +e-f\\
442 & =g+h\\
443 & =i
444 \end{split}
445 \end{equation}
446 \end{verbatim}
447 \producing
448 \begin{equation}\label{xx}
449 \begin{split}
450 a& =b+c-d\\
451 & \quad +e-f\\
452 & =g+h\\
453 & =i
454 \end{split}
455 \end{equation}
456 \end{eqxample}
458 \begin{eqxample}
459 \begin{verbatim}
460 \begin{multline}
461 a+b+c+d+e+f\\
462 +i+j+k+l+m+n
463 \end{multline}
464 \end{verbatim}
465 \producing
466 \begin{multline}
467 a+b+c+d+e+f\\
468 +i+j+k+l+m+n
469 \end{multline}
470 \end{eqxample}
472 \begin{eqxample}
473 \begin{verbatim}
474 \begin{gather}
475 a_1=b_1+c_1\\
476 a_2=b_2+c_2-d_2+e_2
477 \end{gather}
478 \end{verbatim}
479 \producing
480 \begin{gather}
481 a_1=b_1+c_1\\
482 a_2=b_2+c_2-d_2+e_2
483 \end{gather}
484 \end{eqxample}
486 \begin{eqxample}
487 \begin{verbatim}
488 \begin{align}
489 a_1& =b_1+c_1\\
490 a_2& =b_2+c_2-d_2+e_2
491 \end{align}
492 \end{verbatim}
493 \producing
494 \begin{align}
495 a_1& =b_1+c_1\\
496 a_2& =b_2+c_2-d_2+e_2
497 \end{align}
498 \end{eqxample}
500 \begin{eqxample}
501 \begin{verbatim}
502 \begin{align}
503 a_{11}& =b_{11}&
504 a_{12}& =b_{12}\\
505 a_{21}& =b_{21}&
506 a_{22}& =b_{22}+c_{22}
507 \end{align}
508 \end{verbatim}
509 \producing
510 \begin{align}
511 a_{11}& =b_{11}&
512 a_{12}& =b_{12}\\
513 a_{21}& =b_{21}&
514 a_{22}& =b_{22}+c_{22}
515 \end{align}
516 \end{eqxample}
518 \begin{eqxample}
519 \begin{verbatim}
520 \begin{flalign*}
521 a_{11}& =b_{11}&
522 a_{12}& =b_{12}\\
523 a_{21}& =b_{21}&
524 a_{22}& =b_{22}+c_{22}
525 \end{flalign*}
526 \end{verbatim}
527 \producing
528 \begin{flalign*}
529 a_{11}& =b_{11}&
530 a_{12}& =b_{12}\\
531 a_{21}& =b_{21}&
532 a_{22}& =b_{22}+c_{22}
533 \end{flalign*}
534 \end{eqxample}
535 \end{table}
537 \section{Single equations}
539 The \env{equation} environment is for a single equation with an
540 automatically generated number. The \env{equation*} environment is the
541 same except for omitting the number.%
542 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
543 \footnote{Basic \latex/ doesn't provide an \env{equation*} environment,
544 but rather a functionally equivalent environment named
545 \env{displaymath}.}
547 \section{Split equations without alignment}
549 The \env{multline} environment is a variation of the \env{equation}
550 environment used for equations that don't fit on a single line. The
551 first line of a \env{multline} will be at the left margin and the last
552 line at the right margin, except for an indention on both sides in the
553 amount of \cn{multlinegap}. Any additional lines in between will be
554 centered independently within the display width (unless the \opt{fleqn}
555 option is in effect).
557 Like \env{equation}, \env{multline} has only a single equation number
558 (thus, none of the individual lines should be marked with \cn{notag}).
559 The equation number is placed on the last line (\opt{reqno} option) or
560 first line (\opt{leqno} option); vertical centering as for \env{split}
561 is not supported by \env{multline}.
563 It's possible to force one of the middle lines to the left or right with
564 commands \cn{shoveleft}, \cn{shoveright}. These commands take the entire
565 line as an argument, up to but not including the final \cn{\\}; for
566 example
567 \begin{multline}
568 \framebox[.65\columnwidth]{A}\\
569 \framebox[.5\columnwidth]{B}\\
570 \shoveright{\framebox[.55\columnwidth]{C}}\\
571 \framebox[.65\columnwidth]{D}
572 \end{multline}
573 \begin{verbatim}
574 \begin{multline}
575 \framebox[.65\columnwidth]{A}\\
576 \framebox[.5\columnwidth]{B}\\
577 \shoveright{\framebox[.55\columnwidth]{C}}\\
578 \framebox[.65\columnwidth]{D}
579 \end{multline}
580 \end{verbatim}
582 The value of \cn{multlinegap} can be changed with the usual \latex/
583 commands \cn{setlength} or \cn{addtolength}.
585 \section{Split equations with alignment}
587 Like \env{multline}, the \env{split} environment is for \emph{single}
588 equations that are too long to fit on one line and hence must be split
589 into multiple lines. Unlike \env{multline}, however, the \env{split}
590 environment provides for alignment among the split lines, using |&| to
591 mark alignment points. Unlike the other \pkg{amsmath} equation
592 structures, the \env{split} environment provides no numbering, because
593 it is intended to be used \emph{only inside some other displayed
594 equation structure}, usually an \env{equation}, \env{align}, or
595 \env{gather} environment, which provides the numbering. For example:
596 \begin{equation}\label{e:barwq}\begin{split}
597 H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
598 \sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
599 &\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
600 \Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
601 \kern-2em % adjust equation body to the right [mjd,13-Nov-1994]
602 \end{split}\end{equation}
604 \begin{verbatim}
605 \begin{equation}\label{e:barwq}\begin{split}
606 H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
607 \sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
608 &\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
609 \Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
610 \end{split}\end{equation}
611 \end{verbatim}
613 The \env{split} structure should constitute the entire body of the
614 enclosing structure, apart from commands like \cn{label} that produce no
615 visible material.
617 \section{Equation groups without alignment}
619 The \env{gather} environment is used for a group of consecutive
620 equations when there is no alignment desired among them; each one is
621 centered separately within the text width (see Table~\ref{displays}).
622 Equations inside \env{gather} are separated by a \cn{\\} command.
623 Any equation in a \env{gather} may consist of a \verb'\begin{split}'
624 \dots\ \verb'\end{split}' structure\mdash for example:
625 \begin{verbatim}
626 \begin{gather}
627 first equation\\
628 \begin{split}
629 second & equation\\
630 & on two lines
631 \end{split}
633 third equation
634 \end{gather}
635 \end{verbatim}
637 \section{Equation groups with mutual alignment}
639 The \env{align} environment is used for two or more equations when
640 vertical alignment is desired; usually binary relations such as equal
641 signs are aligned (see Table~\ref{displays}).
643 To have several equation columns side-by-side, use extra ampersands
644 to separate the columns:
645 \begin{align}
646 x&=y & X&=Y & a&=b+c\\
647 x'&=y' & X'&=Y' & a'&=b\\
648 x+x'&=y+y' & X+X'&=Y+Y' & a'b&=c'b
649 \end{align}
651 \begin{verbatim}
652 \begin{align}
653 x&=y & X&=Y & a&=b+c\\
654 x'&=y' & X'&=Y' & a'&=b\\
655 x+x'&=y+y' & X+X'&=Y+Y' & a'b&=c'b
656 \end{align}
657 \end{verbatim}
658 Line-by-line annotations on an equation can be done by judicious
659 application of \cn{text} inside an \env{align} environment:
660 \begin{align}
661 x& = y_1-y_2+y_3-y_5+y_8-\dots
662 && \text{by \eqref{eq:C}}\\
663 & = y'\circ y^* && \text{by \eqref{eq:D}}\\
664 & = y(0) y' && \text {by Axiom 1.}
665 \end{align}
667 \begin{verbatim}
668 \begin{align}
669 x& = y_1-y_2+y_3-y_5+y_8-\dots
670 && \text{by \eqref{eq:C}}\\
671 & = y'\circ y^* && \text{by \eqref{eq:D}}\\
672 & = y(0) y' && \text {by Axiom 1.}
673 \end{align}
674 \end{verbatim}
675 A variant environment \env{alignat} allows the horizontal space between
676 equations to be explicitly specified. This environment takes one argument,
677 the number of \qq{equation columns}: count the maximum number of \verb'&'s
678 in any row, add 1 and divide by 2.
679 \begin{alignat}{2}
680 x& = y_1-y_2+y_3-y_5+y_8-\dots
681 &\quad& \text{by \eqref{eq:C}}\\
682 & = y'\circ y^* && \text{by \eqref{eq:D}}\\
683 & = y(0) y' && \text {by Axiom 1.}
684 \end{alignat}
686 \begin{verbatim}
687 \begin{alignat}{2}
688 x& = y_1-y_2+y_3-y_5+y_8-\dots
689 &\quad& \text{by \eqref{eq:C}}\\
690 & = y'\circ y^* && \text{by \eqref{eq:D}}\\
691 & = y(0) y' && \text {by Axiom 1.}
692 \end{alignat}
693 \end{verbatim}
695 \section{Alignment building blocks}
697 Like \env{equation}, the multi-equation environments \env{gather},
698 \env{align}, and \env{alignat} are designed to produce a structure
699 whose width is the full line width. This means, for example, that one
700 cannot readily add parentheses around the entire structure. But variants
701 \env{gathered}, \env{aligned}, and \env{alignedat} are provided whose
702 total width is the actual width of the contents; thus they can be used
703 as a component in a containing expression. E.g.,
704 \begin{equation*}
705 \left.\begin{aligned}
706 B'&=-\partial\times E,\\
707 E'&=\partial\times B - 4\pi j,
708 \end{aligned}
709 \right\}
710 \qquad \text{Maxwell's equations}
711 \end{equation*}
712 \begin{verbatim}
713 \begin{equation*}
714 \left.\begin{aligned}
715 B'&=-\partial\times E,\\
716 E'&=\partial\times B - 4\pi j,
717 \end{aligned}
718 \right\}
719 \qquad \text{Maxwell's equations}
720 \end{equation*}
721 \end{verbatim}
722 Like the \env{array} environment, these \texttt{-ed} variants also take
723 an optional \verb'[t]' or \verb'[b]' argument to specify vertical
724 positioning.
726 \qq{Cases} constructions like the following are common in
727 mathematics:
728 \begin{equation}\label{eq:C}
729 P_{r-j}=
730 \begin{cases}
731 0& \text{if $r-j$ is odd},\\
732 r!\,(-1)^{(r-j)/2}& \text{if $r-j$ is even}.
733 \end{cases}
734 \end{equation}
735 and in the \pkg{amsmath} package there is a \env{cases} environment to
736 make them easy to write:
737 \begin{verbatim}
738 P_{r-j}=\begin{cases}
739 0& \text{if $r-j$ is odd},\\
740 r!\,(-1)^{(r-j)/2}& \text{if $r-j$ is even}.
741 \end{cases}
742 \end{verbatim}
743 Notice the use of \cn{text} (cf.~\secref{text}) and the nested
744 math formulas.
746 \section{Adjusting tag placement}
748 Placing equation numbers can be a rather complex problem in multiline
749 displays. The environments of the \pkg{amsmath} package try hard to
750 avoid overprinting an equation number on the equation contents, if
751 necessary moving the number down or up to a separate line. Difficulties
752 in accurately calculating the profile of an equation can occasionally
753 result in number movement that doesn't look right. There is a
754 \cn{raisetag} command provided to adjust the vertical position of the
755 current equation number, if it has been shifted away from its normal
756 position. To move a particular number up by six points, write
757 |\raisetag{6pt}|. This kind of adjustment is fine tuning like line
758 breaks and page breaks, and should therefore be left undone until your
759 document is nearly finalized, or you may end up redoing the fine tuning
760 several times to keep up with changing document contents.
762 \section{Vertical spacing and page breaks in multiline displays}
764 You can use the \cn{\\}|[|\<dimension>|]| command to get extra vertical
765 space between lines in all the \pkg{amsmath} displayed equation
766 environments, as is usual in \latex/. When the \pkg{amsmath} package is
767 in use \ii{page breaks} between equation lines are normally disallowed;
768 the philosophy is that page breaks in such material should receive
769 individual attention from the author. To get an individual page break
770 inside a particular displayed equation, a \cn{displaybreak} command is
771 provided. \cn{displaybreak} is best placed immediately before the
772 \cn{\\} where it is to take effect. Like \latex/'s \cn{pagebreak},
773 \cn{displaybreak} takes an optional argument between 0 and 4 denoting
774 the desirability of the pagebreak. |\displaybreak[0]| means \qq{it is
775 permissible to break here} without encouraging a break;
776 \cn{displaybreak} with no optional argument is the same as
777 |\displaybreak[4]| and forces a break.
779 If you prefer a strategy of letting page breaks fall where they may,
780 even in the middle of a multi-line equation, then you might put
781 \cn{allowdisplaybreaks}\texttt{[1]} in the preamble of your document. An
782 optional argument 1\ndash 4 can be used for finer control: |[1]| means
783 allow page breaks, but avoid them as much as possible; values of 2,3,4
784 mean increasing permissiveness. When display breaks are enabled with
785 \cn{allowdisplaybreaks}, the \cn{\\*} command can be used to prohibit a
786 pagebreak after a given line, as usual.
788 \begin{bfseries}
789 Note: Certain equation environments wrap their contents in an
790 unbreakable box, with the consequence that neither \cn{displaybreak} nor
791 \cn{allowdisplaybreaks} will have any effect on them. These include
792 \env{split}, \env{aligned}, \env{gathered}, and \env{alignedat}.
793 \end{bfseries}
795 \section{Interrupting a display}
797 The command \cn{intertext} is used for a short interjection of one or
798 two lines of text\index{text fragments inside math} in the middle of a
799 multiple-line display structure (see also the \cn{text} command in
800 \secref{text}). Its salient feature is preservation of the alignment,
801 which would not happen if you simply ended the display and then started
802 it up again afterwards. \cn{intertext} may only appear right after a
803 \cn{\\} or \cn{\\*} command. Notice the position of the word \qq{and} in
804 this example.
805 \begin{align}
806 A_1&=N_0(\lambda;\Omega')-\phi(\lambda;\Omega'),\\
807 A_2&=\phi(\lambda;\Omega')-\phi(\lambda;\Omega),\\
808 \intertext{and}
809 A_3&=\mathcal{N}(\lambda;\omega).
810 \end{align}
811 \begin{verbatim}
812 \begin{align}
813 A_1&=N_0(\lambda;\Omega')-\phi(\lambda;\Omega'),\\
814 A_2&=\phi(\lambda;\Omega')-\phi(\lambda;\Omega),\\
815 \intertext{and}
816 A_3&=\mathcal{N}(\lambda;\omega).
817 \end{align}
818 \end{verbatim}
820 \section{Equation numbering}
822 \subsection{Numbering hierarchy}
823 In \latex/ if you wanted to have equations numbered within
824 sections\mdash that is, have
825 equation numbers (1.1), (1.2), \dots, (2.1), (2.2),
826 \dots, in sections 1, 2, and so forth\mdash you could redefine
827 \cn{theequation} as suggested in the \latex/ manual \cite[\S6.3, \S
828 C.8.4]{lamport}:
829 \begin{verbatim}
830 \renewcommand{\theequation}{\thesection.\arabic{equation}}
831 \end{verbatim}
833 This works pretty well, except that the equation counter won't be reset
834 to zero at the beginning of a new section or chapter, unless you do it
835 yourself using \cn{setcounter}. To make this a little more convenient,
836 the \pkg{amsmath} package provides a command\index{equation
837 numbers!hierarchy} \cn{numberwithin}. To have equation numbering tied to
838 section numbering, with automatic reset of the equation counter, write
839 \begin{verbatim}
840 \numberwithin{equation}{section}
841 \end{verbatim}
842 As its name implies, the \cn{numberwithin} command can be applied to
843 any counter, not just the \texttt{equation} counter.
845 \subsection{Cross references to equation numbers}
847 To make cross-references to equations easier, an \cn{eqref}
848 command\index{equation numbers!cross-references} is provided. This
849 automatically supplies the parentheses around the equation number. I.e.,
850 if \verb'\ref{abc}' produces 3.2 then \verb'\eqref{abc}' produces
851 (3.2).
853 \subsection{Subordinate numbering sequences}
855 The \pkg{amsmath} package provides also a \env{subequations}
856 environment\index{equation numbers!subordinate numbering} to make it
857 easy to number equations in a particular group with a subordinate
858 numbering scheme. For example
859 \begin{verbatim}
860 \begin{subequations}
862 \end{subequations}
863 \end{verbatim}
864 causes all numbered equations within that part of the document to be
865 numbered (4.9a) (4.9b) (4.9c) \dots, if the preceding numbered
866 equation was (4.8). A \cn{label} command immediately after
867 \verb/\begin{subequations}/ will produce a \cn{ref} of the parent
868 number 4.9, not 4.9a. The counters used by the subequations
869 environment are \verb/parentequation/ and \verb/equation/ and
870 \cn{addtocounter}, \cn{setcounter}, \cn{value}, etc., can be applied
871 as usual to those counter names. To get anything other than lowercase
872 letters for the subordinate numbers, use standard \latex/ methods for
873 changing numbering style \cite[\S6.3, \S C.8.4]{lamport}. For example,
874 redefining \cn{theequation} as follows will produce roman numerals.
875 \begin{verbatim}
876 \begin{subequations}
877 \renewcommand{\theequation}{\theparentequation \roman{equation}}
879 \end{verbatim}
881 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
883 \chapter{Miscellaneous mathematical features}
885 \section{Matrices}\label{ss:matrix}
887 The \pkg{amsmath} package provides some environments for
888 matrices\index{matrices} beyond the basic \env{array} environment of
889 \latex/. The \env{pmatrix}, \env{bmatrix}, \env{Bmatrix}, \env{vmatrix}
890 and \env{Vmatrix} have (respectively) $(\,)$, $[\,]$, $\lbrace\,\rbrace$,
891 $\lvert\,\rvert$, and
892 $\lVert\,\rVert$ delimiters built in. For naming consistency there is a
893 \env{matrix} environment sans delimiters. This is not entirely redundant
894 with the \env{array} environment; the matrix environments all use more
895 economical horizontal spacing than the rather prodigal spacing of the
896 \env{array} environment. Also, unlike the \env{array} environment, you
897 don't have to give column specifications for any of the matrix
898 environments; by default you can have up to 10 centered columns.%
899 \footnote{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
900 More precisely: The maximum number of columns in a matrix is determined
901 by the counter |MaxMatrixCols| (normal value = 10), which you can change
902 if necessary using \latex/'s \cn{setcounter} or \cn{addtocounter}
903 commands.%
904 }\space%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
905 (If you need left or right alignment in a column or other special
906 formats you must resort to \env{array}.)
908 To produce a small matrix suitable for use in text, there is a
909 \env{smallmatrix} environment (e.g.,
910 \begin{math}
911 \bigl( \begin{smallmatrix}
912 a&b\\ c&d
913 \end{smallmatrix} \bigr)
914 \end{math})
915 that comes closer to fitting within a single text line than a normal
916 matrix. Delimiters must be provided; there are no |p|,|b|,|B|,|v|,|V|
917 versions of \env{smallmatrix}. The above example was produced by
918 \begin{verbatim}
919 \bigl( \begin{smallmatrix}
920 a&b\\ c&d
921 \end{smallmatrix} \bigr)
922 \end{verbatim}
924 \cn{hdotsfor}|{|\<number>|}| produces a row of dots in a
925 matrix\index{matrices!ellipsis dots}\index{ellipsis dots!in
926 matrices}\index{dots|see{ellipsis dots}} spanning the given number of
927 columns. For example,
928 \begin{center}
929 \begin{minipage}{.3\columnwidth}
930 \noindent$\begin{matrix} a&b&c&d\\
931 e&\hdotsfor{3} \end{matrix}$
932 \end{minipage}%
933 \qquad
934 \begin{minipage}{.45\columnwidth}
935 \begin{verbatim}
936 \begin{matrix} a&b&c&d\\
937 e&\hdotsfor{3} \end{matrix}
938 \end{verbatim}
939 \end{minipage}%
940 \end{center}
942 The spacing of the dots can be varied through use of a square-bracket
943 option, for example, |\hdotsfor[1.5]{3}|. The number in square brackets
944 will be used as a multiplier (i.e., the normal value is 1.0).
945 \begin{equation}\label{eq:D}
946 \begin{pmatrix} D_1t&-a_{12}t_2&\dots&-a_{1n}t_n\\
947 -a_{21}t_1&D_2t&\dots&-a_{2n}t_n\\
948 \hdotsfor[2]{4}\\
949 -a_{n1}t_1&-a_{n2}t_2&\dots&D_nt\end{pmatrix},
950 \end{equation}
951 \begin{verbatim}
952 \begin{pmatrix} D_1t&-a_{12}t_2&\dots&-a_{1n}t_n\\
953 -a_{21}t_1&D_2t&\dots&-a_{2n}t_n\\
954 \hdotsfor[2]{4}\\
955 -a_{n1}t_1&-a_{n2}t_2&\dots&D_nt\end{pmatrix}
956 \end{verbatim}
958 \section{Math spacing commands}
960 The \pkg{amsmath} package slightly extends the set of math
961 spacing\index{horizontal space!in math mode} commands, as shown below.
962 Both the spelled-out and abbreviated forms of these commands are robust,
963 and they can also be used outside of math.
964 \begin{ctab}{lll|lll}
965 Abbrev.& Spelled out& Example & Abbrev.& Spelled out& Example\\
966 \hline
967 \vstrut{2.5ex}
968 & no space& \spx{}& & no space & \spx{}\\
969 \cn{\,}& \cn{thinspace}& \spx{\,}&
970 \cnbang& \cn{negthinspace}& \spx{\!}\\
971 \cn{\:}& \cn{medspace}& \spx{\:}&
972 & \cn{negmedspace}& \spx{\negmedspace}\\
973 \cn{\;}& \cn{thickspace}& \spx{\;}&
974 & \cn{negthickspace}& \spx{\negthickspace}\\
975 & \cn{quad}& \spx{\quad}\\
976 & \cn{qquad}& \spx{\qquad}
977 \end{ctab}
978 For the greatest possible control over math spacing, use \cn{mspace}
979 and `math units'. One math unit, or |mu|, is equal to 1/18 em. Thus to
980 get a negative \cn{quad} you could write |\mspace{-18.0mu}|.
982 \section{Dots}
984 For preferred placement of ellipsis dots (raised or on-line) in various
985 contexts there is no general consensus. It may therefore be considered a
986 matter of taste. By using the semantically oriented commands
987 \begin{itemize}
988 \item \cn{dotsc} for \qq{dots with commas}
989 \item \cn{dotsb} for \qq{dots with binary operators/relations}
990 \item \cn{dotsm} for \qq{multiplication dots}
991 \item \cn{dotsi} for \qq{dots with integrals}
992 \item \cn{dotso} for \qq{other dots} (none of the above)
993 \end{itemize}
994 instead of \cn{ldots} and \cn{cdots}, you make it possible for your
995 document to be adapted to different conventions on the fly, in case (for
996 example) you have to submit it to a publisher who insists on following
997 house tradition in this respect. The default treatment for the various
998 kinds follows American Mathematical Society conventions:
999 \begin{center}
1000 \begin{tabular}{@{}l@{}l@{}}
1001 \begin{minipage}[t]{.54\textwidth}
1002 \begin{verbatim}
1003 Then we have the series $A_1, A_2,
1004 \dotsc$, the regional sum $A_1
1005 +A_2 +\dotsb $, the orthogonal
1006 product $A_1 A_2 \dotsm $, and
1007 the infinite integral
1008 \[\int_{A_1}\int_{A_2}\dotsi\].
1009 \end{verbatim}
1010 \end{minipage}
1012 \begin{minipage}[t]{.45\textwidth}
1013 \noindent
1014 Then we have the series $A_1,A_2,\dotsc$,
1015 the regional sum $A_1+A_2+\dotsb$,
1016 the orthogonal product $A_1A_2\dotsm$,
1017 and the infinite integral
1018 \[\int_{A_1}\int_{A_2}\dotsi.\]
1019 \end{minipage}
1020 \end{tabular}
1021 \end{center}
1023 \section{Nonbreaking dashes}
1025 A command \cn{nobreakdash} is provided to suppress the possibility
1026 of a linebreak after the following hyphen or dash. For example, if you
1027 write `pages 1\ndash 9' as |pages 1\nobreakdash--9| then a linebreak will
1028 never occur between the dash and the 9. You can also use
1029 \cn{nobreakdash} to prevent undesirable hyphenations in combinations
1030 like |$p$-adic|. For frequent use, it's advisable to make abbreviations,
1031 e.g.,
1032 \begin{verbatim}
1033 \newcommand{\p}{$p$\nobreakdash}% for "\p-adic"
1034 \newcommand{\Ndash}{\nobreakdash--}% for "pages 1\Ndash 9"
1035 % For "\n dimensional" ("n-dimensional"):
1036 \newcommand{\n}[1]{$n$\nobreakdash-\hspace{0pt}}
1037 \end{verbatim}
1038 The last example shows how to prohibit a linebreak after the hyphen but
1039 allow normal hyphenation in the following word. (It suffices to add a
1040 zero-width space after the hyphen.)
1042 \section{Accents in math}
1044 In ordinary \LaTeX{} the placement of the second accent in doubled math
1045 accents is often poor. With the \pkg{amsmath} package you
1046 will get improved placement of the second accent:
1047 $\hat{\hat{A}}$ (\cn{hat}|{\hat{A}}|).
1049 The commands \cn{dddot} and \cn{ddddot} are available to produce triple
1050 and quadruple dot accents in addition to the \cn{dot} and \cn{ddot}
1051 accents already available in \latex/.
1053 To get a superscripted hat or tilde character, load the \pkg{amsxtra}
1054 package and use \cn{sphat} or \cn{sptilde}. Usage is \verb'A\sphat'
1055 (note the absence of the \verb'^' character).
1057 To place an arbitrary symbol in math accent position, or to get under
1058 accents, see the \pkg{accents} package by Javier Bezos.
1060 \section{Roots}
1062 In ordinary \latex/ the placement of root indices is sometimes not so
1063 good: $\sqrt[\beta]{k}$ (|\sqrt||[\beta]{k}|). In the
1064 \pkg{amsmath} package \cn{leftroot} and \cn{uproot} allow you to adjust
1065 the position of the root:
1066 \begin{verbatim}
1067 \sqrt[\leftroot{-2}\uproot{2}\beta]{k}
1068 \end{verbatim}
1069 will move the beta up and to the right:
1070 $\sqrt[\leftroot{-2}\uproot{2}\beta]{k}$. The negative argument used
1071 with \cn{leftroot} moves the $\beta$ to the right. The units are a small
1072 amount that is a useful size for such adjustments.
1074 \section{Boxed formulas}
1076 The command \cn{boxed} puts a box around its
1077 argument, like \cn{fbox} except that the contents are in math mode:
1078 \begin{equation}
1079 \boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}
1080 \end{equation}
1081 \begin{verbatim}
1082 \boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}
1083 \end{verbatim}
1085 \section{Over and under arrows}
1087 Basic \latex/ provides \cn{overrightarrow} and \cn{overleftarrow}
1088 commands. Some additional over and under arrow commands are provided
1089 by the \pkg{amsmath} package to extend the set:
1091 \begin{tabbing}
1092 \qquad\=\ncn{overleftrightarrow}\qquad\=\kill
1093 \> \cn{overleftarrow} \> \cn{underleftarrow} \+\\
1094 \cn{overrightarrow} \> \cn{underrightarrow} \\
1095 \cn{overleftrightarrow}\> \cn{underleftrightarrow}
1096 \end{tabbing}
1098 \section{Extensible arrows}
1100 \cn{xleftarrow} and \cn{xrightarrow} produce
1101 arrows\index{arrows!extensible} that extend automatically to accommodate
1102 unusually wide subscripts or superscripts. These commands take one
1103 optional argument (the subscript) and one mandatory argument (the
1104 superscript, possibly empty):
1105 \begin{equation}
1106 A\xleftarrow{n+\mu-1}B \xrightarrow[T]{n\pm i-1}C
1107 \end{equation}
1108 \begin{verbatim}
1109 \xleftarrow{n+\mu-1}\quad \xrightarrow[T]{n\pm i-1}
1110 \end{verbatim}
1112 \section{Affixing symbols to other symbols}
1114 \latex/ provides \cn{stackrel} for placing a
1115 superscript\index{subscripts and superscripts} above a binary relation.
1116 In the \pkg{amsmath} package there are somewhat more general commands,
1117 \cn{overset} and \cn{underset}, that can be used to place one symbol
1118 above or below another symbol, whether it's a relation or something
1119 else. The input |\overset{*}{X}| will place a superscript-size $*$ above
1120 the $X$: $\overset{*}{X}$; \cn{underset} is the analog for adding a
1121 symbol underneath.
1123 See also the description of \cn{sideset} in \secref{sideset}.
1125 \section{Fractions and related constructions}
1127 \subsection{The \cn{frac}, \cn{dfrac}, and \cn{tfrac} commands}
1129 The \cn{frac} command, which is in the basic command set of
1130 \latex/,\index{fractions} takes two arguments\mdash numerator and
1131 denominator\mdash and typesets them in normal fraction form. The
1132 \pkg{amsmath} package provides also \cn{dfrac} and \cn{tfrac} as
1133 convenient abbreviations for |{\displaystyle\frac| |...| |}|
1134 and\indexcs{textstyle}\relax
1135 \indexcs{displaystyle} |{\textstyle\frac| |...| |}|.
1136 \begin{equation}
1137 \frac{1}{k}\log_2 c(f)\quad\tfrac{1}{k}\log_2 c(f)\quad
1138 \sqrt{\frac{1}{k}\log_2 c(f)}\quad\sqrt{\dfrac{1}{k}\log_2 c(f)}
1139 \end{equation}
1140 \begin{verbatim}
1141 \begin{equation}
1142 \frac{1}{k}\log_2 c(f)\;\tfrac{1}{k}\log_2 c(f)\;
1143 \sqrt{\frac{1}{k}\log_2 c(f)}\;\sqrt{\dfrac{1}{k}\log_2 c(f)}
1144 \end{equation}
1145 \end{verbatim}
1147 \subsection{The \cn{binom}, \cn{dbinom}, and \cn{tbinom} commands}
1149 For binomial expressions\index{binomials} such as $\binom{n}{k}$
1150 \pkg{amsmath} has \cn{binom}, \cn{dbinom} and \cn{tbinom}:
1151 \begin{equation}
1152 2^k-\binom{k}{1}2^{k-1}+\binom{k}{2}2^{k-2}
1153 \end{equation}
1154 \begin{verbatim}
1155 2^k-\binom{k}{1}2^{k-1}+\binom{k}{2}2^{k-2}
1156 \end{verbatim}
1158 \subsection{The \cn{genfrac} command}
1160 The capabilities of \cn{frac}, \cn{binom}, and their variants are
1161 subsumed by a generalized fraction command \cn{genfrac} with six
1162 arguments. The last two correspond to \cn{frac}'s numerator and
1163 denominator; the first two are optional delimiters (as seen in
1164 \cn{binom}); the third is a line thickness override (\cn{binom} uses
1165 this to set the fraction line thickness to 0\mdash i.e., invisible); and
1166 the fourth argument is a mathstyle override: integer values 0\ndash 3 select
1167 respectively \cn{displaystyle}, \cn{textstyle}, \cn{scriptstyle}, and
1168 \cn{scriptscriptstyle}. If the third argument is left empty, the line
1169 thickness defaults to `normal'.
1171 \begin{center}\begin{minipage}{.85\columnwidth}
1172 \raggedright \normalfont\ttfamily \exhyphenpenalty10000
1173 \newcommand{\ma}[1]{%
1174 \string{{\normalfont\itshape#1}\string}\penalty9999 \ignorespaces}
1175 \string\genfrac \ma{left-delim} \ma{right-delim} \ma{thickness}
1176 \ma{mathstyle} \ma{numerator} \ma{denominator}
1177 \end{minipage}\end{center}
1178 To illustrate, here is how \cn{frac}, \cn{tfrac}, and
1179 \cn{binom} might be defined.
1180 \begin{verbatim}
1181 \newcommand{\frac}[2]{\genfrac{}{}{}{}{#1}{#2}}
1182 \newcommand{\tfrac}[2]{\genfrac{}{}{}{1}{#1}{#2}}
1183 \newcommand{\binom}[2]{\genfrac{(}{)}{0pt}{}{#1}{#2}}
1184 \end{verbatim}
1185 If you find yourself repeatedly using \cn{genfrac} throughout a document
1186 for a particular notation, you will do yourself a favor (and your
1187 publisher) if you define a meaningfully-named abbreviation for that
1188 notation, along the lines of \cn{frac} and \cn{binom}.
1190 The primitive generalized fraction commands \cs{over}, \cs{overwithdelims},
1191 \cs{atop}, \cs{atopwithdelims}, \cs{above}, \cs{abovewithdelims} produce
1192 warning messages if used with the \pkg{amsmath} package, for reasons
1193 discussed in \fn{technote.tex}.
1195 \section{Continued fractions}
1197 The continued fraction\index{continued fractions}
1198 \begin{equation}
1199 \cfrac{1}{\sqrt{2}+
1200 \cfrac{1}{\sqrt{2}+
1201 \cfrac{1}{\sqrt{2}+\cdots
1203 \end{equation}
1204 can be obtained by typing
1205 {\samepage
1206 \begin{verbatim}
1207 \cfrac{1}{\sqrt{2}+
1208 \cfrac{1}{\sqrt{2}+
1209 \cfrac{1}{\sqrt{2}+\dotsb
1211 \end{verbatim}
1212 }% End of \samepage
1213 This produces better-looking results than straightforward use of
1214 \cn{frac}. Left or right placement of any of the numerators is
1215 accomplished by using \cn{cfrac}|[l]| or \cn{cfrac}|[r]| instead of
1216 \cn{cfrac}.
1218 \section{Smash options}
1220 The command \cn{smash} is used to typeset a subformula with an effective height and depth of zero, which is sometimes
1221 useful in adjusting the subformula's position with respect to adjacent
1222 symbols. With the \pkg{amsmath} package \cn{smash} has optional
1223 arguments |t| and |b|, because occasionally it is advantageous to be
1224 able to \qq{smash} only the top or only the bottom of something while
1225 retaining the natural depth or height. For example, when adjacent
1226 radical symbols are unevenly sized or positioned because of differences
1227 in the height and depth of their contents, \cn{smash} can be employed to
1228 make them more consistent. Compare
1229 $\sqrt{x}+\sqrt{y}+\sqrt{z}$ and $\sqrt{x}+\sqrt{\smash[b]{y}}+\sqrt{z}$,
1230 where the latter was produced by
1231 \verb"$\sqrt{x}" \verb"+"
1232 \verb"\sqrt{"\5\verb"\smash[b]{y}}" \verb"+" \verb"\sqrt{z}$".
1234 \section{Delimiters}
1236 \subsection{Delimiter sizes}\label{bigdel}
1238 The automatic delimiter sizing done by \cn{left} and \cn{right} has two
1239 limitations: First, it is applied mechanically to produce delimiters
1240 large enough to encompass the largest contained item, and second, the
1241 range of sizes is not even approximately continuous but has fairly large
1242 quantum jumps. This means that a math fragment that is infinitesimally
1243 too large for a given delimiter size will get the next larger size, a
1244 jump of 3pt or so in normal-sized text. There are two or three
1245 situations where the delimiter size is commonly adjusted, using a set of
1246 commands that have `big' in their names.
1247 \begin{ctab}{l|llllll}
1248 Delimiter&
1249 text& \ncn{left}& \ncn{bigl}& \ncn{Bigl}& \ncn{biggl}& \ncn{Biggl}\\
1250 size&
1251 size& \ncn{right}& \ncn{bigr}& \ncn{Bigr}& \ncn{biggr}& \ncn{Biggr}\\
1252 \hline
1253 Result\vstrut{5ex}&
1254 $\displaystyle(b)(\frac{c}{d})$&
1255 $\displaystyle\left(b\right)\left(\frac{c}{d}\right)$&
1256 $\displaystyle\bigl(b\bigr)\bigl(\frac{c}{d}\bigr)$&
1257 $\displaystyle\Bigl(b\Bigr)\Bigl(\frac{c}{d}\Bigr)$&
1258 $\displaystyle\biggl(b\biggr)\biggl(\frac{c}{d}\biggr)$&
1259 $\displaystyle\Biggl(b\Biggr)\Biggl(\frac{c}{d}\Biggr)$
1260 \end{ctab}
1261 The first kind of situation is a cumulative operator with limits above
1262 and below. With \cn{left} and \cn{right} the delimiters usually turn out
1263 larger than necessary, and using the |Big| or |bigg|
1264 sizes\index{big@\cn{big}, \cn{Big}, \cn{bigg}, \dots\ delimiters}
1265 instead gives better results:
1266 \begin{equation*}
1267 \left[\sum_i a_i\left\lvert\sum_j x_{ij}\right\rvert^p\right]^{1/p}
1268 \quad\text{versus}\quad
1269 \biggl[\sum_i a_i\Bigl\lvert\sum_j x_{ij}\Bigr\rvert^p\biggr]^{1/p}
1270 \end{equation*}
1271 \begin{verbatim}
1272 \biggl[\sum_i a_i\Bigl\lvert\sum_j x_{ij}\Bigr\rvert^p\biggr]^{1/p}
1273 \end{verbatim}
1274 The second kind of situation is clustered pairs of delimiters where
1275 \cn{left} and \cn{right} make them all the same size (because that is
1276 adequate to cover the encompassed material) but what you really want
1277 is to make some of the delimiters slightly larger to make the nesting
1278 easier to see.
1279 \begin{equation*}
1280 \left((a_1 b_1) - (a_2 b_2)\right)
1281 \left((a_2 b_1) + (a_1 b_2)\right)
1282 \quad\text{versus}\quad
1283 \bigl((a_1 b_1) - (a_2 b_2)\bigr)
1284 \bigl((a_2 b_1) + (a_1 b_2)\bigr)
1285 \end{equation*}
1286 \begin{verbatim}
1287 \left((a_1 b_1) - (a_2 b_2)\right)
1288 \left((a_2 b_1) + (a_1 b_2)\right)
1289 \quad\text{versus}\quad
1290 \bigl((a_1 b_1) - (a_2 b_2)\bigr)
1291 \bigl((a_2 b_1) + (a_1 b_2)\bigr)
1292 \end{verbatim}
1293 The third kind of situation is a slightly oversize object in running
1294 text, such as $\left\lvert\frac{b'}{d'}\right\rvert$ where the
1295 delimiters produced by \cn{left} and \cn{right} cause too much line
1296 spreading. In that case \ncn{bigl} and \ncn{bigr}\index{big@\cn{big},
1297 \cn{Big}, \cn{bigg}, \dots\ delimiters} can be used to produce
1298 delimiters that are slightly larger than the base size but still able to
1299 fit within the normal line spacing:
1300 $\bigl\lvert\frac{b'}{d'}\bigr\rvert$.
1302 In ordinary \latex/ \ncn{big}, \ncn{bigg}, \ncn{Big}, and \ncn{Bigg}
1303 delimiters aren't scaled properly over the full range of \latex/ font
1304 sizes. With the \pkg{amsmath} package they are.
1306 \subsection{Vertical bar notations}
1308 The \pkg{amsmath} package provides commands \cn{lvert}, \cn{rvert},
1309 \cn{lVert}, \cn{rVert} (compare \cn{langle}, \cn{rangle}) to address the
1310 problem of overloading for the vert bar character \qc{\|}. This
1311 character is currently used in \latex/ documents to represent a wide
1312 variety of mathematical objects: the `divides' relation in a
1313 number-theory expression like $p\vert q$, or the absolute-value
1314 operation $\lvert z\rvert$, or the `such that' condition in set
1315 notation, or the `evaluated at' notation $f_\zeta(t)\bigr\rvert_{t=0}$.
1316 The multiplicity of uses in itself is not so bad; what is bad, however,
1317 is that fact that not all of the uses take the same typographical
1318 treatment, and that the complex discriminatory powers of a knowledgeable
1319 reader cannot be replicated in computer processing of mathematical
1320 documents. It is recommended therefore that there should be a one-to-one
1321 correspondence in any given document between the vert bar character
1322 \qc{\|} and a selected mathematical notation, and similarly for the
1323 double-bar command \ncn{\|}\index{"|@\verb"*+"\"|+}. This immediately
1324 rules out the use of \qc{|}
1325 and \ncn{\|}\index{"|@\verb"*+"\"|+} for delimiters, because left and right
1326 delimiters are distinct usages that do not relate in the same way to
1327 adjacent symbols; recommended practice is therefore to define suitable
1328 commands in the document preamble for any paired-delimiter use of vert
1329 bar symbols:
1330 \begin{verbatim}
1331 \providecommand{\abs}[1]{\lvert#1\rvert}
1332 \providecommand{\norm}[1]{\lVert#1\rVert}
1333 \end{verbatim}
1334 whereupon the document would contain |\abs{z}| to produce $\lvert
1335 z\rvert$ and |\norm{v}| to produce $\lVert v\rVert$.
1337 \chapter{Operator names}
1339 \section{Defining new operator names}\label{s:opname}
1341 Math functions\index{operator names}\relax \index{function
1342 names|see{operator names}} such as $\log$, $\sin$, and $\lim$ are
1343 traditionally typeset in roman type to make them visually more distinct
1344 from one-letter math variables, which are set in math italic. The more
1345 common ones have predefined names, \cn{log}, \cn{sin}, \cn{lim}, and so
1346 forth, but new ones come up all the time in mathematical papers, so the
1347 \pkg{amsmath} package provides a general mechanism for defining new
1348 `operator names'. To define a math function \ncn{xxx} to work like
1349 \cn{sin}, you write
1350 \begin{verbatim}
1351 \DeclareMathOperator{\xxx}{xxx}
1352 \end{verbatim}
1353 whereupon ensuing uses of \ncn{xxx} will produce {\upshape xxx} in the
1354 proper font and automatically add proper spacing\index{horizontal
1355 space!around operator names} on either side when necessary, so that you
1356 get $A\xxx B$ instead of $A\mathrm{xxx}B$. In the second argument of
1357 \cn{DeclareMathOperator} (the name text), a pseudo-text mode prevails:
1358 the hyphen character \qc{\-} will print as a text hyphen rather than a
1359 minus sign and an asterisk \qc{\*} will print as a raised text asterisk
1360 instead of a centered math star. (Compare
1361 \textit{a}-\textit{b}*\textit{c} and $a-b*c$.) But otherwise the name
1362 text is printed in math mode, so that you can use, e.g., subscripts and
1363 superscripts there.
1365 If the new operator should have subscripts and superscripts placed in
1366 `limits' position above and below as with $\lim$, $\sup$, or $\max$, use
1367 the \qc{\*} form of the \cn{DeclareMathOperator} command:
1368 \begin{verbatim}
1369 \DeclareMathOperator*{\Lim}{Lim}
1370 \end{verbatim}
1371 See also the discussion of subscript placement in
1372 Section~\ref{subplace}.
1374 The following operator names are predefined:
1375 \begin{ctab}{rlrlrlrl}
1376 \cn{arccos}& $\arccos$ &\cn{deg}& $\deg$ & \cn{lg}& $\lg$ & \cn{projlim}& $\projlim$\\
1377 \cn{arcsin}& $\arcsin$ &\cn{det}& $\det$ & \cn{lim}& $\lim$ & \cn{sec}& $\sec$\\
1378 \cn{arctan}& $\arctan$ &\cn{dim}& $\dim$ & \cn{liminf}& $\liminf$ &\cn{sin}& $\sin$\\
1379 \cn{arg}& $\arg$ & \cn{exp}& $\exp$ & \cn{limsup}& $\limsup$ &\cn{sinh}& $\sinh$\\
1380 \cn{cos}& $\cos$ & \cn{gcd}& $\gcd$ & \cn{ln}& $\ln$ & \cn{sup}& $\sup$\\
1381 \cn{cosh}& $\cosh$ & \cn{hom}& $\hom$ & \cn{log}& $\log$ & \cn{tan}& $\tan$\\
1382 \cn{cot}& $\cot$ & \cn{inf}& $\inf$ & \cn{max}& $\max$ & \cn{tanh}& $\tanh$\\
1383 \cn{coth}& $\coth$ & \cn{injlim}& $\injlim$ &\cn{min}& $\min$\\
1384 \cn{csc}& $\csc$ & \cn{ker}& $\ker$ & \cn{Pr}& $\Pr$
1385 \end{ctab}
1386 \begin{ctab}{rlrl}
1387 \cn{varlimsup}& $\displaystyle\varlimsup$&
1388 \cn{varinjlim}& $\displaystyle\varinjlim$\\
1389 \cn{varliminf}& $\displaystyle\varliminf$&
1390 \cn{varprojlim}& $\displaystyle\varprojlim$
1391 \end{ctab}
1393 There is also a command \cn{operatorname} such that using
1394 \begin{verbatim}
1395 \operatorname{abc}
1396 \end{verbatim}
1397 in a math formula is equivalent to a use of \ncn{abc} defined by
1398 \cn{DeclareMathOperator}. This may be occasionally useful for
1399 constructing more complex notation or other purposes. (Use the variant
1400 \cn{operatorname*} to get limits.)
1402 \section{\cn{mod} and its relatives}
1404 Commands \cn{mod}, \cn{bmod}, \cn{pmod}, \cn{pod} are provided to deal
1405 with the special spacing conventions of \qq{mod} notation. \cn{bmod} and
1406 \cn{pmod} are available in \latex/, but with the \pkg{amsmath} package
1407 the spacing of \cn{pmod} will adjust to a smaller value if it's used in
1408 a non-display-mode formula. \cn{mod} and \cn{pod} are variants of
1409 \cn{pmod} preferred by some authors; \cn{mod} omits the parentheses,
1410 whereas \cn{pod} omits the \qq{mod} and retains the parentheses.
1411 \begin{equation}
1412 \gcd(n,m\bmod n);\quad x\equiv y\pmod b;
1413 \quad x\equiv y\mod c;\quad x\equiv y\pod d
1414 \end{equation}
1415 \begin{verbatim}
1416 \gcd(n,m\bmod n);\quad x\equiv y\pmod b;
1417 \quad x\equiv y\mod c;\quad x\equiv y\pod d
1418 \end{verbatim}
1420 \chapter{The \cn{text} command}\label{text}
1422 The main use of the command \cn{text} is for words or
1423 phrases\index{text fragments inside math} in a display. It is very
1424 similar to the \latex/ command \cn{mbox} in its effects, but has a
1425 couple of advantages. If you want a word or phrase of text in a
1426 subscript, you can type |..._{\text{word or phrase}}|, which is slightly
1427 easier than the \cn{mbox} equivalent: |..._{\mbox{\scriptsize| |word|
1428 |or| |phrase}}|. The other advantage is the more descriptive name.
1429 \begin{equation}
1430 f_{[x_{i-1},x_i]} \text{ is monotonic,}
1431 \quad i = 1,\dots,c+1
1432 \end{equation}
1433 \begin{verbatim}
1434 f_{[x_{i-1},x_i]} \text{ is monotonic,}
1435 \quad i = 1,\dots,c+1
1436 \end{verbatim}
1438 \chapter{Integrals and sums}
1440 \section{Multiline subscripts and superscripts}
1442 The \cn{substack} command can be used to produce a multiline subscript
1443 or superscript:\index{subscripts and superscripts!multi-line}\relax
1444 \index{superscripts|see{subscripts and superscripts}} for example
1445 \begin{ctab}{ll}
1446 \begin{minipage}[t]{.6\columnwidth}
1447 \begin{verbatim}
1448 \sum_{\substack{
1449 0\le i\le m\\
1450 0<j<n}}
1451 P(i,j)
1452 \end{verbatim}
1453 \end{minipage}
1455 $\displaystyle
1456 \sum_{\substack{0\le i\le m\\ 0<j<n}} P(i,j)$
1457 \end{ctab}
1458 A slightly more generalized form is the \env{subarray} environment which
1459 allows you to specify that each line should be left-aligned instead of
1460 centered, as here:
1461 \begin{ctab}{ll}
1462 \begin{minipage}[t]{.6\columnwidth}
1463 \begin{verbatim}
1464 \sum_{\begin{subarray}{l}
1465 i\in\Lambda\\ 0<j<n
1466 \end{subarray}}
1467 P(i,j)
1468 \end{verbatim}
1469 \end{minipage}
1471 $\displaystyle
1472 \sum_{\begin{subarray}{l}
1473 i\in \Lambda\\ 0<j<n
1474 \end{subarray}}
1475 P(i,j)$
1476 \end{ctab}
1478 \section{The \cn{sideset} command}\label{sideset}
1480 There's also a command called \cn{sideset}, for a rather special
1481 purpose: putting symbols at the subscript and
1482 superscript\index{subscripts and superscripts!on sums} corners of a
1483 large operator symbol such as $\sum$ or $\prod$. \emph{Note: this
1484 command is not designed to be applied to anything other than sum-class symbols.} The prime
1485 example is the case when you want to put a prime on a sum symbol. If
1486 there are no limits above or below the sum, you could just use
1487 \cn{nolimits}: here's
1488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1489 |\sum\nolimits' E_n| in display mode:
1490 \begin{equation}
1491 \sum\nolimits' E_n
1492 \end{equation}
1493 If, however, you want not only the prime but also something below or
1494 above the sum symbol, it's not so easy\mdash indeed, without
1495 \cn{sideset}, it would be downright difficult. With \cn{sideset}, you
1496 can write
1497 \begin{ctab}{ll}
1498 \begin{minipage}[t]{.6\columnwidth}
1499 \begin{verbatim}
1500 \sideset{}{'}
1501 \sum_{n<k,\;\text{$n$ odd}} nE_n
1502 \end{verbatim}
1503 \end{minipage}
1504 &$\displaystyle
1505 \sideset{}{'}\sum_{n<k,\;\text{$n$ odd}} nE_n
1507 \end{ctab}
1508 The extra pair of empty braces is explained by the fact that
1509 \cn{sideset} has the capability of putting an extra symbol or symbols at
1510 each corner of a large operator; to put an asterisk at each corner of a
1511 product symbol, you would type
1512 \begin{ctab}{ll}
1513 \begin{minipage}[t]{.6\columnwidth}
1514 \begin{verbatim}
1515 \sideset{_*^*}{_*^*}\prod
1516 \end{verbatim}
1517 \end{minipage}
1518 &$\displaystyle
1519 \sideset{_*^*}{_*^*}\prod
1521 \end{ctab}
1523 \section{Placement of subscripts and limits}\label{subplace}
1525 The default positioning for subscripts depends on the
1526 base symbol involved. The default for sum-class symbols is
1527 `displaylimits' positioning: When a sum-class symbol appears
1528 in a displayed formula, subscript and superscript are placed in `limits'
1529 position above and below, but in an inline formula, they are placed to
1530 the side, to avoid unsightly and wasteful spreading of the
1531 surrounding text lines.
1532 The default for integral-class symbols is to have sub- and
1533 superscripts always to the side, even in displayed formulas.
1534 (See the discussion of the \opt{intlimits} and related options in
1535 Section~\ref{options}.)
1537 Operator names such as $\sin$ or $\lim$ may have either `displaylimits'
1538 or `limits' positioning depending on how they were defined. The standard
1539 operator names are defined according to normal mathematical usage.
1541 The commands \cn{limits} and \cn{nolimits} can be used to override the
1542 normal behavior of a base symbol:
1543 \begin{equation*}
1544 \sum\nolimits_X,\qquad \iint\limits_{A},
1545 \qquad\varliminf\nolimits_{n\to \infty}
1546 \end{equation*}
1547 To define a command whose subscripts follow the
1548 same `displaylimits' behavior as \cn{sum}, put
1549 \cn{displaylimits} at the tail end of the definition. When multiple
1550 instances of \cn{limits}, \cn{nolimits}, or \cn{displaylimits} occur
1551 consecutively, the last one takes precedence.
1553 \section{Multiple integral signs}
1555 \cn{iint}, \cn{iiint}, and \cn{iiiint} give multiple integral
1556 signs\index{integrals!multiple} with the spacing between them nicely
1557 adjusted, in both text and display style. \cn{idotsint} is an extension
1558 of the same idea that gives two integral signs with dots between them.
1559 \begin{gather}
1560 \iint\limits_A f(x,y)\,dx\,dy\qquad\iiint\limits_A
1561 f(x,y,z)\,dx\,dy\,dz\\
1562 \iiiint\limits_A
1563 f(w,x,y,z)\,dw\,dx\,dy\,dz\qquad\idotsint\limits_A f(x_1,\dots,x_k)
1564 \end{gather}
1566 \chapter{Commutative diagrams}\label{s:commdiag}
1568 Some commutative diagram commands like the ones in \amstex/ are
1569 available as a separate package, \pkg{amscd}. For complex commutative
1570 diagrams authors will need to turn to more comprehensive packages like
1571 \pkg{kuvio} or \xypic/, but for simple diagrams without diagonal
1572 arrows\index{arrows!in commutative diagrams} the \pkg{amscd} commands
1573 may be more convenient. Here is one example.
1574 \begin{equation*}
1575 \begin{CD}
1576 S^{{\mathcal{W}}_\Lambda}\otimes T @>j>> T\\
1577 @VVV @VV{\End P}V\\
1578 (S\otimes T)/I @= (Z\otimes T)/J
1579 \end{CD}
1580 \end{equation*}
1581 \begin{verbatim}
1582 \begin{CD}
1583 S^{{\mathcal{W}}_\Lambda}\otimes T @>j>> T\\
1584 @VVV @VV{\End P}V\\
1585 (S\otimes T)/I @= (Z\otimes T)/J
1586 \end{CD}
1587 \end{verbatim}
1588 In the \env{CD} environment the commands |@>>>|,
1589 |@<<<|, |@VVV|, and |@AAA| give respectively right, left, down, and up
1590 arrows. For the horizontal arrows, material between the first and second
1591 |>| or |<| symbols will be typeset as a superscript, and material
1592 between the second and third will be typeset as a subscript. Similarly,
1593 material between the first and second or second and third |A|s or |V|s
1594 of vertical arrows will be typeset as left or right \qq{sidescripts}.
1595 The commands |@=| and \verb'@|' give horizontal and vertical double lines.
1596 A \qq{null arrow} command |@.| can be used instead of a visible arrow
1597 to fill out an array where needed.
1599 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1600 \chapter{Using math fonts}
1602 \section{Introduction}
1604 For more comprehensive information on font use in \latex/, see the
1605 \latex/ font guide (\fn{fntguide.tex}) or \booktitle{The \latex/
1606 Companion} \cite{tlc}. The basic set of math font commands\index{math
1607 fonts}\relax \index{math symbols|see{math fonts}} in \latex/ includes
1608 \cn{mathbf}, \cn{mathrm}, \cn{mathcal}, \cn{mathsf}, \cn{mathtt},
1609 \cn{mathit}. Additional math alphabet commands such as
1610 \cn{mathbb} for blackboard bold, \cn{mathfrak} for Fraktur, and
1611 \cn{mathscr} for Euler script are available through the packages
1612 \pkg{amsfonts} and \pkg{euscript} (distributed separately).
1614 \section{Recommended use of math font commands}
1616 If you find yourself employing math font commands frequently in your
1617 document, you might wish that they had shorter names, such as \ncn{mb}
1618 instead of \cn{mathbf}. Of course, there is nothing to keep you from
1619 providing such abbreviations for yourself by suitable \cn{newcommand}
1620 statements. But for \latex/ to provide shorter names would actually be a
1621 disservice to authors, as that would obscure a much better alternative:
1622 defining custom command names derived from the names of the underlying
1623 mathematical objects, rather than from the names of the fonts used to
1624 distinguish the objects. For example, if you are using bold to indicate
1625 vectors, then you will be better served in the long run if you define a
1626 `vector' command instead of a `math-bold' command:
1627 \begin{verbatim}
1628 \newcommand{\vect}[1]{\mathbf{#1}}
1629 \end{verbatim}
1630 you can write |\vect{a} + \vect{b}| to produce $\vect{a} +
1631 \vect{b}$.
1632 If you decide several months down the road that you want to use the bold
1633 font for some other purpose, and mark vectors by a small over-arrow
1634 instead, then you can put the change into effect merely by changing the
1635 definition of \ncn{vect}; otherwise you would have to replace all
1636 occurrences of \cn{mathbf} throughout your document, perhaps even
1637 needing to inspect each one to see whether it is indeed
1638 an instance of a vector.
1640 It can also be useful to assign distinct
1641 command names for different letters of a particular font:
1642 \begin{verbatim}
1643 \DeclareSymbolFont{AMSb}{U}{msb}{m}{n}% or use amsfonts package
1644 \DeclareMathSymbol{\C}{\mathalpha}{AMSb}{"43}
1645 \DeclareMathSymbol{\R}{\mathalpha}{AMSb}{"52}
1646 \end{verbatim}
1647 These statements would define the commands \cn{C} and \cn{R} to produce
1648 blackboard-bold letters from the `AMSb' math symbols font. If you refer
1649 often to the\break complex numbers or real numbers in your document, you
1650 might find this method more convenient than (let's say) defining a
1651 \ncn{field} command and writing\break |\field{C}|, |\field{R}|. But for
1652 maximum flexibility and control, define such a \ncn{field} command and
1653 then define \ncn{C} and \ncn{R} in terms of that
1654 command:\indexcs{mathbb}
1655 \begin{verbatim}
1656 \usepackage{amsfonts}% to get the \mathbb alphabet
1657 \newcommand{\field}[1]{\mathbb{#1}}
1658 \newcommand{\C}{\field{C}}
1659 \newcommand{\R}{\field{R}}
1660 \end{verbatim}
1662 \section{Bold math symbols}
1664 The \cn{mathbf} command is commonly used to obtain bold Latin letters in
1665 math, but for most other kinds of math symbols it has no effect, or its
1666 effects depend unreliably on the set of math fonts that are in use. For
1667 example, writing
1668 \begin{verbatim}
1669 \Delta \mathbf{\Delta}\mathbf{+}\delta \mathbf{\delta}
1670 \end{verbatim}
1671 produces $\Delta \mathbf{\Delta}\mathbf{+}\delta
1672 \mathbf{\delta}$; the \cn{mathbf} has no effect on the plus
1673 sign or the small delta.
1675 The \pkg{amsmath} package therefore provides two additional commands,
1676 \cn{boldsymbol} and \cn{pmb}, that can be applied to other kinds of math
1677 symbols. \cn{boldsymbol} can be used for a math symbol that remains
1678 unaffected by \cn{mathbf} if (and only if) your current math font set
1679 includes a bold version of that symbol. \cn{pmb} can be used as a last
1680 resort for any math symbols that do not have a true bold version
1681 provided by your set of math fonts; \qq{pmb} stands for \qq{poor man's
1682 bold} and the command works by typesetting multiple copies of the symbol
1683 with slight offsets. The quality of the output is inferior, especially
1684 for symbols that contain any hairline strokes. When the standard default set of
1685 \latex/ math fonts are in use (Computer Modern), the only symbols that
1686 are likely to require \cn{pmb} are large operator symbols like \cn{sum},
1687 extended delimiter symbols, or the extra math symbols provided by
1688 the \pkg{amssymb} package \cite{amsfonts}.
1690 The following formula shows some of the results that are possible:
1691 \begin{verbatim}
1692 A_\infty + \pi A_0
1693 \sim \mathbf{A}_{\boldsymbol{\infty}} \boldsymbol{+}
1694 \boldsymbol{\pi} \mathbf{A}_{\boldsymbol{0}}
1695 \sim\pmb{A}_{\pmb{\infty}} \pmb{+}\pmb{\pi} \pmb{A}_{\pmb{0}}
1696 \end{verbatim}
1697 \begin{equation*}
1698 A_\infty + \pi A_0
1699 \sim \mathbf{A}_{\boldsymbol{\infty}} \boldsymbol{+}
1700 \boldsymbol{\pi} \mathbf{A}_{\boldsymbol{0}}
1701 \sim\pmb{A}_{\pmb{\infty}} \pmb{+}\pmb{\pi} \pmb{A}_{\pmb{0}}
1702 \end{equation*}
1703 If you want to use only the \cn{boldsymbol} command without loading the
1704 whole \pkg{amsmath} package, the \pkg{bm} package is recommended (this
1705 is a standard \latex/ package, not an AMS package; you probably have it
1706 already if you have a 1997 or newer version of \latex/).
1708 \section{Italic Greek letters}
1710 For italic versions of the capital Greek letters, the following commands
1711 are provided:
1712 \begin{ctab}{rlrl}
1713 \cn{varGamma}& $\varGamma$& \cn{varSigma}& $\varSigma$\\
1714 \cn{varDelta}& $\varDelta$& \cn{varUpsilon}& $\varUpsilon$\\
1715 \cn{varTheta}& $\varTheta$& \cn{varPhi}& $\varPhi$\\
1716 \cn{varLambda}& $\varLambda$& \cn{varPsi}& $\varPsi$\\
1717 \cn{varXi}& $\varXi$& \cn{varOmega}& $\varOmega$\\
1718 \cn{varPi}& $\varPi$
1719 \end{ctab}
1721 \chapter{Error messages and output problems}
1723 \section{General remarks}
1725 This is a supplement to Chapter~8 of the \latex/ manual \cite{lamport} (first
1726 edition: Chapter~6). For the reader's convenience, the set of error
1727 messages discussed here overlaps somewhat with the set in that chapter,
1728 but please be aware that we don't provide exhaustive coverage here.
1729 The error messages are arranged in alphabetical order, disregarding
1730 unimportant text such as |! LaTeX Error:| at the beginning, and
1731 nonalphabetical characters such as \qc{\\}. Where examples are given, we
1732 show also the help messages that appear on screen when you respond to an
1733 error message prompt by entering |h|.
1735 There is also a section discussing some output errors, i.e., instances
1736 where the printed document has something wrong but there was no \latex/
1737 error during typesetting.
1739 \section{Error messages}
1741 \begin{error}{\begin{split} won't work here.}
1742 \errexa
1743 \begin{verbatim}
1744 ! Package amsmath Error: \begin{split} won't work here.
1747 l.8 \begin{split}
1750 \Did you forget a preceding \begin{equation}?
1751 If not, perhaps the `aligned' environment is what you want.
1753 \end{verbatim}
1754 \errexpl
1755 The \env{split} environment does not construct a stand-alone displayed
1756 equation; it needs to be used within some other environment such as
1757 \env{equation} or \env{gather}.
1759 \end{error}
1761 \begin{error}{Extra & on this line}
1762 \errexa
1763 \begin{verbatim}
1764 ! Package amsmath Error: Extra & on this line.
1766 See the amsmath package documentation for explanation.
1767 Type H <return> for immediate help.
1770 l.9 \end{alignat}
1773 \An extra & here is so disastrous that you should probably exit
1774 and fix things up.
1776 \end{verbatim}
1777 \errexpl
1778 In an \env{alignat} structure the number of alignment points per line
1779 is dictated by the numeric argument given after |\begin{alignat}|.
1780 If you use more alignment points in a line it is assumed that you
1781 accidentally left out a newline command \cn{\\} and the above error is
1782 issued.
1783 \end{error}
1785 \begin{error}{Improper argument for math accent}
1786 \errexa
1787 \begin{verbatim}
1788 ! Package amsmath Error: Improper argument for math accent:
1789 (amsmath) Extra braces must be added to
1790 (amsmath) prevent wrong output.
1792 See the amsmath package documentation for explanation.
1793 Type H <return> for immediate help.
1796 l.415 \tilde k_{\lambda_j} = P_{\tilde \mathcal
1797 {M}}
1799 \end{verbatim}
1800 \errexpl
1801 Non-simple arguments for any \LaTeX{} command should be enclosed in
1802 braces. In this example extra braces are needed as follows:
1803 \begin{verbatim}
1804 ... P_{\tilde{\mathcal{M}}}
1805 \end{verbatim}
1806 \end{error}
1808 \begin{error}{Font OMX/cmex/m/n/7=cmex7 not loadable ...}
1809 \errexa
1810 \begin{verbatim}
1811 ! Font OMX/cmex/m/n/7=cmex7 not loadable: Metric (TFM) file not found.
1812 <to be read again>
1813 relax
1814 l.8 $a
1815 b+b^2$
1817 I wasn't able to read the size data for this font,
1818 so I will ignore the font specification.
1819 [Wizards can fix TFM files using TFtoPL/PLtoTF.]
1820 You might try inserting a different font spec;
1821 e.g., type `I\font<same font id>=<substitute font name>'.
1823 \end{verbatim}
1824 \errexpl
1825 Certain extra sizes of some Computer Modern fonts that were formerly
1826 available mainly through the AMSFonts\index{AMSFonts collection}
1827 distribution are considered part of standard \latex/ (as of June 1994):
1828 \fn{cmex7}\ndash \texttt{9}, \fn{cmmib5}\ndash \texttt{9}, and
1829 \fn{cmbsy5}\ndash \texttt{9}. If these extra sizes are missing on your
1830 system, you should try first to get them from the source where you
1831 obtained \latex/. If that fails, you could try getting the fonts from
1832 CTAN (e.g., in the form of Metafont\index{Metafont source files} source
1833 files, directory \nfn{/tex-archive/fonts/latex/mf}, or in PostScript
1834 Type 1 format, directory
1835 \nfn{/tex-archive/fonts/cm/ps-type1/bakoma}\index{BaKoMa fonts}\relax
1836 \index{PostScript fonts}).
1838 If the font name begins with \fn{cmex}, there is a special option
1839 \fn{cmex10} for the \pkg{amsmath} package that provides a temporary
1840 workaround. I.e., change the \cn{usepackage} to
1841 \begin{verbatim}
1842 \usepackage[cmex10]{amsmath}
1843 \end{verbatim}
1844 This will force the use of the 10-point size of the \fn{cmex} font in
1845 all cases. Depending on the contents of your document this may be
1846 adequate.
1847 \end{error}
1849 \begin{error}{Math formula deleted: Insufficient extension fonts}
1850 \errexa
1851 \begin{verbatim}
1852 ! Math formula deleted: Insufficient extension fonts.
1853 l.8 $ab+b^2$
1856 \end{verbatim}
1857 \errexpl
1858 This usually follows a previous error |Font ... not loadable|; see the
1859 discussion of that error (above) for solutions.
1860 \end{error}
1862 \begin{error}{Missing number, treated as zero}
1863 \errexa
1864 \begin{verbatim}
1865 ! Missing number, treated as zero.
1866 <to be read again>
1868 l.100 \end{alignat}
1871 A number should have been here; I inserted `0'.
1872 (If you can't figure out why I needed to see a number,
1873 look up `weird error' in the index to The TeXbook.)
1876 \end{verbatim}
1877 \errexpl
1878 There are many possibilities that can lead to this error. However, one
1879 possibility that is relevant for the \pkg{amsmath} package is that you
1880 forgot to give the number argument of an \env{alignat} environment, as
1882 \begin{verbatim}
1883 \begin{alignat}
1884 a& =b& c& =d\\
1885 a'& =b'& c'& =d'
1886 \end{alignat}
1887 \end{verbatim}
1888 where the first line should read instead
1889 \begin{verbatim}
1890 \begin{alignat}{2}
1891 \end{verbatim}
1893 Another possibility is that you have a left bracket character |[|
1894 following a linebreak command \cn{\\} in a multiline construction such
1895 as \env{array}, \env{tabular}, or \env{eqnarray}. This will be
1896 interpreted by \latex/ as the beginning of an `additional vertical
1897 space' request \cite[\S C.1.6]{lamport}, even if it occurs on the following
1898 line and is intended to be part of the contents. For example
1899 \begin{verbatim}
1900 \begin{array}
1901 a+b\\
1902 [f,g]\\
1904 \end{array}
1905 \end{verbatim}
1906 To prevent the error message in such a case, you can
1907 add braces as discussed in the \latex/ manual \cite[\S C.1.1]{lamport}:
1908 \begin{verbatim}
1909 \begin{array}
1910 a+b\\
1911 {[f,g]}\\
1913 \end{array}
1914 \end{verbatim}
1916 \end{error}
1918 \begin{error}{Missing \right. inserted}
1919 \errexa
1920 \begin{verbatim}
1921 ! Missing \right. inserted.
1922 <inserted text>
1923 \right .
1924 l.10 \end{multline}
1927 I've inserted something that you may have forgotten.
1928 (See the <inserted text> above.)
1929 With luck, this will get me unwedged. But if you
1930 really didn't forget anything, try typing `2' now; then
1931 my insertion and my current dilemma will both disappear.
1932 \end{verbatim}
1933 \errexpl
1934 This error typically arises when you try to insert a linebreak inside a
1935 \cn{left}-\cn{right} pair of delimiters in a \env{multline} or
1936 \env{split} environment:
1937 \begin{verbatim}
1938 \begin{multline}
1939 AAA\left(BBB\\
1940 CCC\right)
1941 \end{multline}
1942 \end{verbatim}
1943 There are two possible solutions: (1)~instead of using \cn{left} and
1944 \cn{right}, use `big' delimiters of fixed size (\cn{bigl} \cn{bigr}
1945 \cn{biggl} \cn{biggr} \dots; see \secref{bigdel}); or (2)~use null
1946 delimiters to break up the \cn{left}-\cn{right} pair into parts for each
1947 line:
1948 \begin{verbatim}
1949 AAA\left(BBB\right.\\
1950 \left.CCC\right)
1951 \end{verbatim}
1952 The latter solution may result in mismatched delimiter sizes;
1953 ensuring that they match requires using \cn{vphantom} in the line
1954 that has the smaller delimiter (or possibly \cn{smash} in the line that
1955 has the larger delimiter). In the argument of \cn{vphantom} put a copy
1956 of the tallest element that occurs in the other line, e.g.,
1957 \begin{verbatim}
1958 xxx \left(\int_t yyy\right.\\
1959 \left.\vphantom{\int_t} zzz ... \right)
1960 \end{verbatim}
1961 \end{error}
1963 \begin{error}{Paragraph ended before \xxx was complete}
1964 \errexa
1965 \begin{verbatim}
1966 Runaway argument?
1968 ! Paragraph ended before \multline was complete.
1969 <to be read again>
1970 \par
1971 l.100
1974 I suspect you've forgotten a `}', causing me to apply this
1975 control sequence to too much text. How can we recover?
1976 My plan is to forget the whole thing and hope for the best.
1978 \end{verbatim}
1979 \errexpl
1980 This might be produced by a misspelling in the |\end{multline}| command,
1981 e.g.,
1982 \begin{verbatim}
1983 \begin{multline}
1985 \end{multiline}
1986 \end{verbatim}
1987 or by using abbreviations for certain environments, such as |\bal| and
1988 |\eal| for |\begin{align}| and |\end{align}|:
1989 \begin{verbatim}
1990 \bal
1992 \eal
1993 \end{verbatim}
1994 For technical reasons that kind of abbreviation does not work with
1995 the more complex displayed equation environments of the \pkg{amsmath} package
1996 (\env{gather}, \env{align}, \env{split}, etc.; cf.\@ \fn{technote.tex}).
1997 \end{error}
1999 \begin{error}{Runaway argument?}
2000 See the discussion for the error message
2001 \texttt{Paragraph ended before \ncn{xxx} was complete}.
2002 \end{error}
2004 \begin{error}{Unknown option `xxx' for package `yyy'}
2005 \errexa
2006 \begin{verbatim}
2007 ! LaTeX Error: Unknown option `intlim' for package `amsmath'.
2010 The option `intlim' was not declared in package `amsmath', perhaps you
2011 misspelled its name. Try typing <return> to proceed.
2013 \end{verbatim}
2014 \errexpl
2015 This means that you misspelled the option name, or the package simply
2016 does not have an option that you expected it to have. Consult the
2017 documentation for the given package.
2018 \end{error}
2020 \begin{error}{Old form `\pmatrix' should be \begin{pmatrix}.}
2021 \errexa
2022 \begin{verbatim}
2023 ! Package amsmath Error: Old form `\pmatrix' should be
2024 \begin{pmatrix}.
2026 See the amsmath package documentation for explanation.
2027 Type H <return> for immediate help.
2030 \pmatrix ->\left (\matrix@check \pmatrix
2031 \env@matrix
2032 l.16 \pmatrix
2033 {a&b\cr c&d\cr}
2035 `\pmatrix{...}' is old Plain-TeX syntax whose use is
2036 ill-advised in LaTeX.
2038 \end{verbatim}
2039 \errexpl
2040 When the \pkg{amsmath} package is used, the old forms of \cn{pmatrix},
2041 \cn{matrix}, and \cn{cases} cannot be used any longer because of naming
2042 conflicts. Their syntax did not conform with standard \LaTeX{} syntax
2043 in any case.
2044 \end{error}
2046 \begin{error}{Erroneous nesting of equation structures}
2047 \errexa
2048 \begin{verbatim}
2049 ! Package amsmath Error: Erroneous nesting of equation structures;
2050 (amsmath) trying to recover with `aligned'.
2052 See the amsmath package documentation for explanation.
2053 Type H <return> for immediate help.
2056 l.260 \end{alignat*}
2057 \end{equation*}
2058 \end{verbatim}
2059 \errexpl
2060 The structures \env{align}, \env{alignat}, etc., are designed
2061 for top-level use and for the most part cannot be nested inside some
2062 other displayed equation structure. The chief exception is that
2063 \env{align} and most of its variants can be used inside the
2064 \env{gather} environment.
2065 \end{error}
2067 \section{Warning messages}
2069 \begin{error}{Foreign command \over [or \atop or \above]}
2070 \errexa
2071 \begin{verbatim}
2072 Package amsmath Warning: Foreign command \over; \frac or \genfrac
2073 (amsmath) should be used instead.
2074 \end{verbatim}
2075 \errexpl The primitive generalized fraction commands of \tex/\mdash
2076 \cs{over}, \cs{atop}, \cs{above}\mdash are deprecated when the
2077 \pkg{amsmath} package is used because their syntax is foreign to \latex/
2078 and \pkg{amsmath} provides native \latex/ equivalents. See
2079 \fn{technote.tex} for further information.
2080 \end{error}
2082 \begin{error}{Cannot use `split' here}
2083 \errexa
2084 \begin{verbatim}
2085 Package amsmath Warning: Cannot use `split' here;
2086 (amsmath) trying to recover with `aligned'
2087 \end{verbatim}
2088 \errexpl The \env{split} environment is designed to serve as the entire
2089 body of an equation, or an entire line of an \env{align} or \env{gather}
2090 environment. There cannot be any printed material before or
2091 after it within the same enclosing structure:
2092 \begin{verbatim}
2093 \begin{equation}
2094 \left\{ % <-- Not allowed
2095 \begin{split}
2097 \end{split}
2098 \right. % <-- Not allowed
2099 \end{equation}
2100 \end{verbatim}
2101 \end{error}
2103 \section{Wrong output}
2105 \subsection{Section numbers 0.1, 5.1, 8.1 instead of 1, 2, 3}
2106 \label{numinverse}
2108 This most likely means that you have the arguments for \cn{numberwithin}
2109 in reverse order:
2110 \begin{verbatim}
2111 \numberwithin{section}{equation}
2112 \end{verbatim}
2113 That means `print the section number as \textit{equation
2114 number}.\textit{section number} and reset to 1 every time an equation
2115 occurs' when what you probably wanted was the inverse
2116 \begin{verbatim}
2117 \numberwithin{equation}{section}
2118 \end{verbatim}
2120 \subsection{The \cn{numberwithin} command had no effect on equation
2121 numbers}
2123 Are you looking at the first section in your document? Check the section
2124 numbers elsewhere to see if the problem is the one described in
2125 \secref{numinverse}.
2127 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2129 \chapter{Additional information}
2131 \section{Converting existing documents}
2133 \subsection{Converting from plain \LaTeX{}}
2135 A \LaTeX{} document will typically continue to work the same in most
2136 respects if \verb'\usepackage{amsmath}' is added in the document
2137 preamble. By default, however, the \pkg{amsmath} package suppresses page
2138 breaks inside multiple-line displayed equation structures such as
2139 \env{eqnarray}, \env{align}, and \env{gather}. To continue allowing page
2140 breaks inside \env{eqnarray} after switching to \pkg{amsmath}, you will
2141 need to add the following line in your document preamble:
2142 \begin{verbatim}
2143 \allowdisplaybreaks[1]
2144 \end{verbatim}
2145 To ensure normal spacing around relation symbols, you might also want to
2146 change \env{eqnarray} to \env{align}, \env{multline}, or
2147 \env{equation}\slash\env{split} as appropriate.
2149 Most of the other differences in \pkg{amsmath} usage can be considered
2150 optional refinements, e.g., using
2151 \begin{verbatim}
2152 \DeclareMathOperator{\Hom}{Hom}
2153 \end{verbatim}
2154 instead of \verb'\newcommand{\Hom}{\mbox{Hom}}'.
2156 \subsection{Converting from \amslatex/ 1.1}
2157 See \fn{diffs-m.txt}.
2159 \section{Technical notes}
2160 The file \fn{technote.tex} contains some remarks on miscellaneous
2161 technical questions that are less likely to be of general interest.
2163 \section{Getting help}
2165 Questions or comments regarding \pkg{amsmath} and related packages
2166 should be sent to:
2167 \begin{infoaddress}
2168 American Mathematical Society\\
2169 Technical Support\\
2170 Electronic Products and Services\\
2171 P. O. Box 6248\\
2172 Providence, RI 02940\\[3pt]
2173 Phone: 800-321-4AMS (321-4267) \quad or \quad 401-455-4080\\
2174 Internet: \mail{tech-support@ams.org}
2175 \end{infoaddress}
2176 If you are reporting a problem you should include
2177 the following information to make proper investigation possible:
2178 \begin{enumerate}
2179 \item The source file where the problem occurred, preferably reduced
2180 to minimum size by removing any material that can be removed without
2181 affecting the observed problem.
2182 \item A \latex/ log file showing the error message (if applicable) and
2183 the version numbers of the document class and option files being used.
2184 \end{enumerate}
2186 \section{Of possible interest}\label{a:possible-interest}
2187 Information about obtaining AMSFonts or other \tex/-related
2188 software from the AMS Internet archive \fn{e-math.ams.org}
2189 can be obtained by sending a request through electronic mail to:
2190 \mail{webmaster@ams.org}.
2192 Information about obtaining the \pkg{amsmath} distribution on diskette
2193 from the AMS is available from:
2194 \begin{infoaddress}
2195 American Mathematical Society\\
2196 Customer Services\\
2197 P. O. Box 6248\\
2198 Providence, RI 02940\\[3pt]
2199 Phone: 800-321-4AMS (321-4267) \quad or \quad 401-455-4000\\
2200 Internet: \mail{cust-serv@ams.org}
2201 \end{infoaddress}
2203 The \tex/ Users Group\index{TeX Users@\tex/ Users Group} is a nonprofit
2204 organization that publishes a journal
2205 (\journalname{TUGboat}\index{TUGboat@\journalname{TUGboat}}), holds
2206 meetings, and serves as a clearing-house of general information about
2207 \tex/ and \tex/-related software.
2208 \begin{infoaddress}
2209 \tex/ Users Group\\
2210 PO Box 2311\\
2211 Portland, OR 97208-2311\\
2212 USA\\[3pt]
2213 Phone: +1-503-223-9994\\
2214 Email: \mail{office@tug.org}
2215 \end{infoaddress}
2216 Membership in the \tex/ Users Group is a good way to support continued
2217 development of free \tex/-related software. There are also many local
2218 \tex/ user groups in other countries; information about contacting a
2219 local user group can be gotten from the \tex/ Users Group.
2221 There is a Usenet newsgroup called \fn{comp.text.tex} that is a fairly
2222 good source of information about \latex/ and \tex/ in general. If you
2223 don't know about reading newsgroups, check with your local system
2224 administrator to see if newsgroup service is available at your site.
2226 \begin{thebibliography}{9}
2227 \addcontentsline{toc}{chapter}{Bibliography}
2229 \bibitem{amsfonts}\booktitle{AMSFonts version \textup{2.2}\mdash user's guide},
2230 Amer. Math. Soc., Providence, RI, 1994; distributed
2231 with the AMSFonts package.
2233 \bibitem{instr-l}\booktitle{Instructions for preparation of
2234 papers and monographs\mdash \amslatex/},
2235 Amer. Math. Soc., Providence, RI, 1996, 1999.
2237 \bibitem{amsthdoc}\booktitle{Using the \pkg{amsthm} Package},
2238 Amer. Math. Soc., Providence, RI, 1999.
2240 \bibitem{tlc} Michel Goossens, Frank Mittelbach, and Alexander Samarin,
2241 \booktitle{The \latex/ companion}, Addison-Wesley, Reading, MA, 1994.
2242 [\emph{Note: The 1994 edition is not a reliable guide for the
2243 \pkg{amsmath} package unless you refer to the errata for Chapter
2244 8\mdash file \fn{compan.err}, distributed with \LaTeX{}.}]
2246 % Deal with a line breaking problem
2247 \begin{raggedright}
2248 \bibitem{mil} G. Gr\"{a}tzer,
2249 \emph{Math into \LaTeX{}: An Introduction to \LaTeX{} and AMS-\LaTeX{}}
2250 \url{http://www.ams.org/cgi-bin/bookstore/bookpromo?fn=91&arg1=bookvideo&itmc=MLTEX},
2251 Birkh\"{a}user, Boston, 1995.\par
2252 \end{raggedright}
2254 \bibitem{kn} Donald E. Knuth, \booktitle{The \tex/book},
2255 Addison-Wesley, Reading, MA, 1984.
2257 \bibitem{lamport} Leslie Lamport, \booktitle{\latex/: A document preparation
2258 system}, 2nd revised ed., Addison-Wesley, Reading, MA, 1994.
2260 \bibitem{msf} Frank Mittelbach and Rainer Sch\"opf,
2261 \textit{The new font family selection\mdash user
2262 interface to standard \latex/}, \journalname{TUGboat} \textbf{11},
2263 no.~2 (June 1990), pp.~297\ndash 305.
2265 \bibitem{jt} Michael Spivak, \booktitle{The joy of \tex/}, 2nd revised ed.,
2266 Amer. Math. Soc., Providence, RI, 1990.
2268 \end{thebibliography}
2270 \begin{theindex}
2272 \item {\normalfont \ttfamily \bslchar \qcbang }, 11
2273 \item \verb*+\,+, 11
2274 \item \verb*+\:+, 11
2275 \item \verb*+\;+, 11
2276 \item \verb*+\\+, 3, 5, 6, 8, 9, 24, 26
2277 \item \verb*+\\*+, 9
2278 \item \verb*+\|+, 16
2280 \indexspace
2282 \item \verb*+\above+, 14, 29
2283 \item \verb*+\abovewithdelims+, 14
2284 \item \verb*+\accentedsymbol+, 2
2285 \item \texttt{accents} package, 12
2286 \item \verb*+\addtocounter+, 10
2287 \item \verb*+\addtolength+, 5
2288 \item \texttt{align} environment, 3, 5--7, 28--30
2289 \item \texttt{alignat} environment, 7, 24, 26, 29
2290 \item \texttt{aligned} environment, 7, 9
2291 \item \texttt{alignedat} environment, 7, 9
2292 \item \verb*+\allowdisplaybreaks+, 8, 9
2293 \item \texttt{amsart} class, 1
2294 \item \texttt{amsbook} class, 1
2295 \item \texttt{amsbsy} package, 1, 2
2296 \item \texttt{amscd} package, 1, 2, 20
2297 \item \texttt{amsfonts} package, 21
2298 \item AMSFonts collection, 25
2299 \item \texttt{amsmath} package, i, 1--3, 5, 8--18, 22, 23, 25, 26,
2300 28--32
2301 \item \texttt{amsopn} package, 1, 2
2302 \item \texttt{amssymb} package, 22
2303 \item \texttt{amstext} package, 1, 2
2304 \item \texttt{amsthm} package, 1, 32
2305 \item \texttt{amsxtra} package, 1, 2, 12
2306 \item \verb*+\arccos+, 18
2307 \item \verb*+\arcsin+, 18
2308 \item \verb*+\arctan+, 18
2309 \item \verb*+\arg+, 18
2310 \item \texttt{array} environment, 8, 10, 26
2311 \item arrows
2312 \subitem extensible, 13
2313 \subitem in commutative diagrams, 20
2314 \item \verb*+\atop+, 14, 29
2315 \item \verb*+\atopwithdelims+, 14
2317 \indexspace
2319 \item BaKoMa fonts, 25
2320 \item \cn{big}, \cn{Big}, \cn{bigg}, \dots\ delimiters, 16
2321 \item \verb*+\biggl+, 27
2322 \item \verb*+\biggr+, 27
2323 \item \verb*+\bigl+, 27
2324 \item \verb*+\bigr+, 27
2325 \item \verb*+\binom+, 14
2326 \item binomials, 14
2327 \item \texttt{bm} package, 2, 23
2328 \item \texttt{Bmatrix} environment, 10
2329 \item \texttt{bmatrix} environment, 10
2330 \item \verb*+\bmod+, 18
2331 \item \verb*+\boldsymbol+, 22, 23
2332 \item \verb*+\boxed+, 13
2334 \indexspace
2336 \item \verb*+\C+, 22
2337 \item \texttt{cases} environment, 8
2338 \item \verb*+\cases+, 28
2339 \item \texttt{CD} environment, 2, 21
2340 \item \verb*+\cdots+, 12
2341 \item \texttt{centertags} option, 2
2342 \item \verb*+\cfrac+, 15
2343 \item \texttt{cmbsy5}, 25
2344 \item \texttt{cmex}, 25
2345 \item \texttt{cmex10}, 25
2346 \item \texttt{cmex7}, 25
2347 \item \texttt{cmmib5}, 25
2348 \item \texttt{comp.text.tex}, 31
2349 \item \texttt{compan.err}, 32
2350 \item continued fractions, 15
2351 \item \verb*+\cos+, 18
2352 \item \verb*+\cosh+, 18
2353 \item \verb*+\cot+, 18
2354 \item \verb*+\coth+, 18
2355 \item \verb*+\csc+, 18
2357 \indexspace
2359 \item \verb*+\dbinom+, 14
2360 \item \verb*+\ddddot+, 12
2361 \item \verb*+\dddot+, 12
2362 \item \verb*+\ddot+, 12
2363 \item \verb*+\DeclareMathOperator+, 2, 17, 18
2364 \item \verb*+\deg+, 18
2365 \item \verb*+\det+, 18
2366 \item \verb*+\dfrac+, 14
2367 \item \texttt{diffs-m.txt}, 30
2368 \item \verb*+\dim+, 18
2369 \item \verb*+\displaybreak+, 8, 9
2370 \item displayed equations, 3
2371 \item displayed equations
2372 \subitem centering, 3
2373 \item \verb*+\displaylimits+, 20
2374 \item \texttt{displaymath} environment, 3
2375 \item \verb*+\displaystyle+, 14
2376 \item \verb*+\documentclass+, 2
2377 \item \verb*+\dot+, 12
2378 \item dots, \see{ellipsis dots}{11}
2379 \item \verb*+\dotsb+, 12
2380 \item \verb*+\dotsc+, 12
2381 \item \verb*+\dotsi+, 12
2382 \item \verb*+\dotsm+, 12
2383 \item \verb*+\dotso+, 12
2385 \indexspace
2387 \item \texttt{e-math.ams.org}, 31
2388 \item ellipsis dots
2389 \subitem in matrices, 11
2390 \item \texttt{eqnarray} environment, 1, 3, 26, 30
2391 \item \verb*+\eqref+, 10
2392 \item \texttt{equation} environment, 1, 3, 5, 7, 24, 30
2393 \item equation numbers
2394 \subitem cross-references, 10
2395 \subitem hierarchy, 9
2396 \subitem left or right placement, 3
2397 \subitem overriding, 3
2398 \subitem subordinate numbering, 10
2399 \subitem vertical placement, 2
2400 \item \texttt{equation*} environment, 3
2401 \item equations, \see{displayed equations}{3}
2402 \item \texttt{euscript} package, 21
2403 \item \verb*+\exp+, 18
2405 \indexspace
2407 \item \verb*+\fbox+, 13
2408 \item \texttt{fleqn} option, 3, 5
2409 \item \texttt{fntguide.tex}, 21
2410 \item \verb*+\frac+, 14, 15
2411 \item fractions, 14
2412 \item \verb*+\fracwithdelims+, 2
2413 \item function names, \see{operator names}{17}
2415 \indexspace
2417 \item \texttt{gather} environment, 5--7, 24, 28--30
2418 \item \texttt{gathered} environment, 7, 9
2419 \item \verb*+\gcd+, 18
2420 \item \verb*+\genfrac+, 14
2422 \indexspace
2424 \item \verb*+\hat+, 12
2425 \item \verb*+\hdotsfor+, 11
2426 \item \verb*+\hom+, 18
2427 \item horizontal space
2428 \subitem around operator names, 17
2429 \subitem in math mode, 11
2431 \indexspace
2433 \item \verb*+\idotsint+, 20
2434 \item \verb*+\iiiint+, 20
2435 \item \verb*+\iiint+, 20
2436 \item \verb*+\iint+, 20
2437 \item \verb*+\inf+, 18
2438 \item \verb*+\injlim+, 18
2439 \item integrals
2440 \subitem multiple, 20
2441 \subitem placement of limits, 2
2442 \item \verb*+\intertext+, 9
2443 \item \texttt{intlimits} option, 2, 20
2445 \indexspace
2447 \item \verb*+\ker+, 18
2448 \item \texttt{kuvio} package, 20
2450 \indexspace
2452 \item \verb*+\label+, 6, 10
2453 \item \verb*+\langle+, 16
2454 \item \verb*+\ldots+, 12
2455 \item \verb*+\left+, 15, 16, 27
2456 \item \verb*+\leftroot+, 13
2457 \item \texttt{leqno} option, 3, 5
2458 \item \verb*+\lg+, 18
2459 \item \verb*+\lim+, 1, 2, 17, 18
2460 \item \verb*+\liminf+, 18
2461 \item limits, \see{subscripts and superscripts}{2}
2462 \item \verb*+\limits+, 20
2463 \item \verb*+\limsup+, 18
2464 \item \verb*+\ln+, 18
2465 \item \verb*+\log+, 17, 18
2466 \item \verb*+\lVert+, 16
2467 \item \verb*+\lvert+, 16
2469 \indexspace
2471 \item math fonts, 21
2472 \item math symbols, \see{math fonts}{21}
2473 \item \verb*+\mathbb+, 21, 22
2474 \item \verb*+\mathbf+, 21, 22
2475 \item \verb*+\mathcal+, 21
2476 \item \verb*+\mathfrak+, 21
2477 \item \verb*+\mathit+, 21
2478 \item \verb*+\mathrm+, 21
2479 \item \verb*+\mathscr+, 21
2480 \item \verb*+\mathsf+, 21
2481 \item \verb*+\mathtt+, 21
2482 \item matrices, 10
2483 \subitem ellipsis dots, 11
2484 \item \texttt{matrix} environment, 10
2485 \item \verb*+\matrix+, 28
2486 \item \verb*+\max+, 18
2487 \item \verb*+\mbox+, 18
2488 \item \verb*+\medspace+, 11
2489 \item Metafont source files, 25
2490 \item \verb*+\min+, 18
2491 \item \verb*+\mod+, 18
2492 \item \verb*+\mspace+, 11
2493 \item \texttt{multline} environment, 3, 5, 27, 30
2494 \item \verb*+\multlinegap+, 5
2496 \indexspace
2498 \item \texttt{namelimits} option, 2
2499 \item \verb*+\negmedspace+, 11
2500 \item \verb*+\negthickspace+, 11
2501 \item \verb*+\negthinspace+, 11
2502 \item \verb*+\newcommand+, 21
2503 \item \verb*+\nobreakdash+, 12
2504 \item \texttt{nointlimits} option, 2
2505 \item \verb*+\nolimits+, 19, 20
2506 \item \texttt{nonamelimits} option, 2
2507 \item \texttt{nosumlimits} option, 2
2508 \item \verb*+\notag+, 3, 5
2509 \item \verb*+\numberwithin+, 9, 29, 30
2511 \indexspace
2513 \item operator names, 17
2514 \item \verb*+\operatorname+, 18
2515 \item \verb*+\operatorname*+, 18
2516 \item \verb*+\over+, 14, 29
2517 \item \verb*+\overleftarrow+, 13
2518 \item \verb*+\overleftrightarrow+, 13
2519 \item \verb*+\overrightarrow+, 13
2520 \item \verb*+\overset+, 13
2521 \item \verb*+\overwithdelims+, 14
2523 \indexspace
2525 \item page breaks, 8
2526 \item \verb*+\pagebreak+, 8
2527 \item \texttt{pmatrix} environment, 10
2528 \item \verb*+\pmatrix+, 28
2529 \item \verb*+\pmb+, 22
2530 \item \verb*+\pmod+, 18
2531 \item \verb*+\pod+, 18
2532 \item PostScript fonts, 25
2533 \item \verb*+\Pr+, 18
2534 \item \verb*+\projlim+, 18
2536 \indexspace
2538 \item \verb*+\qquad+, 11
2539 \item \verb*+\quad+, 11
2541 \indexspace
2543 \item \verb*+\R+, 22
2544 \item \verb*+\raisetag+, 8
2545 \item \verb*+\rangle+, 16
2546 \item \verb*+\ref+, 10
2547 \item \texttt{reqno} option, 3, 5
2548 \item \verb*+\right+, 15, 16, 27
2549 \item \verb*+\rVert+, 16
2550 \item \verb*+\rvert+, 16
2552 \indexspace
2554 \item \verb*+\scriptscriptstyle+, 14
2555 \item \verb*+\scriptstyle+, 14
2556 \item \verb*+\sec+, 18
2557 \item \verb*+\setcounter+, 9, 10
2558 \item \verb*+\setlength+, 5
2559 \item \verb*+\shoveleft+, 5
2560 \item \verb*+\shoveright+, 5
2561 \item \verb*+\sideset+, 13, 19
2562 \item \verb*+\sin+, 1, 2, 17, 18
2563 \item \verb*+\sinh+, 18
2564 \item \texttt{smallmatrix} environment, 11
2565 \item \verb*+\smash+, 15, 27
2566 \item \verb*+\sphat+, 12
2567 \item \texttt{split} environment, 3, 5, 6, 9, 24, 27--30
2568 \item \verb*+\sptilde+, 12
2569 \item \verb*+\stackrel+, 13
2570 \item \texttt{subarray} environment, 19
2571 \item \texttt{subeqn.tex}, 3
2572 \item \texttt{subequations} environment, 10
2573 \item subscripts and superscripts, 13
2574 \subitem multi-line, 19
2575 \subitem on sums, 19
2576 \subitem placement, 2
2577 \item \verb*+\substack+, 19
2578 \item \verb*+\sum+, 20, 22
2579 \item \texttt{sumlimits} option, 2
2580 \item \verb*+\sup+, 18
2581 \item superscripts, \see{subscripts and superscripts}{19}
2583 \indexspace
2585 \item \texttt{tabular} environment, 26
2586 \item \verb*+\tag+, 3
2587 \item \verb*+\tag*+, 3
2588 \item \verb*+\tan+, 18
2589 \item \verb*+\tanh+, 18
2590 \item \verb*+\tbinom+, 14
2591 \item \texttt{tbtags} option, 2
2592 \item \texttt{technote.tex}, 14, 28--30
2593 \item \texttt{testmath.tex}, 3
2594 \item \tex/ Users Group, 31
2595 \item \verb*+\text+, 2, 7--9, 18
2596 \item text fragments inside math, 9, 18
2597 \item \verb*+\textstyle+, 14
2598 \item \verb*+\tfrac+, 14
2599 \item \verb*+\theequation+, 9, 10
2600 \item \verb*+\thickspace+, 11
2601 \item \verb*+\thinspace+, 11
2602 \item \journalname{TUGboat}, 31
2604 \indexspace
2606 \item \verb*+\underleftarrow+, 13
2607 \item \verb*+\underleftrightarrow+, 13
2608 \item \verb*+\underrightarrow+, 13
2609 \item \verb*+\underset+, 13
2610 \item \verb*+\uproot+, 13
2611 \item \verb*+\usepackage+, 2, 25
2613 \indexspace
2615 \item \verb*+\value+, 10
2616 \item \verb*+\varDelta+, 23
2617 \item \verb*+\varGamma+, 23
2618 \item \verb*+\varinjlim+, 18
2619 \item \verb*+\varLambda+, 23
2620 \item \verb*+\varliminf+, 18
2621 \item \verb*+\varlimsup+, 18
2622 \item \verb*+\varOmega+, 23
2623 \item \verb*+\varPhi+, 23
2624 \item \verb*+\varPi+, 23
2625 \item \verb*+\varprojlim+, 18
2626 \item \verb*+\varPsi+, 23
2627 \item \verb*+\varSigma+, 23
2628 \item \verb*+\varTheta+, 23
2629 \item \verb*+\varUpsilon+, 23
2630 \item \verb*+\varXi+, 23
2631 \item \texttt{Vmatrix} environment, 10
2632 \item \texttt{vmatrix} environment, 10
2633 \item \verb*+\vphantom+, 27
2635 \indexspace
2637 \item \verb*+\xleftarrow+, 13
2638 \item \verb*+\xrightarrow+, 13
2640 \end{theindex}
2642 \end{document}