%%% ==================================================================== %%% @LaTeX-file{ %%% filename = "amsldoc.tex", %%% version = "2.09", %%% date = "2004/04/06", %%% time = "15:13:33 EDT", %%% checksum = "39446 2620 11111 93831", %%% author = "American Mathematical Society", %%% address = "American Mathematical Society, %%% Technical Support, %%% Electronic Products and Services, %%% P. O. Box 6248, %%% Providence, RI 02940, %%% USA", %%% telephone = "401-455-4080 or (in the USA and Canada) %%% 800-321-4AMS (321-4267)", %%% FAX = "401-331-3842", %%% email = "tech-support@ams.org (Internet)", %%% copyright = "Copyright 1999 American Mathematical Society, %%% all rights reserved. Copying of this file is %%% authorized only if either: %%% (1) you make absolutely no changes to your copy, %%% including name; OR %%% (2) if you do make changes, you first rename it %%% to some other name.", %%% supported = "yes", %%% keywords = "latex, amsmath", %%% abstract = "This file is the source file for the user's %%% guide of the \LaTeX{} package amsmath .", %%% docstring = "The checksum field above contains a CRC-16 %%% checksum as the first value, followed by the %%% equivalent of the standard UNIX wc (word %%% count) utility output of lines, words, and %%% characters. This is produced by Robert %%% Solovay's checksum utility.", %%% } %%% ==================================================================== \documentclass[leqno,titlepage,openany]{amsldoc}[1999/12/13] \ifx\UndEfiNed\url \ClassError{amsldoc}{% This version of amsldoc.tex must be processed\MessageBreak with a newer version of amsldoc.cls (2.02 or later)}{} \fi \title{User's Guide for the \pkg{amsmath} Package (Version~2.0)} \author{American Mathematical Society} \date{1999-12-13 (revised 2002-02-25)} % Use the amsmath package and amscd package in order to print % examples. \usepackage{amsmath} \usepackage{amscd} \makeindex % generate index data \providecommand{\see}[2]{\textit{see} #1} % The amsldoc class includes a number of features useful for % documentation about TeX, including: % % ---Commands \tex/, \amstex/, \latex/, ... for uniform treatment % of the various logos and easy handling of following spaces. % % ---Commands for printing various common elements: \cn for command % names, \fn for file names (including font-file names), \env for % environments, \pkg and \cls for packages and classes, etc. % Many of the command names used here are rather long and will % contribute to poor linebreaking if we follow the \latex/ practice % of not hyphenating anything set in tt font; instead we selectively % allow some hyphenation. \allowtthyphens % defined in amsldoc.cls \hyphenation{ac-cent-ed-sym-bol add-to-counter add-to-length align-at aligned-at allow-dis-play-breaks ams-art ams-cd ams-la-tex amsl-doc ams-symb ams-tex ams-text ams-xtra bmatrix bold-sym-bol cen-ter-tags eqn-ar-ray idots-int int-lim-its latex med-space neg-med-space neg-thick-space neg-thin-space no-int-lim-its no-name-lim-its over-left-arrow over-left-right-arrow over-right-arrow pmatrix qed-sym-bol set-length side-set small-er tbinom the-equa-tion thick-space thin-space un-der-left-arrow un-der-left-right-arrow un-der-right-arrow use-pack-age var-inj-lim var-proj-lim vmatrix xalign-at xx-align-at} % Prepare for illustrating the \vec example \newcommand{\vect}[1]{\mathbf{#1}} \newcommand{\booktitle}[1]{\textit{#1}} \newcommand{\journalname}[1]{\textit{#1}} \newcommand{\seriesname}[1]{\textit{#1}} % Command to insert and index a particular phrase. Doesn't work for % certain kinds of special characters in the argument. \newcommand{\ii}[1]{#1\index{#1}} \newcommand{\vstrut}[1]{\vrule width0pt height#1\relax} % An environment for presenting comprehensive address information: \newenvironment{infoaddress}{% \par\topsep\medskipamount \trivlist\centering \item[]% \begin{minipage}{.7\columnwidth}% \raggedright }{% \end{minipage}% \endtrivlist } \newenvironment{eqxample}{% \par\addvspace\medskipamount \noindent\begin{minipage}{.5\columnwidth}% \def\producing{\end{minipage}\begin{minipage}{.5\columnwidth}% \hbox\bgroup\kern-.2pt\vrule width.2pt% \vbox\bgroup\parindent0pt\relax % The 3pt is to cancel the -\lineskip from \displ@y \abovedisplayskip3pt \abovedisplayshortskip\abovedisplayskip \belowdisplayskip0pt \belowdisplayshortskip\belowdisplayskip \noindent} }{% \par % Ensure that a lonely \[\] structure doesn't take up width less than % \hsize. \hrule height0pt width\hsize \egroup\vrule width.2pt\kern-.2pt\egroup \end{minipage}% \par\addvspace\medskipamount } % The chapters are so short, perhaps we shouldn't call them by the % name `Chapter'. We make \chaptername read an argument in order to % remove a following \space or "{} " (both possibilities are present % in book.cls). \renewcommand{\chaptername}[1]{} \newcommand{\chapnum}[1]{\mdash #1\mdash } \makeatletter \def\@makechapterhead#1{% \vspace{1.5\baselineskip}% {\parindent \z@ \raggedright \reset@font \ifnum \c@secnumdepth >\m@ne \large\bfseries \chapnum{\thechapter}% \par\nobreak \vskip.5\baselineskip\relax \fi #1\par\nobreak \vskip\baselineskip }} \makeatother % A command for ragged-right parbox in a tabular. \newcommand{\rp}{\let\PBS\\\raggedright\let\\\PBS} % Non-indexed file name \newcommand{\nfn}[1]{\texttt{#1}} % For the examples in the math spacing table. %%\newcommand{\lspx}{\mbox{\rule{5pt}{.6pt}\rule{.6pt}{6pt}}} %%\newcommand{\rspx}{\mbox{\rule[-1pt]{.6pt}{7pt}% %% \rule[-1pt]{5pt}{.6pt}}} \newcommand{\lspx}{\mathord{\Rightarrow\mkern-1mu}} \newcommand{\rspx}{\mathord{\mkern-1mu\Leftarrow}} \newcommand{\spx}[1]{$\lspx #1\rspx$} % For a list of characters representing document input. \newcommand{\clist}[1]{% \mbox{\ntt\spaceskip.2em plus.1em \xspaceskip\spaceskip#1}} % Fix weird \latex/ definition of rightmark. \makeatletter \def\rightmark{\expandafter\@rightmark\botmark{}{}} % Also turn off section marks. \let\sectionmark\@gobble \renewcommand{\chaptermark}[1]{% \uppercase{\markboth{\rhcn#1}{\rhcn#1}}} \newcommand{\rhcn}{\thechapter. } \makeatother % Include down to \section but not \subsection, in toc: \setcounter{tocdepth}{1} \DeclareMathOperator{\ix}{ix} \DeclareMathOperator{\nul}{nul} \DeclareMathOperator{\End}{End} \DeclareMathOperator{\xxx}{xxx} \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \frontmatter \maketitle \pagestyle{headings} \tableofcontents \cleardoublepage % for better page number placement %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \mainmatter \chapter{Introduction} The \pkg{amsmath} package is a \LaTeX{} package that provides miscellaneous enhancements for improving the information structure and printed output of documents that contain mathematical formulas. Readers unfamiliar with \LaTeX{} should refer to \cite{lamport}. If you have an up-to-date version of \LaTeX{}, the \pkg{amsmath} package is normally provided along with it. Upgrading when a newer version of the \pkg{amsmath} package is released can be done via \url{http://www.ams.org/tex/amsmath.html} or \url{ftp://ftp.ams.org/pub/tex/}. This documentation describes the features of the \pkg{amsmath} package and discusses how they are intended to be used. It also covers some ancillary packages: \begin{ctab}{ll} \pkg{amsbsy}& \pkg{amstext}\\ \pkg{amscd}& \pkg{amsxtra}\\ \pkg{amsopn} \end{ctab} These all have something to do with the contents of math formulas. For information on extra math symbols and math fonts, see \cite{amsfonts} and \url{http://www.ams.org/tex/amsfonts.html}. For documentation of the \pkg{amsthm} package or AMS document classes (\cls{amsart}, \cls{amsbook}, etc.\@) see \cite{amsthdoc} or \cite{instr-l} and \url{http://www.ams.org/tex/author-info.html}. If you are a long-time \latex/ user and have lots of mathematics in what you write, then you may recognize solutions for some familiar problems in this list of \pkg{amsmath} features: \begin{itemize} \item A convenient way to define new `operator name' commands analogous to \cn{sin} and \cn{lim}, including proper side spacing and automatic selection of the correct font style and size (even when used in sub- or superscripts). \item Multiple substitutes for the \env{eqnarray} environment to make various kinds of equation arrangements easier to write. \item Equation numbers automatically adjust up or down to avoid overprinting on the equation contents (unlike \env{eqnarray}). \item Spacing around equals signs matches the normal spacing in the \env{equation} environment (unlike \env{eqnarray}). \item A way to produce multiline subscripts as are often used with summation or product symbols. \item An easy way to substitute a variant equation number for a given equation instead of the automatically supplied number. \item An easy way to produce subordinate equation numbers of the form (1.3a) (1.3b) (1.3c) for selected groups of equations. \end{itemize} The \pkg{amsmath} package is distributed together with some small auxiliary packages: \begin{description} \item[\pkg{amsmath}] Primary package, provides various features for displayed equations and other mathematical constructs. \item[\pkg{amstext}] Provides a \cn{text} command for typesetting a fragment of text inside a display. \item[\pkg{amsopn}] Provides \cn{DeclareMathOperator} for defining new `operator names' like \cn{sin} and \cn{lim}. \item[\pkg{amsbsy}] For backward compatibility this package continues to exist but use of the newer \pkg{bm} package that comes with \LaTeX{} is recommended instead. \item[\pkg{amscd}] Provides a \env{CD} environment for simple commutative diagrams (no support for diagonal arrows). \item[\pkg{amsxtra}] Provides certain odds and ends such as \cn{fracwithdelims} and \cn{accentedsymbol}, for compatibility with documents created using version 1.1. \end{description} The \pkg{amsmath} package incorporates \pkg{amstext}, \pkg{amsopn}, and \pkg{amsbsy}. The features of \pkg{amscd} and \pkg{amsxtra}, however, are available only by invoking those packages separately. \chapter{Options for the \pkg{amsmath} package}\label{options} The \pkg{amsmath} package has the following options: \begin{description} \item[\opt{centertags}] (default) For a split equation, place equation numbers\index{equation numbers!vertical placement} vertically centered on the total height of the equation. \item[\opt{tbtags}] `Top-or-bottom tags': For a split equation, place equation numbers\index{equation numbers!vertical placement} level with the last (resp.\@ first) line, if numbers are on the right (resp.\@ left). \item[\opt{sumlimits}] (default) Place the subscripts and superscripts\index{subscripts and superscripts!placement}\relax \index{limits|see{subscripts and superscripts}} of summation symbols above and below, in displayed equations. This option also affects other symbols of the same type\mdash $\prod$, $\coprod$, $\bigotimes$, $\bigoplus$, and so forth\mdash but excluding integrals (see below). \item[\opt{nosumlimits}] Always place the subscripts and superscripts of summation-type symbols to the side, even in displayed equations. \item[\opt{intlimits}] Like \opt{sumlimits}, but for integral\index{integrals!placement of limits} symbols. \item[\opt{nointlimits}] (default) Opposite of \opt{intlimits}. \item[\opt{namelimits}] (default) Like \opt{sumlimits}, but for certain `operator names' such as $\det$, $\inf$, $\lim$, $\max$, $\min$, that traditionally have subscripts \index{subscripts and superscripts!placement} placed underneath when they occur in a displayed equation. \item[\opt{nonamelimits}] Opposite of \opt{namelimits}. \end{description} To use one of these package options, put the option name in the optional argument of the \cn{usepackage} command\mdash e.g., \verb"\usepackage[intlimits]{amsmath}". The \pkg{amsmath} package also recognizes the following options which are normally selected (implicitly or explicitly) through the \cn{documentclass} command, and thus need not be repeated in the option list of the \cn{usepackage}|{amsmath}| statement. \begin{description} \item[\opt{leqno}] Place equation numbers on the left.\index{equation numbers!left or right placement} \item[\opt{reqno}] Place equation numbers on the right. \item[\opt{fleqn}] Position equations at a fixed indent from the left margin rather than centered in the text column.\index{displayed equations!centering} \end{description} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Displayed equations} \section{Introduction} The \pkg{amsmath} package provides a number of additional displayed equation structures\index{displayed equations}\index{equations|see{displayed equations}} beyond the ones provided in basic \latex/. The augmented set includes: \begin{verbatim} equation equation* align align* gather gather* flalign flalign* multline multline* alignat alignat* split \end{verbatim} (Although the standard \env{eqnarray} environment remains available, it is better to use \env{align} or \env{equation}+\env{split} instead.) Except for \env{split}, each environment has both starred and unstarred forms, where the unstarred forms have automatic numbering using \latex/'s \env{equation} counter. You can suppress the number on any particular line by putting \cn{notag} before the \cn{\\}; you can also override\index{equation numbers!overriding} it with a tag of your own using \cn{tag}|{|\