%\documentclass{book}

%\usepackage[leqno]{amsmath}

%\usepackage{cprotect}

%\usepackage{color}

%\usepackage{xcolor}

%\usepackage{graphics,array}

%\usepackage{url}

%\usepackage{hyperref}

%\usepackage{fancyvrb}%%%IN DASTUR BAEES MISHAVAD BETAN AZ \verb== BE ONVAN ARGUMAN  
%\VerbatimFootnotes%%%%% SAYER DASTURHA NIZ ESTEFADE KARD MANAND \footnote{} 


%\usepackage{amssymb}

%\usepackage{dtklogos}










%\begin{document}
\tableofcontents

\listoffigures

\listoftables

\chapter{Introduction}
\chapter{The Layout of The Page}
\chapter{3}
\chapter{4}
\chapter{Tabular Material}
\chapter{6}
\chapter{7}

\chapter{Higher Mathematics}\label{chap8}

Basic \LaTeX{} offers excellent mathematical typesetting
capabilities for straightforward
documents. However, when complex displayed equations or more
advanced
mathematical constructs are heavily used, something more is
needed. Although it
is possible to define new commands or environments to ease the
burden of typing
in formulas, this is not the best solution. The American
Mathematical Society
(AMS) provides a major package, \textsf{amsmath}, which makes
the preparation of mathematical
documents much less time-consuming and more
consistent.\footnote{This package has its foundations in
the macro-level extensions to \TeX{} known as .\AmS-\TeX.} It
forms the
core of a collection of packages known as .\AmS-\LaTeX{} [8] and
is the major subject
of this chapter. A useful book by George Gr\"atzer [60] also
covers these packages
in detail.

This chapter describes briefly, and provides examples of, a
substantial number
of the many features of these packages as well as a few closely
related packages;
it also gives a few pointers to other relevant packages. In
addition, it provides
some essential background on mathematical typesetting with
\TeX. Thus, it covers
some of standard \LaTeX's features for mathematical
typesetting and layout and
contains some general hints on how to typeset mathematical
formulas, though
these are not the main aims of this chapter.

It is also definitely not a comprehensive manual of good
practice for typesetting
mathematics with \LaTeX. Indeed, many of the examples are
offered up purely
for illustration purposes and, therefore, present neither good
design, nor good
mathematics, nor necessarily good \LaTeX{} coding.

Advice on how to typeset mathematics according to late
20th-century U.S.
practice can be found in Ellen Swanson's \emph{Math into Type}
[156]. Many details concerning
how to implement this advice using \TeX{} or, equally, standard
\LaTeX{} appear
in Chapters 16-18 of Donald Knuth's \emph{The \TeX book} [82].

To use the majority of the material described in this chapter,
you need to load
at least the \textsf{amsmath} package in the preamble of your document.
If other packages
are needed, they are clearly marked in the examples. Detailed
installation and
usage documentation is included with the individual packages.

\section{Introduction to \AmS-\LaTeX}\label{sec8.1}

The \AmS-\LaTeX{} project commenced in 1987 and three years
later \AmS-\LaTeX{} version
1.0 was released. This was the original conversion to \LaTeX{}
of the mathematical
capabilities in Michael Spivak's \AmS-\TeX{} by Frank Mittelbach
and Rainer
Sch\"opf, working as consultants to the American Mathematical
Society, with assistance
from Michael Downes of the AMS technical staff. In 1994, further
work was
done with David Jones. This work was coordinated by Michael
Dowp.es and the
packages have throughout been supported and much enhanced under
his direction
and the patronage of the AMS.\footnote{Some material in this
chapter is reprinted from the
documentation distributed with \AmS-\LaTeX{}
(with permIssion from the Amencan Mathematical Society).}

Michael would have been the\marginpar{\emph{Thanks to a great\\ guy!}} author of this chapter had he not
died in spring 2003. Much of the chapter is based on the documentation he
prepared for \AmS-\LaTeX{}; thus, what
you are reading is a particular and heartfelt tribute by its current
authors to the life and work of our dearest friend and colleague with whom we
shared many coding adventures in the uncharted backwaters of
\TeX.

A few options are recognized\marginpar{\emph{Avilable package\\Options}} by the \textsf{amsmath} package.
Most of these affect only detailed positioning of the ``lilnits'' on various types of
mathematical operators (Section~\ref{sec8.4.4}) or that of equation tags (Section~\ref{sec8.2.4}).

The following three options are often\marginpar{\emph{Extension packages}} supplied as global
document options, set on the \verb|\documentclass| command. They are, however,
also recognized when the \textsf{amsmath} package is loaded with the \verb|\usepackage| command.

\begin{description}

\item[{\tt reqno}](\textbf{default}) Place equation numbers
(tags) on the right.

\item[{\tt leqno}] place equation numbers (tags) on the
left.\footnote{When using the \AmS-\LaTeX{}
document classes, the default is {\tt leqno}.}

\item[{\tt fleqn}] Position equations at a fixed indent from the
left margin rather than
 centered in the text column.
 
\end{description}

The \AmS-\LaTeX{} distribution also\marginpar{\emph{Available\\ sub-packages}} contains components that can
be loaded in-dependently by the \verb|\usepackage| command. In particular, some features of the
\textsf{amsmath} package are also available in these smaller packages:

\begin{description}

\item[{\sf amsopn}] Provides \verb|\DeclareMathOperator| for defining new operator
names such as \verb|\Ker| and \verb|\esssup|.

\item[{\sf amstext}] Provides the \verb|\text| command for typesetting a fragment of text in the correct type size.

\end{description}

The following packages, providing functionality additional to
that in \textsf{amsmath}, must be loaded explicitly; they are listed here for completeness.

\begin{description}

\item[{\sf amscd}] Defines some commands for easing the
generation of commutative diagrams by introducing the CD environment (see Section~\ref{sec8.3.4} on
page 488). There is no support for diagonal arrows.

\item[{\sf amsthm}] Provides a method to declare theorem-like
structures and offers a proof environment. It is discussed in Section~\ref{sec3.3.3} on page l38.

\item[{\sf amsxtra}] Provides certain odds and ends that are
needed for historical compatibility, such as \verb|\fracwithdelims|, \verb|\accentedsymbol|, and
commands for placing accents as superscripts.

\item[{\sf upref}] Makes \verb|\ref| print cross-reference numbers in an upright/Roman font regardless of context.

\end{description}

The principal documentation for these packages is the \emph{User's Guide for the}
\textsf{amsmath} \emph{Package} (Version 2.0) [8].

The current \AmS-\LaTeX{} collection includes three document classes: \textsf{amsart},
\textsf{amsproc}, and \textsf{amsbook}, corresponding to
\LaTeX's \textsf{article,proc,} and\marginpar{\emph{The \AmS-\LaTeX\\document classes}}
\textsf{book}, respectively. They are designed to be used in the
preparation of manuscripts for submission to the AMS [6], but nothing prohibits their use for
other purposes. With these class files the amsmath package is automatically loaded, so that you
can start your document simply with \verb|\documentclass{amsart}|. These classes are not covered in
this book as they provide an interface similar to that provided by the \LaTeX{} standard
classes; refer to [6] for details of their use.

Some of the material in this chapter\marginpar{\emph{The AMSfonts\\collection}} refers to another
collection of packages from the American Mathematical Society, namely the AMSfonts distribution. These
packages, listed below, set up various fonts and commands for use in mathematical formulas.

\begin{description}

\item[{\sf amsfonts}] Defines the \verb|\mathfrak| and
\verb|\mathbb| commands and sets up the fonts\verb|msam| (extra
math symbols A), \verb|msbm| (extra math symbols B and
blackboard bold), \verb|eufm| (Euler Fraktur), extra sizes of \verb|cmmib|
(bold math italic and bold lowercase Greek), and \verb|cmbsy| (bold math symbols and bold script).

\item[{\sf amssymb}] Defines the names of the mathematical
symbols available with the AMSfonts collection. These commands are discussed in Section~\ref{sec8.9}. The package
automatically loads the \textsf{amsfonts} package.

\item[{\sf eufrak}] Sets up the fonts for the Euler Fraktur
letters (\verb|\mathfrak|), as discussed in Section~\ref{sec7.7.10}. This alphabet is also available from the
\textsf{amsfonts} package.

\item[{\sf eucal}] Makes \verb|\mathcal| use the Euler script
instead of the usual Computer Modern script letters, see Section~\ref{sec7.7.10} for details.

\end{description}
All of these packages recognize the \texttt{psamsionts} option,
which will set up \LaTeX{} to use the Y\&Y/Blue Sky Research version of these fonts in the
AMSfonts collection. This will be useful only if you have this version of the fonts
installed on your system; they are available on (TAN and are often available as the
default in modern distributions of \LaTeX. The principal piece of documentation
for these packages is the \emph{User's Guide to AMSFonts Version 2.2d} [9].
\\
\\
\textbf{ A few important warnings}
\\[6pt]
Many of the commands described in this chapter are fragile and
need to be \verb|\protected| in moving arguments (see Appendix~\ref{appB.1} on page
892). Thus, when strange error messages appear, a missing \verb|\protect| is a likely cause.

It is never a good idea to use shortcut codes for \LaTeX{}
environments. With the
\textsf{amsmath} display environments described in this chapter,
such shortcuts are alnotways
disastrous-don't do it! For closely related reasons, you will
also find that
verbatim material cannot be used within these environments. Here
are some examples
of declarations for disaster:
\begin{verbatim}
   \newenvironment{mlt}{\begin{multline}}{\end{multline}}
   \newcommand\bga{\begin{gather}}  \newcommand\ega{\end{gather}}\end{verbatim}
Both will produce errors of the form ``\verb|\begin{...}| ended
by \ldots{} ''. However, you can
define synonyms and variant forms of these environments as
follows:
\begin{verbatim}
   \newenvironment{mlt}{\multline}}{\endmultline}
   \newenvironment{longgather}{\allowdisplaybreaks\gather}}{\endgather}
\end{verbatim}
Note that these must have the command form of an existing
environment as the
last command in the ``begin-code'', and the corresponding
\verb|\end| \ldots\ command as the first
thing in the ``end-code''. See also Section~\ref{appA.1.3}, for more
details.

\section{Display and alignment structures for equations}\label{sec8.2}

The \textsf{amsmath} package defines several environments for
creating displayed mathematics.
These cover single- and multiple-line displays with single or
multiple
alignment points and various options for numbering equations
within displays.

Throughout this section the term ``equation'' will be used in a
very particular
way: to refer to a \emph{logical} distinct part of a
mathematical display that is frequently
numbered for reference purposes and is also labeled (commonly by
its number in
parentheses). Such labels are often called \emph{tags}.

The complete list of all the display environments you will need
for mathematical
typesetting is given in Table~\ref{tab8.1} on the next page; the majority
of these
environments are covered in this section, along with examples of
their use. Where
appropriate they have starred forms in which there is no
numbering or tagging of
the equations.
\begin{table}
\begin{tabular}{>{\ttfamily}l>{\ttfamily}l l}
equation&equation$*$&One line, one equation\\
multline&multline$*$&One unaligned multiple-line equation, one
equation number\\
gather&gather$*$&Several equations without alignment\\
align&align$*$&Several equations with multiple alignments\\
flalign&flalign$*$&Several equations: horizontally spread form
of align\\
split&&A simple alignment within a multiple-line equation\\
gathered&&A ``mini-page'' with unaligned equations\\
aligned&&A ``mini-page'' with multiple alignments
\end{tabular}
\caption{Display environments in the \textsf{amsmath} package}
\label{tab8.1}
\end{table}

In these examples of alignment environments, other commands from
the
\textsf{amsmath} package are also used. A detailed understanding
of how these work
is not necessary at this stage; an interested reader can turn to
later sections for
more information. The display width is the measure that defines
the right and left
margins (or extents) of a display; in the examples these extents
are indicated by
thin blue vertical rules at the right and left margins of the
display.

Except where noted, all examples in this chapter are typeset
with the mathematical
material centered and the equation numbers, or tags, on the
right (the
default settings for the \textsf{amsmath} package). When the
option \texttt{leqno} is specified for
the \textsf{amsmath} package or the document class, the equation
number tags will be
printed at the left side of the equation.
\begin{verbatim}
\usepackage[leqno]{amsmath}
\begin{equation*} (a+b)^2 = a^2+2ab+b^2 \end{equation*}
\[ \sin^2\eta+\cos^2\eta = 1 \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-1}}}\\
\end{huge}
\end{center}

To position the mathematics at a fixed indent from the left
margin, rather
than centered in the text column, you use the option
\texttt{fleqn}. You will then normally
need to set the size of the indent in the preamble. It is the
value of the
rubber length \verb|\mathindent|, which gets its default value
from the indentation of
a first-level list-which is probably not the value you want!
Observe the differences
between the next example and the previous example. In this
particular case, use
of the \texttt{reqno} option is redundant (as it is the
default), but it forces the equation
number to the right side regardless of what the document class
specifies.
\begin{verbatim}
\usepackage[fleqn,reqno]{amsmath}
\setlength\mathindent{lpc}
\begin{equation} (a+b)^2 = a^2+2ab+b^2 \end{equation}
\[ \sin^2\eta+\cos^2\eta = 1 \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-2}}}\\
\end{huge}
\end{center}

As later examples will show, as in standard \LaTeX, \verb|&| and
\verb|\\| are used for column and
line separation within displayed alignments. The details of
their usage change in the
\textsf{amsmath} environments, however (see the next section).

\subsection{Comparison with standard \LaTeX}\label{sec8.2.1}

Some of the multiple-line display environments allow you to
align parts of the
formula. In contrast to the original \LaTeX{} environments
\texttt{eqnarray} and \verb=eqnarray*=,the structures
implemented by the \textsf{amsmath} package use a slightly
different and
more straightforward method for marking the alignment points.
Standard \LaTeX's
\verb=eqnarray*= is similar to an \texttt{array} environment
with \verb|{rcl}| as the preamble
and, therefore, requires two ampersand characters indicating the
two alignment points.
In the equivalent \textsf{amsmath} structures there is only a
single alignment point (similar
to a \verb|{rl}| preamble), so only a single ampersand character
should be used,
placed to the left of the symbol (usually a relation) that
should be aligned.

The \texttt{amsmath} structures give fixed spacing at the
alignment points, whereas
the \texttt{eqnarray} environment produces extra space depending
on the parameter settings
for \texttt{array}. The difference can be seen clearly in the next
example, where the
same equation is typeset using the \texttt{equation},
\texttt{align}, and \texttt{eqnarray}
environments; the spaces in the \texttt{eqnarray} environment
come out too wide for conventional
standards of mathematical typesetting.
\begin{verbatim}
\usepackage{amsmath}
\begin{equation}
  x^2 + y^2 = z^2
\end{equation}
\begin{align}
  x^2 + y^2 &= z^2 \\
  x^3 + y^3 &< z^3
\end{align}
\begin{eqnarray}
  x^2 + y^2 &=& z^2 \\
  x^3 + y^3 &<& z^3
\end{eqnarray}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-3}}}\\
\end{huge}
\end{center}

As in standard \LaTeX, lines in an \textsf{amsmath} display are
marked with \verb|\\| (or the end of
the environment). Because line breaking in a mathematical
display usually
requires a thorough understanding of the structure of the
formula, it is commonly
considered to be beyond today's software capabilities. However,
one of the last
bigger projects undertaken by Michael Downes precisely tackled
this problem; it
resulted in the \textsf{breqn} package (see [42] for details).

Unlike \texttt{eqnarray}, the \textsf{amsmath} environments do
not, by default, allow page
breaks between lines (see Section~\ref{sec8.2.10}).

Another difference concerns the use of
\verb|\\[|\emph{dimension}\verb|]| or \verb|\\*| within
mathematical display environments. With \textsf{amsmath}, there must be
no space between
the \verb|\\| and the \texttt{[} or the \texttt{*}; otherwise,
the optional argument or star will
not be recognized. The reason is that brackets and stars are
very common in mathematical
formulas, so this restriction avoids the annoyance of having a
genuine bracket
belonging to the formula be mistaken for the start of the
optional argument.

Finally, there is one less obvious change that is very unlikely
to cause any
problems for users: in standard \LaTeX{} the parameter
\verb|\mathindent| is a non-rubber length,
whereas in \textsf{amsmath} it becomes a rubber length. The
reasons for, and consequences of, this
change are discussed in \texttt{amsmath.dtx}, the documented
source
of the \textsf{amsmath} package.

\subsection{A single equation on one line}\label{sec8.2.2}

The \texttt{equation} environment produces a single equation
with an automatically generated
number or tag placed on the extreme left or right according to
the option
in use (see Section~\ref{sec8.2.11}); \texttt{equation*} does the same
but omits a tag.\footnote{Standard
\LaTeX{} also has equation, but not \texttt{equation*}, as the
latter is similar to the standard
displayed math environment.}

Note that the presence of the tag does not affect the
positioning of the contents.
If there is not enough room for it on the one line, the tag will
be shifted up
or down: to the previous line when equation numbers are on the
left, and to the
next line when numbers are on the right.
\begin{verbatim}
\usepackage[leqno]{amsmath}
\begin{equation*}
  n^2 + m^2 = k^2
\end{equation*}
\begin{equation}
  n^p +m^p \neq k^p  \qquad p > 2
\end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-4}}}\\
\end{huge}
\end{center}

\subsection{A single equation on several lines: no alignment}\label{sec8.2.3}

The \texttt{multline} environment is a variation of the \texttt{equation}
environment used only
for equations that do not fit on a single line. In this
environment \verb|\\| must be used to mark
the line breaks, as they are not found automatically.

The first line of a \texttt{multline} will be aligned on an
indentation from the left
margin and the last line on the same indentation from the right
margin.\footnote{Never use
\texttt{multline} for a single·line equation because the effect
is unpredictable.} The
size of this indentation is the value of the length
\verb|\multlinegap|; thus, it can be changed
using \LaTeX's \verb|\setlength| and \verb|\addtolength|
commands.

If a \texttt{multline} contains more than two lines, each line
other than the first and
last is centered individually within the display width (unless
the option \texttt{fleqn} is
used). It is, however, possible to force a single line to the
left or the right by adding
either \verb|\shoveleft| or \verb|\shoveright| within that line.
A mul tline environment is a single (logical) equation and thus
has only a
single tag, the \texttt{multline*} having none; thus, none of
the individual lines can be
changed by the use of \verb|\tag| or \verb|\notag|. The tag, if
present, is placed flush right on
the last line with the default reqno option or flush left on the
first line when the \texttt{leqno}
option is used.
\begin{verbatim}
\usepackage{amsmath}
\begin{multline}
 \text{First line of a multline}    \\
 \text{Centered Middle line}        \\
 \shoveright{\text{A right Middle}} \\
 \text{Another centered Middle}     \\
 \text{Yet another centered Middle} \\
 \shoveleft{\text{A left Midale}}   \\
 \text{Last line of the multline}
\end{multline}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-5}}}\\
\end{huge}
\end{center}

