# What does each AMS package do?

In my view, any document with a substantial amount of mathematics should load the packages from AMS-TeX. Hence, most of my document's preambles contain

\usepackage{amsmath, amsthm, amssymb, amsfonts}


(I could add to that the non-AMS mathtools, etc.). What do each of those packages do? Do I really need to list all of them, or do some of them load others? In particular, does any package load all of them, so that I can simply type

\usepackage{ams-everything}


shorter than the current list?

-
amssymb loads amsfonts. –  Gonzalo Medina Oct 20 '11 at 2:13

Most of the answer was extracted from the Introduction sections of the documentation of amsmath and amsthm:

1. amsmath provides miscellaneous enhancements for improving the information structure and printed output of documents containing mathematical formulas. Some of the features provided by this package are:

• The \DeclareMathOperator command (through the auxiliary package amsopn) 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.
• The \text command (through the auxiliary package amstext) for typesetting a fragment of text inside a display.
2. amsthm helps to define theorem-like structures; the introduction to the documentation gives a nice concise description of the package:

The amsthm package provides an enhanced version of LaTeX's \newtheorem command for defining theorem-like environments. The enhanced \newtheorem recognizes a \theoremstyle specification (as in Mittelbach's theorem package) and has a * form for defining unnumbered environments. The amsthm package also defines a proof environment that automatically adds a QED symbol at the end. AMS document classes incorporate the amsthm package, so everything described here applies to them as well.

If the amsthm package is used with a non-AMS document class and with the amsmath package, amsthm must be loaded after amsmath, not before.

3. amssymb provides an extended symbol collection. For example, after loading amssymb you have the following additional binary relation symbols: \barwedge, \boxdot, \boxminus, \boxplus, \boxtimes, \Cap, \Cup (and many more), the arrow \leadsto, and some other symbols such as \Box and \Diamond. Another useful feature is the \mathbb command to produce blackboard bold characters

Since amssymb internally loads amsfonts, it's enough to load the former.

As far as I know, there's not a single package loading amsmath, amsthm, and amssymb so all three of them will have to be loaded when using the standard classes (book, report, article).

If one of the document classes of the AMS-collection (amsbook, amsart) is being used, there's no need to load amsmath, or amsthm; amssymb will have to be explicitly loaded.

-
amsmath also defines \eqref and \tag –  Seamus Oct 20 '11 at 11:32
mathtools loads amsmath, corrects some bugs, and provides additional useful features, many of which are extensions of the existing amsmath syntax. (relevant also to the answer by @Werner.) –  barbara beeton Nov 22 '14 at 16:19

Here is the package dependency hierarchy in terms of the AMS-LaTeX bundle:

At the moment, there exists no (say) ams-all package that would load the entire bundle.

* This package has no dependencies.

-
Nice and concise answer. –  Bruno Le Floch Oct 20 '11 at 5:33
@Werner -- amsthm does not load amsfonts. it does check whether amsmath is loaded and makes certain decisions based on that answer (but does not load amsmath). –  barbara beeton Mar 10 '14 at 19:30
@barbarabeeton: Correct, of course. At the time (Oct 2011), could amsthm have had a dependency? –  Werner Mar 10 '14 at 19:43
@Werner -- i don't think amsthm ever had that dependency. (the last "meaningful" update was in 2004.) however, since amsthm is generated from amsclass.dtx, and the three class files also generated from that .dtx file do load amsmath, i can see how one might quite easily arrive at such a conclusion. –  barbara beeton Mar 10 '14 at 19:47