%%% ==================================================================== %%% @LaTeX-file{ %%% filename = "amsldoc.tex", %%% version = "1.2c", %%% date = "01 November 1996", %%% time = "14:07:00 EST", %%% checksum = "33348 3017 13802 113517", %%% 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 (C) 1996 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, amslatex, ams-latex, amstex", %%% abstract = "This file is the source file for the AMS-\LaTeX{} %%% user's guide.", %%% 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.", %%% } %%% ==================================================================== \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) [1994/06/01]% LaTeX date must June 1994 or later \documentclass[leqno,titlepage,openany]{amsldoc} \title{\amslatex/ Version 1.2\\User's Guide} \author{American Mathematical Society} \date{01 November 1996 \\ Version 1.02} % Use the amsmath package and amscd package in order to print % examples. \usepackage{amsmath} \usepackage{amscd} %\usepackage{syntonly}\syntaxonly \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-intsm ams-la-tex amsl-doc ams-symb ams-texdf ams-text ams-xtra bmatrix bold-sym-bol cen-ter-tags curr-addr eqn-ar-ray idots-int int-lim-its latex make-title med-space mr-abbrev neg-med-space neg-thick-space neg-thin-space new-en-vi-ron-ment new-theo-rem no-ams-fonts no-int-lim-its no-name-lim-its over-left-arrow over-left-right-arrow over-right-arrow pmatrix ps-ams-fonts qed-sym-bol set-length side-set small-er subj-class tbinom the-equa-tion theo-rem theo-rem-style 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 \let\vector=\vec \renewcommand{\vec}[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}} % 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]{---#1---} \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{\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}} \newtheorem{prop}{Proposition} % 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}{}% empty for first unnumbered chapter \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 \tableofcontents \newpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter*{What is `\amslatex/', and why would anyone want to use it?} \chaptermark{What is `\amslatex/'?} \section*{What is `\amslatex/'?} \leavevmode \addcontentsline{toc}{chapter}{What is `\amslatex/', and why would anyone want to use it?} \addcontentsline{toc}{section}{What is `\amslatex/'?} % The name \amslatex/ is used for convenience to describe a set of loosely related files that are distributed together by the American Mathematical Society. Basically they may be described as miscellaneous enhancements to \latex/ for \emph{superior information structure of mathematical documents} and \emph{superior printed output}. Because \amslatex/ is an extension for \latex/, which in turn is a `macro package'\gloss{macro package} for the \tex/ typesetting program, it follows that in order to use any of the pieces of \amslatex/ you need to have \tex/ and \latex/ installed first. \latex/ by itself does a rather good job of typesetting mathematics, compared to non-\tex/-based software; it doesn't add much, however, to the basic set of mathematical capabilities that it adopted from the Plain \tex/ macro package. At the same time that \latex/ was being developed by Leslie Lamport\index{Lamport, Leslie} (roughly 1982--1986), the American Mathematical Society was throwing its resources into the development of a different macro package known as \amstex/\index{amstex@\amstex/}, written by Michael Spivak\index{Spivak, Michael}. By 1987 or so it became evident that \amstex/ and \latex/ had complementary feature sets: \amstex/ focused on the typesetting of math formulas and on fine-tuning typically done by publishers, and was relatively weak in other areas (for example no automatic numbering or cross-reference facilities); \latex/ focused on document structure and logical markup of text, and had a comparatively limited set of features for dealing with math formula contents. This situation led to dissatisfaction among both \amstex/ and \latex/ users who saw desirable features tantalizingly out of reach in the other macro package. So the American Mathematical Society looked into the question of producing some sort of combination of the two macro packages that would better serve mathematicians in their writing tasks. The decision that was eventually taken was to graft the mathematical capabilities of \amstex/ onto the base stock of \latex/ through an extension package: \amslatex/. Most of the programming work was done by Frank Mittelbach\index{Mittelbach, Frank} and Rainer Sch\"opf\index{Sch\"opf, Rainer} in 1989--1990 and version 1.0 of \amslatex/ was released in mid-1990. \section*{Why would a \latex/ user want to bother with \amslatex/?} \leavevmode \addcontentsline{toc}{section}{Why would a \latex/ user want to bother with \amslatex/?} % If you are just starting out as a \latex/ user, you'll probably have to take our word for this (or the word of friends and colleagues), but: If your writing contains a significant proportion of mathematics, and you care about the quality of the printed results, then sooner or later you'll find shortcomings in standard \latex/ and want to remedy them. Chances are that at least the first few of the shortcomings you encounter will be ones that are already addressed by an \amslatex/ package. If you want to have maximum mathematical typesetting power ready at hand, rather than stop to cast about for a solution whenever you run into some unusual demand in your writing, then \amslatex/ will go a long way toward meeting your needs. 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 \amslatex/ 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. \item A \cn{boldsymbol} command for printing bold versions of individual symbols, including things like $\infty$ and lowercase Greek letters. \item An \pkg{amsthm} package that provides a useful \env{proof} environment and some enhancements to the \cn{newtheorem} command: support for multiple theorem styles in a single document and for unnumbered theorem types. \end{itemize} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \mainmatter \renewcommand{\rhcn}{\thechapter. } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{How to use \amslatex/} \section{Using an AMS package in a \latex/ document}\label{usepackage} A `package'\gloss{package} in \latex/ terminology is an extension written in such a form that it can be used via the \cn{usepackage} command. Many of the principal features of \amslatex/ are provided in separate packages so that they can be used individually on demand. The \pkg{amsmath} package is perhaps the single most noteworthy package, as it subsumes the \pkg{amstext}, \pkg{amsbsy}, and \pkg{amsopn} packages, and provides a number of other enhancements for mathematical typesetting. The current list of packages is: \begin{description} \raggedright \item[\pkg{amsmath}] Defines extra environments for multiline displayed equations, as well as a number of other enhancements for math. \item[\pkg{amstext}] Provides a \cn{text} command for typesetting a fragment of text inside a display. \item[\pkg{amsbsy}] Defines \cn{boldsymbol} and \cn{pmb} `poor man's bold' commands. \item[\pkg{amsopn}] Provides \cn{DeclareMathOperator} for defining new `operator names' like \cn{sin} and \cn{lim}. \item[\pkg{amsthm}] Provides a \env{proof} environment and extensions for the \cn{newtheorem} command. \item[\pkg{amsintx}] Provides more descriptive command syntax for integrals and sums. \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. \item[\pkg{upref}] Makes \cn{ref} print cross-reference numbers always in an upright/roman font regardless of context. \end{description} \section{Options for the \pkg{amsmath} package} 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---$\prod$, $\coprod$, $\bigotimes$, $\bigoplus$, and so forth---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---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} For symmetry there should perhaps be a \verb"centereqn" option as well, to balance with \verb"fleqn", but as things currently stand there doesn't seem to be a genuine need for it. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Displayed equations (\pkg{amsmath} package)} \section{Introduction} The \pkg{amsmath} package provides a number of additional displayed equation structures\index{displayed equations}\index{equations|see{displayed equations}} beyond the basic \env{equation} and \env{eqnarray} environments provided in basic \latex/. The augmented set includes: \begin{verbatim} equation align gather flalign multline alignat split \end{verbatim} (Although the standard \env{eqnarray} environment remains available, \env{align} or \env{split} are recommended 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}|{|\