The next example shows the effect of \verb|\multlinegap|. In the
first setting, the ``\emph{dy}''s
line up and make it appear that a tag is missing from the first
line of the
equation. When the parameter is set to zero, the space on the
left of the second
line does not change because of the tag, while the first line is
pushed over to the
left margin, thus making it clear that this is only one
equation.
\begin{verbatim}
\usepackage{amsmath}
\begin{multline} \tag{2}
  \sum_{t \in \mathbf{T}} \int_a^t
    \biggl\lbrace \int_a^t f(t - x)^2 \,
        g(y)^2 \,dx \biggr\rbrace \,dy \\
  =\sum_{t \notin \mathbf{T}} \int_t^a
    \biggl\lbrace g(y)^2 \int_t^a
      f(x)^2 \,dx \biggr\rbrace \,dy
\end{multline}

\setlength\multlinegap{0pt}
\begin{multline} \tag{2}
  \sum_{t \in \mathbf{T}} \int_a^t
    \biggl\lbrace \int_a^t f(t - x)^2 \,
        g(y)^2 \,dx \biggr\rbrace \,dy \\
  =\sum_{t \notin \mathbf{T}} \int_t~a
    \biggl\lbrace g(y)^2 \int_t^a
      f(x)^2 \,dx \biggr\rbrace \,dy
\end{multline}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-6}}}\\
\end{huge}
\end{center}

\subsection{A single equation on several lines: with alignment}\label{sec8.2.4}

When a simple alignment is needed within a single multiple-line
equation, the
\texttt{split} environment is almost always the best choice. It
uses a single ampersand
(\&) on each line to mark the alignment point.
\begin{verbatim}
\usepackage{amsmath}
\begin{equation*}
 \begin{split}
 (a + b)^4
   &= (a + b)^2 (a + b)^2 \\
   &= (a^2 + 2ab + b^2)
      (a^2 + 2ab + b^2)   \\
   &= a^4 + 4a^3b + 6a^2b^2 + 4ab^3 + b^4
 \end{split}
\end{equation*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-7}}}\\
\end{huge}
\end{center}

Because it is always used as the content of a single (logical)
equation, a \texttt{split}
does not itself produce any numbering tag and hence there is no
starred variant.
If needed, the outer display environment will provide any needed
tags.

Apart from commands such as \verb|\label| or \verb|\notag| that
produce no visible material, a
\texttt{split} structure should normally constitute the entire
body of the \texttt{equation} being
\texttt{split}. It can consist of either a whole
\texttt{equation} or \texttt{equation*} environment
or one whole line of a \texttt{gather} or \texttt{gather*}
environment; see Section~\ref{sec8.2.5}.

When the \texttt{centertags} option is in effect (the default),
the tag (and any other
material in the equation outside the \texttt{split}) is centered
vertically on the total
height of the material from the \texttt{split} environment. When
the \texttt{tbtags} option is
specified, the tag is aligned with the last line of the split
when the tag is on the
right, and with the first line of the split when the tag is on
the left.
\begin{verbatim}
\usepackage[tbtags]{amsmath}
\begin{equation}
 \begin{split}
  (a + b)^3 &= (a + b) (a + b)^2        \\
            &= (a + b)(a^2 + 2ab + b^2) \\
            &= a^3 + 3a^2b + 3ab^2 + b^3
 \end{split}
\end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-8}}}\\
\end{huge}
\end{center}

In the next example the command \verb|\phantom| is used to
adjust the horizontal positioning. It is
first used in the preamble to define an ``invisible relation
symbol''
of width equal to that of its argument (in this case, =). Within
the example it
is used to align certain lines by starting them with a
``phantom, or invisible, subformula''
(see Section~\ref{sec8.7.2} on page 503). The empty pair of braces
\verb|{}| is equivalent
to \verb|\mathord{}| and provides an invisible zero-width
``letter'' that is needed to achieve the
correct spacing of +\emph{h} (without the \verb|{}| it would
look like this: +\emph{h}).
\begin{verbatim}
\usepackage{amsmath}
\newcommand\relphantom[1] {\mathrel{\phantom{#1}}}
\newcommand\ve{\varepsilon} \newcommand\tve{t_{\varepsillon}}
\newcommand\vf{\varphi} \newcommand\yvf{y_{\varphi}}
\newcommand\bfE{\mathbf{E}}
\begin{equation} \begin{split}
  f_{h, \ve}(x, y)
&= \ve \bfE_{x, y} \int_0^{\tve} L_{x,\yvf(\ve u)} \vf(x) \,du
\\
    &=h \int L_{x,z} \vf(x) \rho_x(dz)
    &\relphantom{=} {} + h   \biggl[
       \frac{1}{\tve}
       \biggl( \bfE_{y} \int_0^{\tve} L_{x, y^x(s)} \vf(x) \,ds
- \tve \int L_{x, z} \vf(x) \rho_x(dz)    \biggr) + \\    &\relphantom{=} \phantom{{} + h \biggl[ }
      \frac{1}{\tve}
      \biggl( \bfE_{y} \int_0^{\tve} L_{x, y^x(s)} \vf(x) \,ds
               - \bfE_{x, y} \int_0^{\tve} L_{x, \yvf(\ve s)}
\vf(x) \,ds \biggr) \biggr]\end{split} \end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-9}}}\\
\end{huge}
\end{center}
Note that the equation number tag has been moved to the line
below the displayed
material. Although this does not seem to be a very wise
decision, it is as far as the
automated expertise built into the system at this stage can take
us.

\subsection{Equation groups without alignment}\label{sec8.2.5}

The \texttt{gather} environment is used to put two or more
equations into a single display
without alignment between the equations. Each equation is
separately centered
within the display width and has its individual number tag, if
needed. Each line of
a \texttt{gather} is a single (logical) equation.
\begin{verbatim}
\usepackage{amsmath}
\begin{gather*}
  (a + b)^2 = a^2 + 2ab + b^2         \\
  (a + b) \cdot (a - b) = a^2 - b^2
\end{gather*}
\end{verbatim}
\begin{gather*}
(a + b)^2 = a^2 + 2ab + b^2 \\
(a + b) \cdot (a - b) = a^2 - b^2
\end{gather*}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-10}}}\\
\end{huge}
\end{center}

Use \verb|\notag| within the logical line to suppress the
equation number for that
line; or use \texttt{gather*} to suppress all equation numbers.
\begin{verbatim}
\usepackage{amsmath}
\begin{gather}
  D(a,r) \equiv \{ z \in \mathbf{C}
         \colon |z - a| < r \} \notag \\
  \operatorname{seg} (a, r) \equiv
    \{ z \in \mathbf{C} \colon
      \Im z < \Im a, \ |z - a| < r \}  \\
    C (E, \theta, r) \equiv
    \bigcup_{e \in E} c (e, \theta, r)
\end{gather}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-11}}}\\
\end{huge}
\end{center}

\subsection{Equation groups with simple alignment}\label{sec8.2.6}

The \texttt{align} environment should be used for two or more
equations in a single
display with vertical alignment. The simplest form uses a single
ampersand (\&) on
each line to mark the alignment point (usually just before a
Relation symbol).
\begin{verbatim}
\usepackage{amsmath}
\begin{align}
  (a + b)^3 &= (a + b) (a + b)^2        \\
            &= (a + b)(a^2 + 2ab + b^2) \\
            &= a^3 + 3a^2b + 3ab^2 + b^3
\end{align*}
\begin{align}
  x^2 + y^2 & = 1              \\
  x         & = \sqrt{1-y^2}
\end{align*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-12}}}\\
\end{huge}
\end{center}

\subsection{Multiple alignments: \texttt{align} and \texttt{flalign}}\label{sec8.2.7}

An \texttt{align} environment can include more than one
alignment point. The layout contains as many column-pairs as necessary and is similar to an
\texttt{array} with preamble of the form \verb|{rIrl}...}|. If it consists of \emph{n} such
\texttt{rl} column-pairs, then the number of ampersands per line will be \emph{2n - 1}: one
ampersand for alignment within each column-pair giving \emph{n}; and \emph{n - 1} ampersands to
separate the column-pairs.

Within the \texttt{align} environment, the material is spread
out evenly across the display width. All extra (or white) space within the line is
distributed equally ``between consecutive \texttt{rl} column-pairs'' and the two display
margins.
\begin{verbatim}
\usepackage{amsmath}
This example has two column-pairs.
\begin{align}    \text{Compare}
x^2 + y^2 &= 1                &
x^3 + y^3 &= 1               \\
x         &= \sqrt {1-y^2}    &
x         &= \sqrt[3]{1-y^3}
\end{align}
This example has three column-pairs.
\begin{align}
    x     &= y     & X  &= Y  &
      a   &= b+c   \\
    x'    &= y'    & X' &= Y' &
      a'  &= b      \\
  x + x'  &= y + y'           &
  X + X'   &= Y + Y' & a'b &= c'b
\end{align}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-13}}}\\
\end{huge}
\end{center}

In the variant \texttt{flalign} the layout is similar except
that there is no space at the margins. As a result, in the next example, Equation (3) now
fits on a single line (while in Equation (2) this was still not possible).
\begin{verbatim}
\usepackage{amsrnath}
This example has two column-pairs.
\begin{flalign}  \text{Compare }
  x^2 + y^2 &= 1             &
  x^3 + y^3 &= 1             \\
  x       &= \sqrt {1-y^2}   &
  x       &= \sqrt[3]{1-y^3}
\end{flalign}
This example has three column-pairs.
\begin{flalign}
    x     &= y      & X &= Y  &
      a   &= b+c              \\
    x'    &= y'     & X'&= Y' &
      a'  &= b                \\
  x + x'  &= y + y'           &
  X + X'  &= Y + Y' & a'b &= c'b
\end{flalign}
\end{verbatim}

In both cases the minimum space between column-pairs can be set
by changing
\verb|\minalignsep|. Its default value is 10pt but,
misleadingly, it is not a length
parameter. Thus, it must be changed by using
\verb|\renewcommand|. If we set it to zero for the
first part of the example, Equation (2) gets squeezed onto a
single line; if
we set it to 15 pt later, the label (3) gets forced onto a line
by itself.

Unfortunately, there is no such simple parametric method for
controlling the
spacing at the margins.
\begin{verbatim}
\usepackage{amsmath}
This example has two column-pairs.
\renewcommand\minalignsep{0pt}
\begin{align} \text{Compare }
  x^2 + y^2 &= 1               &
  x^3 + y^3 &= 1               \\
  x         &= \sqrt {1-y^2}    &
  x         &= \sqrt[3]{1-y^3}
\end{align}
This example has three column-pairs.
\renewcommand\minalignsep{15pt}
\begin{flalign}
    x      &= y & X &= Y         &
      a    &= b+c               \\
    x'     &= y' & X'&= Y'       &
      a'   &= b                  \\
  x + x'   &= y + y'             &
  X + X'   &= Y + Y' & a'b &= c'b
\end{flalign}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-15}}}\\
\end{huge}
\end{center}

The next example illustrates a very common use for
\texttt{align}. Note the use of
\verb|\text| to produce normal text within the mathematical
material.
\begin{verbatim}
\usepackage{amsmath}
\renewcommand\minalignsep{2em}
\begin{align}
  x &= y           && \text{by hypothesis} \\
      x' &= y'     && \text{by definition} \\
  x + x' &= y + y' && \text{by Axiom 1}
\end{align}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-16}}}\\
\end{huge}
\end{center}

\subsection{Display environments as mini-pages}\label{sec8.2.8}

All the environments described so far produce material set to
the full display
width. A few of these environments have also been adapted to
provide self-contained
alignment structures, as if they were set as the only content of
a \texttt{minipage}
environment whose size, in both directions, is determined by its
contents. The
environmnt names are changed only slightly: to \texttt{aligned}
and \texttt{gathered}. Note
that an \texttt{aligned} environment avoids unnecessary space on
the left and right; thus,
it mostly resembles the \texttt{flalign} environment.

Like \texttt{minipage}, these environments take an optional
argument that specifies
the vertical positioning with respect to the material on either
side. The default
alignment of the box is centered (\verb|[c]|). Of course, like
\texttt{split} they are used only
within equations and they never produce tags.
\begin{verbatim}
\usepackage{amsmath}
\begin{equation}
\begin{aligned}
  x^2 + y^2 &= 1               \\
  x         &= \sqrt{1-y^2}    \\
 \text{and also }y &= \sqrt{1-x^2}
\end{aligned}               \qquad
\begin{gathered}
 (a + b)^2 = a^2 + 2ab + b^2    \\
 (a + b) \cdot (a - b) = a^2 - b^2
\end{gathered}      \end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-17}}}\\
\end{huge}
\end{center}

The same mathematics can also be typeset, albeit not very
beautifully, using
different vertical alignments for the environments.
\begin{verbatim}
\usepackage{amsmath}
\begin{equation}
\begin{aligned}[b]
  x^2 + y^2 &= 1               \\
  x         &= \sqrt{1-y^2}    \\
 \text{and also }y &= \sqrt{1-x^2}
\end{aligned}               \qquad
\begin{gathered}[t]
 (a + b)^2 = a^2 + 2ab + b^2    \\
 (a + b) \cdot (a - b) = a^2 - b^2
\end{gathered}      \end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-18}}}\\
\end{huge}
\end{center}

They may be used in many ways--for example, to do some creative
and useful
grouping of famous equations. Incidentally, these mini-page
display environments
are among the very few from \texttt{amsmath} that are robust
enough to be used inside
other definitions, as in the following example.
\begin{verbatim}
\usepackage{amsmath,bm}
\newenvironment{rcase}
    {\left.\begin{aligned}}
    {\end{aligned}\right\rbrace}
\begin{equation*}
 \begin{rcase}
 \bm{B}' &= -c\nabla\times\bm{E}          \\
 \bm{E}' &=c\nabla\times\bm{B} - 4\pi\bm{J}\,
 \end{rcase}
 \quad \text {Maxwell's equations}
\end{equation*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-19}}}\\
\end{huge}
\end{center}

You can also use the \verb|\minalignsep| command to control the
space between
pairs of columns in an \verb|aligned| environment, as shown in
the next example.
\begin{verbatim}
\usepackage{amsmath}
\renewcommand\minalignsep{5pt}
\begin{equation} \begin{aligned}
  V_j &= v_j                      &
  X_i &= x_i - q_i x_j            &
      &= u_j + \sum_{i\ne j} q_i \\
  V_i &= v_i - q_i v_j            &
  X_j &= x_j                      &
  U_i &= u_i
\end{aligned} \end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-20}}}\\
\end{huge}
\end{center}

\subsection{Interrupting displays: \texttt{$\backslash$intertext}}\label{sec8.2.9}

The \verb|\intertext| command is used for a short passage of
text (typically at most a few lines)
that appears between the lines of a display alignment. Its
importance
stems from the fact that all the alignment properties are
unaffected by the text,
which itself is typeset as a normal paragraph set to the display
width; this alignment
would not be possible if you simply ended the display and then
started a
new display after the text. This command may appear only
immediately after a \verb|\\| or \verb|\\*|
command.

Here the words ``and finally'' are outside the alignment, at the
left margin, but
all three equations are aligned.
\begin{verbatim}
\usepackage{amsmath}
\begin{align}
  A_1 &= N_O (\lambda ; \Omega')
         - \phi ( \lambda ; \Omega')     \\
  A_2 &=     \phi (\lambda ; \Omega')
\phi (\lambda ; \Omega)     \\
\intertext{and finally}
  A_3 &= \mathcal{N} (\lambda ; \omega)
\end{align}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-21}}}\\
\end{huge}
\end{center}

\subsection{Vertical space and page breaks in and around displays}\label{sec8.2.10}

As is usual in \LaTeX, the optional argument
\verb|\\[|\emph{dimension}\verb|]| gives extra vertical
space between two lines in all amsmath display environments
(there\marginpar{\emph{Space within the\\display\ldots}} must be no space between the
\verb|\\| and the [ character delimiting the optional argument).
The vertical spaces before and
after each display\marginpar{\emph{\ldots and around the \\display}} environment are controlled by the following
rubber lengths, where the values in
parentheses are those for \verb|\normalsize| with the (default)
\texttt{10pt} option in the standard \LaTeX{}
classes:\footnote{These defaults are very much improved by the
\AmS-\LaTeX{} document classes.}

\begin{description}

\item[\texttt{$\backslash$abovedisplayskip},\texttt{$\backslash$belowdisplayskip}]
The normal
vertical space added
above and below a mathematical display (default \texttt{10pt
plus 2pt minus 5pt}).

\item[\texttt{$\backslash$abovedisplayshortskip},
\texttt{$\backslash$belowdisplayshortskip}]The
(usually smaller) vertical space added above and below a ``short
display'' (\texttt{0pt plus 3pt}
and \texttt{6pt plus 3pt minus 3pt}, respectively). A short
\emph{display} is one that starts to the
right of where the preceding text line ends.

\end{description}

If you look closely, you can observe the results of these space
parameters in the
following example. The second equation is surrounded by less
space because the
text in front of it does not overlap with the formula.
\begin{verbatim}
\usepackage{amsmath}
We now have the following:
\[  X = a \qquad  a = c \]
and thus we have
\begin{equation}  X = c \end{equation}
And now we don't get much space
around the display!
\end{verbatim}
We now have the following:
\[ X = a \qquad a = c \]
and thus we have
\begin{equation} X = c \end{equation}
And now we don't get much space
around the display!
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-22}}}\\
\end{huge}
\end{center}

Since the four parameters \verb|\abovedisplay..| and
\verb|\belowdisplay..| depend on the current
font size, they cannot be modified in the preamble of the
document
using \verb|\setlength|. Instead, they must be changed by
modifying \verb|\normalsize|,
\verb|\small| , and similar commands---a job usually done in a
document class.

Automatic page breaking before and after each display
environment is controlled by the penalty
parameters \verb|\predisplaypenalty|\marginpar{\emph{Page breaks around\\the display\ldots}} (for breaking before a
display; default \verb|10000|, i.e., no break allowed) and
\verb|\postdisplaypenalty| (for breaking
after a display, default \verb|0|; i.e., breaks allowed). The
defaults are already
set in standard \LaTeX{} and are not changed by
\textsf{amsmath}.

Unlike standard \LaTeX, the \textsf{amsmath} display
environments do not, by default,
allow page breaks between\marginpar{\emph{and within the\\display}} lines of the display. The reason for
this behavior is
that correct page breaks in such locations depend heavily on the
structure of the
display, so they often require individual attention from the
author.

With \textsf{amsmath} such individual control of page breaks is
best achieved via the
\verb|\displaybreak| command, but it should be used only when
absolutely necessary
to allow a page break within a display. The command must go
before the \verb|\\| at
which a break may be taken, and it applies only to that line and
can be used only
within an environment that produces a complete display. Somewhat
like standard
\LaTeX's \verb|\pagebreak| (see Section~\ref{sec6.2.2} in [104]),
\verb|\displaybreak| takes an optional
integer as its argument, with a value ranging from zero to four,
denoting the desirability
of the page break: \verb|\displaybreak[0]| means ``it is
permissible to break
here'' without encouraging a break; \verb|\displaybreak| with no
optional argument
is the same as \verb|\displaybreak[4]| and forces a break. This
command cannot be
used to discourage or prevent page breaks. Note that it makes no
sense to break
within a ``mini-page display'', as those environments will never
be split over two
pages.

