#### What is AMS-LaTeX?

#### Why AMS-LaTeX?

#### Getting the Documentation.

#### Using AMS-LaTeX.

#### Undocumented stuff about the

`newtheoremstyle`environment.

AMS-LaTeX is a set of LaTeX packages for mathematics, which was developed by the American Mathematical Society so that mathematicians could produce beautiful mathematics in LaTeX, mathematics acceptible for publication in the society's journals.

Originally AMS-LaTeX was separate from LaTeX, but in the new version of LaTeX, called LaTeX2e, introduced 10 years ago, all such separate programs became LaTeX packages. So now AMS-LaTeX is just a set of LaTeX packages.

- A convenient way to define new `operator name' commands analogous
to
`\sin`and`\lim`, including proper side spacing and automatic selection of the correct font style and size (even when used in sub- or superscripts). - Multiple substitutes for the
`eqnarray`environment to make various kinds of equation arrangements easier to write. - Equation numbers automatically adjust up or down to avoid
overprinting on the equation contents (unlike
`eqnarray`). - Spacing around equals signs matches the normal spacing in the
`equation`environment (unlike`eqnarray`). - A way to produce multiline subscripts as are often used with summation or product symbols.
- An easy way to substitute a variant equation number for a given equation instead of the automatically supplied number.
- An easy way to produce subordinate equation numbers of the form (1.3a) (1.3b) (1.3c) for selected groups of equations.
- A
`\boldsymbol`command for printing bold versions of individual symbols, including things like`\infty`and lowercase Greek letters. - An
`amsthm`package that provides a useful`proof`environment and some enhancements to the`\newtheorem`command: support for multiple theorem styles in a single document and for unnumbered theorem types.

The AMS-LaTeX people are too polite about the defects of the LaTeX
`eqnarray` environment; `eqnarray` is so brain-damaged
that it is impossible to use it to produce non-ugly mathematics.
AMS-LaTeX provides six different replacements to do a variety of
jobs, all of which must be done and done poorly by `eqnarray`
when you use plain LaTeX. All six of the AMS-LaTeX replacements work
beautifully.

They also don't say enough about the `amsthm`. It also provides
a `newtheoremstyle` environment that allows you to change the style
of `theorem` environments so that they have the look you want.
You can also use different theorem styles for different theorem environments,
one style for `theorem` and `corollary`, another style for
`remark`, and yet another style for `example`.

The documentation can be found on the web at http://www.ams.org/tex/amslatex.html.

The LaTeX Companion, 2nd Edition by Mittelbach, Goossens, Braams, Carlisle, and Rowley is a really cool book, having lots of information about all aspects of LaTeX.

**Warning:** The first edition is seriously out of date
about AMS-LaTeX. Use the second edition only.

`amsmath`- Defines extra environments for multiline displayed
equations, as well as a number of other enhancements for math
(includes the
`amstext`,`amsbsy`, and`amsopn`packages). `amstext`- Provides a
`\text`command for typesetting a fragment of text inside a display. `amsbsy`- Defines
`\boldsymbol`and`\pmb``poor man's bold' commands. `amsopn`- Provides
`\DeclareMathOperator`for defining new `operator names' like`\sin`and`\lim`. `amsthm`- Provides a
`proof`environment and extensions for the`\newtheorem`command. `amsintx`- Provides more descriptive command syntax for integrals and sums.
`amscd`- Provides a
`CD`environment for simple commutative diagrams (no support for diagonal arrows). `amsxtra`- Provides certain odds and ends such as
`\fracwithdelims`and`\accentedsymbol`. `upref`- Makes
`\ref`print cross-reference numbers always in an upright/roman font regardless of context. `amsfonts`- Loads extra fonts and symbols, including
boldface (
`\mathbf`), blackboard boldface (`\mathbb`), and fractur (`\mathfrac`). `amssymb`- Loads lots of extra symbols.

So the typical AMS-LaTeX document looks something like

\documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} % if you want the fonts \usepackage{amssymb} % if you want extra symbols \begin{document} Blah, blah, blah (the document). \end{document}

\newtheoremstyle{note}% name {3pt}% Space above {3pt}% Space below {}% Body font {}% Indent amount (empty = no indent, \parindent = para indent) {\itshape}% Thm head font {:}% Punctuation after thm head {.5em}% Space after thm head: " " = normal interword space; % \newline = linebreak {}% Thm head spec (can be left empty, meaning `normal')then

\theoremstyle{note} \newtheorem{note}{Note}defines a

Great! But your humble author found two questions with answers
found only in the source code `amsthm.dtx`.

- Suppose I don't want to set a specific ``space above'' and ``space below''
like in the example. What I want is the same space as the default theorem
environments. Answer:
`\topsep`. Make the first three lines in the example\newtheoremstyle{note}% name {\topsep}% Space above {\topsep}% Space below

and leave the rest unchanged, and you've got a theorem environment with the default spacing. - How do I take apart the bits of the theorem header to make a theorem
header in my favorite style? Answer
The [Thm head spec] argument follows a special convention: it is interpreted as the replacement text for an internal three-argument function

`\thmhead`, i.e., as if you were defining\renewcommand{\thmhead}[3]{...#1...#2...#3...}

but omitting the initial`\renewcommand{\thmhead}[3]`. The three arguments that will be supplied to`\thmhead`are the name, number, and optional note components. Within the replacement text you can (and normally will want to) use other special functions`\thmname`,`\thmnumber`, and`\thmnote`. These will print their argument if and only if the corresponding argument of`\thmhead`is nonempty. For example{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}

This would cause the theorem note`#3`to be printed with a preceding space and enclosing parentheses, if it is present, and if it is absent, the space and parentheses will be omitted because they are inside the argument of`\thmnote`.

Putting both together, here's an example of an `example` environment
I use for lecture notes.

\newtheoremstyle{example}{\topsep}{\topsep}% {}% Body font {}% Indent amount (empty = no indent, \parindent = para indent) {\bfseries}% Thm head font {}% Punctuation after thm head {\newline}% Space after thm head (\newline = linebreak) {\thmname{#1}\thmnumber{ #2}\thmnote{ #3}}% Thm head spec \theoremstyle{example} \newtheorem{example}{Example}[subsection]This empty body font argument sets the body in the normal (roman) font. This theorem head spec makes

\begin{example}[Normal Distributions]produce

Example 1.1.1 Normal Distributions

Written by Charles Geyer (charlie@stat.umn.edu) Dec 8, 1996. Revised July, 1, 2004.

Comments or corrections welcome.