This kind of adjustment is fine-tuning, like the insertion of
line breaks and
page breaks in text. It should therefore be left until your
document is nearly
finalized. Otherwise, you may end up redoing the fine-tuning
several times to
keep up with changing document content.

The command \verb|\allowdisplaybreaks|, which obeys the usual
\LaTeX{} scoping
rules, is equivalent to putting \verb|\displaybreak| before
every line end in any
display environment within its scope; it takes the same optional
argument as
\verb|\displaybreak|. Within the scope of an
\verb|\allowdisplaybreaks| command, the
\verb|\\*| command can be used to prohibit a page break.

The effect of a \verb|\displaybreak| command overrides both the
default and the effect of an
\verb|\allowdisplaybreaks|.

Many authors wisely use empty lines between major structures in
the document
source\marginpar{\emph{Be wary of empty\\lines around\\display}} to make it more readable. In most cases, such as before
and
after a heading, these empty lines do no harm. This is not
universally true,
however. Especially around and within mathematical display
environments, one
has to be quite careful: a blank line in front of such an
environment will
produce unexpected formatting because the empty line is in
effect converted
into a paragraph containing no text (and so containing just the
invisible paragraph
indentation box). The following display is consequently
surrounded by
spaces of size \verb|\.. displayshortskip|. Thus, the combined
result is quite a lot of (possibly
too much) space before the display (a whole empty line plus the
\verb|\abovedisplayshortskip|) and a very small amount of space
after the display, as this example
shows.
\begin{verbatim}
\usepackage{amsmath}
Empty line before display:

\[ a \neq b \]

In both cases, too much space before! \ldots

\begin{equation} a \neq b \end{equation}

\ldots\ and not a lot of space after!
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-23}}}\\
\end{huge}
\end{center}

With the \textsf{amsmath} package loaded, this behavior is
exhibited by all the display
math environments. Strangely enough, with standard \LaTeX{} the
\verb|\[| case comes out looking
more or less right.
\begin{verbatim}
Empty line before display:

\[ a \neq b \]

Enough space now, but don't rely on it!

\begin{equation} a \neq b \end{equation}

Less space after in this case!
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-24}}}\\
\end{huge}
\end{center}
To summarize, do not use empty lines around display
environments!

\subsection{Equation numbering and tags}\label{sec8.2.11}

In \LaTeX{} the tags for equations are typically generated
automatically and contain
a printed representation of the \LaTeX{} counter
\texttt{equation}. This involves three processes;
setting (normally by incrementing) the value of the
\texttt{equation} counter; formatting
the tag; and printing it in the correct position.

In practice, the first two processes are nearly always linked.
Thus, the value of
the \texttt{equation} counter is increased only when a tag
containing its representation
is automatically printed. For example, when a mathematical
display environment
has both starred and unstarred forms, the unstarred form
automatically tags each
logical \texttt{equation} while the starred form does not. Only
in the unstarred form is the
value of the \texttt{equation} counter changed.

Within the unstarred forms the setting of a tag (and the
incrementing of the
counter value) for any particular logical equation can be
suppressed by putting
\verb|\notag| (or \verb|\nonumber|\footnote{The command
\verb=\notag= is mterchangeable
with \verb=\nonumber=} ) \emph{before} the
\verb|\\|. You can override the default
automatic tag
with one of your own design (or provide a new one) by using the
command \verb|\tag|
\emph{before} the \verb|\\|. The argument of this command can be
arbitrary normal text that is
typeset (within the normal parentheses) as the tag for that
equation.

Note that the use of \verb|\tag| suppresses the incrementing of
the counter value. Thus, the default
tag setting is only visually the same as
\verb|\tag{\theequation}|;
they are not equivalent forms. The starred form, \verb|\tag*|,
causes the text in its argument to be
typeset without the parentheses (and without any other material
that might otherwise be added with a particular document class).\begin{verbatim}
\begin{align}
  x^2+y^2 &= z^2 \label{eq:A}           \\
  x^3+y^3 &= z^3 \notag                 \\
  x^4+y^4 &= r^4 \tag{$*$}              \\
  x^5+y^5 &= r^5 \tag*{$*$}             \\
  x^6+y^6 &= r^6 \tag{\ref{eq:A}$'$}    \\
      A_1 &= N_0 (\lambda ; \Omega')
           - \phi ( \lambda ; \Omega')  \\
      A_2 &= \phi (\lambda ; \Omega')
          \, \phi (\lambda ; \Omega)
          \tag*{ALSO (\theequation)}    \\
      A_3 &= \mathcal{N} (\lambda ; \omega)
\end{align}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-25}}}\\
\end{huge}
\end{center}

Notice this example's use of the \verb|\label| and \verb|\ref|
commands to provide some kinds of
``relative numbering'' of equations.

To facilitate the creation of cross-references to equations, the
\verb|\eqref| command (used in
Example 8-2-29 on page 485)\marginpar{\emph{Referencing \\equations}}, automatically adds the parentheses
around the equation number, adding an italic correction if
necessary. See also
Section~\ref{sec2.4} on page 66 for more general solutions to managing
references.

\subsection{Fine-tuning tag placement}\label{sec8.2.12}

Optimal placement of equation number tags can be a rather
complex problem in
multiple-line displays. These display environments try hard to
avoid overprinting
an equation number on the equation contents; if necessary, the
number tag is
moved down or up, onto a separate line. The difficulty of
accurately determining
the layout of a display can occasionally result in a tag
placement that needs further
adjustment. Here is an example of the kind of thing that can
happen, and a
strategy for fixing it. The automatic tag placement is clearly
not very good.
\begin{verbatim}
\usepackage{amsmath}
\begin{equation} \begin{split}
  \lvert I_2 \rvert &=    \left\lvert \int_{0}^T \psi(t)
     \left\{  u(a, t) - \int_{\gamma(t)}^a \frac{d
       \theta}{k}
     (\theta, t) \int_{a}^\theta c (\xi) u_t (\xi, t) \,d\xi
     \right\} dt \right\rvert         \\
                  &\le C_6 \Biggl\lvert
     \left\lvert f \int_\Omega \left\lvert
         \widetilde{S}^{-1,0}_{a,-} W_2(\Omega,  \Gamma_l)
    \right\rvert\ \right\rvert
     \left\lvert \lvert u \rvert
\overset{\circ}{\to} W_2^{\widetilde{A}} (
\Omega; \Gamma_r,T)
\right\rvert \Biggr\rvert
\end{split} \end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-26}}}\\
\end{huge}
\end{center}

A fairly easy way to improve the appearance of such an equation
is to use an
\texttt{align} environment with a \verb|\notag| on the first equation
line:
\begin{verbatim}
\usepackage{amsmath}
\begin{equation} \begin{split}
\lvert I_2 \rvert &= \left\lvert \int_{0}^T
\psi(t)
\left\{ u(a, t) - \int_{\gamma(t)}^a \frac{d 
\theta}{k}
(\theta, t) \int_{a}^\theta c (\xi) u_t (
\xi, t) \,d\xi
\right\} dt \right\rvert \notag \\
\\
&\le C_6 \Biggl\lvert
\left\lvert f \int_\Omega \left\lvert
\widetilde{S}^{-1,0}_{a,-} W_2(\Omega,
\Gamma_l)
\right\rvert\ \right\rvert
\left\lvert \lvert u \rvert
\overset{\circ}{\to} W_2^{\widetilde{A}} (
\Omega; \Gamma_r,T)
\right\rvert \Biggr\rvert
\end{split} \end{equation}
\end{verbatim}

A \verb|\raisetag| command is available that will further adjust
the vertical position of the
current equation number but \emph{only} when it has been
automatically
moved from its ``normal position''. For example, to move such a
tag upward\footnote{The description
in the file \texttt{amsmath.dtx} seems to indicate that a
positive value should always
move the tag toward the ``normal position''---that is, downward
for tags on the left, but the
current
implementation does not work in this way.} by
6pt, you could write \verb|\raisetag{6pt}|. You can try
adjusting the above equation with
\verb|\raisetag| but the correct value is not easy to divine: a
value of \verb|1.2\baselineskip|
looks about right!

A more sensible use is shown in the next example, where
\verb|\raisetag| with a negative argument is
used to move the tag on the left down into the display.
\begin{verbatim}
\usepackage[leqno]{amsmath}
\begin{gather}   \raisetag{-10pt}
  \text{The sign function: \ }
    \mathcal{S}(x) =  \begin{cases}
                         -1  & x < 0 \\
                          0  & x = 0 \\
                          1  & x > 0
                       \end{cases}
\end{gather}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-28}}}\\
\end{huge}
\end{center}

Here we used a \texttt{gather} environment with a single line
because the \texttt{equation}
environment is (the only) one within which \verb|\raisetag|
unfortunately has no effect (it is coded
using low-level \TeX).

These kinds of adjustment constitute ``fine-tuning'', like line
breaks and page
breaks in text. They should therefore be left until your
document is nearly finalized.
Otherwise, you may end up redoing the fine-tuning several times
to keep up
with changing document content.

\subsection{Subordinate numbering sequences}\label{sec8.2.13}

The \textsf{amsmath} package provides a \texttt{subequations}
environment to support ``equation
sub-numbering'' with tags of the form (2a), (2b), (2c), and so
on. All the tagged
equations within it use this sub-numbering scheme based on two
normal \LaTeX{}
counters: \texttt{parentequation} and \texttt{equation}.

The next example demonstrates that the tag can be redefined to
some extent,
but note that the redefinition for \verb|\theequation| must
appear within the
\texttt{subequations} environment! (Appendix~\ref{appA1.4} discusses
counter manipulations.)
\begin{verbatim}
\usepackage{amsmath}
\begin{subequations} \label{eq:1}
\begin{align} f  &= g      \label{eq:1A} \\
              f' &= g'     \label{eq:1B} \\
    \mathcal{L}f &= \mathcal{L}g \label{eq:1C}
\end{align}
\end{subequations}
\begin{subequations} \label{eq:2}
\renewcommand\theequation{\theparentequation
\roman{equation}}
\begin{align}  f  &= g     \label{eq:2A} \\
               f' &= g'    \label{eq:2B} \\
    \mathcal{L}f  &= \mathcal{L}g + K  \label{eq:2C}
\end{align}
\end{subequations}
Note the relationship between~\eqref{eq:1}
and~\eqref{eq:2}: only~\ref{eq:1C} and~\ref{eq:2C} differ.
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-2-29}}}\\
\end{huge}
\end{center}

The \texttt{subequations} environment must appear \emph{outside}
the displays that it affects.
Also, it should not be nested within itself. Each use of this
environment
advances the ``main'' equation counter by one. A \verb|\label|
command within the
\texttt{subequations} environment but outside any individual
(logical) equation will produce
a \verb|\ref| to the parent number (e.g., to 2 rather than 2i).

\subsection{Resetting the equation counter}\label{sec8.2.14}

It is fairly common practice to have equations numbered within
sections or chapters,
using tags such as (1.1), (1.2), ... , (2.1), (2.2), .... With
amsmath this can easily
be set up by using the declaration
\verb|\numberwithin|.\footnote{lAs the name implies,
\verb=\numberwithin= can be applied to any pair of
counters, but the results may not be
satisfactory in all cases because of potential complications.
See the discussion of the
\verb=\@addtoreset= command in Appendix~\ref{appA.1.4}.}

For example, to get compound equation tags including the section
number,
with the equation counter being automatically reset for each
section, put this declaration
in the preamble: \verb|\numberwithin{equation}{section}|.

\section{Matrix-like environments}\label{sec8.3}

The \textsf{amsmath} package offers a number of matrix-like
environments, all of which
are similar to \texttt{array} in syntax and layout. Thinking of
complex mathematical layouts
in this way is a useful exercise, as quite a wide variety of
two-dimensional
mathematical structures and table-like layouts can be so
described.

Three of these environments replace old commands that are kept
well hidden
in standard \LaTeX; \texttt{cases} (discussed in the next
section)\marginpar{\emph{Old commands\\disabled}} and \texttt{matrix} and
\texttt{pmatrix} (discussed in the section after that). Because
these old command forms use a
totally different notation, they are not truly part of \LaTeX{}
and they cannot be mixed
with the environment forms described here. Indeed,
\textsf{amsmath} will produce an
explanatory error message if one of the old commands is used
(see page 907).
If, contrariwise, you make the mistake of using the
\textsf{amsmath} environment forms
without loading that package, then you will most probably get
this error message:
\verb|``Misplaced alignment tab character &''|.

\subsection{The \texttt{cases} environment}\label{sec8.3.1}

Constructions like the following, where a single equation has a
few variants, are
very common in mathematics. To handle these constructions,
\textsf{amsmath} provides
the \texttt{cases} environment. It produces a decorated array
with two columns, both left
aligned.
\begin{verbatim}
\usepackage{amsmath}
\begin{equation}     P_{r - j} =
 \begin{cases}
    0   &   \text{if $r - j$ is odd,} \\
    r! \, (-1)^{(r - j)/2}
        &   \text{if $r - j$ is even.}
 \end{cases}             \end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-1}}}\\
\end{huge}
\end{center}
Notice the use of \verb|\text| and the ``embedded math mode'' in
the text strings. With the help of
the \texttt{aligned} environment, other environments similar to
cases can be defined, as in Example
8-2-19 on page 478.

\subsection{The matrix environments}\label{sec8.3.2}

The matrix environments are similar to \LaTeX's \texttt{array},
except that they do not have
an argument specifying the formats of the columns. Instead, a
default format is
provided: up to 10 centered columns. Also, the spacing differs
slightly from the
default in \texttt{array}. The example below illustrates the
matrix environments \texttt{matrix},
\texttt{pmatrix}, \texttt{bmatrix}, \texttt{Bmatrix},
\texttt{vmatrix}, and
\texttt{Vmatrix}.\footnote{Note the warning above about possible
problems when using \texttt{matrix}
and \texttt{pmatrix}.}
\begin{verbatim}
\usepackage{amsmath}
\begin{gather*}
  \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix}    \quad
  \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} \\
  \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \quad
  \begin{Bmatrix} 1 & 0 \\ 0 & -1 \end{Bmatrix} \\
  \begin{vmatrix} a & b \\ c & d \end{vmatrix}  \quad
  \begin{Vmatrix} i & 0 \\ 0 & -i \end{Vmatrix}
\end{gather*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-2}}}\\
\end{huge}
\end{center}

The maximum number of columns in a matrix environment is
determined by
the counter \texttt{MaxMatrixCols}, which you can change using
\LaTeX's standard counter
commands. As in standard arrays, the amount of space between the
columns
is given by the value of \verb|\arraycolsep|, but no space is
added on either side of the array.
With more columns \LaTeX{} has to work a little harder and needs
slightly
more resources. However, with today's typical \TeX{}
implementations such limits
are less important, so setting it to 20 or even higher is
possible without a noticeable
change in processing speed.
\begin{verbatim}
\usepackage{amsmath}
\setcounter{MaxMatrixCols}{20}
\[
 \begin{Vmatrix}
  \,a&b&c&d&e&f&g&h&i&j &\cdots\,{} \\
    &a&b&c&d&e&f&g&h&i  &\cdots\,{} \\
    & &a&b&c&d&e&f&g&h  &\cdots\,{} \\
    & & &a&b&c&d&e&f&g  &\cdots\,{} \\
    & & & &\ddots&\ddots&\hdotsfor[2]{5}\,{}
  \end{Vmatrix} \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-3}}}\\
\end{huge}
\end{center}

This example also demonstrates use of the command
\verb|\hdotsfor| to produce a row of dots in a
matrix, spanning a given number of columns (here 5). The spacingof the dots can be varied by using the optional parameter (here
2) to specify a
multiplier for the default space between the dots; the default
space between dots
is 3 math units (see Appendix~\ref{appA.1.5}). The thin space and the
brace group \verb|\,{}| at the end of
each row simply make the layout look better; together they
produce
two thin spaces, about 6mu or 1/3 em. (Spacing in formulas is
discussed in more
detail in Section~\ref{sec8.7.6} on page 507.)

To produce a small matrix suitable for use in text, use the
\texttt{smallmatrix} environment.
Note that the text lines are not spread apart even though the
line before
the small matrix contains words with descenders.
\begin{verbatim}
\usepackage{amsmath}
To show the effect of the matrix on surrounding
lines inside a paragraph, we put it here:
  $ \left( \begin{smallmatrix}
              1 & 0 \\ 0 & -1
           \end{smallmatrix} \right) $
and follow it with enough text to ensure that
there is at least one full line below the matrix.
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-4}}}\\
\end{huge}
\end{center}

\subsection{Stacking in subscripts and superscripts}\label{sec8.3.3}

The \verb|\substack| command is most commonly used to typeset
several lines within a subscript or
superscript, using \verb|\\| as the row delimiter.

A slightly more general structure is the \texttt{subarray}
environment, which allows
you to specify that the lines should be left or right aligned
instead of centered.
Note that both environments need to be surrounded by braces when
they appear
as a subscript or superscript.
\begin{verbatim}
\usepackage{amsmath}
\begin{gather}
  \sum_{\substack{0 \le i \le m \\ 0 < j < n}} P(i, j) \\
  \sum_{\begin{subarray}{l}  i \in \Lambda \\
                       0 \le i \le m       \\
                       0 < j < n
         \end{subarray}} P(i, j)
\end{gather}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-5}}}\\
\end{huge}
\end{center}

\subsection{Commutative diagrams}\label{sec8.3.4}

Some commands for producing simple commutative diagrams based on
arrays
are available in a separate package, \textsf{amscd}. It provides
some useful shorthand
forms for specifying the decorated arrows and other connectors.
However, it is
very limited---for example, these connectors can be only
horizontal and vertical.

The \texttt{picture} environment could be used for more complex
commutative diagrams
but for most serious work in this area you will need one of the
more
comprehensive packages. These include Kristoffer Rose's XY-pic
system (see [57,
chapter~\ref{chap5}]) and its extension [11] by Michael Barr; the
\textsf{diagram} system [22,23] by
Francis Borceux; and the \textsf{kuvio} package [155] by Anders
Svensson.

In the \texttt{CD} environment the notations \verb|@>>>, @<<<|,
\verb|@VVV|, and \verb|@AAA| give
\texttt{right,left, down,} and \texttt{up} arrows,
respectively.\footnote{For keyboards lacking the
characters \verb=<= and \verb=>=, the notations \texttt{@)))} and
\texttt{@(((} are alternatives.} The
following examples also show the use of the command
\verb|\DeclareMathOperator| (see Section~\ref{sec8.6.2}).
\begin{verbatim}
\usepackage{amsmath,amscd}
\DeclareMathOperator\add{add}
\DeclareMathOperator\cf {cf}
\DeclareMathOperator\cov{cov}
\DeclareMathOperator\non{non}
\[ \begin{CD}
      \cov (L) @>>> \non (K) @>>> \cf (K) \\
       @VVV           @AAA          @AAA  \\
      \add (L) @>>> \add (K) @>>> \cov (K) \\
   \end{CD} \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-6}}}\\
\end{huge}
\end{center}

Decorations on the arrows are specified as follows. For the
horizontal arrows,
material between the first and second \verb|>| or \verb|<|
symbols will be typeset as a superscript,and material between
the second and third will be typeset as a subscript.
Similarly, material between the first and second, or second and
third, As or Vs of
vertical arrows will be typeset as left or right
``side-scripts''; this format is used in
the next example to place the operator End\textit{P} to the
right of the arrow.

The notations \verb|@=| and \verb=@|= give horizontal and
vertical double lines.

A ``null arrow'' (produced by \verb|@|.) can be used instead of
a visible arrow to fill
out an array where needed.
\begin{verbatim}
\usepaekage{amsmath,amsed}
\DeelareMathOperator{\End}{End}
\[ \begin{CD}
    S^{W_\Lambda}\otimes       T        @>j>> T \\
     @VVV                          @VV{\End P}V \\
    (S \otimes T)/I       @=     (Z\otimes T)/J
   \end{CD} \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-7}}}\\
\end{huge}
\end{center}

A similar layout, which does not look nearly as good, can be
produced in
standard \LaTeX:
\begin{verbatim}
\[\begin{array}{ccc}
   S^{\mathcal{W}_\Lambda}\otimes T &
      \stackrel{j}{\longrightarrow} &
   T                                         \\
   \Big\downarrow                   &    &
   \Big\downarrow\vcenter{%
      \rlap{$\scriptstyle{\mathrm{End}}\,P$}} \\
   (S\otimes T)/I                   & =  &
   (Z\otimes T)/J
\end{array}\]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-8}}}\\
\end{huge}
\end{center}

This example shows clearly how much better the results are with
the \textsf{amscd}
package: the notation is enormously easier and, for example, the
package produces
longer horizontal arrows and much improved spacing between
elements
of the diagram. The more specialized packages will enable you to
get even more
beautiful results.

\subsection{\textsf{delarray}--Delimiters surrounding an array}\label{sec8.3.5}

This section describes a useful general extension to the
\textsf{array} package (see Section~\ref{sec5.2} on page 243) that allows the user to specify opening and
closing extensible
delimiters (see Section~\ref{sec8.5.3}) to surround a mathematical
\texttt{array} environment.
The \textsf{delarray} package was written by David Carlisle, and
its use is illustrated in the
next, rather odd-looking, example (note that the
\textsf{delarray} package is independent
of \textsf{amsmath} but it automatically loads the array package
if necessary).
\begin{verbatim}
\usepaekage{delarray}
\[ \mathcal{Q} =
\begin{array}[t] ( {cc} ) X & Y \end{array}
\begin{array}[t] [ {cc} ] A & B \\ C & D  \end{array}
\begin{array}[b] \lgroup{cc}\rgroup L \\ M \end{array}
\]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-3-9}}}\\
\end{huge}
\end{center}
The delimiters are placed on either side of the ``preamble
declaration'' (here \verb={cc}=).
They must be delimiters from Table~\ref{tab8.3} on page 498.

The most useful feature of this package is also illustrated in
the preceding
example: the use of the \texttt{[t]} and \texttt{[b]} optional
arguments, which are not available
with \textsf{amsmath}'s matrix environments. These show that use
of the \textsf{delarray} syntax
is not equivalent to surrounding the \texttt{array} environment
with \verb|\left| and \verb|\right|,
since the delimiters are raised as well as the array itself.

\section{Compound structures and decorations}\label{sec8.4}

This section presents some commands that produce a variety of
medium-sized
mathematical structures including decorated symbols and
fraction-like objects.

\subsection{Decorated arrows}\label{sec8.4.1}

The commands \verb|\xleftarrow| and \verb|\xrightarrow| produce
horizontal relation arrows
similar to those used for the commutative diagrams in Section~\ref{sec8.3.4}; they are
intended to have textual decorations above and/or below the
arrow and the length
of the arrow is chosen automatically to accommodate the text.
These arrows are
normally available in only one size. Thus, they will probably
not be suited for use
in fractions, subscripts, or superscripts, for example.

The textual decorations below and above the arrows are specified
in an optional
and a mandatory argument to the command.
\begin{verbatim}
\usepackage{amsmath}
\[
   0 \xleftarrow [\zeta]{} F \times \Delta (n - 1)
     \xrightarrow {\partial_0 \alpha(b)} E^{\partial_0 b}
\]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-1}}}\\
\end{huge}
\end{center}

\subsection{Continued fractions}\label{sec8.4.2}

The \verb|\drac| command produces fraction arrays known as
``continued fractions''.
By default, each numerator formula is centered; left or right
alignment of a numerator
is achieved by adding the optional argument \texttt{[l]} or
\texttt{[r]}.
\begin{verbatim}
\usepackage{amsmath}
\begin{equation*}
\cfrac {1}{\sqrt{2} +
 \cfrac {1}{\sqrt{3} +
  \cfrac {1}{\sqrt{4} +
   \cfrac[r] {1}{\sqrt{5} +
    \cfrac[l] {1}{\sqrt{6} + \dotsb }
   }}}}
\end{equation*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-2}}}\\
\end{huge}
\end{center}

\subsection{Boxed formulas}\label{sec8.4.3}

The command \verb|\boxed| puts a box around its argument; it
works just like \verb|\fbox|, except
that the contents are in math mode. See also the commands
described in Section~\ref{sec10.1}.
\begin{verbatim}
\usepackage{amsmath} 
\begin{equation}
   \boxed { W_t - F \subseteq V(P_i) \subseteq W_t }
\end{equation}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-3}}}\\
\end{huge}
\end{center}

\subsection{Limiting positions}\label{sec8.4.4}

Subscripts and superscripts on integrals, sums, or other
operators can be placed
either above and below the mathematical operator or in the
normal sub/super
positions on the right of the operator. They are said to ``take
limits'' if the superscript
and subscript material is placed (in the ``limit positions'')
above and below
the symbol or operator name. Typically, no limits are used in
text (to avoid spreading
lines apart); in a display, the placement depends on the
operator used. The
default placements in \LaTeX{} are illustrated in the following
example.
\begin{verbatim}
\[
\sum_{i=1}^n \qquad \int_0^\infty \qquad \lim_{n \to 0}
\]
Text: $\sum_{i=1}^n$, $\int_0^\infty$, $\lim_{n \to 0}$.
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-4}}}\\
\end{huge}
\end{center}

The placement of subscripts and superscripts on integrals, sums,
and other
operators is often dictated by the house-style of a journal.
Recognizing this fact,
amsmath offers a long list of options for controlling the
positioning. In the following
summary, \emph{default} indicates what happens when the
\textsf{amsmath} package is used
with a standard \LaTeX{} class but without any of these
options.\footnote{But not necessarily when
using the \AmS-\LaTeX{} document classes.}
\begin{description}

\item[\texttt{intlimits, nointlimits}] In displayed equations
only, place superscripts and
subscripts of integration-type symbols above and below or at the
side (default), respectively.

\item[\texttt{sumlimits, nosumlimits}] In displayed equations
only, place superscripts and
subscripts of summation-type symbols (also called ``large
operators'') above
and below (default) or at the side, respectively. This option
also affects other
big operators---$\prod$, $\coprod$, $\bigotimes$, $\bigoplus$,
and so forth--but not integrals.

\item[\texttt{namelimits, nonamelimits}] Like \texttt{sumlimits}
or \texttt{nosumlimits} but for
certain
``operator names'', such as det, inf, lim, and max, min, that
traditionally
have subscripts placed underneath, at least when they occur in a
displayed
equation.

\end{description}

The positioning on individual symbols/names can be controlled
directly by
placing one of the following \TeX{} primitive commands
immediately after the symbol
or operator name: \verb|\limits,\nolimits|, or
\verb|\displaylimits|. This last command,
which specifies that the operator ``takes limits'' only when the
mathematical
style is a display style, is the default whenever a symbol of
class Operator\footnote{See Section~\ref{sec8.9.1} on page 524 for a discussion of the various mathematical
classes of symbols.} appears or a
\verb=\mathop= construction is used. If an operator
is to ``take limits'' outside a
display, then this must be declared individually using the
\verb=\limits= command.
Compare the next example to Example 8-4-4, noting that some
commands show no effect as they merely
reinforce the default.
\begin{verbatim}
\[
\sum\nolimits_{i=1}^n \qquad \int\limits_0^\infty
\qquad \lim\displaylimits_{n \to 0}
\]
Text: $\sum\nolimits_{i=1}^n$, $\int\limits_0^\infty$,
$\lim\displaylimits_{n \to 0}$.
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-5}}}\\
\end{huge}
\end{center}

\subsection{Multiple integral signs}\label{sec8.4.5}

The commands \verb|\iint,\iiint,| and \verb|\iiiint| give
multiple integral signs with welladjusted
spaces between them, in both running text and displays. The
command
\verb|\idotsint| gives two integral signs with ellipsis dots
between them. The following example
also shows the use of \verb|\limits| to override the default for
integral constructions and place
the limit \emph{V} underneath the symbol.
\begin{verbatim}
\usepackage{amsmath}
\begin{gather*}
 \iint      \limits _V \mu(v,w)
   \,du \,dv                      \\
 \iiint     \limits _V \mu(u,v,w)
   \,du \,dv \,dw                  \\
 \iiiint    \limits _V \mu(t,u,v,w)
   \,dt \,du \,dv \,dw              \\
 \idotsint  \limits _V \mu(z_1, \dots, z_k)
   \,\mathbf{dz}
\end{gather*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-6}}}\\
\end{huge}
\end{center}

\subsection{Modular relations}\label{sec8.4.6}

The commands \verb|\mod|, \verb|\bmod|, \verb|\pmod|, and
\verb|\pod| are provided by the \textsf{amsmath}
package to deal with the special spacing conventions of the
``mod'' notation for equivalence
classes of integers. Two of these commands, \verb|\mod| and
\verb|\pod|, are variants of
\verb|\pmod| that are preferred by some authors; \verb|\mod|
omits the parentheses, whereas
\verb|\pod| omits the ``mod'' and retains the parentheses. With
\textsf{amsmath} the spacing of \verb|\pmod|
is decreased within a non-display formula.
\begin{verbatim}
\usepackage{amsmath}
\begin{align*}
  u &  \equiv v + 1 \mod{n^2} \\
  u &  \equiv v + 1 \bmod{n^2} \\
  u &     =   v + 1 \pmod{n^2} \\
  u &     =   v + 1 \pod{n^2}
\end{align*}
The in-text layout: $ u = v + 1 \pmod{n^2} $
\begin{gather*}
   (m \bmod n) = k^2 \, ; \quad
  x \equiv y \pmod b \, ; \\
  x \equiv y \mod  c \, ; \quad
  x \equiv y \pod  d\, .
\end{gather*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-7}}}\\
\end{huge}
\end{center}

\subsection{Fractions and generalizations}\label{sec8.4.7}

In addition to the common \verb|\frac|, the amsmath package
provides \verb|\dfrac| and \verb|\tfrac|
as convenient abbreviations for \verb|{\displaystyle \frac...}|
and \verb|{\textstyle \frac...}|
(mathematical styles are discussed in more detail in Section~\ref{sec8.7.1} on page 502).
\begin{verbatim}
\usepackage{amsmath}
\begin{equation} \frac{1}{k} \log_2 c(f)
\quad \tfrac{1}{k} \log_2 c(f)
\end{equation}
Text: $ \sqrt{ \frac{1}{k} \log_2 c(f) } \quad
\sqrt{ \dfrac{1}{k} \log_2 c(f) }\, $.
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-8}}}\\
\end{huge}
\end{center}

For binomial coefficients such as $\binom{n}{k}$, use the
similar commands \verb|\binom|,
\verb|\dbinom|, and \verb|\tbinom|.
\begin{verbatim}
\usepackage{amsmath}
\begin{equation} \binom{k}{2} 2^{k - 1}
          + \tbinom{k - 1}{2} 2^{k - 2} \end{equation}
Text: $ \binom{k}{2} 2^{k - 1}
        + \dbinom{k - 1}{2} 2^{k - 2} $.
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-9}}}\\
\end{huge}
\end{center}

All of these \verb|\binom| and \verb|\frac| commands are special
cases of the generalized fraction
command \verb|\genfrac|, which has six parameters.
\\
\\
\verb|\genfrac{|\emph{Idelim}\verb=}{=\emph{rdelim}\verb=}{=\emph{thick}\verb=}{=\emph{style}\verb=}{=\emph{num}\verb=}{=\emph{denom}\verb|}|
\\[6pt]
The first two parameters, \texttt{Idelim} and \texttt{rdelim},
are the left and right delimiters,
respectively. They must be either both empty or both non-empty;
to place a single
delimiter, use a period `` .'' on the ``empty'' side. The third
parameter, \emph{thick}, is
used to override the default thickness of the fraction rule; for
instance, \verb|\binom|
uses 0pt for this argument so that the line is invisible. If it
is left empty, the line
thickness has the default value specified by the font set-up in
use for mathematical
typesetting. The examples in this chapter use the defaults
listed in Table~\ref{tab8.2}
in the various styles (see also Section~\ref{sec8.7.1}).

\begin{table}
\centering
\begin{tabular}{cc}
\emph{Style} &\emph{Default Thickness (approximately)}\\
text/display &0.40pt\\
script&0.34pt\\
scriptscript& 0.24pt
\end{tabular}
\caption{Default rule thickness in different math styles}
\label{tab8.2}
\end{table}


The fourth parameter, style, provides a ``mathematical style
override'' for the
layout and font sizes used. It can take integer values in the
range 0-3 denoting
\verb|displaystyle,\textstyle,\scriptstyle,| and
\verb|\scriptscriptstyle|, respectively.
If this argument is left empty, then the style is selected
according to the
normal rules for fractions (described in Table~\ref{tab8.5} on page 502).
The last two arguments
are simply the numerator (\emph{num}) and denominator
(\emph{denom}).

To illustrate, here is how \verb|\frac,\tfrac,| and
\verb|\binom| might be defined:
\begin{verbatim}
   \newcommand\frac [2]{\genfrac       {}{}{}{}{#1}{#2}}
   \newcommand\tfrac[2]{\genfrac       {}{}{}{}{#1}{#2}}
   \newcommand\binom[2]{\genfrac  {(}{)}{0pt}{}{#1}{#2}}
\end{verbatim}
Of course, if you want to use a particular complex notation
(such as one implemented
with \verb=\genfrac=) repeatedly throughout your document,
then you will do
yourself (and your editor) a favor if you define a meaningful
command name with
\verb=\newcommand= as an abbreviation for that notation, as
in the examples above.

The old generalized fraction commands \verb=\over=,
\verb=\overwithdelims=,
\verb=\atop=,
\verb=\atopwithdelims=, \verb=\above=, and
\verb=\abovewithdelims= (inherited in
standard \LaTeX{}
from primitive \TeX{}) produce warning messages if they are used
with the \textsf{amsmath}
package.

\subsection{Dottier accents}\label{sec8.4.8}

The \verb|\dot| and \verb|\ddot| mathematical accents are
supplemented by \verb|\dddot| and
\verb|\ddddot|, giving triple and quadruple dot accents,
respectively.
\begin{verbatim}
\usepackage{amsmath}
$ \dot{S} \quad \ddot{P} \quad \dddot{Q} \quad \ddddot{R} $
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-10}}}\\
\end{huge}
\end{center}

If you want to set up your own mathematical accents, then you
should probably
use the \textsf{accents} package developed by Javier Bezos. It
provides methods
of defining ``faked'' accents (see \verb|\accentset| in the
example) and general underaccents
(\verb|\underaccent|, \verb|\undertilde|), along with other
features. It can be used together with
\textsf{amsmath}. For further details see [20].
\begin{verbatim}
\usepackage{accents}
\[ \accentset{\ast}{X}                 \quad
   \hat{\accentset{\star}{\hat h}}     \quad
   \underaccent{\diamond}{\mathcal{M}} \quad
   \undertilde{C}\quad\undertilde{M}\quad\undertilde{ABC} \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-11}}}\\
\end{huge}
\end{center}

\subsection{\textsf{amsxtra}--Accents as superscripts}\label{sec8.4.9}

One feature available with this package is a collection of
simple commands for
placing accents as superscripts to a sub-formula:
\begin{verbatim}
\usepackage{amsxtra}
$(xyz)\spdddot$ \quad $(xyz)\spddot$ \quad $(xyz)\spdot$ \\
$(xyz)\spbreve$ \quad $(xyz)\spcheck$ \\
$(xyz)\sphat$   \quad $(xyz)\sptilde$
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-12}}}\\
\end{huge}
\end{center}

\subsection{Extra decorations}\label{sec8.4.10}

Standard \LaTeX{} provides \verb|\stackrel| for placing a
superscript above a Relation symbol.
The \textsf{amsmath} package makes the commands \verb|\overset|
and \verb|\underset| available
as well. They can be used to place material above or below any
Ordinary symbol
or Binary operator symbol, in addition to Relation symbols; they
are typeset
just like the limits above and below a summation sign.

The command \verb|\sideset| serves a special purpose,
complementary to the others: it adds
decorations additional to the ``normal'' limits (which are set
above and
below) to any Operator symbol such as $\sum$ or $\prod$ .These
are placed in the subscript
and superscript positions, on both the left and right of the
Operator.
\begin{verbatim}
\usepackage{amsmath}
\[ \overset{*}{X} > \underset{*}{X}
   \iff \sideset{}{'}\sum_{a,b \in \mathbf{R^*}}
                     \overset{a}{\underset{b}{X}} = X \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-13}}}\\
\end{huge}
\end{center}

This more complex example shows how to fully decorate a product
symbol.
\begin{verbatim}
\usepackage{amsmath}
\[ \sideset{_{i = 1}^n}{_{j = 2}^m}\prod_{k > 1}
                                   \mathcal{T}_{i,j}^k \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-4-}}}\\
\end{huge}
\end{center}

\section{Variable symbol commands}\label{sec8.5}

Many \LaTeX{} commands are often thought of as producing a
particular symbol when,
in fact, the exact form is not fixed (even when the font and
size are fixed). Certain
features of \TeX's mathematical typesetting can even be used to
produce structures
that can, in principle, grow to whatever size is required.

Such context-dependent variability is very important in
mathematical typesetting,
and this section discusses some aspects of it. With a few dearly
noted
exceptions, the commands covered in this section are available
in standard \LaTeX.

A well-known, but not very exciting, example of such variability
entails the
mathematical operator symbols, such as \verb|\sum| and
\verb|\prod|, which typically come in
just two sizes: a smaller size that is used in running text and
a larger size that is
used in displayed formulas. Such symbols appear in Table~\ref{tab8.25} on
page 536.

\subsection{Ellipsis \ldots}\label{sec8.5.1}

Standard \LaTeX{} provides several types of mathematical
ellipsis dots: \verb|\ldots|,
\verb|\cdots|, and so on. When using \textsf{amsmath}, however,
such ellipsis dots within math
mode should almost always be marked up using simply
\verb|\dots|.\footnote{lThe commands
\verb=\dots= and \verb=\ldots= can
also be used in text mode, where both
always produce a normal text ellipsis.}

The vertical position (on the baseline or centered) of the
ellipsis, together
with the space around it, are both automatically selected
according to what kind
of symbol follows \verb|\dots|. For example, if the next symbol
is a plus sign, the dots will be
centered; if it is a comma, they will be on the baseline. In all
cases, three
dots are used but the spacing varies. These defaults from the
\textsf{amsmath} package
can be changed in a class file when different conventions are in
use.
\begin{verbatim}
\usepackage{amsmath}
A series $H_1, H_2, \dots, H_n$, a sum\\
$H_1 + H_2 + \dots + H_n$, an orthogonal product\\
$H_1 \times H_2 \times \dots \times H_n$.
\end{verbatim}
A series $H_1, H_2, \dots, H_n$, a sum\\
$H_1 + H_2 + \dots + H_n$, an orthogonal product\\
$H_1 \times H_2 \times \dots \times H_n$.
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-5-1}}}\\
\end{huge}
\end{center}

If the dots fall at the end of a mathematical formula, the next
object will be
something like \verb|\end| or \verb|\|) or \verb|$|, which does
not give any information about how
to place the dots. In such a case, you must help by using
\verb|\dotsc| for ``dots with commas'',
\verb|\dotsb| for ``dots with Binary operator/Relation
symbols'', \verb|\dotsm| for ``multiplication
dots'', \verb|\dotsi| for ``dots with integrals'', or even
\verb|\dotso| for ``none of the above''.
These commands should be used only in such special positions:
otherwise you should just use
\verb|\dots|.

In this example, low dots are produced in the first instance and
centered dots
in the other cases, with the space around the dots being nicely
adjusted.
\begin{verbatim}
\usepackage{amsmath}
A series $H_1, H_2, \dotsc\,$, a sum\\
$H_1 + H_2 + \dotsb\,$, an orthogonal product\\
$H_1 \times H_2 \times \dotsm\,$, and an infinite
integral: \[ \int_{H_1} \int_{H_2} \dotsi \;
                         {-\Gamma}\, d\Theta \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-5-2}}}\\
\end{huge}
\end{center}

You can customize the symbols and spacing produced by the
\verb|\dots| command
in various contexts by redefining the commands \verb|\dotsc|,
\verb|\dotsb|, \verb|\dotsm|, and
\verb|\dotsi|; this would normally be done in a class file.
Thus, for example, you could decide to
use only two dots in some cases.

\subsection{Horizontal extensions}\label{sec8.5.2}

In principle, any mathematical accent command can be set up to
produce the
appropriate glyph from a range of widths whenever these are
provided by the
available fonts. However, in standard \LaTeX{} there are only
two such commands:
 \verb|\widehat| and  \verb|\widetilde|.

This section describes a few commands that produce constructions
similar to
these extensible accents. They all produce compound symbols of
mathematical
class Ordinary (see Section~\ref{sec8.9.1} on page 524) and are
illustrated in this example.
\begin{verbatim}
\usepakage{amsmath}
\begin{align*}
\widehat       {\psi_\delta(t) E_t h}
&= \widetilde  {\psi_\delta(t) E_t h} \\
\overline      {\psi_\delta(t) E_t h}
&= \underline  {\psi_\delta(t) E_t h} \\
\overbrace     {\psi_\delta(t) E_t h}
&= \underbrace {\psi_\delta(t) E_t h}
& & \text{Do not change style} \\
\overrightarrow{\psi_\delta(t) E_t h}
&= \overleftarrow  {\psi_\delta(t) E_t h}
& & \text{Do not Change style} \\[-3pt]
& & & \text{without \textsf{amsmath}} \\
\underrightarrow   {\psi_\delta(t) E_t h}
&= \underleftarrow {\psi_\delta(t) E_t h}
& & \text{Do need \textsf{amsmath}} \\
\overleftrightarrow{\psi_\delta(t) E_t h}
&=\underleftrightarrow{\psi_\delta(t) E_t h}
& & \text{Do need \textsf{amsmath}}
\end{align*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-5-3}}}\\
\end{huge}
\end{center}

Further details of the availability and properties of these
commands are unfortunately
somewhat complex but they are summarized in the example. Here,
``change style'' means that the symbol employed is affected by
the mathematical
style in use so that they will look right when used, for
example, in fractions or
subscripts/superscripts (see Section~\ref{sec8.7.1} on page 502). Those
that do not change
style are suitable for use only at the top level of displayed
mathematics.

Another horizontally extensible feature of \LaTeX{} is the bar
in a radical sign; it
is described at the end of the next subsection.

\begin{table}[!h]
\centering
\caption{Vertically extensible symbols}
\label{tab8.3}
\end{table} 

\subsection{Vertical extensions}\label{sec8.5.3}

There is a much larger range available with vertical extensions.
All of the symbols
depicted in Table~\ref{tab8.26} on page 537 are potentially extensible,
as are a few others.
The full list is given in Table~\ref{tab8.3}. These symbols become
extensible only in certain
usages; they must all be based on a construction of the
following form:\footnote{If \LaTeX{} is
using the e\TeX\ program, then you can also use these extensible
symbols with
\verb=\middle=.}
\\
\verb|   \left| $\langle{ext-Open}\rangle$ \quad
$\langle{sub-formula}\rangle$ \qquad
\verb|\right| $\langle{ext-Close}\rangle$
\\[5pt]
Here $\langle{ext-Open}\rangle$ and
$\langle{ext-Close}\rangle$ can be any of the
symbols (except \verb|\sqrtsign|)
listed in Table~\ref{tab8.3}, or possibly others if additional packages
are loaded. They must
be symbols that have been set up to be extensible using the
methods described in
[l09], which is part of every \LaTeX{} distribution; thus, a
symbol must be available to
represent the absence of an actual glyph. This symbol, which is
sometimes called
the \emph{null delimiter}, was chosen to be the period (.). The
sizes of the actual glyphs
used to typeset the extensible symbols are chosen to fit with
the vertical size
(height and depth) of the typeset sub-formula that lies in
between them; the exact
details of how this is done, and of the parameters that affect
the process, can be
found in Chapter 17 and Appendix G (Rule 19) of \emph{The \TeX
book} [82]. One can also
request specific sizes for such symbols (see Section~\ref{sec8.7.3} on
page 504).

The radical sign \verb|\sqrtsign| is even more amazing---it
grows both vertically
and horizontally to fit the size of its argument. In \LaTeX{} it
is typically accessed via
the \verb|\sqrt| command, which is discussed further in Section~\ref{sec8.7.4} on page 504.
\begin{verbatim}
\[
  \sqrtsign{1 + \sqrtsign{1 + \sqrtsign{1 +
    \sqrtsign{1 + \sqrtsign{1 + \sqrtsign{1 + x}}}}}}
\]
\end{verbatim}
\[
\sqrtsign{1 + \sqrtsign{1 + \sqrtsign{1 +
\sqrtsign{1 + \sqrtsign{1 + \sqrtsign{1 + x}}}}}}
\]
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-5-4}}}\\
\end{huge}
\end{center}

\section{Words in mathematics}\label{sec8.6}

\cprotect\subsection{The \verb=\text= command}\label{sec8.6.1}

Math font-changing commands such as \verb|\mathrm| are not
intended for putting nor· mal text inside
mathematics; even for single words this task is often best
carried
out with the \verb|\text| command, which is similar to the
\LaTeX{} command \verb|\mbox| but is much
better, ensuring that the text is set using the correct font
size. The font will be the text font in
use outside the current mathematical material.
\begin{verbatim}
\usepackage{amsmath}
\begin{gather}
  \text{Also, if } \Delta_{\text{max up}}
           = \Delta_{\text{min down}} \notag \\
  \text{(for all ups and downs) then} \notag \\
  \Delta_{\text{sum of ups}}
           = \Delta_{\text{sum of downs}}
\end{gather}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-6-1}}}\\
\end{huge}
\end{center}

\subsection{Operator and function names}\label{sec8.6.2}

The names of many well-known mathematical functions (such as log
and sin) and
operators (such as max and lim) are traditionally typeset as
Words (or abbreviations)
in Roman type so as to visually distinguish them from shorter
variable
names that are set in ``math italic''. The most common function
names have predefined
commands to produce the correct typographical treatment; see
Table~\ref{tab8.4}.
Most functions are available in standard \LaTeX; those listed
in \textcolor{blue}{blue} in the table require
loading \textsf{amsmath}. The functions marked with (\emph{l}) may ``take
limits'' in display
formulas (see Section~\ref{sec8.4.4}).

\begin{table}[!h]
\centering

\caption{Predefined operators and functions}
\label{tab8.4}
\end{table}
\begin{verbatim}
\usepackage[fleqn]{amsmath}
\newcommand\abs[1]{\lvert#1\rvert}
\setlength\mathindent{0pt}
\begin{gather*}
  \lim_{x \rightarrow 0} \frac{ \sin^2(x) }{ x^2 }= 1 \\
  \varliminf_{n \rightarrow \infty}
    \abs{a_{n+1}} / \abs{a_n} = 0                     \\
  \varinjlim (m_i^\lambda \cdot M)^* \le
    \varprojlim_{A/p \rightarrow \lambda(A)}A_p \le 0
\end{gather*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-6-2}}}\\
\end{huge}
\end{center}

New functions of this type are needed frequently in mathematics,
so the
\textsf{amsmath} package provides a general mechanism for
defining new ``operator
names''.
\\
\\
\verb|\DeclareMathOperator*{|\emph{cmd}\verb|}{|\emph{text}\verb|}|\qquad
\verb|\operatorname*{|\emph{text}\verb|}|
\\[5pt]
The \verb|\DeclareMathOperator| defines \emph{cmd} to produce
\emph{text} in the appropriate font
for ``textual operators''. If the new function being named is an
operator that should,
when used in displays, ``take limits'' (so that any subscripts
and superscripts are
placed in the ``limits'' positions, above and below, as with,
for example, lim, sup,
or min), then use the starred form \verb|\DeclareMathOperator*|.
In addition to using
the proper font, \verb|\DeclareMathOperator| sets up good
spacing on either side of
the function name when necessary. For example, it gives
\emph{A}meas\emph{B} instead of
\emph{A}meas\emph{B}. The \emph{text} argument is processed
using a ``pseudo-text mode'' in which

\begin{itemize}

\item The hyphen character - will print as a text hyphen (not as
a minus sign); see
\verb|\supminus| in the next example.

\item The asterisk character \verb|*| will print as a raised
text asterisk (not centered).

\item Otherwise, the text is processed in math mode so that
spaces are ignored and
you can use subscripts, superscripts, and other elements.

\end{itemize}

The related command \verb|\operatorname| (and its \verb|*|-form)
simply turns its argument
into a function name, as in Example 8-2-11 on page 475. It is
useful for ``one-off"
operators.

The next example shows how to provide the command. \verb|\meas|
for the new function name ``meas''
(short for measure) and the operator functions \verb|\esssup|
and \verb|\supminus|, both of which
take limits.
\begin{verbatim}
\usepackage[fleqn]{amsmath}
\DeclareMathOperator \meas    {meas}
\DeclareMathOperator*\esssup  {ess \, sup}
\DeclareMathOperator*\supminus{sup - minus*}
\newcommand\abs[1]{\lvert#1\rvert}
\newcommand\norm[1]{\lVert#1\rVert}
\begin{gather*}
  \norm{f}_\infty = \esssup_{x \in R^n} \abs{f(x)}  \\
  \meas_1 \{ u \in R_+^1 \colon f^*(u)>\alpha \}    \\
  \quad \esssup_{x \in R^i} \; \meas_i
    \{ u \in R^n \colon \abs{f(u)} \geq \alpha \}   \\
  \quad (\forall \alpha \in \supminus_{f^*} R_{*+})
\end{gather*}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-6-3}}}\\
\end{huge}
\end{center}

Unfortunately, such declarations must appear in the preamble so
it is not possible
to change a declaration temporarily. In fact,
\verb|\DeclareMathOperator| works only for command
names that have not been used previously, so it is not possible
to overwrite an existing command directly. To do so, you must
first remove
the previous definition (in this case, of \verb|\csc|) before
redeclaring it; this removal is
accomplished by using low-level \TeX\ coding, as \LaTeX{}
provides no method for completing this
task.
\begin{verbatim}
\usepackage{amsmath}
%% Low-level TeX needed here to cancel
%% the old definition of \csc:
\let \csc \relax
\DeclareMathOperator\csc{cosec}
\newcommand\calQ{\mathcal{Q}}
\[ \varlimsup_{n\to\infty} \calQ (u_n, u_n - u^{\#})
   \ge \esc (\calQ' (u^{\#}))                     \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-6-4}}}\\
\end{huge}
\end{center}

\begin{table}[!h]
\centering
\begin{tabular}{ccccc}
\emph{Style} &\emph{Superscript}& \emph{Subscript}&
\emph{Numerator}& \emph{Denominator}\\
D&S&S$'$&T&T$'$\\
D$'$&S$'$&S$'$&T$'$&T$'$\\
T&S&S$'$&S&S$'$\\
T$'$&S$'$&S$'$&S$'$&S$'$\\
S, SS&SS&SS$'$&SS&SS$'$\\
S$'$, SS$'$&SS$'$&SS$'$&SS$'$&SS$'$
\end{tabular}
\caption{Mathematical styles in sub-formulas}
\label{tab8.5}
\end{table}

\section{Fine-tuning the mathematical layout}\label{sec8.7}

Although \LaTeX{} generally does a good job of laying out the
elements of a formula,
it is sometimes necessary to fine-tune the positioning. This
section describes how
to achieve some of the many detailed adjustments to the layout
that are used
to produce mathematical typography that is just a little bit
better. Most of this
section applies to all \LaTeX{} mathematical material, but a few
features are available
only with the amsmath package; these will be clearly labeled.

\subsection{Controlling the automatic sizing and spacing}\label{sec8.7.1}

Letters and mathematical symbols normally get smaller, and are
more tightly
spaced, when they appear in fractions, superscripts, or
subscripts. In total, \TeX{}
has eight different styles in which it can layout formulas:
\\[8pt]
\begin{tabular}{cll}
D, D$'$ &\verb|\displaystyle|& Displayed on lines by
themselves\\
T, T$'$ &\verb|\textstyle|& Embedded in text\\
S, S$'$ &\verb|\scriptstyle|& In superscripts or subscripts\\
SS, SS$'$ &\verb|\scriptscriptstyle|& In all higher-order
superscripts orsubscripts
\end{tabular}
\\
\\
The prime versions (D$'$, T$'$, etc.) represent the so-called
\emph{cramped} styles, which are
similar to the normal styles except that superscripts are not
raised so much.

\TeX{} uses only three type sizes for mathematics in these
styles: text size (also
used in \verb|\displaystyle|), script size, and scriptscript
size. The size of each part of a
formula can be determined according to the following scheme.
\\
\begin{center}
\begin{tabular}{ccc}
\emph{A symbol in style}& \emph{Will be typeset in}& \emph{And
produces}\\
D,D$'$,T,T$'$& text size& (text size)\\
S,S$'$& script size& {\scriptsize (script size)}\\
SS,SS$'$& scriptscript size& {\tiny (scriptscript size)}
\end{tabular}
\end{center}

In \LaTeX, the top-level part of a formula set in running text
(within a \verb|$| pair
or between \verb|\(...\)|) is typeset using text style (style
\emph{T}). A displayed formula (e.g.,
one between \verb|\[...\]|) will be typeset in display style
(style \emph{D}). The kind of style
used in a sub-formula can then be determined from Table 8.S on
the facing page, where the last two
columns describe the styles used in the numerator and the
denominator of a fraction.

The various styles can be seen in this example:
\begin{verbatim}
\normalsize             %% Style:
\[ b                    %% D
   ^0                   %% S
  +                     %% D
  \frac{(k + p)         %% T
        _ {j '}         %% s'
     % \displaystyle
      \pm               %% T  [D]
      \frac{(f + q)     %% S  [T]
         ^{(pk)         %% ss [S]
              ^y        %% ss
                _{j'}}} %% SS'
         {(h + y)}}     %% s' [T']
     {(I + q)           %% T'
       ^{(pk)}}         %% S'
\]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-7-1}}}\\
\end{huge}
\end{center}

You can change the layout of this example by explicitly
specifying the style
to be used in each part. For example, if you remove the comment
character in
front of \verb|\displaystyle|, then some of the styles will
change to those shown in brackets. The
result looks like this:

\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-7-2}}}\\
\end{huge}
\end{center}

Section~\ref{sec3.1.4} describes other ways to change the style of an
individual symbol.

\subsection{Sub-formulas}\label{sec8.7.2}

Whereas in text a pair of braces can simply indicate a group to
which the effects
of some declaration should be confined, within mathematics they
do more than
this. They delimit a sub-formula, which is always typeset as a
separate entity that
is added to the outer formula. As a side effect, sub-formulas
are always typeset at
their natural width and will not stretch or shrink horizontally
when \TeX{} tries to
fit a formula in a paragraph line during line-breaking. As shown
earlier, the subformula
from a simple brace group is treated as if it was just a single
symbol (of
class Ordinary). An empty brace group, therefore, generates an
invisible symbol
that can affect the spacing. The exact details can be found in
Chapters 17 and 18
and Appendix G of \emph{The \TeX book} [82].

The contents of subscripts/superscripts and the arguments of
many (but not
all) commands, such as \verb|\frac| and \verb|\mathrel|, are
also sub-formulas and get this same
special treatment. Important examples of arguments that are not
necessarily set as sub-formulas
include those of \verb|\bm| (see Section~\ref{sec8.8.2}). If a group is
needed only to limit the scope of a
declaration (i.e., where a separately typeset sub-formula would
be wrong), then \verb|\begingroup|
and \verb|\endgroup| should be used. Note that specialized
mathematical declarations such as style
changes apply until the end of the current sub·formula,
irrespective the presence of any other
groups.

\subsection{Big-g delimiters}\label{sec8.7.3}

To provide direct control of the sizes of extensible delimiters,
\LaTeX{} offers four
commands: \verb|\big|, \verb|\Big|, \verb|\bigg|, and
\verb|\Bigg|. These take a single parameter,
which
\emph{must} be an extensible delimiter, and they produce
ever-larger versions of the delimiter, from
1.2 to 3 times as big as the base size.

Three extra variants exist for each of the four commands, giving
four sizes of
Opening symbol (e.g., \verb|\bigl|); four sizes of Relation
symbol (e.g.,
\verb=\Bigm=); and four
sizes of Closing symbol (e.g., \verb|\Biggr|).\footnote{See
Section~\ref{sec8.9.1} on page 524 for the
various mathematical classes of symbols.} All 16 of these
commands can (and must)
be used with any symbol that can come after either
\verb|\left,\right|, or (with e\TeX)
\verb|\middle| (see Table~\ref{tab8.3} on page 498).

In standard \LaTeX{} the sizes of these delimiters are fixed.
With the amsmath
package, however, the sizes adapt to the size of the surrounding
material, according
to the type size and mathematical style in use, as shown in the
next example.
The same is true when you load the \textsf{exscale} package (see
Section~\ref{sec7.5.5}), or when
you use a font package that implements the \textsf{exscale}
functionality as an option
(e.g., most of the packages discussed in Sections~\ref{sec7.6} and~\ref{sec7.7}).
\begin{verbatim}
\usepackage{amsmath}
\[ \biggl( \mathbf{E}_{y} \int_0^{t_\varepsilon}
   L_{x, y^x(s)} \varphi(x)\, ds \biggr) \]
\Large
\[ \biggl( \mathbf{E}_{y} \int_0^{t_varepsilon}
   L_{x, y^x(s)} \varphi(x)\, ds \biggr) \]}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-7-3}}}\\
\end{huge}
\end{center}

\subsection{Radical movements}\label{sec8.7.4}

In standard \LaTeX, the placement of the index on a radical
sign is sometimes not
good. With \textsf{amsmath}, the commands \verb|\leftroot| and
\verb|\uproot| can be used within
the optional argument of the \verb|\sqrt| command to adjust the
positioning of this index. Positive
integer arguments to these commands move the root index to the
left and up, respectively, while negative arguments move it
right and down. These
arguments are given in terms of math units (see Section~\ref{sec8.7.6}),
which are quite
small, so these commands are useful for fine adjustments.
\begin{verbatim}
\usepackage{amsmath}
\[
   \sqrt[\beta]{k} \qquad
   \sqrt[\leftroot{2}\uproot{4} \beta]{k} \qquad
   \sqrt[\leftroot{1}\uproot{3} \beta]{k}
\]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-7-4}}}\\
\end{huge}
\end{center}

\subsection{Ghostbusters$\texttrademark$}\label{sec8.7.5}

To get math spacing and alignment ``just right'', it is often
best to make creative
use of some of primitive \TeX's unique and sophisticated
typesetting abilities.
These features are accessed by a collection of commands related
to \verb|\phantom| and
\verb|\smash|; and they can be used in both mathematical and
other text.

For instance, the large alignment example (Example 8-2-9 on page
474) uses
lots of phantoms to get the alignment just right. Each of these
phantoms produces
an invisible ``white box'' whose size (width and total height
plus depth) is
determined by typesetting the text in its argument and measuring
its size.

Conversely, the command \verb|\smash| typesets its contents (in
an LR-box) but
then ignores both their height and depth, behaving as if they
were both zero.
The standard \LaTeX\ command \verb|\hphantom| is a combination
of these, producing
the equivalent of \verb=\smash{\phantom{a truly busted ghost!}}= : an invisible box
with zero height and depth but the width of the phantom
contents.

The \verb|\vphantom| command makes the width of the phantom zero
but preserves
its total height plus depth. An example is the command
\verb|\mathstrut|, which is
defined as ``\verb|\vphantom| ('' so that it produces a
zero-width box of height and depth equal to
that of a parenthesis.

The \textsf{amsmath} package provides an optional argument for
\verb|\smash|, used as
follows: \verb|\smash[t]{...}| ignores the height of the box's
contents, but retains the
depth, while \verb|\smash[b] {...}| ignores the depth and keeps
the height. Compare these four
lines, in which only the handling of $\sqrt{y}$ varies:
\begin{verbatim}
\usepackage{amsmath}
$\sqrt{x} + \sqrt{y}            + \sqrt{z}$ \\
$\sqrt{x} + \sqrt{\mathstrut y} + \sqrt{z}$ \\
$\sqrt{x} + \sqrt{\smash{y}}    + \sqrt{z}$ \\
$\sqrt{x} + \sqrt{\smash[b]{y}} + \sqrt{z}$
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-7-5}}}\\
\end{huge}
\end{center}
To get the three radical signs looking pleasantly similar, it
seems that the thing
to do may be to give the $y$ some extra height with a
strut---but that only makes
things worse! The best solution turns out to be to smash the
bottom of the $y$ (but
not the whole of it!).

In the next example, the top of the large fraction in the second
line appears
correctly at its normal height, while neither this height nor
the depth of the $p$ in
the denominator on the first line affects the vertical space
between the two lines.
This, of course, would bring the two lines in this example
confusingly close together.
For this reason, another \verb|\strut| was added. Nevertheless,
more moderate use of smashing is
often of benefit to such unbalanced displays.
\begin{verbatim}
\usepackage{amsmath}
\[
  Lp (x) =
  \begin{cases}
    \frac{1}{\smash[b] {p}} &x=p                 \\
    \frac{\strut
        \smash[t]{\frac{(1 - x)A{\frac{1}{2}} }
                       { x - \sin (x - p)     } } }
         {\sqrt{l - p} \, \cos (x - p)} & x \neq p
  \end{cases}
\]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-7-6}}}\\
\end{huge}
\end{center}

Another collection of examples illustrates a very common
application of
smashing: using a partial \verb|\smash| to give fine control
over the height of surrounding
delimiters. It also shows that smashing can lead to problems
because the real
height of the line needs to be known; this is restored by
\verb|\vphantom|. In the following code,
\verb|\Hmjd| is the compound symbol defined by
\begin{verbatim}
   \newcommand\Hmjd{\widetilde{\mathcal{H}^2}_{MJD}(\chi)}
\end{verbatim}
To show the resulting vertical space we added some rules:\\
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW }}}\\
\end{huge}
\end{center}

A word of warning: in a few places, deficiencies in the very
low-level \TeX\ processing may cause
errors in the fine details of typesetting. These possibilities
are
of particular concern in mathematical layouts where (1) a
sub-formula (such as
the numerator/denominator of a fraction or
subscripts/superscripts) consists of
exactly one LR-box, or a similarly constructed mathematical box,
and also (2) that
box does not have its natural size, as with the more complex
forms of \texttt{$\backslash$makebox},smashes, and some
phantoms. As an example look at the following:
\begin{verbatim}
\[
   $\sqrt{ \frac{a+b}{x_j} }$           \quad
   $\sqrt{ \frac{a+b}{\smash{x_j}} }$   \quad
   $\sqrt{ \frac{a+b}{{}\smash{x_j}} }$ \quad
   $\sqrt{ \frac{a+b}{\smash{x_j+b}} }$
\]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-7-7}}}\\
\end{huge}
\end{center}

To shorten the depth of the radical, a \verb|\smash| was added
in the second radical,
but without any effect. With an empty brace group (third
radical), it suddenly
worked. On the other hand, no workaround was needed for the
forth radical.\footnote{Technically this
is due to the denominator being wider than the nominator in this
case, so that
it was not reboxed by \TeX.} For
the same reason the \verb|\strut| or an empty brace group was
actually necessary in
Example 8-7-6 on the facing page to see any effects from the
\verb|\smash| commands
there. In summary, whenever you find that a \verb|\smash| does
not work, try adding an
empty math sub-formula (from \verb|{}|) before the lonely box,
to keep it from being
mistreated.

\subsection{Horizontal spaces}\label{sec8.7.6}

Even finer, and more difficult, tuning requires the explicit
spacing commands
shown in Table~\ref{tab8.6} on the next page. Both the full and short
forms of these commands
are robust, and they can also be used outside math mode in
normal text.
They are related to the thin, medium, and thick spaces available
on the machines
used to typeset mathematics in the mid-20th century.

The amounts of space added by these \verb|\..space| commands
are, in fact, defined
by the current values of the three parameters
\verb|\thinmuskip,\medmuskip|,
and \verb|\thickmuskip|; the table lists their default values
with \textsf{amsmath}. These very
low-level \TeX\ parameters require values in ``mu'' (\emph{math
units}). They must therefore
be set only via low-level \TeX\ assignments (as shown in Example
8-9-2 on page 525)
and not by \verb|\setlength| or similar\marginpar{\emph{Don ot change\\ the parameter\\value}} commands. Moreover, in
normal circumstances
their values should not be modified because they are used
internally by \TeX's
mathematical typesetting (see Table~\ref{tab8.7} on page 525).

One math unit (\verb|1mu|) is 1/18 of an em in the current
mathematical font size
(see also Table~\ref{tabA.1} on page 855). Thus, the absolute value of a
math unit varies
with the mathematical style, giving consistent spacing whatever
the style.

These math units can be used more generally to achieve even
better control
over space within mathematics. This is done via the
\textsf{amsmath} command
\verb|\mspace|, which is like \verb|\hspace| except that it can
be used only within mathematics
and its length argument must be given in math units (e.g.,
\verb|\mspace{0.5mu}|).
Thus, to get a negative \verb|\quad| within a mathematical
formula, you could write
\verb|\mspace{-18.0mu}|; this will, for example, normally give
about half the space in a double
subscript size as it does in the basic mathematical size. In
contrast,
\verb|\hspace{-1em}| will produce the same amount of space
whatever the mathematical
font size (but \verb|\$text{\hspace{-1em}}| will produce
variable-sized space).

\begin{table}[!h]
\centering

\caption{Mathematical spacing commands}
\label{tab8.6}
\end{table}

\section{Fonts in formulas}\label{sec8.8}

For most symbols in a formula, the font used for a glyph cannot
be changed by a
font declaration as it can be in text. Indeed, there is no
concept of, for example,
an italic plus sign or a small caps less than sign.

One exception involves the letters of the Latin alphabet, whose
appearance
can be altered by the use of math alphabet identifier commands
such as \verb|\mathcal|.
The commands provided by standard \LaTeX{} for this purpose are
discussed in Section~\ref{sec7.4}; this section introduces a few more. Another exception
relates to the use
of bold versions of arbitrary symbols to produce distinct
symbols with new meanings.
This potentially doubles the number of symbols available, as
boldness can
be a recognizable attribute of a glyph for nearly every shape:
depending on the
font family, even ``\verb|<|'' is noticeably different from
``\verb|<|''. Although there is a
\verb|\mathbf|
command, the concept of a math alphabet identifier cannot be
extended to cover
bold symbols; a better solution is discussed in Section~\ref{sec8.8.2}.

To change the overall appearance of the mathematics in a
document, the best
approach is to replace all the fonts used to typeset formulas.
This is usually done
in the preamble of a document by loading a (set of) suitable
packages, such as
those discussed in Sections~\ref{sec7.6} and~\ref{sec7.7}.

At the end of this section we showcase the effects of such
extensive changes,
made with but a few keystrokes, on a sample page of mathematics.
Section~\ref{sec8.8.3}
contains the same material typeset with both Computer Modern
Math fonts (the
default in \LaTeX{}) and 15 other font families for text and
mathematics. All of the
fonts used are readily available and about half of them are
provided free of charge.

\subsection{Additional math font commands}\label{sec8.8.1}

By loading the \textsf{amsfonts} (or \textsf{amssymb}) package,
the Euler Fraktur alphabet
(\verb|\mathfrak|) and a Blackboard Bold alphabet
(\verb|\mathbb|) become available.
\begin{verbatim}
\usepackage{amsfonts}
$ \forall n \in \mathbb{N} : \mathfrak{M}_n \leq \mathfrak{A} $
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-1}}}\\
\end{huge}
\end{center}

As an example of small-scale changes to the mathematical
typesetting, those
who prefer a visually distinct Blackboard Bold alphabet can load
one from the
Math Pazo fonts. See Section~\ref{sec7.6.3} for more information on the
Math Pazo fonts
and Section~\ref{sec7.4.1} for details on \verb|\DeclareMathAlphabet|. In
this example we first load the
\textsf{amsfonts} package and then overwrite its definition of
\verb|\mathbb|.
\begin{verbatim}
\usepackage{amsfonts}
\DeclareMathAlphabet\mathbb{U}{fplmbb}{m}{n}
$ \lbrace n,m \in \mathbb{N} \mid \mathfrak{N}_{n,m} \rbrace $
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-2}}}\\
\end{huge}
\end{center}

This example shows how to include arbitrary alphabets from your
\LaTeX{}
distribution as math alphabets, with the crucial part being the
arguments of
\verb|\DeclareMathAlphabet|. Although getting these right may
appear to be a tricky matter, it is
not so difficult once you know where to look. Fonts suitable for
inclusion
need to have an \texttt{.fd} file; that is, given a font family
name in the Berry
naming convention (see Section~\ref{sec7.10.2}), there should be a file
$\langle{enc}\rangle\langle{name}\rangle$
\texttt{.fd}. For example,
\\

\textcolor{red}{the commercial lucida handwriting font}
\\
\\
has the family name \texttt{hlcw}. It is available in several encodings,
including \texttt{T1}, so
one possible file to look at is \texttt{t1hlcw.fd}. In that file
you will find the remaining
arguments for the declaration. The font is available only in
series \texttt{m} and shape
\texttt{it}. All other font shapes contain substitutions (see Section~\ref{sec7.10.6} for details on
the file format for \texttt{.fd} files). Putting all this
together enables us to provide a
\verb|\mathscr| command. Another possibility is to use this
alphabet as a replacement
for the standard \verb|\mathcal| command.
\begin{verbatim}
\DeclareMathAlphabet\mathscr{T1}{hlcw}{m}{it}
$A_B \neq \mathscr{A}_\mathscr{B} \neq \mathcal{A}_\mathcal{B}$
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-3}}}\\
\end{huge}
\end{center}

Of course, the presence of the file \texttt{t1hlcw.fd} (and
other support files) on
your system does not mean that the previous example will run
there. To achieve
this goal, you must also install the corresponding commercial
font. Most modern
\LaTeX{} installations contain such support files for various
commercial font sets, so
that you can use these fonts the moment you have bought them and
added them
to your system. In this case you would need a file called
\texttt{hlcriw8a.pfb}.

In truth, you probably do not need to buy any fonts, because the
freely available
fonts already include a huge choice. The \textsf{nfssfont.tex}
program can provide
valuable help in choosing a font, by producing samples and
character tables for
the fonts available to your installation (see Section~\ref{sec7.5.7}).

\subsection{\textsf{bm}--Making bold}\label{sec8.8.2}

For bold Latin letters only, you can use the command
\verb|\mathbf|; for everything else,
there is the \textsf{bm} package. Although \textsf{amsmath}
provides \verb|\boldsymbol| and
\verb|\pmb|, the
rules about when to use which command, and many of the
restrictions on when
they work, can now be avoided: just load the \textsf{bm} package
and use \verb|\bm| to make any
formula as bold and beautiful as the available fonts allow.

The example below shows many ways to use the \verb|\bm| and
\verb|\mathbf| commands
and a strategy for defining shorthand names for frequently
occurring bold symbols,
using both standard \LaTeX's \verb|\newcommand| and
\verb|\bmdefine|, which is provided
by \textsf{bm}. Note that \verb|\mathbf{xy}| is not identical to
\verb|\bm{xy}|: the formet producesbold Roman ``\textcolor{red}{\textbf{xy}}''
and the latter produces $``xy''$ (i.e., bold math italic).
\begin{verbatim}
\usepackage{amsmath,amssymb,bm}
\newcommand\bfB{\mathbf{B}}  \newcommand\bfx{\mathbf{x}}
\bmdefine\bpl{\pl}           \bmdeflne\blnfty{\infty}
\section{The bold equivalence
$\sum_{j < B} \prod_\lambda : \bm{\sUID_{X_j} \prod_\lambda}$}\begin{gather}
B_\infty + \pi B_1 \sim \bfB_{\binfty} \bm{+}\bpi \bfB_{\bm{1}}     \bm {\sim B_\infty + \pi B_1} \\
  B_\binfty + \bpi B_{\bm{1}} \bm{\in} \bm{\biggl\lbrace}
     (\bfB, \bfx) : \frac {\partial \bfB}{\partial \bfx}
     \bm{\lnapprox} \bm{1} \bm{\biggr\rbrace}
\end{gather}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-4}}}\\
\end{huge}
\end{center}

In the above example \textsf{bm} tries its best to fulfill the
requests for bold versions
of individual symbols and letters, but if you look closely you
will see that the
results are not always optimal. For example, $\sum$, $\prod$,
and $\lessapprox$ are all made bold byuse of a technique known
as \emph{poor man's bold}, in which the symbol is overprinted
three times with slight offsets. Also, the \verb|{| is not made
bold in any way. Such
deficiencies are unavoidable because for some symbols there is
simply no bold
variant available when using the Computer Modern math fonts.

The situation changes when the \textsf{txfonts} are loaded by
changing the first line
of the previous example to
\verb|\usepackage{amsmath,amssymb,txfonts,bm}|. This family of
fonts
contains bold variants for \emph{all} symbols from standard
\LaTeX{} and \textsf{amssymb}. It
produces the following output:
\begin{verbatim}
\newcommand\bfB{\mathbf{B}} \newcommand\bfx{\mathbf{x}}
\bmdefine\bpi{\pi} \bmdefine\binfty{\infty}
\section*{The bold equivalence
$\sum_{j < B} \prod_\lambda : \bm{\sum_{X_j} \prod_\lambda}$}
\begin{gather}
B_\infty + \pi B_1 \sim \bfB_{\binfty} \bm{+}\bpi \bfB_{\bm{1}}
\bm {\sim B_\infty + \pi B_1} \\
B_\binfty + \bpi B_{\bm{1}} \bm{\in} \bm{\biggl\lbrace}
(\bfB, \bfx) : \frac {\partial \bfB}{\partial \bfx}
\bm{\lnapprox} \bm{1} \bm{\biggr\rbrace}
\end{gather}
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-5}}}\\
\end{huge}
\end{center}

What are the precise rules used by \verb|\bm| to produce bold
forms of the symbols
in its argument? In a nutshell, it makes use of the fact that
\LaTeX{} includes a \textbf{bold}
math version (accessible via \verb|\boldmath|) for typesetting a
whole formula in bold
(provided suitable bold fonts are available and set up). For
each symbol, the \verb|\bm|
command\marginpar{\emph{Load the \textsf{bm}\\package after\\packages that\\change the existing\\ math font set-up!}} looks at this math version to see what would be done in
that version. If
the font selected for the symbol is different from the one
selected in the normal
math version, it then typesets the symbol in this bold font,
obtaining a perfect
result (assuming that the bold math version was set up
properly). If the fonts in
both versions are identical, it assumes that there is no bold
variant available and
applies poor man's bold (see above).

With delimiters, such as \verb|\biggl\lbrace| in the example,
the situation is even
more complex: a delimiter in \TeX\ is typically typeset by a
glyph chosen to match a
requested height from a sequence of different sizes (see Section~\ref{sec8.5.3} on page 498).
Moreover, these glyphs can live in different fonts and a
particular size mayor may
not have bold variants, making it impossible for \verb|\bm| to
reliably work out whether
it needs to apply poor man's bold. It therefore essentially
typesets the delimiter
using whatever fonts the bold math version offers. With the
Computer Modern
ath fonts, only the smallest delimiter size is available in
bold; all other sizes
come from fonts that have no bold variants.
\begin{verbatim}
\usepackage{bm}
$\bm{\Biggl\lbrace\biggl\lbrace\Bigl\lbrace\bigl\lbrace \lbrace
     \mathcal{Q}
\rangle \bigr\rangle\Bigr\rangle\biggr\rangle\Biggr\rangle}$
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-6}}}\\
\end{huge}
\end{center}

This situation can be improved by use of the \textsf{txfonts}
(as in Example 8-8-5) or
use of another font set with full bold variants, such as the
\textsf{pxfonts} shown here:
\begin{verbatim}
\usepackage{pxfonts,bm}
$\bm{\Biggl\lbrace\biggl\lbrace\Bigl\lbrace\bigl\lbrace \lbrace
     \mathcal{Q}
\rangle \bigr\rangle\Bigr\rangle\biggr\rangle\Biggr\rangle}$
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-7}}}\\
\end{huge}
\end{center}

Normally, \verb|\bm| requires that if a command that itself
takes arguments is within its argument,
then that command must be fully included (i.e., both the commandand its arguments must appear) in the argument of \verb|\bm|; as
a result, all parts of the typeset
material will be in bold. If you really need the output of a
command with
arguments to be only partially bold, then you have to work
harder. You should
place the symbol(s) that should not be bold in an \verb|\mbox|
and explicitly reset the
math version within the box contents using \verb|\unboldmath|.
\TeX\ considers an \verb|\mbox|
to be a symbol of class Ordinary (see Section~\ref{sec8.9.1}); hence, to
get the spacing right,
you may have to surround it by a \verb|\mathbin|,
\verb|\mathrel|, or \verb|\mathop|.
\begin{verbatim}
\usepackage{amsmath,bm}
$ \bm{\sqrt[2]{x \times \alpha}} $ but
$ \bm{\sqrt[2]{x \mathbin{\mbox{\unboldmath$\times$}} \alpha}} $   or the similar
$ \bm{\sqrtsign}{\bm{x} \times \bm{\alpha}} $
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-8}}}\\
\end{huge}
\end{center}

Fortunately, such gymnastics are seldom needed. In most cases
involving commands
with arguments, only parts of the arguments need to be made
bold, which
can be achieved by using \verb|\bm| inside those arguments. As
with \verb|\sqrtsign| in the example
above, for the common case of bold accents \verb|\bm| is
specially programmed to allow the accent's
argument to be outside its own argument. However, if you need
such accents regularly, it is wise to define your own
abbreviation using \verb|\bmdefine|, as in the
next example.

Although \verb|\bmdefine\bpi{pi}| appears to be simply shorthand
for
\verb|\newcommand\bpi{bm{\pi}}|,\marginpar{\emph{Speeding up the\\processing}} in fact almost the opposite is
true: \verb|\bm| defines
a new hidden temporary command using \verb|\bmdefine| and then
immediately uses
this temporary command to produce the bold symbol. In other
words, \verb|\bmdefine|
does all the hard work! If you frequently use, for example,
something that is defined
via \verb|\bm{alpha}|, then a new \verb|\bmdefine| is executed
at every use. If you set
things up by doing \verb|\bmdefine\balpha{\alpha}|, then
\verb|\bmdefine| does its timeconsuming
work only once, however many times \verb|\balpha| is used.
\begin{verbatim}
\usepackage{bm}   \bmdefine\bhat{\hat}
$\hat a \neq \bm{\hat a} \neq \bm\hat a = \bhat a \neq
\bm\widehat a$
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-8-9}}}\\
\end{huge}
\end{center}
This example also shows that the variable-width accents (e.g.,
\verb|\widehat|) share a deficiency
with the delimiters: in the Computer Modern math set-up they
come
from a font for which no bold variant is available.

The \textsf{bm} package tries very hard to produce the correct
spacing between symbols (both inside
and outside the argument of \verb|\bm|).\marginpar{\emph{Dealing with\\strange errors}} For this effort to
work, \verb|\bm|
has to ``investigate'' the definitions of the commands in its
argument to determine
the correct mathematical class to which each of the resulting
symbols belongs
(see Section~\ref{sec8.9.1} on page 524). It is possible that some
strange constructions
could confuse this investigation. If this happens then \LaTeX{}
will almost certainly
stop with a strange error. Ideally, this problem should not
arise with constructs
from standard \LaTeX{} or the .\AmS-\LaTeX{} distributions, but
proper parsing in \TeX{} is
extremely
difficult and the odd overlooked case might still be present.
For instance,
the author got trapped when writing this section by the fact
that \verb|\bm| was trying
to process the argument of \verb|\hspace| instead of producing
the desired space (this problem is
fixed in version 1.1a).

If some command does produce an error when used inside
\verb|\bm|, you can always
surround it \emph{and all its arguments} with an extra level of
braces-for example,
writing \verb|\bm{..{\cmd ..}..}| rather than simply \verb|\bme|
. \verb|\cmd ..}|. The \verb|\bm|
command
will not attempt to parse material surrounded by braces but will
use the
\verb|\boldmath| version to typeset the whole of the formula
within the braces. The
resulting bold sub-formula is then inserted as if it were a
``symbol'' of class Ordinary.
Thus, to obtain the right spacing around it, you may have to
explicitly set
its class; for instance, for a relation you would use
\verb|\bm{.. \mathrel{\cmd ..}..}|
(see Section~\ref{sec8.9.1} on page 524).

\subsection{A collection of math font set-ups}\label{sec8.8.3}

In this section we show a sample text typeset with different
font set-ups for math
and text. Figure~\ref{fig8.1} shows the sample text typeset in Computer
Modern text and
math fonts---the default font set-up in \LaTeX. Figures~\ref{fig8.2} to~\ref{fig8.16} on pages 514-523
(with blue captions to visually separate caption and sample)
have also been generated
by typesetting this sample text, each time loading different
support packages
for text and math fonts. These packages do all the work required
to modify \LaTeX's
internal tables. For other set-ups and additional information
see [24].

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-10}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Computer Modern fonts}
\label{fig8.1}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-11}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset wi ith Concrete fonts}
\label{fig8.2}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-12}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Concrete and Euler fonts}
\label{fig8.3}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-13}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Fourier fonts}
\label{fig8.4}
\end{figure}

The Concrete Roman text fonts were designed by Donald Knuth,
matching
math fonts were designed by Ulrik Vieth; see Section~\ref{sec7.7.2}. They
are shown in
Figure~\ref{fig8.2}, which was produced by adding
\verb|\usepackage[boldsans]{ccfonts}| to
the preamble of the sample document. Note that Concrete fonts
have no boldface,
so that the $\partial Q$ subscript on the integral comes out in
poor man's bold.

Figure~\ref{fig8.3} combines Concrete Roman with Euler Math (designed by
Hermann
Zapf). This combination was produced with
\begin{verbatim}
   \usepackage{ccfonts} \usepackage[euler-digits]{eulervm}
\end{verbatim}
and shows no deficiencies with bold symbols in math; see also
Section~\ref{sec7.7.10}. You
will probably want to design different headings, as the default
(Computer Modern
boldface extended) does not blend very well with Concrete Roman.
In Figure~\ref{fig8.4} we see Utopia combined with Fourier Math fonts
(designed by
Michel Bovani). This combination has been discussed in Section~\ref{sec7.7.7} and was
produced by adding \verb|\usepackage{fourier}| to the preamble.
Again, the boldface
subscript shows deficiencies, but these are expected to be
addressed in a future
release of the fonts.

The \MF\ versions of Concrete, both Roman and Math, are freely
available.
Scalable outlines can be purchased from
MicroPress.\footnote{\url{http://www.micropress-inc.com}}
The Fourier set-up is freely available in Type 1 format.

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-14}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Times and Symbol}
\label{fig8.5}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-15}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Times and TX fonts}
\label{fig8.6}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-16}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Times and TM Math fonts}
\label{fig8.7}
\end{figure}

This page spread shows three math font set-ups for use with
Times Roman as
a body font. With Times Roman being one of the predominant fonts
in use today,
several solutions have been developed to provide support for it.
Figure~\ref{fig8.5} shows a free solution devised by Alan Jeffrey and
others (discussed
in Section~\ref{sec7.6.2}), which was produced by adding
\verb|\usepackage{mathptmx}| to the
preamble. It deploys Adobe's Symbol font for most mathematical
symbols and
due to a missing set of bold symbols for math, shows the typical
deficiencies in
this respect. In contrast to other font solutions it does not
offer its own shapes for
the extended AMS symbol set but uses the standard Computer
Modern shapes.

Figure~\ref{fig8.6} also shows a freely available implementation
deploying the TX
fonts (designed by Young Ryu). It offers the full range of
mathematical symbols
including boldface variants, but uses exceptionally tight
spacing so that sometimes
symbols in formulas touch each other; see Section~\ref{sec7.7.5} for
details. It can
be activated by adding \verb|\usepackage{txfonts}| in the
preamble.

In Figure~\ref{fig8.7} we see the commerCially available TM Math solution
by MicroPress,
\footnote{\url{http://www.micropress-inc.com}} which uses
considerably wider spacing in formulas. It
comprises bold symbols
and offers its own shapes for the AMS extended symbol set. It
can be activated
through \verb|\usepackage{tmmath,tmams}| in the preamble.

Other commercial Math fonts in Type 1 format for use with Times
Roman
are MathTime and MathTime Professional (designed by Michael
Spivak), available
through Y\&Y\footnote{ \url{http://www.YandY.com}} and
Pc\TeX,\footnote{\url{http://www.pctex.com}}
respectively.

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-17}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Palatino and Math Pazo}
\label{fig8.8}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-18}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Palatino and PX fonts}
\label{fig8.9}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-19}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Palatino and PA Math fonts}
\label{fig8.10}
\end{figure}

The typeface Palatino was designed by Hermann Zapf for the
Stempel foundry
in 1948 based on lettering from the Italian Renaissance. Since
then it has become
one of the most widely used typefaces, and probably the most
popular Old Style
revival in existence. A number of math font set-ups are
available for use with
Palatino as the text font.

Figure~\ref{fig8.8} shows the freely available Math Pazo fonts (designed
by Diego Puga),
which can be activated with \verb|\usepackage{mathpazo}|. It
offers boldface symbols
and a matching blackboard bold alphabet, but does not contain
specially designed
shapes for the AMS symbol set; see also Section~\ref{sec7.6.3}.

In contrast, the free PX fonts (designed by Young Ryu) comprise
the complete
symbol set. They are shown in Figure~\ref{fig8.9}. Just like the TX
fonts, they are
very tightly spaced; see Section~\ref{sec7.7.6} for details. This set-up
can be activated with
\verb|\usepackage{pxfonts}|.

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-20}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Baskenille fonts}
\label{fig8.11}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-21}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Charter fonts}
\label{fig8.12}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-22}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Lucida Bright}
\label{fig8.13}
\end{figure}

Figure~\ref{fig8.10} shows the commercial solution offered by
MicroPress.\footnote{\url{http://www.micropress-inc.com}} It
provides
a similar range of symbols as the Math Pazo solution with
rougbly the same running
length, though with noticeably different shapes. This set-up can
be activated
with  \verb|\usepackage{pamath}|.

Figure~\ref{fig8.11} deploys the Baskerville typeface as a text font.
This ``transitional''
typeface was originally designed by John Baskerville (1706-1775)
and can be obtained
from many font vendors. The math fonts are BA Math from
MicroPress\footnote{\url{http://www.micropress-inc.com}}--
their distribution also contains a variant of the Baskerville
text fonts used here.
The BA Math fonts include bold weights but do not contain shapes
for the AMS
symbol set. Note that although the individual symbols do not
look very large, the
display formulas take more vertical space than in other
examples. The font set-up
is activated with \verb|\usepackage{ba}|.

Figure~\ref{fig8.12} shows the use of the commercial CH Math fonts (also
from
MicroPress\footnote{\url{http://www.micropress-inc.com}}
). Their distribution has been designed to work with the freely
available
Charter fonts; see Section~\ref{sec7.6.1}. The CH Math fonts comprise the
full set of mathematical
symbols including the AMS additions and are activated by adding
the
preamble line \verb|\usepackage{chmath,chams}|.

The Lucida Bright and Lucida New Math fonts are displayed in
Figure~\ref{fig8.13}.
This set of commercial text and math fonts has been designed by
Charles Bigelow
and Kris Holmes and can be obtained from
Y\&Y.\footnote{\url{http://www.YandY.com}} The font set-up
covers all standard
mathematical symbols including AMS additions and is activated by
loading
the \textsf{lucidabr} package. As you will notice, the formulas
run very wide, which enhances
legibility at the cost of space. The body font in this book is
Lucida Bright.
However, for the examples, we usually used Computer Modern to
make them come
out as in standard \LaTeX.

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-23}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with CM Bright fonts}
\label{fig8.14}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-24}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Helvetica Math fonts}
\label{fig8.15}
\end{figure}

\begin{figure}[!h]
\centering
\begin{large}\textbf{1\quad Sample page of mathematical
typesetting}\end{large}
First some large operators both in text: $\iiint \limits
_\mathcal{Q}f(x, y, z) dx dy dz$ and
$\prod_{\gamma\in\Gamma_{\bar
C}}\partial\left(\widetilde{X}_\gamma\right)$; and also on
display:\\
\begin{align}
\iiint \limits _\mathcal{Q}f(x, y, z) dx dy
dz&\le\oint_{\partial\mathcal{Q}}f'\left(\max\begin{Bmatrix}\frac{\|w\|}{|w^2+x^2|};\frac{\|z\|}{|y^2+z^2|};\frac{\|w\oplus
z\|}{\|x\oplus y\|}\end{Bmatrix}\right)\nonumber\\
\fbox{8-8-25}\hspace{4cm}&\precapprox\biguplus_{\mathbb{Q}\Subset
Q}\begin{bmatrix}
f^*\left(\frac{\lgroup \mathbb{Q}(t)
\rgroup}{\sqrt{1-t^2}}\right)\end{bmatrix}_{t=\alpha}^{t=\vartheta}
\end{align}

For x in the open interval ]-1,1[ the infinite sum in Equation
(2) is convergent;
however, this does not hold throughout the closed interval [-1,
1].
\\
\begin{equation}
(1-x)^{-k}=1+\sum_{j=1}^\infty(-1)^j \begin{Bmatrix}
k\\j\end{Bmatrix} x^j \qquad
for\hspace{3pt}k\in \mathbb{N}; k\neq 0.
\end{equation}

\caption{Sample page typeset with Informal Math fonts}
\label{fig8.16}
\end{figure}

This page spread shows two sans serif set-ups and an
``informal'' math font
set-up. The solutions involving sans serif fonts can be usefully
deployed in many
circumstances, such as conventional articles, presentations
(e.g., slides, reports),
online documentation, or magazines. On the other hand, the
Informal Math solution
should probably be confined to announcements, fliers, and
similar material.

Figure~\ref{fig8.14} shows the Computer Modern Bright set of fonts
(designed by Walter
Schmidt), which are based on the Computer Modern font design The
solution
offers the full range of math symbols in normal and bold weights
and is activated
by loading the \textsf{cmbright} package; see Section~\ref{sec7.7.3}. The
fonts are freely available
in \MF\ format, and the Type 1 versions are commercially
available from
MicroPress.\footnote{\url{http://www.micropress-inc.com}}

Figure~\ref{fig8.15} shows a math font set-up for use with Helvetica
(originally designed
by Max Miedinger). The HV math fonts have been designed at
MicroPress\footnote{\url{http://www.micropress-inc.com}}
and comprise the full set of mathematical symbols. The set-up is
activated by loading
the packages \textsf{hvmath} and \textsf{hvams} (for the AMS
symbol set). While the Type 1
fonts are only commercially available, you can obtain 300dpi
bitmapped fonts
free of charge from MicroPress.

Finally, Figure~\ref{fig8.16} shows the Informal Math solution also
offered by MicroPress.
\footnote{\url{http://www.micropress-inc.com}} The font design
is loosely based on Adobe's Tekton
family of fonts. The
set-up is activated by loading the \textsf{infomath} package.
Note that the text fonts are
only available in \texttt{OT1} and that the AMS symbol set is
not supported.

\section{Symbols in formulas}\label{sec8.9}

The tables at the end of this section advertise the large range
of mathematical symbols
provided by the \AmS\ fonts packages, including the command to
use for each
symbol. They also include the supplementary symbols from the St
Mary Road Font,
which was designed by Alan Jeffrey and Jeremy Gibbons. This font
extends the
Computer Modern and \AmS\ symbol font collections; the
corresponding \textsf{stmaryrd}
package should normally be loaded in addition to
\textsf{amssymb}, but always after it.
It provides extra symbols for fields such as functional
programming, process algebra,
domain theory, linear logic, and many more. For a wealth of
information
about an even wider variety of symbols, see \emph{the
Comprehensive \LaTeX{} Symbol List}
by Scott Pakin [134].

The tables indicate which extra packages need to be loaded to
use each symbol
command. They are organized as follows: symbols with comman~
names in
black are available in standard \LaTeX{} without loading further
packages; symbols
in \textcolor{blue}{blue} require loading either
\textsf{amsmath,amssymb,} or \textsf{stmaryrd}, as
explained in
the table notes. If necessary, further classification is given
by markings: $^{(StM)}$ Signals
a symbol from \textsf{stmaryrd} when the table also contains
symbols from other
packages; $^{(kernel)}$ identifies symbols that are available in
standard \LaTeX{} but only
by combining two or more glyphs, whereas a single glyph exists
in the indicated
package; and $^{(var)}$ marks ``Alphabetic characters/symbols''
(of type \verb|\mathalpha|;
see Table~\ref{tab7.30} on page 435) that change appearance when used
within the scope
of a math alphabet identifier (see Section~\ref{sec7.4}).

\subsection{Mathematical symbol classes}\label{sec8.9.1}

The symbols are classified primarily by their ``mathematical
class", occasionally
called their ``math symbol type". This classification is related
to their "meaning"
in standard technical usage, but its importance for mathematical
typography is
that it influences the layout of a formula. For example, \TeX's
mathematical formatter
adjusts the horizontal space on either side of each symbol
according to
its mathematical class. There are also some finer distinctions
made, for example,
between accents and simple symbols and in breaking up the
enormous list of
Relation symbols into several tables.

The set-up for mathematics puts each symbol into one of these
classes: Ordinary
(Ord), Operator (Op), Binary (Bin), Relation (Rei), Opening
(Open), Closing
(Close), or Punctuation (Punct). This classification can be
eXplicitly changed
by using the commands
\verb|\mathord,\mathop,\mathbin,\mathrel,\mathopen|,
\verb|\mathclose|, and \verb|\mathpunct|, thereby altering the
surrounding spacing. In this
example, \verb|\#| and \verb|\top| (both Ord by default) are
changed into a Rei and an Op.
\begin{verbatim}
\usepackage[fleqn]{amsrnath}
\[ a          \#          \top _x^\alpha x^\alpha_b \]
\[ a \mathrel{\#} \mathop{\top}_x^\alpha x^\alpha_b \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-9-1}}}\\
\end{huge}
\end{center}

\begin{table}[!h]
\centering
\begin{tabular}{cccccccccc}
\multicolumn{10}{c}{\emph{Right Object}}\\
&&Ord& Op& Bin& ReI& Open& Close& Punct& Inner\\
&Ord& 0& 1& (2)& (3)& 0& 0& 0& (1)\\
&Op& 1& 1& $*$& (3)& 0& 0& 0& (1 )\\
&Bin& (2)& (2)& $*$& $*$& (2)&  $*$& $*$& (2)\\
\emph{Left}& ReI& (3)& (3)& $*$& 0& (3)& 0& 0& (3)\\
\emph{Object}& Open& 0& 0& $*$& 0& 0& 0& 0& 0\\
&Close& 0& 1& (2)& (3)& 0& 0& 0& (1)\\
&Punct& (1)& (1 )& $*$& (1)& (1)& (1)& (1)& (1)\\
&Inner& (1)& 1& (2)& (3)& (1)& 0& (1)& (1)\\
&\multicolumn{9}{l}{0=\emph{\texttt{no space}}, 1
=\emph{\texttt{ $\backslash$thinmuskip}}, 2 =
\emph{\texttt{$\backslash$medmuskip}}, 3 =
\emph{\texttt{$\backslash$thickmuskip}}, $*$ =
\emph{\texttt{impossible}}}\\
\multicolumn{10}{l}{\emph{Entries in (\textcolor{blue}{blue})
are not added when in the mathematical
``script styles'' (see also Sections~\ref{sec8.7.1} and~\ref{sec8.7.6}).}}
\end{tabular}
\caption{Space between symbols}
\label{tab8.7}
\end{table}

A symbol can be declared to belong to one of the above classes
using the
mechanism described in Section~\ref{sec7.10.7}. In addition, certain
sub-formulas--most
importantly fractions, and those produced by \verb|\left| and
\verb|\right|--form a class
called Inner; it is explicitly available through the
\verb|\mathinner| command.

In \TeX\, spacing within formulas is done simply by identifying
the class of
each object in a formula and then adding space between each pair
of adjacent
objects as defined in Table~\ref{tab8.7}; this table is unfortunately
hard-wired into \TeX's
mathematical typesetting routines and so cannot be changed by
macro packages.\footnote{Although a
few of the entries in the table are questionable, on the whole
it gives pleasing results.}
In this table 0, 1, 2, and 3 stand for no space, a thin space
(\verb|\,|), a medium space
(\verb|\:|), and a thick space (\verb|\;|), respectively. The
exact amounts of space used are listed
in Section~\ref{sec8.7.6} on page 507.

A Binary symbol is turned into an Ordinary symbol whenever it is
not pre·
ceded and followed by symbols of a nature compatible with a
binary operation;
for this reason, some entries in the table are marked with a
star to indicate that
they are not possible. For example, \verb|$+x$| gives $+x$ (a
``unary plus'') and not + $x$;
the latter can be produced by \verb|${}+x$|.

Finally, an entry in (blue) in Table 8.7 indicates that the
corresponding space
is not inserted when the style is script or scriptscript.

As an example of applying these rules, consider the following
formula (the
default values are deliberately changed to show the added spaces
more clearly):
\begin{verbatim}
\thinmuskip=10mu \medmuskip=17mu \thickmuskip=30mu
\[
          a - b = -\max \{ x , y \}
\]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-9-2}}}\\
\end{huge}
\end{center}

\begin{table}
\centering
\begin{tabular}{c}
ABCDEFGHIJKLMNOPQRSTUVWXYZ\\
abcdefghijklmnopqrstuvwxyz\\
0123456789
\end{tabular}
\caption{Latin letters and Arabic numerals}
\label{tab8.8}
\end{table}
\TeX\ identifies the objects as Ord, Bin, Ord, and so on, and
then inserts spaces as
follows:
\begin{verbatim}
    a      -      b      =      -    \max  \{   x    ,       y   \}
   Ord \: Bin \: Ord \; ReI \; Ord \, Op Open Ord Punet \, Ord Close
\end{verbatim}
The minus in front of \verb|\max| is turned into an Ordinary
because a Binary cannot follow a
Relation.

Table~\ref{tab8.7} reveals a difference\footnote{Another important
distinction is that the material within a
``\verb=\left= \ldots \verb=\right=''
construction is
processed separately as a sub-formula (see Section~\ref{sec8.7.2} on page
503).} between a ``
\verb|\left...\right|''' construction, in
which the entire sub-formula delimited by the construction
becomes a single object
of class Inner (see Section~\ref{sec8.5.3} on page 498), and commands
like \verb|\Bigl| and \verb|\Bigr| that
produce individual symbols of the classes Opening and Closing,
respectively. Although they may
result in typesetting delimiters of equal vertical
size, spacing differences can arise depending on adjacent
objects in the formula.
For example, Ordinary followed by Opening gets no space, whereas
Ordinary followed
by Inner is separated by a thin space. The spaces inside the
sub-formula
within a `` \verb|\left...\right|'' construction are as
expected, beginning with an Opening
symbol and ending with a Closing symbol. In this example we
again use larger
spaces to highlight the difference.
\begin{verbatim}
\thinmuskip=10mu \medmuskip=17mu \thickmuskip=30mu
\[ a \Bigl( \sum x \Bigr) \neq a \left( \sum x \right) \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-9-3}}}\\
\end{huge}
\end{center}

In summary, it is not enough to look up a symbol in the tables
that follow;
rather, it is also advisable to check that the symbol has the
desired mathematical
class to ensure that it is properly spaced when used. Example
8-9-4 on page 528
shows how to define new symbols that differ only in their
mathematical class from
existing symbols.

\subsection{Letters, numerals, and other Ordinary symbols}\label{sec8.9.2}

The unaccented ASCII Latin letters and Arabic numeral digits
(see Table~\ref{tab8.8}) all
referred to as ``Alphabetic symbols''. The font used for them
can vary: in mathematical
formulas, the default font for Latin letters is italic whereas
for the Arabic
digits it is upright/Roman. Alphabetical symbols are all of
class Ordinary.

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathord} (Greek)}
\label{tab8.9}
\end{table}

Unlike the Latin letters, the mathematical Greek letters are no
longer closely
related to the glyphs used for typesetting normal Greek text.
Due to an interesting
18th-century happenstance, in the major European tradition of
mathematical
typography the default font for lowercase Greek letters in
mathematical formulas
is italic whereas for uppercase Greek letters it is
upright/Roman. (In other fields,
such as physics and chemistry, the typographical traditions are
slightly different.)

The capital Greek letters in the first columns of Table 8.9 are
also Alphabetic
symbols whose font varies, with the default being upright/Roman.
Those capital
Greek letters not present in this table are the letters that
have the same appearance
as some Latin letter (e.g., \emph{A} and \emph{Alpha}, \emph{B} and
\emph{Beta}, \emph{K} and \emph{Kappa},
\emph{O} and
\emph{Omicron}). Similarly, the list of lowercase Greek letters
contains no omicron because
it would be identical in appearance to the Latin \emph{o}. Thus,
in practice, the
Greek letters that have Latin look-alikes are not used in
mathematical formulas.

Table 8.10 lists other letter-shaped symbols of class Ordinary.
The first four
are Hebrew letters. Table~\ref{tab8.11} lists the remaining symbols in
the Ordinary class,
including some common punctuation. These behave like letters and
digits, so they
never get any extra space around them.

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathord} (letter-shaped)}
\label{tab8.10}
\end{table}

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathord} (miscellaneous)}
\label{tab8.11}
\end{table}

A common mistake is to use the symbols from Table~\ref{tab8.11} directly
as Binary
operator or Relation symbols, without using a properly defined
math symbol command
for that type. Thus, if you use commands such as
\verb|\#,\square,| or \verb|\&|, check carefully
that you get the correct inter-symbol spaces or, even better,
define your own symbol command.
\begin{verbatim}
\usepackage[fleqn]{amsmath}   \usepackage{amssymb}
\DeclareMathSymbol\bneg   {\mathbin}{symbols}{"3A}
\DeclareMathSymbol\rsquare{\mathrel}{AMSa}{"03}
\[ a \neg           b \qquad x          \square  y + z \]
\[ a \mathbin{\neg} b \qquad x \mathrel{\square} y + z \]
\[ a \bneg      b \qquad x          \rsquare y + z \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-9-4}}}\\
\end{huge}
\end{center}

The \verb|\DeclareMathSymbol| declaration is explained in
Section~\ref{sec7.10.7}. The correct values for its
arguments are most easily found by looking at the definitions
in the file \texttt{amssymb.sty} or \texttt{fontmath.ltx} (for
the core symbols). For example, we
looked up \verb|\neq| and \verb|\square|, replaced the
\verb|\mathord| in each case, and finally
gave the resulting symbol a new name.

\begin{table}[!h]
\centering
\begin{tabular}{llllllll}
$\acute{x}$&\verb|\acute{x}|&$\bar{x}$&\verb|\bar{x}|&$\breve{x}$&\verb|\breve{x}|&$\check{x}$&\verb|\check{x}|\\
$\ddddot{x}$&\verb|\ddddot{x}|&$\dddot{x}$&\verb|\dddot{x}|&$\ddot{x}$&\verb|\ddot{x}|&$\dot{x}$&\verb|\dot{x}|\\
$\grave{x}$&\verb|\grave{x}|&$\hat{x}$&\verb|\hat{x}|&$\mathring{x}$&\verb|\mathring{x}|&$\tilde{x}$&\verb|\tilde{x}|\\
$\vec{x}$&\verb|\vec{x}|&$\widehat{xyz}$&\verb|\widehat{xyz}|&$\widetilde{xyz}$&\verb|\widetilde{xyz}|\\\\

\multicolumn{4}{c}{\emph{Accents in \textcolor{blue}{blue}
require the \textsf{amsmath}
package.}}\\[4pt]

\multicolumn{8}{c}{\emph{The last two accents are available in a
range of widths, the largest suitable one being automatically used.}}
\end{tabular}
\caption{Mathematical accents, giving sub-formulas of class \texttt{$\backslash$mathord}}
\label{tab8.12}
\end{table}

\subsection{Mathematical accents}\label{sec8.9.3}

The accent commands available for use in formulas are listed in
Table~\ref{tab8.12}. Most
of them are already defined in standard \LaTeX. See Section~\ref{sec8.4.8} for ways to define
additional accent commands and Section~\ref{sec8.5.2} for information
about extensible
accents. Adding a mathematical accent to a symbol always
produces a symbol
of class Ordinary. Thus, without additional help, one cannot use
the accents to
produce new Binary or Relation symbols.
\begin{verbatim}
\usepackage{amstext}
\[ a = b \text{ but } a \tilde{=} b
   \text{ which is not } a \mathrel{\tilde{=}} b \]
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-9-5}}}\\
\end{huge}
\end{center}

Other ways to place symbols over Relation symbols are shown in
Section~\ref{sec8.4.10}. When adding an accent to an $i$ or $j$ in mathematics,
it is best to use
the dotless variants \verb|\imath| and \verb|\jmath|; for
example, use \verb|\hat{\jmath}| to get
$\hat{\jmath}$.

\subsection{Binary operator symbols}\label{sec8.9.4}

There are more than 100 symbols of class Binary operators from
which to choose.
Most of these Binary symbols are shown in Table~\ref{tab8.13} on the next
page. Some of them are also available, under different names, as Relation
symbols.

The \textsf{amssymb} package offers a few box symbols for use as
Binary operators;
many more are added by \textsf{stmaryrd}. These are shown in
Table~\ref{tab8.14}.

The \textsf{stmaryrd} package can be loaded with the option
\texttt{heavycircles}. It causes
each circle symbol command in Table~\ref{tab8.15} on page 531 that starts
with \verb|\var|
to swap its definition with the corresponding command without
the ``var''; for
example, the symbol \verb|\varodot| becomes \verb|\odot|, and
vice versa.

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathbin} (miscellaneous)}
\label{tab8.13}
\end{table}

\begin{table}[!h]
\centering

\caption{Symbols of class  \texttt{$\backslash$mathbin} (boxes)}
\label{tab8.14}
\end{table}

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathbin} (circles)}
\label{tab8.15}
\end{table}

\subsection{Relation symbols}\label{sec8.9.5}

The class of binary Relation symbols forms a collection even
larger than that of the
Binary operators. The lists start with symbols for equality and
order (Table~\ref{tab8.16}
on the next page). You can put a slash through any Relation
symbol by preceding
it with the \verb|\not| command; this negated symbol represents
the complement (or
negation) of the relation.
\begin{verbatim}
$ u \not< v$ or $a \not\in \mathbf{A} $
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{yellow}{\emph{I DON'T KNOW 8-9-6}}}
\end{huge}
\end{center}

Especially with larger symbols, this generic method of negating
a Relation
symbol does not always give good results because the slash will
always be of
the same size, position, and slope. Therefore, some specially
designed ``negated
symbols'' are also available (see Table~\ref{tab8.17} on the following
page). If a choice is
available, the designed glyphs are usually preferable. To see
why, compare the
symbols in this example.
\begin{verbatim}
\usepackage{amssymb}
$ \not  \leq \  \not\succeq \ \not\sim $ \par
$ \nleq \    \nsucceq \   \nsim        $
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{yellow}{\emph{I DON'T KNOW 8-9-7}}}
\end{huge}
\end{center}

Next come the Relation symbols for sets and inclusions, and
their negations
(see Tables~\ref{tab8.18} and~\ref{tab8.19}).

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathrel} (equality and order)}
\label{tab8.16}
\end{table} 

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathrel} (equality and order---negated)}
\label{tab8.17}
\end{table}

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathrel} (sets and inclusion)}
\label{tab8.18}
\end{table}

They are followed by Relation symbols that are arrow-shaped (see
Tables~\ref{tab8.20}
and~\ref{tab8.21}). Some extensible arrow constructions that produce
compound Relation
symbols are described in Section~\ref{sec8.5.2} on page 497.

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathrel} (sets and inclusion---negated)}
\label{tab8.19}
\end{table}

In addition to \verb|\not|, used to negate general Relation
symbols, other building blocks have been
especially designed to negate or extend arrow-like symbols;
these are collected in Table 8.22.
\begin{verbatim}
\usepackage{stmaryrd}
$\Longarrownot\longleftrightarrow \qquad
\arrownot\hookleftarrow$
\end{verbatim}
\begin{center}
\begin{huge}
\colorbox{green}{\textcolor{red}{\emph{I DON'T KNOW 8-9-8}}}\\
\end{huge}
\end{center}

Finally, in Table~\ref{tab8.23} on page 535 you will find a miscellaneous
collection of
Relation symbols.

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathrel} (arrows)}
\label{tab8.20}
\end{table}

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathrel} (arrows---negated)}
\label{tab8.21}
\end{table}

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathrel} (negation
and arrow extensions)}
\label{tab8.22}
\end{table}

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathrel}
(miscellaneous)}
\label{tab8.23}
\end{table}

\subsection{Punctuation}\label{sec8.9.6}

The symbols of class Punctuation appear in Table~\ref{tab8.24}, together
with some other
punctuation-like symbols. Note that some of the typical
punctuation characters
(i.e., \verb|``.!?''|) are not set up as mathematical
punctuation but rather as symbols
of class Ordinary. This can cause unexpected results for common
uses of these
symbols, especially in the cases of \verb|!| and \verb|?| Some
of the dots symbols listed here
are of class Inner; Section~\ref{sec8.5.1} on page 496 provides
information about using
dots for mathematical ellipsis.

The : character produces a colon with class Relation-not a
Punctuation symbol.
As an alternative, standard \LaTeX{} offers the command
\verb|\colon| as the Punctuation symbol.
However, the amsmath package makes unfortunate major changes
to the spacing produced by the command \verb|\colon|, so that it
is useful only for a particular
layout in constructions such as f\verb|\colon| A \verb|\to| B
where it produces \colorbox{red}{$f:
A\to B$}. It is therefore wise to always use
\verb|\mathpunct{:}| for the simple punctuation colon
in mathematics.
%

\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathpunct}
\texttt{$\backslash$mathord}\texttt{$\backslash$mathinner}(punctuation)}
\label{tab8.24}
\end{table}


\begin{table}[!h]
\centering

\caption{Symbols of class \texttt{$\backslash$mathop}}
\label{tab8.25}
\end{table}
\begin{Huge}
\begin{center}
\colorbox{red}{I DONT KNOW TABs 8-25}
\end{center}
\end{Huge}
%
\subsection{Operator symbols}\label{sec8.9.7}

The Operator symbols typically come in two sizes, for text and
display uses; most
of them are related to similar Binary operator symbols. Whether
an Operator symbol
takes limits in displays depends on a variety of factors (see
Section~\ref{sec8.4.4}). The
available collection is shown in Table~\ref{tab8.25}.
%

\begin{table}[!h]
\centering

\caption{Symbol pairs of class \texttt{$\backslash$mathopen} and
\texttt{$\backslash$mathclose}
(extensible)}
\label{tab8.26}
\end{table}
\begin{table}[!h]
\centering
\caption{Symbol pairs of class \texttt{$\backslash$mathopen} and
\texttt{$\backslash$mathclose}
(non-extensible)}
\label{tab8.27}
\end{table}

\subsection{Opening and Closing symbols}\label{sec8.9.8}

The paired extensible delimiters, when used on their own (i.e., without a preceding
\verb=\left=, \verb=\right=, or \verb=\middle=), produce symbols of class Opening or Closing; these
pairs are listed in Table~\ref{tab8.26}. See Section~\ref{sec8.5.3} on page 498 for further information
about the extensible symbols.

To improve the flexibility of the vertical bar notation, amsmath defines some
new pairs of paired extensible delimiter commands: \verb=\lvert=, \verb=\rvert=, \verb=\lVert=,
and \verb=\rVert=. These commands are comparable to standard \LaTeX's \verb=\langle= and
\verb=\rangle= commands.

The \textsf{stmaryrd} package adds a collection of non-extensible paired symbols of
class Opening and Closing, which are listed in Table~\ref{tab8.27}.






\end{document}
%
\begin{table}
\begin{tabular}{llllll}
$\llceil$ $\rrceil$&\verb|\llceil
\rrceil|$^{(\emph{StM})}$&$\binampersand$
$\bindnasrepma$&\verb|\binampersand
\bindnasrepma|$^{(\emph{StM})}$&$\Lbag$ $\Rbag$&\verb|\Lbag
\Rbag|$^{(\emph{StM})}$\\

$\llfloor$ $\rrfloor$&\verb|\llfloor
\rrfloor|$^{(\emph{StM})}$&$\llparenthesis$
$\rrparenthesis$&\verb|\llparenthesis
\rrparenthesis|$^{(\emph{StM})}$\\[5pt]

\multicolumn{6}{l}{\emph{All these pairs of symbols require the
\textsf{stmaryrd} package and are
not extensible.}}
\end{tabular}
\caption{Symbol pairs of class \texttt{$\backslash$mathopen} and
\texttt{$\backslash$mathclose}
(non-extensible)}
\end{table}

\begin{Huge}
\begin{center}
\colorbox{red}{I DONT KNOW TABs 8-26,27}
\end{center}
\end{Huge}
%

\subsection{Opening and Closing symbols} 

The paired extensible delimiters, when used on their own (i.e.,
without a preceding
\verb|\left|, \verb|\right|, or \verb|\middle|), produce symbols
of class Opening or Closing; these
pairs are listed in Table 8.26. See Section 8.5.3 on page 498
for further information
about the extensible symbols.

To improve the flexibility of the vertical bar notation, amsmath
defines some
new pairs of paired extensible delimiter commands:
\verb|\lvert|, \verb|\rvert|, \verb|\lVert|, and
\verb|\rVert|. These commands are comparable to standard
\LaTeX's \verb|\langle| and \verb|\rangle|
commands.

The \textsf{stmaryrd} package adds a collection of
non-extensible paired symbols of
class Opening and Closing, which are listed in Table 8.27.



\chapter{\LaTeX\ in a Multilingual Environment}

\chapter{Graphics Generation and Manipulation}

\chapter{Index Generation}

\chapter{Managing Citations}

\chapter{Bibliography Generation}

\chapter{\LaTeX\ Package Documentation Tools}


%\end{document}










