summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/mathmode/Mathmode.tex
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2006-10-07 22:54:05 +0000
committerNorbert Preining <preining@logic.at>2006-10-07 22:54:05 +0000
commit1b6cea470ecac795dbf4efe7b66abe6da4058c2f (patch)
tree883c420d6ca2a94bfb1835771dbd2e83d0763baf /Master/texmf-doc/doc/english/mathmode/Mathmode.tex
parent786d68888e249e843f432c26147c611b7f05b62b (diff)
update mathmode
git-svn-id: svn://tug.org/texlive/trunk@2275 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-doc/doc/english/mathmode/Mathmode.tex')
-rw-r--r--Master/texmf-doc/doc/english/mathmode/Mathmode.tex1108
1 files changed, 634 insertions, 474 deletions
diff --git a/Master/texmf-doc/doc/english/mathmode/Mathmode.tex b/Master/texmf-doc/doc/english/mathmode/Mathmode.tex
index 252cde0fd91..2c7ce808a69 100644
--- a/Master/texmf-doc/doc/english/mathmode/Mathmode.tex
+++ b/Master/texmf-doc/doc/english/mathmode/Mathmode.tex
@@ -13,7 +13,7 @@
%% DESCRIPTION:
%% `Mathmode' is a document how the math mode works inside LaTeX
%%
-\def\MathmodeVersion{2.18}
+\def\MathmodeVersion{2.19}
%\ifvtex\title{\logo Math mode - v.\MathmodeVersion}\else
\ifpdf\title{Math mode - v.\MathmodeVersion}\else
\title{\logo Math mode - v.\MathmodeVersion}\fi%\fi
@@ -23,7 +23,7 @@
Alexander Boronka; Walter Brown;
Christian Faulhammer; Jos\'e{} Luis G\'omez Dans;
Zongbao Fang;
- Azzam Hassam; Martin Hensel;
+ Azzam Hassam; Henning Heinze; Martin Hensel;
Morten H\o{}gholm; M. Kalidoss; Dan Lasley;
Angus Leeming; Tim Love; Dan Luecking;
Hendrik Maryns; Heinz Mezera;
@@ -101,7 +101,7 @@ $\underline{A}=\left[\begin{smallmatrix}%
a & b & c\cr
d & e & f\cr
g & h & i\end{smallmatrix}\right]$ from the \AmSmath{} package (see section \vref{sec:ams-matrix}) or the
-displaymath mode\index{Display math mode} (section \ref{display} on page \pageref{display}).
+displaymath mode\index{Display math mode} (section~\vref{display}).
This inline mode is possible with three different commands:
@@ -131,15 +131,16 @@ not a robust macro (see section~\vref{subsec:mathInTitles}).
\marginpar{\CMD{begin\{math\}}\\...\\\CMD{end\{math\}}}
\end{enumerate}
+\index{*@\texttt{\textbackslash\char040}}\index{*@\texttt{\textbackslash\char041}}
In general \verb+$...$+ is the best choice, but this does not work in environments like \verb+verbatim+
-or \verb+alltt+. In this case \verb+\(...\)+ works.
+or \verb+alltt+. In this case \verb+\(...\)+ works.\index{$@\texttt{\$}}
\subsection{Limits}\label{sub:Limits-Inline}
In the inline mode the limits\index{limits@\textbackslash limits} are by default only in
super\index{Superscript} or subscript mode\index{Subscript} and
-the fractions\index{Fraction} are always in the scriptstyle\footnote{See section \vref{sec:Styles}.}\index{scriptstyle}
+the fractions\index{Fraction} are always in the \Index{scriptstyle}\footnote{See section \vref{sec:Styles}.}\index{scriptstyle}
font size. For
example: $\int_{1}^{\infty}\frac{1}{x^2}dx=1$, which is not too
big for the textline. You %
@@ -152,13 +153,13 @@ a product (\CMD{prod}\index{prod@\textbackslash prod}) or a limes
(\CMD{lim}\index{lim@\textbackslash lim}). But this $\int\limits_{1}^{\infty}\frac{1}{x^2}dx=1$
does not look very nice in a text line when it appears between two lines,
especially when there are multiline limits.\footnote{For more
-information about limits see section \vref{sub:Multiple-Limits} or section \vref{sec:limit-AMS}.}
+information about limits see section~\vref{sub:Multiple-Limits} or section~\vref{sec:limit-AMS}.}
\subsection{Fraction command}\label{sub:fraction command}
For inlined formulas the fractions\index{Fraction} are by default
-in the scriptstyle\index{scriptstyle@\textbackslash scriptstyle} (see tabular \vref{cap:Mathstyles}),
+in the scriptstyle\index{scriptstyle@\textbackslash scriptstyle} (see tabular~\vref{cap:Mathstyles}),
which is good for typesetting $y=\frac{a}{b+1}$, because the
linespacing %
\marginpar{\CMD{frac}}is nearly the same, but not optimal, when the formula shows some important
@@ -167,11 +168,11 @@ facts. There are two solutions to get a better reading:
\begin{enumerate}
\item choose the display mode instead of the inline mode, which is the better
one;
-\item set the fontstyle to \verb+displaystyle+\index{displaystyle@\textbackslash displaystyle}, which makes
+\item set the fontstyle to \CIndex{displaystyle}, which makes
the fraction $y={\displaystyle\frac{a}{b+1}}$ more readable but
the linespacing increases which is always a bad solution and should
only be used when the first solution makes no sense.\footnote{For an abbreviation see
-section \vref{sec:ams-fraction}, there is a special \CMD{dfrac} macro.}
+section~\vref{sec:ams-fraction}, there is a special \CIndex{dfrac} macro.}
\bigskip
\begin{minipage}{0.25\fullwidth}
@@ -185,8 +186,8 @@ $y=\frac{a}{b+1}={\displaystyle\frac{a}{b+1}}$
\end{enumerate}
-\subsection[Math in Chapter/Section Titles]{\label{inline-chapter}Math in \CMD{part},
-\CMD{chapter}, \CMD{section},
+\subsection[Math in Chapter/Section Titles]{\label{inline-chapter}Math in \CIndex{part},
+\CIndex{chapter}, \CIndex{section},
... titles like $f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\right)$}\label{subsec:mathInTitles}
All commands which appear in positions like contents, index, header,
@@ -196,25 +197,24 @@ into for example the tableofcontents file (\texttt{*.toc}). No robustness is
often a problem, when a macro is part of another macro.}
which is the case for \verb+$...$+ but not for \verb+\(...\)+.
If you do not have any contents, index, a.s.o.
-you can write the mathstuff in \CMD{chapter}\index{chapter@\textbackslash chapter},
-\CMD{section}\index{section@\textbackslash section},
+you can write the mathstuff in \CIndex{chapter}, \CIndex{section},
a.s.o without any restriction. Otherwise use \verb+\protect\(+ and \verb+\protect\)+ or the
-\verb+$...$+ version.
+\verb+$...$+ version.\index{$@\texttt{\$}}
The whole math expression appears in the default font shape and not
-in bold like the other text. Section \vref{sec:titleItem} describes how the math
+in bold like the other text. Section~\vref{sec:titleItem} describes how the math
expressions can be printed also in bold.
\marginpar{\CMD{texorpdfstring}}%
-There are problems with \verb+hyperref+\index{hyperref.sty} when there is a non
-text part in a title. It is possible to tell \verb+hyperref+\index{hyperref.sty} to use different
-commands, one for the title and another one for the bookmarks\index{texorpdfstring@\textbackslash texorpdfstring}:
+There are problems with the \PIndex{hyperref} package when there is no
+text part in a title. It is possible with the command \CIndex{texorpdfstring}
+to tell \verb+hyperref+ to use different
+commands, one for the title and another one for the bookmarks:
\begin{verbatim}
\texorpdfstring{<TeX part>}{<hyperref part>}
\end{verbatim}
-E.g.
\begin{minipage}{\fullwidth}
\begin{lstlisting}
@@ -229,7 +229,7 @@ E.g.
It is obvious that the numbering of inline mathstuff makes no sense!
\subsection{Framed math}
-With the \verb|\fbox| macro everything of inline math can be framed\index{Framed inline
+With the \CIndex{fbox} macro everything of inline math can be framed\index{Framed inline
math}\index{boxed inline math}, like the following one:
\bigskip
@@ -242,9 +242,10 @@ math}\index{boxed inline math}, like the following one:
\end{lstlisting}
\end{minipage}
+%$
-Parameters are the width of \verb|\fboxsep| and \verb|\fboxrule|, the predefined values
-from \verb|latex.ltx| are:
+Parameters are the width of \LIndex{fboxsep} and \LIndex{fboxrule}, the predefined values
+from the file \verb|latex.ltx| are:
\bigskip
\begin{minipage}{\fullwidth}
@@ -254,7 +255,7 @@ from \verb|latex.ltx| are:
\end{lstlisting}
\end{minipage}
-The same is possible with the \verb|\colorbox|
+The same is possible with the \CIndex{colorbox}
\colorbox{yellow}{$f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\right)$}
from the color package.
@@ -265,14 +266,14 @@ from the color package.
\end{lstlisting}
\end{minipage}
-
+%$
\subsection{Linebreak}
\LaTeX{} can break an inline formula only when a relation symbol ($=, <, >, \ldots$) or a
binary operation symbol ($+,-, \ldots$) exists and at least one of these symbols appears at
the outer level of a formula.
-Thus \verb|$a+b+c$| can be broken across lines, but \verb|${a+b+c}$| not.
+Thus \verb|$a+b+c$| can be broken across lines, but \verb|${a+b+c}$| not.\index{$@\texttt{\$}}
\begin{itemize}
\item The default: \hspace{1cm}
@@ -299,8 +300,9 @@ which is the extreme case of grudgingly allowing breaks in extreme cases.
\subsection{Whitespace}\label{subsec:whitespace}
-\LaTeX{} defines the length \verb|\mathsurround|\index{mathsurround@\textbackslash mathsurround} with the default value of
-\verb|0pt|. This length is added before and after an inlined math expression (see table \vref{tab:whitespace}).
+\LaTeX{} defines the length \LIndex{mathsurround} with the default value of
+\verb|0pt|. This length is added before and after an inlined math expression
+(see table~\vref{tab:whitespace}).
\begin{table}[htb]
\hspace*{-0.1\linewidth}%
@@ -330,6 +332,7 @@ foo \fbox{$ f(x)=\int_1^{\infty}\frac{1}{x^2}dx=1 $} bar
\caption{Meaning of \CMD{mathsurround}}\label{tab:whitespace}
\end{table}
+%$
\subsection{\AmSmath for the inline mode}
@@ -363,8 +366,8 @@ For example:
\bigskip
The delimiters\index{Delimiter}
-\CMD{begin\{equation\} ... }\CMD{end\{equation\}} are the only difference to the inline version. There
-are some equivalent commands for the display-math mode:
+\CMD{begin\{equation\} ... }\CMD{end\{equation\}} are the only difference to the inline version.
+There are some equivalent commands for the display-math mode:
\begin{enumerate}
\marginpar{\CMD{begin\{displaymath\}}\\
@@ -378,6 +381,7 @@ are some equivalent commands for the display-math mode:
\[
f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\right)
\]
+%
displayed, no number. Same as 1.
%
\item \CMD{begin\{equation\}\ldots}\CMD{end\{equation\}}%
@@ -386,8 +390,9 @@ displayed, no number. Same as 1.
\CMD{end\{equation\}}}%
%
\begin{equation}
-f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\right)\end{equation}
-\\
+f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\right)
+\end{equation}
+%
displayed, a sequential equation number, which may be reset when
starting a new chapter or section.
@@ -395,8 +400,8 @@ starting a new chapter or section.
\begin{enumerate}
\item There is only \textbf{one} equation number for the whole environment.
\item \marginpar{\CMD{nonumber}}There exists no star-version of the equation environment
-because \verb|\[...\]| is the equivalent. With the tag
-\CMD{nonumber}\index{nonumber@\textbackslash nonumber} it is possible to suppress the equation number:
+because \CIndex{[}\ldots\CIndex{]} is the equivalent. With the tag
+\CIndex{nonumber} it is possible to suppress the equation number:
\begin{minipage}{0.5\linewidth}
\begin{equation}
@@ -448,10 +453,11 @@ the whole environment in \verb|latex.ltx|.
\end{tabular}
\bigskip
-The \verb|eqnarray| environment should not be used as an array. As seen in the above
+The \UIndex{eqnarray} should not be used as an array. As seen in the above
example the typesetting is wrong for the middle column. The numbering of eqnarray
environments is always for every row, means,
-that four lines get four different equation numbers (for the labels see section \ref{sec:Labels}):
+that four lines get four different equation numbers (for the labels see
+section~\vref{sec:Labels}):
\bigskip
\begin{minipage}{0.5\columnwidth}
@@ -500,9 +506,8 @@ y & = & ax^{3}+bx^{2}+cx+d\label{eq:4}
\medskip
Toggling off/on for \textbf{single} rows is possible with the above
-mentioned \CMD{nonumber}\index{nonumber@\textbackslash nonumber} tag at the end of a row
-(before the newline command).
-For example:
+mentioned \CIndex{nonumber} tag at the end of a row
+(before the newline command). For example:
\medskip
\begin{minipage}{0.45\columnwidth}
@@ -526,7 +531,8 @@ For example:
\subsubsection{Short commands}\label{subsec:shortcommand}
-It is possible to define short commands for the \verb|eqnarray| environment
+It is possible to define short commands for the \UIndex{eqnarray}
+%
\begin{lstlisting}
\makeatletter
\newcommand{\be}{%
@@ -552,20 +558,20 @@ It is possible to define short commands for the \verb|eqnarray| environment
Now you can write the whole equation as
-\begin{showexample}[width=0.5\columnwidth,wide]
+\begin{LTXexample}[width=0.5\columnwidth,wide]
\be
f(x) &=& \int\frac{\sin x}{x}dx
\ee
-\end{showexample}
+\end{LTXexample}
\medskip
\noindent or, if you do not want to have a numbered equation as
-\begin{showexample}[width=0.5\columnwidth,wide]
+\begin{LTXexample}[width=0.5\columnwidth,wide]
\be*
f(x) &=& \int\frac{\sin x}{x}dx
\ee
-\end{showexample}
+\end{LTXexample}
\subsection{Equation numbering}\label{sub:Equationnumbering}
@@ -574,7 +580,7 @@ For all equations which can have one or %
\marginpar{\CMD{nonumber}}more equation numbers (for every line/row) the numbering
for the whole equation can be disabled with switching from the unstarred to the star
version. This is still for the whole formula and doesn't work for single rows.
-In this case use the \CMD{nonumber} tag.
+In this case use the \CIndex{nonumber} tag.
\begin{itemize}
\item This doc is written with the article-class, which counts the equations
@@ -583,8 +589,8 @@ in different ways (see the following subsections).
\item In standard \LaTeX{} it is a problem with too long equations and the
equation number, which may be printed with the equation one upon the other. In this case
use the \AmSmath package, where the number is set above or below
-of a too long equation (see equation \vref{eq:braces}).
-\item For counting subequations see section \vref{ams:subeqn}.
+of a too long equation (see equation~\vref{eq:braces}).
+\item For counting subequations see section~\vref{ams:subeqn}.
\end{itemize}
\subsubsection{Changing the style}
@@ -595,16 +601,15 @@ counting changes from ``\ref{eq:IntoSection}{}'' into the new style
``\ref{eq:newCounting}''. The command sequence is
\begin{lstlisting}
-\renewcommand\theequation{%
- \thepart-\arabic{equation}%
-}
+\renewcommand\theequation{\thepart-\arabic{equation}}
\end{lstlisting}
-See section \vref{sec:Equation-numbering} for the \AmSmath command.
+
+See section~\vref{sec:Equation-numbering} for the \AmSmath command.
\subsubsection{Resetting a counter style}
-Removing a given reset is possible with the package \verb+remreset+.%
+Removing a given reset is possible with the \PIndex{remreset}.%
\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/contrib/supported/carlisle/remreset.sty}{CTAN://macros/latex/contrib/supported/carlisle/remreset.sty}} Write into the %
\marginpar{\CMD{@removefromreset}} preamble
@@ -621,7 +626,7 @@ You can see this after section~\vref{split}.
\subsubsection{Equation numbers on the left side}
-Choose package \texttt{leqno}%
+Choose package \PIndex{leqno}%
\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/unpacked/leqno.sty}{CTAN://macros/latex/unpacked/leqno.sty}}
or have a look at your document class, if such an option exists.
@@ -763,12 +768,12 @@ which is described in section \vref{sec:Labels-and-Tags}\index{tag@\textbackslas
\subsection{Frames}\label{sec:Frames}
Similiar to the inline mode, displayed equations can also be framed with
-the \verb|\fbox|\index{fbox@\textbackslash fbox} command, like equation \ref{eq:frame0}.
+the \CIndex{fbox} command, like equation \ref{eq:frame0}.
The only difference is
the fact, that the equation must be packed into a parbox or minipage. It is
nearly the same for a colored box, where the \verb|\fbox{...}| has to be
replaced with \verb|\colorbox{yellow}{...}|. The package \verb|color.sty| must
-be loaded and --important -- the \verb|calc.sty| package to get a correct boxwidth.
+be loaded and --important -- the \PIndex{calc} package to get a correct boxwidth.
\noindent\fbox{\parbox{\linewidth-2\fboxsep-2\fboxrule}{%
\begin{equation}\label{eq:frame0}
@@ -850,15 +855,17 @@ If you are using the \AmSmath package, then try the solutions from section
\section{\texttt{array} environment}
\marginpar{\CMD{begin\{array\}}\\...\\\CMD{end\{array\}}}
-This is simply the same as the eqnarray environment only with the
+This is simply the same as the \UIndex{eqnarray} only with the
possibility of variable rows \textbf{and} columns and the fact, that
the whole formula has only \textbf{one} equation number and that the
\verb|array| environment can only be part of another math environment,
-like \verb|equation| or \verb|displaymath|.
+like the \UIndex{equation} or the \UIndex{displaymath}. With \verb+@{}+ before the
+first and after the last colomn the additional space \LIndex{arraycolsep}
+is not used, which maybe important when using left aligned equations.
\begin{equation}
\left.%
-\begin{array}{r@{\quad}ccrr}
+\begin{array}{@{}r@{\quad}ccrr@{}}
\textrm{a}) & y & = & c & (constant)\\
\textrm{b}) & y & = & cx+d & (linear)\\
\textrm{c}) & y & = & bx^{2}+cx+d & (square)\\
@@ -871,8 +878,7 @@ like \verb|equation| or \verb|displaymath|.
\begin{lstlisting}
\begin{equation}
\left.%
-\begin{array}{r@{\\
-\quad}ccrr}
+\begin{array}{@{}r@{\quad}ccrr@{}}
\textrm{a}) & y & = & c & (constant)\\
\textrm{b}) & y & = & cx+d & (linear)\\
\textrm{c}) & y & = & bx^{2}+cx+d & (square)\\
@@ -884,28 +890,28 @@ like \verb|equation| or \verb|displaymath|.
The horizontal alignment of the columns is the same as the one from the
-\texttt{tabular} environment.
+\UIndex{tabular}.
-For arrays with delimiters see section \vref{delarray}.
+For arrays with delimiters see section~\vref{delarray}.
\subsection{Cases structure}
If you do not want to use the \AmSmath package then write your own
cases structure\index{cases@\textbackslash cases} with the \verb|array| environment:
-\begin{showexample}[pos=b]
+\begin{LTXexample}[pos=b]
\begin{equation}
x=\left\{ \begin{array}{cl}
0 & \textrm{if A=...}\\
1 & \textrm{if B=...}\\
x & \textrm{this runs with as much text as you like, but without an raggeright text.}\end{array}\right.
\end{equation}
-\end{showexample}
+\end{LTXexample}
It is obvious, that we need a \CMD{parbox} if the text is longer than the possible linewidth.
-\begin{showexample}[pos=b]
+\begin{LTXexample}[pos=b]
\begin{equation}
x = \left\{%
\begin{array}{l>{\raggedright}p{.5\textwidth}}%
@@ -919,7 +925,7 @@ x = \left\{%
\end{array}%
\right. %
\end{equation}
-\end{showexample}
+\end{LTXexample}
@@ -969,22 +975,22 @@ f(x) & = & \int\frac{\sin x}{x}dx
\section{Matrix}\label{sec:matrix}
\marginpar{\CMD{matrix}\\\CMD{bordermatrix}}\TeX{} knows two macros and \LaTeX{} one more for typesetting a matrix\index{bordermatrix@\textbackslash bordermatrix}:
-\begin{showexample}
+\begin{LTXexample}
$\begin{matrix}
A & B & C \\
d & e & f \\
1 & 2 & 3 \\
\end{matrix}$
-\end{showexample}
+\end{LTXexample}
\vspace{-10pt}
-\begin{showexample}
+\begin{LTXexample}
$\bordermatrix{%
& 0 & 1 & 2 \cr
0 & A & B & C \cr
1 & d & e & f \cr
2 & 1 & 2 & 3 \cr
}$
-\end{showexample}
+\end{LTXexample}
\iffalse % smallmatrix belongs to amsmath
\begin{minipage}{0.4\textwidth}
@@ -1042,59 +1048,59 @@ version which takes the left top part as matrix:
}
\makeatother
-\begin{showexample}
+\begin{LTXexample}
$\bordermatrix{%
& 1 & 2 \cr
1 & x1 & x2 \cr
2 & x3 & x4 \cr
3 & x5 & x6
}$
-\end{showexample}
+\end{LTXexample}
\vspace{-10pt}
-\begin{showexample}
+\begin{LTXexample}
$\bordermatrix[{[]}]{%
& 1 & 2 \cr
1 & x1 & x2 \cr
2 & x3 & x4 \cr
3 & x5 & x6
}$
-\end{showexample}
+\end{LTXexample}
\vspace{-10pt}
-\begin{showexample}
+\begin{LTXexample}
$\bordermatrix[\{\}]{%
& 1 & 2 \cr
1 & x1 & x2 \cr
2 & x3 & x4 \cr
3 & x5 & x6
}$
-\end{showexample}
+\end{LTXexample}
\vspace{-10pt}
-\begin{showexample}
+\begin{LTXexample}
$\bordermatrix*{%
x1 & x2 & 1 \cr
x3 & x4 & 2 \cr
x5 & x6 & 3 \cr
1 & 2
}$
-\end{showexample}
+\end{LTXexample}
\vspace{-10pt}
-\begin{showexample}
+\begin{LTXexample}
$\bordermatrix*[{[]}]{%
x1 & x2 & 1 \cr
x3 & x4 & 2 \cr
x5 & x6 & 3 \cr
1 & 2
}$
-\end{showexample}
+\end{LTXexample}
\vspace{-10pt}
-\begin{showexample}
+\begin{LTXexample}
$\bordermatrix*[\{\}]{%
x1 & x2 & 1 \cr
x3 & x4 & 2 \cr
x5 & x6 & 3 \cr
1 & 2
}$
-\end{showexample}
+\end{LTXexample}
There is now an optional argument for the parenthesis with \verb|()| as the default one. To get such a behaviour, write into the preamble:
@@ -1140,35 +1146,38 @@ The problem is the different height, which can be modified in several ways
\item \verb+$a_{\mathrm{max}}+: $a_{\mathrm{min}}$ and $a_{\mathrm{max}}$;
\item \verb+$a_{\max}+: $a_{\min}$ and $a_{\max}$. Both are predefined operators (see section~\vref{sec:ltxOperators}).
\end{itemize}
-
+%$
\subsection{Multiple limits}\label{sub:Multiple-Limits}
\marginpar{\CMD{atop}}For general information about limits\index{Limits} read section
-\vref{sub:Limits-Inline}. With the \CMD{atop}\index{atop@\textbackslash atop} command
+\vref{sub:Limits-Inline}. With the \TeX\ command \CMD{atop}\index{atop@\textbackslash atop} command
multiple limits for a sum\index{sum@\textbackslash sum} or prod\index{prod@\textbackslash prod}
are possible. The syntax is:
-\begin{showexample}[width=0.4\linewidth]
+\begin{LTXexample}[width=0.4\linewidth]
\[ {above \atop below} \]
-\end{showexample}
+\end{LTXexample}
\noindent which is nearly the same as a fraction without a rule. This can
be enhanced to \verb|a\atop b\atop c| and so on. For equation \ref{eq:atop} do the following steps:
-\begin{showexample}[width=0.4\linewidth]
+\begin{LTXexample}[width=0.4\linewidth]
\begin{equation}\label{eq:atop}
\sum_{{1\le j\le p\atop {%
{1\le j\le q\atop 1\le k\le r}}}%
}a_{ij}b_{jk}c_{ki}
\end{equation}
-\end{showexample}
+\end{LTXexample}
\bigskip
-There are other solutions to get multiple limits, e.g. an array,
+\marginpar{\CMD{shortstack}}%
which is not the best solution because the space between the lines
-is too big. The \AmSmath package provides several commands for limits (section \ref{sec:limit-AMS}) and the \CMD{underset} and \CMD{overset} commands (see section \ref{sec:misc-AMS}).
+is too big.
+The \AmSmath package provides several commands for
+limits (section~\vref{sec:limit-AMS}) and the \CMD{underset} and \CMD{overset}
+commands (see section~\vref{sec:misc-AMS}).
\subsection{Problems}
@@ -1229,8 +1238,9 @@ size. Equation \ref{eq:disp-limits2} shows the effect and equation
\section{Roots}\label{sec:Roots}
-The square root\index{Root} \CMD{sqrt}\index{sqrt@\textbackslash sqrt} is the default
-for \LaTeX{} and the $n$-th root can be inserted with the optional parameter \CMD{sqrt[n]\{\ldots\}}.
+The square root\index{Root} \CIndex{sqrt} is the default
+for \LaTeX{} and the $n$-th root can be inserted with the optional
+parameter \CMD{sqrt[n]\{\ldots\}}.
\marginpar{\CMD{sqrt}}.
\begin{center}
@@ -1240,40 +1250,39 @@ for \LaTeX{} and the $n$-th root can be inserted with the optional parameter \CM
\end{tabular}
\end{center}
-There is a different typesetting in roots. Equation \vref{eq:root1}
-has different heights for the roots, whereas equation \vref{eq:root2}
+There is a different typesetting in roots. Equation~\vref{eq:root1}
+has different heights for the roots, whereas equation~\vref{eq:root2}
has the same one. This is possible with the %
\marginpar{\CMD{vphantom}}%
-\verb+\vphantom+\index{vphantom@\textbackslash vphantom} command,
+\CIndex{vphantom} command,
which reserves the vertical space (without a horizontal one) of the
parameter height.
-\begin{showexample}[width=0.35\linewidth,wide]
+\begin{LTXexample}[width=0.35\linewidth,wide]
\begin{equation}
\sqrt{a}\,%
\sqrt{T}\,%
\sqrt{2\alpha k_{B_1}T^i}\label{eq:root1}
\end{equation}
-\end{showexample}
+\end{LTXexample}
\vspace{-10pt}
-\begin{showexample}[width=0.35\linewidth,wide]
+\begin{LTXexample}[width=0.35\linewidth,wide]
\begin{equation}\label{eq:root2}
\sqrt{a\vphantom{k_{B_1}T^i}}\,%
\sqrt{T\vphantom{k_{B_1}T^i}}\,%
\sqrt{2\alpha k_{B_1}T^i}
\end{equation}
-\end{showexample}
+\end{LTXexample}
The typesetting looks much better, especially when the formula
-has different roots in a row, like equation \vref{eq:root1}. Using
-\AmSmath with the \CMD{smash} command%
+has different roots in a row, like equation~\vref{eq:root1}. Using
+\AmSmath with the \CIndex{smash} command%
\footnote{The \CMD{smash} command exists also in \LaTeX{}
-but without an optional argument, which makes the use for roots possible.%
-} gives some more possibilities for the typesetting of roots (see section
-\vref{sec:Roots-ams}).
+but without an optional argument, which makes the use for roots possible.}
+gives some more possibilities for the typesetting of roots (see section~\vref{sec:Roots-ams}).
\section[Brackets, braces \ldots]{Brackets, braces and parentheses}\label{sec:Brackets,-Braces-and}
@@ -1290,12 +1299,11 @@ $\uparrow\Uparrow$
$\downarrow\Downarrow$
$\updownarrow\Updownarrow${}''
and their use as an argument %
-\marginpar{\CMD{leftX}\\\CMD{rightX}} of the \CMD{left}\index{left@\textbackslash left}
-and \CMD{right}\index{right@\textbackslash right}
+\marginpar{\CMD{leftX}\\\CMD{rightX}} of the \CIndex{left} and \CIndex{right}
command, where \LaTeX{} stretches the size in a way that everything between
the pair of left and right parentheses is smaller than the parentheses themselves. In some cases%
-\footnote{See section \vref{cap:Use-of-the-vphantom} for example.%
-} it may be useful to choose a fixed height, which is possible with
+\footnote{See section \vref{cap:Use-of-the-vphantom} for example.}
+it may be useful to choose a fixed height, which is possible with
the \CMD{big}-series. Instead of writing \CMD{leftX}
or \CMD{rightX} one of the following commands can
be chosen:
@@ -1335,33 +1343,33 @@ $\Bigg\updownarrow\Bigg\Updownarrow$
\medskip{}
Only a few commands can be written in a short form like \CMD{big(}.
The ``X{}'' has to be replaced with one of the following characters
-or commands from table \ref{tab:big}, which shows the parentheses
+or commands from table~\vref{tab:big}, which shows the parentheses
character, its code for the use with one of the ``big{}'' commands
and an example with the code for that.
\marginpar{\CMD{biglX}\\\CMD{bigrX}}%
-For all commands there exists a left/right version \CMD{bigl}\index{bigl@\textbackslash bigl},
-\CMD{bigr}\index{bigr@\textbackslash bigr}, \CMD{Bigl}\index{Bigl@\textbackslash Bigl}
-and so on, which only makes sense when writing things like:
+For all commands there exists a left/right version \CIndex{bigl},
+\CIndex{bigr}, \CIndex{Bigl} and so on, which only makes sense when writing things like:
-\begin{showexample}[width=0.3\linewidth,wide]
+\begin{LTXexample}[width=0.3\linewidth,wide]
\begin{align}
\biggl)\times \frac{a}{b} \times\biggr(
\end{align}
\begin{align}
\bigg)\times \frac{a}{b} \times\bigg(
\end{align}
-\end{showexample}
+\end{LTXexample}
-\LaTeX{} takes the \verb|\biggl)| as a mathopen symbol, which has by default
+\LaTeX{} takes the \verb|\biggl)| as a \Index{mathopen symbol}, which has by default
another horizontal spacing.
In addition to the above commands there exist some more:
-\CMD{bigm}\index{bigm@\textbackslash bigm}, \CMD{Bigm}\index{Bigm@\textbackslash Bigm},
-\CMD{biggm}\index{biggm@\textbackslash biggm} and \CMD{Biggm}\index{Biggm@\textbackslash Biggm},
+\CIndex{bigm}, \CIndex{Bigm}, \CIndex{biggm} and \CIndex{Biggm},
which work as the standard ones (without the addtional ``m{}'')
but add some more horizontal space%
-\marginpar{\CMD{bigmX}\\\CMD{bigmX}} between the delimiter and the formula before and after (see table \ref{cap:Difference-between-the-bigg}).
+\marginpar{\CMD{bigmX}\\\CMD{bigmX}} %
+between the delimiter and the formula before and after (see
+table~\vref{cap:Difference-between-the-bigg}).
@@ -1369,13 +1377,13 @@ but add some more horizontal space%
%$3\biggm|a^2-b^2-c^2\biggm|+2$
\begin{table}[htb]
-\begin{showexample}
+\begin{LTXexample}
$\bigg(\dfrac{1}{3}\bigg|\dfrac{3}{4}\bigg)$
-\end{showexample}
+\end{LTXexample}
\vspace{-15pt}
-\begin{showexample}
+\begin{LTXexample}
$\bigg(\dfrac{1}{3}\biggm|\dfrac{3}{4}\bigg)$
-\end{showexample}
+\end{LTXexample}
\caption{Difference between the default
\CMD{bigg} and the \CMD{biggm} command}\label{cap:Difference-between-the-bigg}
\end{table}
@@ -1473,7 +1481,7 @@ It is obvious that there is a problem with the right closing parentheses.
Because of the two pairs ``\verb|\left( ... \right.|''
and ``\verb|\left. ... \right)|''
they have a different size because every pair does it in its own
-way. Using the \CMD{Bigg} command changes this into a better
+way. Using the \Index{Bigg} command changes this into a better
typesetting:
{\arraycolsep=2pt
@@ -1523,43 +1531,45 @@ in smaller pieces.
\subsubsection{Middle bar}
-See section \vref{sec:braket} for examples and the use of package \verb|braket.sty|.
+See section~\vref{sec:braket} for examples and the use of package \PIndex{braket}.
\subsection{New delimiters}\label{subsec:delim}
The default delimiters\index{Delimiter} are defined in the file \verb|fontmath.ltx|\index{fontmath.ltx}
which is stored in general
in \path{[TEXMF]/tex/latex/base/fontmath.ltx}. If we need for example a thicker vertical symbol
-than the existing \verb|\vert| symbol we can define in the preamble:
+than the existing \CIndex{vert} symbol we can define in the preamble:
\begin{lstlisting}
\DeclareMathDelimiter{\Norm}
{\mathord}{largesymbols}{"3E}{largesymbols}{"3E}
\end{lstlisting}
-The character number $3E_{16}$ (decimal $62$) from the \verb|cmex10|\index{cmex10} font is the small
+The character number $3E_{16}$ (decimal $62$) from the \FIndex{cmex10} font is the small
thick vertical rule. Now the new delimiter \verb|\Norm| can be used in the usual way:
-\begin{showexample}[width=0.3\linewidth,wide]
+\begin{LTXexample}[width=0.3\linewidth,wide]
$\left\Norm *BLA* \right\Norm$
$\left\Norm \dfrac{*BLA*}{*BLUB*} \right\Norm$
-\end{showexample}
+\end{LTXexample}
\subsection{Problems with parentheses}\label{subsec:Problems-with-parenthesis}
-\marginpar{\CMD{delimitershortfall}\\\CMD{delimiterfactor}}It is obvious that the following
+\marginpar{\CMD{delimitershortfall}\\\CMD{delimiterfactor}}%
+It is obvious that the following
equation has not the right size of the parenthesis in the
second integral, the inner one should be a bit smaller than the outer one.
-\begin{showexample}[width=0.425\linewidth,wide]
+%
+\begin{LTXexample}[width=0.425\linewidth,wide]
\[
\int_\gamma F'(z) dz =\int_\alpha^\beta
F'\left(\gamma (t)\right)\cdot\gamma '(t)dt
\]
-\end{showexample}
+\end{LTXexample}
The problem is that \TeX{} controlls the height of the parenthesis with
-\verb|\delimitershortfall|\index{delimitershortfall@\textbackslash delimitershortfall} and \verb|\delimiterfactor|\index{delimiterfactor@\textbackslash delimiterfactor}, with the default values
+\LIndex{delimitershortfall} and \CIndex{delimiterfactor}, with the default values
\begin{verbatim}
\delimitershortfall=5pt
\delimiterfactor=901
@@ -1571,13 +1581,13 @@ at the end of the formula, the best way is to set them straight before the math
or globally for all in the preamble.
-\begin{showexample}[width=0.425\linewidth,wide]
+\begin{LTXexample}[width=0.425\linewidth,wide]
{\delimitershortfall=-1pt
\[
\int_\gamma F'(z) dz =\int_\alpha^\beta
F'\left(\gamma (t)\right)\cdot\gamma '(t)dt
\]}
-\end{showexample}
+\end{LTXexample}
\section{Text in math mode}\label{sec:Text}
@@ -1592,12 +1602,13 @@ names: $\boxed{{I\ am\ \textrm{text}\ inside\ math.}}$ (see also
\marginpar{\CMD{mathrm}}
\item \CMD{mathrm}. It is like math mode (no spaces), but in upright mode
\item \CMD{textrm}. Upright mode with printed spaces (real textmode)
-\item \CMD{mbox}. The font size is still the one from \CMD{textstyle} (see section \vref{sec:Styles}), so that you have to place additional
-commands when you use \CMD{mbox} in a super- or subscript for limits.
+\item \CMD{mbox}. The font size is still the one from \CIndex{textstyle}
+ (see section~\vref{sec:Styles}), so that you have to place additional
+commands when you use \CIndex{mbox} in a super- or subscript for limits.
\end{itemize}
-Inserting long text is possible with a \verb+parbox+, which can be aligned as usual to the top,
-bottom or center, e.g.\index{Text!\textbackslash parbox}
+Inserting long text is possible with a \CIndex{parbox}, which can be aligned as usual to the top,
+bottom or center, \eg \index{Text!\textbackslash parbox}
\begin{eqnarray}
a+b+c+d+ef & = & g+h+i+j+k %
\qquad\textrm{\parbox[t]{.25\linewidth}{%
@@ -1617,7 +1628,7 @@ bottom or center, e.g.\index{Text!\textbackslash parbox}
Additional commands for text inside math are provided by \AmSmath (see
section \vref{sec:Text-in-math mode}).
-
+%$
\section{Font commands}
\subsection{Old-style font commands}
@@ -1635,7 +1646,8 @@ the ``XX{}'' one, whereas the new commands start a group which
switches back to the mode before at its end.
\begin{table}[!htb]
-\centering\begin{tabular}{rc|rc|rc|cc|cc}
+\centering
+\begin{tabular}{rc|rc|rc|cc|cc}
\CMD{bf}\index{bf@\textbackslash bf} & ${\bf {\bf test}}$ &
\CMD{cal}\index{cal@\textbackslash cal} & ${\cal TEST}$ &
\CMD{it}\index{it@\textbackslash it} &
@@ -1666,7 +1678,7 @@ The default syntax is
\mathXX{test}
\end{lstlisting}
Table~\ref{cap:Fonts-in-math-mode} shows what has to be
-replaced for the XX. See section \vref{sec:euscript.sty} for additional packages.
+replaced for the XX. See section~\vref{sec:euscript.sty} for additional packages.
\begin{table}[htb]
\includegraphics{styles}
@@ -1744,7 +1756,7 @@ values\footnote{see \texttt{\small fontmath.ltx}}:
\thickmuskip=5mu plus 5mu
\end{lstlisting}
-\noindent where \verb|mu| is the abbreviation for \verb|math unit|.
+\noindent where \verb|mu| is the abbreviation for \Index{math unit}.
\[
1 \mathrm{mu}= \dfrac{1}{18} \mathrm{em}
\]
@@ -1765,13 +1777,13 @@ all set to zero & {\thickmuskip=0mu\thinmuskip=0mu\medmuskip=0mu $\boxed{f(x)=x^
These lengths can have all glue and are
used for the horizontal spacing in math expressions where \TeX{} puts spaces between symbols
and operators. The meaning of these different
-horizontal skips is shown in table \ref{tab:mathSpaces}. For a better typesetting \LaTeX{}
+horizontal skips is shown in table~\ref{tab:mathSpaces}. For a better typesetting \LaTeX{}
inserts different spaces between the symbols.
\begin{description}
-\item[\CMD{thinmuskip}] space between ordinary and operator atoms
-\item[\CMD{medmuskip}] space between ordinary and binary atoms in display and text styles
-\item[\CMD{thickmuskip}] space between ordinary and relation atoms in display and text styles
+\item[\CIndex{thinmuskip}] space between ordinary and operator atoms
+\item[\CIndex{medmuskip}] space between ordinary and binary atoms in display and text styles
+\item[\CIndex{thickmuskip}] space between ordinary and relation atoms in display and text styles
\end{description}
\subsection{Additional horizontal spacing}
@@ -1810,7 +1822,7 @@ $\boxed{a}\negthickspace\boxed{b}$\\
\end{tabular}
\caption{Spaces in math mode}\label{cap:Spaces-in-math mode}
\end{table}
-
+%$
LaTeX defines the following short commands:
@@ -1820,36 +1832,38 @@ LaTeX defines the following short commands:
\def\!{\mskip-\thinmuskip}
\end{verbatim}
In math mode there is often a need for additional tiny spaces between variables,
-e.g. $L\dfrac{di}{dt}$ written with a tiny space between $L$ and
-$\dfrac{di}{dt}$ looks nicer: $L\:\dfrac{di}{dt}$. Table \ref{cap:Spaces-in-math mode}
+\eg $L\dfrac{di}{dt}$ written with a tiny space between $L$ and
+$\dfrac{di}{dt}$ looks nicer: $L\:\dfrac{di}{dt}$. Table~\ref{cap:Spaces-in-math mode}
shows a list of all commands for horizontal space which can be used
in math mode. The ``space{}'' is seen ``between{}'' the boxed a
-and b. For all examples a is \texttt{\textbackslash{}boxed\{a\}} and
-b is \texttt{\textbackslash{}boxed\{b\}}. The short forms for some
+and b. For all examples a is \verb+\boxed{a}+ and
+b is \verb+\boxed{b}+. The short forms for some
\marginpar{\CMD{hspace}\\
\CMD{hphantom}\\
-\CMD{kern}}spaces may cause problems with other packages. In this case use the
+\CMD{kern}}
+spaces may cause problems with other packages. In this case use the
long form of the commands.
\subsection{Problems}\label{space:problems}
-Using \verb+\hphantom+\index{hphantom@\textbackslash hphantom}\index{phantom@\textbackslash phantom}
-in mathmode depends to on object. \verb+\hphantom+ reserves only the space of
+Using \CIndex{hphantom} in mathmode depends to on object. \CIndex{hphantom}
+reserves only the space of
the exact width without any additional space. In the following example the second line is
wrong: \verb+& \hphantom{\rightarrow} b\\+. It does not reserve any additional space.
-\begin{showexample}[width=0.15\linewidth,wide]
+\begin{LTXexample}[width=0.15\linewidth,wide]
\begin{align*}
a & \rightarrow b\\
& \hphantom{\rightarrow} b\\
& \mkern\thickmuskip\hphantom{\rightarrow}\mkern\thickmuskip b\\
& \mathrel{\hphantom{\rightarrow}} b
\end{align*}
-\end{showexample}
+\end{LTXexample}
This only works when the math symbol is a mathrel one, otherwise you have to change the
-horizontal space to \verb+\medmuskip+ or \verb+\thinmuskip+. For more informations
-about the math objects look into \verb+fontmath.ltx+ or \verb+amssymb.sty+ or use the \verb+\show+
-macro, which prints out the type of the mathsymbol, e.g.: \verb+\show\rightarrow+ with the
+horizontal space to \CIndex{medmuskip} or \CIndex{thinmuskip} or to use an empty group after
+the \CIndex{hphantom} command. For more informations
+about the math objects look into \verb+fontmath.ltx+ or \PIndex{amssymb} or use the \CIndex{show}
+macro, which prints out the type of the mathsymbol, \eg \verb+\show\rightarrow+ with the
output:
\begin{lstlisting}
@@ -1889,8 +1903,8 @@ Another possibilty is to use the \verb+numprint+ package.\footnote{%
\subsection{Dot versus comma}\label{subsec:dot-comma}
\marginpar{\CMD{mathpunct}\\\CMD{mathord}}%
-In difference to a decimal point\index{decimal point} and a \index{comma}comma as a marker of thousands a lot of
-countries prefer it vice versa. To get the same behaviour the meaning of \index{dot}dot and
+In difference to a \Index{decimal point} and a \Index{comma} as a marker of thousands a lot of
+countries prefer it vice versa. To get the same behaviour the meaning of \Index{dot} and
comma has to be changed:
\begin{align}
@@ -1914,7 +1928,10 @@ Located in \url{texmf/tex/latex/base/}} are
\DeclareMathSymbol{.}{\mathord}{letters}{"3A}
\end{verbatim}
-\noindent\index{mathord@\textbackslash mathord}\index{mathpunct@\textbackslash mathpunct}and can be changed for a documentwide other behaviour. In the above equation~\ref{eq:comma} the comma is only set in a pair of braces \verb+{,}+, which is the same as writing \verb+\mathord{,}+ because LaTeX{} handles everything
+\noindent\CIndex{mathord} and \CIndex{mathpunct}
+can be changed for a documentwide other behaviour. In the above equation~\ref{eq:comma}
+the comma is only set in a pair of braces \verb+{,}+, which is the same as writing
+\verb+\mathord{,}+ because LaTeX{} handles everything
inside of parenthises as a formula, which gets the same spacing.
It is also possible to use the package \verb+icomma.sty+\footnote{%
@@ -1939,7 +1956,8 @@ of displayed formulas:
\index{belowdisplayshortskip@\textbackslash belowdisplayshortskip}
The short skips are used if the formula starts behind the end of the foregoing
last line. Only for demonstration the shortskips
-are set to \verb|0pt| in the following examples and the normal skips to \verb|20pt| without any glue:
+are set to \verb|0pt| in the following examples and the normal skips to
+\verb|20pt| without any glue:
\medskip
\noindent\fbox{\begin{minipage}{\linewidth-2\fboxsep-2\fboxrule}
@@ -1974,6 +1992,17 @@ f(x) = \int\frac{\sin x}{x}dx
\end{equation}
\noindent And the next line starts as usual with some text ...
\end{lstlisting}
+%$
+
+
+\marginpar{\texttt{fleqn} class option}%
+When using the \verb+fleqn+\index{fleqn@\texttt{fleqn}} classoption for left
+aligned equations the math environments \uIndex{equation}
+and \CIndex{[}\ldots\CIndex{]} are typeset as a list. This is the reason why the
+vertical space is defined by the length registers for a list, especially
+\LIndex{topsep}, instead of \LIndex{abovedisplayskip} and \LIndex{belowdisplayskip}.
+This doesn't effect the \UIndex{eqnarray}.
+
\subsubsection{Inside math expressions}\label{subsec:vspacing}
@@ -1983,14 +2012,14 @@ This works inside the math mode in the same way as in the text mode.
\paragraph{\CMD{jot}}\marginpar{\CMD{jot}}
The vertical space between the lines for all math expressions which allow multiple
-lines can be changed with the length
-\verb|\jot|\index{jot@\textbackslash jot}, which is predefined as
+lines can be changed with the length \LIndex{jot}, which is predefined as
\begin{verbatim}
\newdimen\jot \jot=3pt
\end{verbatim}
-The following three formulas show this for the default value, \verb|\jot=0pt| and \verb|\jot=10pt|.
+The following three formulas show this for the default value, \verb|\setlength\jot{0pt}|
+and \verb|\setlength\jot{10pt}|.
\begin{minipage}{0.3\linewidth}
\begin{eqnarray*}
@@ -2000,7 +2029,7 @@ The following three formulas show this for the default value, \verb|\jot=0pt| a
\end{eqnarray*}
\end{minipage}\hfill
\begin{minipage}{0.3\linewidth}
-\jot=0pt
+\setlength\jot{0pt}
\begin{eqnarray*}
y & = & d\\
y & = & c\frac{1}{x}+d\\
@@ -2008,7 +2037,7 @@ The following three formulas show this for the default value, \verb|\jot=0pt| a
\end{eqnarray*}
\end{minipage}\hfill
\begin{minipage}{0.3\linewidth}
-\jot=10pt
+\setlength\jot{10pt}
\begin{eqnarray*}
y & = & d\\
y & = & c\frac{1}{x}+d\\
@@ -2030,18 +2059,18 @@ length are locally.
\paragraph{\CMD{arraystretch}}\cIndex{arraystretch}
\marginpar{\CMD{arraystretch}}%
The vertical space between the lines for all math expressions which contain an
-\verb+array+ environment can be changed with the command
-\verb|\arraystretch|, which is predefined
+\UIndex{array} can be changed with the command
+\CIndex{arraystretch}, which is predefined
as
\begin{verbatim}
-\def\arraystretch{1}
+\renewcommand\arraystretch{1}
\end{verbatim}
Renewing this definition is global to all following math expressions, so it should be used
-in the same way as \verb+\jot+.
+in the same way as \LIndex{jot}.
-\paragraph{\CMD{vskip}}\cIndex{vskip}\index{Vertical spacing}\index{Spacing!vertical}
-Another spacing for single lines is possible with the \CMD{vskip} macro:
+\paragraph{\CMD{vskip}}\index{Vertical spacing}\index{Spacing!vertical}
+Another spacing for single lines is possible with the \CIndex{vskip} macro:
\begin{LTXexample}[width=0.4\linewidth]
\[
@@ -2060,9 +2089,8 @@ Another spacing for single lines is possible with the \CMD{vskip} macro:
\paragraph{Package \texttt{setspace}}
-\PIndex{setspace}
To have all formulas with another vertical spacing, one can choose
-the package \verb+setspace+ and redefining some of the math macros, e.g.
+the package \PIndex{setspace} and redefining some of the math macros, \eg
\begingroup
\newcommand*\Array[2][1]{\setstretch{#1}\array{#2}}
@@ -2073,7 +2101,7 @@ the package \verb+setspace+ and redefining some of the math macros, e.g.
\let\endArray\endarray
\end{lstlisting}
-\begin{showexample}[width=0.25\linewidth]
+\begin{LTXexample}[width=0.25\linewidth]
\[
\begin{Array}[2]{cc}
a =&b\\
@@ -2087,7 +2115,7 @@ a =&b\\
a =&b\\
a =&b
\end{Array}$ text
-\end{showexample}
+\end{LTXexample}
\endgroup
\section{Styles}\label{sec:Styles}
@@ -2124,7 +2152,7 @@ ${\textstyle f(t)=\frac{T}{2\pi}\int\frac{1}{\sin\frac{\omega}{t}}dt}$&
\end{tabular}
\caption{Math styles}\label{cap:Mathstyles}
\end{table}
-
+%$
\makeatletter
\newenvironment{smallequation}[1]{%
\skip@=\baselineskip
@@ -2139,12 +2167,11 @@ formula has a default math %
\marginpar{\CMD{textstyle}\\
\CMD{displaystyle}\\
\CMD{scriptstyle}\\
-\CMD{scripscriptstyle}} fontsize called \CMD{textstyle}\index{textstyle@\textbackslash textstyle},
-which is smaller than the one for a display formula (see section \ref{display}), which is called
-\CMD{displaystyle}\index{displaystyle@\textbackslash displaystyle}.
+\CMD{scripscriptstyle}} fontsize called \CIndex{textstyle},
+which is smaller than the one for a display formula (see section~\ref{display}), which is called
+\CIndex{displaystyle}.
Beside this predefinition there are two other special fontstyles for
-math, \CMD{scriptstyle}\index{scriptstyle@\textbackslash scriptstyle}
-and \CMD{scriptscriptstyle}\index{scriptscriptstyle@\textbackslash scriptscriptstyle}.
+math, \CIndex{scriptstyle} and \CIndex{scriptscriptstyle}.
They are called ``style{}'' in difference to ``size{}'', because
they have a dynamic character, their real fontsize belongs to the
environment in which they are used. A fraction for example is by default in scriptstyle when it is in an
@@ -2154,10 +2181,8 @@ This may be in some cases useful but it looks in general ugly because
the line spacing is too big.
These four styles\index{Style} are predefined and together in a
logical relationship. It is no problem to use the other styles like
-\CMD{large}\index{large@\textbackslash large},
-\CMD{Large}\index{Large@\textbackslash Large},
-... \textbf{outside} the math environment. For example a fraction written with
-\CMD{Huge}\index{Huge@\textbackslash Huge}: {\Huge$\frac{a}{b}$}
+\Index{large}, \CIndex{Large}, \ldots\ \textbf{outside} the math environment.
+For example a fraction written with \CIndex{Huge}: {\Huge$\frac{a}{b}$}
(\verb|\Huge$\frac{a}{b}$|). This may cause some problems when you want to write
a displayed formula in another fontsize\index{Font size}, because it also affects the interline spacing of
the preceding part of the paragraph.
@@ -2185,7 +2210,7 @@ If you use this the other way round for huge fontsizes, don't forget to load pac
\verb+exscale+ (see section~\vref{sec:exscale}). Also see this section for diffent symbol sizes.
-
+%$
\section{Dots\label{sec:Dots}}
\marginpar{\CMD{cdots}\\
@@ -2204,7 +2229,8 @@ lower left to upper right are possible with \verb|\reflectbox{$\ddots$}|\index{r
\reflectbox{$\ddots$}
\begin{table}[htb]
-\centering\begin{tabular}{*{5}{rc}}
+\centering
+\begin{tabular}{*{5}{rc}}
\CMD{cdots}\index{cdots@\textbackslash cdots}&$\cdots$ &
\CMD{ddots}\index{ddots@\textbackslash ddots}&$\ddots$ &
\CMD{dotsb}\index{dotsb@\textbackslash dotsb}&$\dotsb$ &
@@ -2265,16 +2291,16 @@ $\underleftrightarrow{a}$&
\caption{Accents in math mode}\label{cap:Accents-in-math mode}
\end{table}
-The letters \verb+i+ and \verb+j+ can be substituted with the macros \verb+\imath+ and \verb+\jmath+ when an accents is placed over these letters and the dot should
+The letters \verb+i+ and \verb+j+ can be substituted with the macros \CIndex{imath}
+and \CIndex{jmath} when an accents is placed over these letters and the dot should
disappear: $\vec{\imath}\ \dddot{\jmath}$ (\verb+$\vec{\imath}\ \dddot{\jmath}$+).
-\index{imath@\textbackslash imath}\index{jmath@\textbackslash jmath}
-Accents can be used in different ways, e.g. strike a single character with a horizontal line like
+Accents can be used in different ways, \eg strike a single character with a horizontal line like
\verb+$\mathaccent`-A$+: $\mathaccent`-A$ or \verb+$\mathaccent\mathcode`-A$+: $\mathaccent\mathcode`-A$.
-In section \vref{cancel.sty} is a better solution for more than one character.
+In section~\vref{cancel.sty} is a better solution for more than one character.
\subsection{Over- and underbrackets}
-There are no \CMD{underbracket}\index{underbracket@\textbackslash{}underbracket} and \CMD{overbracket}\index{overbracket@\textbackslash{}overbracket}
+There are no \CIndex{underbracket} and \CIndex{overbracket}
commands in the list of accents. They can be defined in the preamble
with the following code.
@@ -2297,7 +2323,7 @@ with the following code.
\def\bracketend#1#2{\vrule height #2 width #1\relax}
\makeatother
\end{lstlisting}
-
+%$
\begin{enumerate}
\item \verb/\underbrace{...}/ is an often used command:
\begin{eqnarray}
@@ -2324,11 +2350,11 @@ with the following code.
The \verb/\underbracket{...}/ command has two optional parameters:
\begin{itemize}
-\item the line thickness in any valid latex unit, e.g. \verb/1pt/
-\item the height of the edge brackets, e.g. \verb/1em/
+\item the line thickness in any valid latex unit, \eg \verb/1pt/
+\item the height of the edge brackets, \eg \verb/1em/
\end{itemize}
using without any parameters gives the same values for thickness and
-height as predefined for the \verb/\underbrace/ command.
+height as predefined for the \CIndex{underbrace} command.
\vspace{0.3cm}
@@ -2359,11 +2385,11 @@ more ways than \verb/\overbrace{...}/. For example:
The \verb/\overbracket{...}/ command has two optional parameters:
\begin{itemize}
-\item the line thickness in any valid latex unit, e.g. \verb/1pt/
-\item the height of the edge brackets, e.g. \verb/1em/
+\item the line thickness in any valid latex unit, \eg \verb/1pt/
+\item the height of the edge brackets, \eg \verb/1em/
\end{itemize}
using without any parameters gives the same values for thickness and
-height as predefined for the \verb/\overbrace/ command.
+height as predefined for the \CIndex{overbrace} command.
\vspace{0.3cm}
@@ -2375,29 +2401,31 @@ height as predefined for the \verb/\overbrace/ command.
\end{tabular}
\end{center}
-
+%$
\subsection{Vectors}
-Especially for vectors\index{Vector} there is the \verb|esvect.sty|\index{esvect.sty}%
+Especially for vectors\index{Vector} there is the package \PIndex{esvect}%
\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/contrib/esvect/}%
{CTAN://macros/latex/contrib/esvect/}} package, which looks better than the
-\CMD{overrightarrow}\index{overrightarrow@\textbackslash overrightarrow}, f.ex:
+\CMD{overrightarrow}\index{overrightarrow@\textbackslash overrightarrow}, \eg
-\begin{table}[htb]
-\centering\begin{tabular}{c|c}
+\begin{table}[!htb]
+\centering
+\begin{tabular}{c|c}
\textbackslash{}vv\{...\}&\textbackslash{}overrightarrow\{...\}\tabularnewline\hline
$\vv{a}$ & $\overrightarrow{a}$\tabularnewline
$\vv{abc}$ & $\overrightarrow{abc}$\tabularnewline
$\vv{\imath}$ & $\overrightarrow{\imath}$\tabularnewline
$\vv*{A}{x}$ & $\overrightarrow{A}_{x}$\tabularnewline
\end{tabular}
-\caption{Vectors with package \texttt{esvect.sty} (in the right column the
+\caption{Vectors with package \texttt{esvec} (in the right column the
default one from \LaTeX{})}
\end{table}
-Look into the documentation for more details about \verb|esvect.sty|.
+Look into the documentation for more details about the package \PIndex{esvect}.
+%$
\section{Exponents and indices}\label{sec:exponents}
The two active characters \verb|_| and \verb|^| can only be used in math mode. The
\textbf{following} character will be printed as an index (\verb|$y=a_1x+a_0$|: $y=a_1x+a_0$)
@@ -2416,16 +2444,32 @@ there are several possibilities. For example:
{\left({\left(x^2\right)}^3\right)}^4
\end{lstlisting}
-For variables with both exponent\index{Exponent} and indices index\index{Indices} the order is not important, \verb|$a_1^2$| is
-exactly the same than \verb|$a^2_1$|: $a_1^2=a^2_1$
+\index{Upright letters}
+For variables with both exponent\index{Exponent} and indice index\index{Indice}
+the order is not important, \verb|$a_1^2$| is
+exactly the same than \verb|$a^2_1$|: $a_1^2=a^2_1$. By default all exponents and indices
+are set as italic characters. It is possible to change this behaviour
+to get upright characters. The following example shows this for the indices.
+
+\bgroup
+\begin{LTXexample}[width=4.5cm,preset=\raggedright]
+$A_{abc_{xyz}123def}^{abc123def}aa$
+
+\makeatletter
+\catcode`\_\active
+\def_#1{\sb{\operator@font#1}}
+\makeatother
+$A_{abc_{xyz}123def}^{abc123def}aa$
+\end{LTXexample}
+\egroup
\section{Operators}\label{sec:ltxOperators}
They are written in upright font shape and are placed with some additional
space before and after for a better typesetting. With the \AmSmath
package it is possible to define one's own operators\index{Operator} (see
-section \vref{OperatorNames}). Table~\vref{tab:operator} and \vref{tab:operator2} show a list of
+section~\vref{OperatorNames}). Table~\vref{tab:operator} and \vref{tab:operator2} show a list of
the predefined ones for standard \LaTeX{}.
\begin{table}[htb]
@@ -2440,10 +2484,10 @@ the predefined ones for standard \LaTeX{}.
\end{tabular}
\caption{The predefined operators of \texttt{fontmath.ltx}}\label{tab:operator}
\end{table}
-The difference between \verb+\intop+ and \verb+\int+ is that the first one has by default
+The difference between \CIndex{intop} and \CIndex{int} is that the first one has by default
over/under limits and the second subscript/superscript limits. Both can be changed
-with the \verb+\limits+ or \verb+\nolimits+ command. The same behaviour happens to the
-\verb+\ointop+ and \verb+\oint+ Symbols.
+with the \CIndex{limits} or \CIndex{nolimits} command. The same behaviour happens to the
+\CIndex{ointop} and \CIndex{oint} Symbols.
\begin{table}[htb]
\centering
@@ -2468,7 +2512,9 @@ with the \verb+\limits+ or \verb+\nolimits+ command. The same behaviour happens
\makeatletter
\newcommand\foo{\mathop{\operator@font foo}\nolimits}
\makeatother
-For more predefined operator names see table~\vref{tab:amsopn}. It is easy to define a new operator with
+For more predefined operator names see table~\vref{tab:amsopn}. It is easy
+to define a new operator with
+%
\begin{lstlisting}
\makeatletter
\newcommand\foo{\mathop{\operator@font foo}\nolimits}
@@ -2476,24 +2522,32 @@ For more predefined operator names see table~\vref{tab:amsopn}. It is easy to de
\end{lstlisting}
Now you can use \verb|\foo| in the usual way:
-\begin{showexample}[width=4cm]
+%
+\begin{LTXexample}[width=4cm]
\[ \foo_1^2 = x^2 \]
-\end{showexample}
-In this example \verb|\foo| is defined with \verb|\nolimits|, means that limits\index{Limits} are placed in
+\end{LTXexample}
+In this example \verb|\foo| is defined with \verb|\nolimits|, means
+that limits\index{Limits} are placed in
superscript/subscript mode and not over under. This is still possible with \verb|\limits| in the
definition or the equation:
-\begin{showexample}[width=4cm]
+\begin{LTXexample}[width=4cm]
\[ \foo\limits_1^2 = x^2 \]
-\end{showexample}
+\end{LTXexample}
-\AmSmath has an own macro for a definition, have a look at section \vref{OperatorNames}.
+\AmSmath has an own macro for a definition, have a look at section~\vref{OperatorNames}.
\section{Greek letters}\label{sec:greek}
-The \AmSmath package simulates a bold font for the greek letters, it writes a greek character twice with a small kerning. The \verb|\mathbf{<character>}| doesn't work with lower greek character. See
-section \vref{sec:greek-AMS} for the \verb|\pmb| macro, which makes it possible to print bold lower greek\index{Greek} letters. Not all upper case letters have own macro names. If there is no difference to the roman font, then the default letter is used, e.g.: A for the upper case of
-$\alpha$. Table \ref{tab:greek-letters} shows only those upper case letters which have own macro names. Some of the lower case letters have an additional \verb|var| option for
-an alternative.
+The \AmSmath package simulates a bold font for the greek letters, it writes a
+greek character twice with a small kerning. The \verb|\mathbf{<character>}|
+doesn't work with lower greek character. See
+section \vref{sec:greek-AMS} for the \CIndex{pmb} macro, which makes it possible
+to print bold lower greek\index{Greek} letters. Not all upper case letters have
+own macro names. If there is no difference to the roman font, then the default
+letter is used, \eg A for the upper case of
+$\alpha$. Table \ref{tab:greek-letters} shows only those upper case letters
+which have own macro names. Some of the lower case letters have an additional
+\verb|var| option for an alternative.
\bgroup
\tabcolsep=3pt
@@ -2544,37 +2598,55 @@ lower & default & upper & default & \verb|\mathbf| & \verb|\mathit|\\\hline
\end{longtable}
\egroup
-Bold greek letters are possible with the package \verb+bm+ (see section \vref{sec:bm})
-and if they should also be upright with the package \verb+upgreek+:
-\index{greek}\index{greek!upright}\index{greek!bold}
+Bold \Index{greek} letters are possible with the package \PIndex{bm} (see section~\vref{sec:bm})
+and if they should also be upright with the package \PIndex{upgreek}:
+\index{greek!upright}\index{greek!bold}
\medskip
\verb+$\bm{\upalpha}, \bm{\upbeta} ... $+ $ \bm{\upalpha}, \bm{\upbeta} ... $
+A useful definition maybe:
+
+\begin{lstlisting}
+\usepackage{upgreek}
+\makeatletter
+\newcommand{\bfgreek}[1]{\bm{\@nameuse{up#1}}}
+\makeatother
+\end{lstlisting}
+
+\makeatletter
+\newcommand{\bfgreek}[1]{\bm{\@nameuse{up#1}}}
+\makeatother
+Then
+\verb|$\bfgreek{mu}$| will allow you to type $\bfgreek{mu}$ to obtain an upright boldface $\mu$.
\section{Pagebreaks}
-\marginpar{\CMD{allowdisplaybreaks}}By default a displayed formula cannot have a pagebreak. This makes some sense, but sometimes it gives a better typesetting when a pagebreak is possible.
+\marginpar{\CMD{allowdisplaybreaks}}By default a displayed formula cannot
+have a pagebreak. This makes some sense, but sometimes it gives a better
+typesetting when a pagebreak is possible.
\begin{verbatim}
\allowdisplaybreaks
\end{verbatim}
-\index{allowdisplaybreaks@\textbackslash allowdisplaybreaks} This macro enables \TeX{} to insert pagebreaks into displayed formulas whenever a newline command appears.\index{Pagebreak} With the command \verb+\displaybreak+ it is also possible to insert a pagebreak at any place.\index{displaybreak@\textbackslash displaybreak}
+\CIndex{allowdisplaybreaks} enables \TeX{} to insert pagebreaks into
+displayed formulas whenever a newline command appears.\index{Pagebreak}
+With the command \CIndex{displaybreak} it is also possible to insert a
+pagebreak at any place.
\section{\CMD{stackrel}}
-\CMD{stackrel}\index{stackrel@\textbackslash stackrel}
-puts a character on top of another one which may be important if a
+\CIndex{stackrel} puts a character on top of another one which may be important if a
used symbol is not predefined. For example ``$\stackrel{\wedge}{=}$''
-(\verb|\stackrel{\wedge}{=}|).
+(\verb|\stackrel{\wedge}{=}|). \marginpar{\CMD{stackrel}}
The syntax is
-
\begin{lstlisting}
\stackrel{top}{base}
\end{lstlisting}
+
Such symbols may be often needed so that a macro definition in the preamble makes some sense:
\begin{lstlisting}
@@ -2584,13 +2656,14 @@ Such symbols may be often needed so that a macro definition in the preamble mak
}%
}
\end{lstlisting}
-With the \CMD{ensuremath}\index{ensuremath@\textbackslash ensuremath}
-command we can use the new \CMD{eqdef} command in text
+%
+With the \CIndex{ensuremath} command we can use the new \CIndex{eqdef} command in text
and in math mode, \LaTeX{} switches automatically in math mode, which
saves some keystrokes like the following command, which is written
without the delimiters (\texttt{\$...\$}) for the math mode \eqdef ,
only \CMD{eqdef} with a space at the end. In math mode
-together with another material it may look like $\vec{x}\eqdef\left(x_{1},\ldots,x_{n}\right)$ and as command sequence
+together with another material it may look like
+$\vec{x}\eqdef\left(x_{1},\ldots,x_{n}\right)$ and as command sequence
\begin{lstlisting}
$\vec{x}\eqdef\left(x_{1},\ldots,x_{n}\right)$
@@ -2602,11 +2675,10 @@ top or decrease the base.
\section{\CMD{choose}}
-\CMD{choose}\index{choose@\textbackslash choose}\index{Binom}
-is like \CMD{atop}\index{atop@\textbackslash atop}
-with delimiters or like \CMD{frac}\index{frac@\textbackslash frac}
+\CIndex{choose}\index{Binom} is like \CIndex{atop}
+with delimiters or like \CIndex{frac}
without the fraction line and also with delimiters. It is often used
-for binoms and has the following syntax:
+for binoms and has the following syntax:\marginpar{\CMD{choose}}
\begin{lstlisting}
{above \choose below}
@@ -2622,7 +2694,7 @@ The two braces are not really important but it is safe to use them.
\end{lstlisting}
-See section \vref{sub:Binoms} for the \AmSmath equivalents and enhancements.
+See section~\vref{sub:Binoms} for the \AmSmath equivalents and enhancements.
\section{Color in math expressions}\label{sec:color}
\index{Color}There is no difference in using colored text and colored math expressions. With
@@ -2634,7 +2706,7 @@ See section \vref{sub:Binoms} for the \AmSmath equivalents and enhancements.
\begin{equation}
\textcolor{blue}{f(x)} = \int\limits_1^{\infty}\textcolor{red}{\frac{1}{x^2}}\,dx=1
\end{equation}
-
+\marginpar{\CMD{textcolor}}
\begin{lstlisting}
\begin{equation}
\textcolor{blue}{f(x)} = \int\limits_1^{\infty}\textcolor{red}{\frac{1}{x^2}}\,dx=1
@@ -2800,9 +2872,9 @@ There are some other macros which are not mentioned in the foregoing text. Here
a not really complete list of these macros.
\begin{description}
\item[\CMD{everymath}] \index{everymath@\textbackslash everymath} puts the argument before
-any inlined math expression, e.g. \verb+\everymath{\small}+.
+any inlined math expression, \eg \verb+\everymath{\small}+.
\item[\CMD{everydisplay}] \index{everydisplay@\textbackslash everydisplay} puts the
-argument before any displayed math expression, e.g. \verb+\everydisplay{\color{blue}}+.
+argument before any displayed math expression, \eg \verb+\everydisplay{\color{blue}}+.
\item[\CMD{underline}] \index{underline@\textbackslash underline} underlines a math
expression and has to be used inside the math mode.
\[
@@ -2849,7 +2921,7 @@ have subscripts placed underneath when they occur in a displayed equation.\\\hli
\bigskip
To use one of these package options, put the option name in the optional
-argument, e.g.,
+argument, \eg
\verb|\usepackage[intlimits]{amsmath}|. The %%% ----- Martin -----
\AmSmath also recognises the following options which are normally
selected (implicitly or explicitly) through the \verb|documentclass|
@@ -2911,11 +2983,11 @@ with the same code, where the first three can have an equation number}\label{cap
\end{table}
-In difference to the \verb+eqnarray+ environment from standard \LaTeX{}
+In difference to the \UIndex{eqnarray} from standard \LaTeX{}
(section~\ref{display:eqnarray}), the ``three'' parts
of one equation \verb+expr.-symbol-expr.+ are divided by only one ampersand %%% ----- Martin -----
-in two parts. In general the ampersand should be before the symbol to get the right spacing, e.g.
-\verb+y &= x+. Compare the following three equations, the second one has a wrong spacing. %%% ----- Martin -----
+in two parts. In general the ampersand should be before the symbol to get the right spacing,
+\eg \verb+y &= x+. Compare the following three equations, the second one has a wrong spacing. %%% ----- Martin -----
\noindent
@@ -2971,12 +3043,12 @@ the \texttt{align} environment gives:
\begin{itemize}
\item The \texttt{align} environment has an implicit \textbf{\{rlrl...\}}
-horizontal alignment with a vertical column-alignment, e.g.:
-\begin{showexample}[width=0.5\linewidth]
+horizontal alignment with a vertical column-alignment, \eg
+\begin{LTXexample}[width=0.5\linewidth]
\begin{align*}
1 & 2 & 3
\end{align*}
-\end{showexample}
+\end{LTXexample}
\item A nonumber-version \texttt{\small \textbackslash{}begin\{align{*}\}...\textbackslash{}end\{align{*}\}}
exists.
@@ -3075,13 +3147,13 @@ exists.
environments. It is nearly the same as the \texttt{xalignat} environment, only
more ``out spaced'' and ``left aligned''.
-\begin{showexample}[width=0.5\linewidth]
+\begin{LTXexample}[width=0.5\linewidth]
\begin{flalign}
i_{11} & =0.25\nonumber \\
i_{21} & =\frac{1}{3}i_{11}\\
i_{31} & =0.33i_{22}
\end{flalign}
-\end{showexample}
+\end{LTXexample}
\medskip
As seen, the equations are not really left aligned, when they have only one
@@ -3218,17 +3290,17 @@ When using one of the \verb+align+ environments, there should be no \verb+\\+ at
end of the last line, otherwise you'll get another equation number for this
``empty{}'' line: %%% ----- Martin -----
-\begin{showexample}[width=0.65\linewidth]
+\begin{LTXexample}[width=0.65\linewidth]
\begin{align}
2x+3 &= 7\\
\end{align}
-\end{showexample}
+\end{LTXexample}
-\begin{showexample}[width=0.65\linewidth]
+\begin{LTXexample}[width=0.65\linewidth]
\begin{align}
2x+3 &= 7
\end{align}
-\end{showexample}
+\end{LTXexample}
\section{Other environments}
\subsection{\texttt{gather} environment}
@@ -3913,7 +3985,7 @@ has some more commands for the $n$-th root:
\noindent \verb+<number>+ indicates a value for the points%
\footnote{In PostScript units (bp -- Big Points).} of which the root can be
-adjusted to the left and/or to the top, e.g.:
+adjusted to the left and/or to the top, \eg
$\sqrt[k_n]{a}$ (\verb+$\sqrt[k_n]{a}$+) has a too deep exponent, whereas $\sqrt[\uproot{2}k_n]{a}$ \verb+$\sqrt[\uproot{2}k_n]{a}$+ looks nicer.
@@ -4727,7 +4799,7 @@ too short. With \verb+\delimiterfactor+ one can correct this height. The delimit
is $<\textrm{calculated height}>\cdot <\textrm{\#1}>/1000$ where \verb+#1+ is the parameter of
\verb+\delimiterfactor+. The default value is $901$.
-\begin{showexample}[width=0.4\linewidth]
+\begin{LTXexample}[width=0.4\linewidth]
\[
y = \left\{%
\begin{array}{ll}
@@ -4738,9 +4810,9 @@ y = \left\{%
\end{array}%
\right.
\]
-\end{showexample}
+\end{LTXexample}
-\begin{showexample}[width=0.4\linewidth]
+\begin{LTXexample}[width=0.4\linewidth]
\[
\delimiterfactor=1500
y = \left\{%
@@ -4752,7 +4824,7 @@ y = \left\{%
\end{array}%
\right.
\]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{delimitershortfall}}
\cIndex{delimitershortfall}Additionally to the forgoing \verb+\delimiterfactor+ one can modify the height of the
@@ -4760,20 +4832,20 @@ delimiter with another value. \TeX{} makes the delimiter larger than the values
$<\textrm{calculated height}>\cdot <\textrm{delimiterfactor}>/1000$ and $<\textrm{calculated height}>-<\textrm{delimitershortfall}>$. This makes it possible to always get different heights %%% ----- Martin -----
of a sequence of delimiters.
-\begin{showexample}[width=0.3\linewidth]
+\begin{LTXexample}[width=0.3\linewidth]
$x\cdot\left(\left(x^2-y^2\right)-3\right)$\\[7pt]
$
\delimitershortfall-1pt
x\cdot\left(\left(x^2-y^2\right)-3\right)$
-\end{showexample}
+\end{LTXexample}
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
$\left(\left(\left(A\right)\right)\right)$\\[7pt]
$\delimitershortfall-1pt
\left(\left(\left(A\right)\right)\right)$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{displayindent}}
@@ -4785,7 +4857,7 @@ The following formula is typeset in the usual way without modifying anything.
\[ f(x) = \int \frac{\sin x}{x}dx \]
-Now we start a quotation environment which sets \verb+\labelwidth+ to new values for a
+Now we start a quotation environment which sets \CIndex{labelwidth} to new values for a
greater %%% ----- Martin -----
left margin.
@@ -4794,7 +4866,7 @@ left margin.
\[ f(x) = \int \frac{\sin x}{x}dx \]
-\item Now we write the same equation, but now with modifying \verb+\displayindent+, it is set to
+\item Now we write the same equation, but now with modifying \Index{displayindent}, it is set to
the negative \verb+\labelwidth+:
\[
@@ -4848,11 +4920,12 @@ inline math mode (see section~\ref{subsec:whitespace}).
\cIndex{muskipdef}Defines a symbolic name for a \verb+\muskip+ register.
\subsection{\CMD{nonscript}}
-\cIndex{nonscript}Ignores immediately following glue or kern in script and scriptscript styles, which makes
-a redefinition of \verb+\mathchoice+ superfluous.
+\cIndex{nonscript}Ignores immediately following glue or kern in script and
+scriptscript styles, which makes a redefinition of \verb+\mathchoice+ superfluous.
\subsection{\CMD{nulldelimiterspace}}
-\cIndex{nulldelimiterspace}This is the width of a null or missing delimiter, e.g. \verb+\right.+ or for the left one.
+\cIndex{nulldelimiterspace}This is the width of a null or missing delimiter,
+\eg \verb+\right.+ or for the left one.
\subsection{\CMD{predisplaysize}}
\cIndex{predisplaystyle}Is the effective width of the line preceeding a displayed equation, whether
@@ -4869,15 +4942,15 @@ a redefinition of \verb+\mathchoice+ superfluous.
for a negative skip as \verb+\def\!{\mskip-\thinmuskip}+ (see also section~\ref{subsec:mathskip}).
-\begin{showexample}[width=0.35\linewidth]
+\begin{LTXexample}[width=0.35\linewidth]
$\sqrt 2 x$ -- $\sqrt 2\,x$\\
$\sqrt{\log x}$ -- $\sqrt{\,\log x}$\\
$P\left({1/\sqrt n}\right)$ -- $P\left({1/ \sqrt n}\,\right)$\\[8pt]
$[0,1)$ -- $[\,0,1)$\\
$x^2/2$ -- $x^2\!/2$\\
-\end{showexample}
+\end{LTXexample}
-\begin{showexample}[width=0.35\linewidth]
+\begin{LTXexample}[width=0.35\linewidth]
\[\int\int_D dxdy \quad
\int\!\int_D dx\,dy\]
\[\int\!\!\int_D dx\,\,dy \quad
@@ -4885,7 +4958,7 @@ $x^2/2$ -- $x^2\!/2$\\
\[\int\!\!\!\!\int_D dx\,\,\,\,dy \quad
\int\!\!\!\!\!\int_D dx\,\,\,\,\,dy\]
\[\int\!\!\!\int_D dx\,dy\]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{medmuskip}}
See section~\ref{subsec:mathskip}.
@@ -4893,17 +4966,20 @@ See section~\ref{subsec:mathskip}.
\section{Math font macros}
\subsection{\CMD{delcode}}
-\cIndex{delcode}Each character has not only a \verb+\catcode+ and \verb+\mathcode+ but also
+\cIndex{delcode}Each character has not only a \CIndex{catcode} and \CIndex{mathcode} but also
a \verb+\delcode+
which defines for a single chracter how it should look when used as a math delimiter.
\subsection{\CMD{delimiter}}
-\cIndex{delimiter}Every character can be declared as a delimiter, but \TeX{} must know which characters
-should be used for the default and the big size. For \LaTeX{} the macro \verb+\DeclareMathDelimiter+ should be used (see section~\ref{subsec:delim}).
-
-In the following example \verb+\tdela+ is the character $0x22$ ($\uparrow$) from font number $2$ (\verb+csmy+) and character $0x78$ from font number $3$ (\verb+cmex+) for the big version.
-\verb+\tdelb+ is the same vice versa ($\downarrow$).
-\begin{showexample}[width=0.35\linewidth]
+\cIndex{delimiter}Every character can be declared as a delimiter, but \TeX{}
+must know which characters
+should be used for the default and the big size. For \LaTeX{}
+the macro \CIndex{DeclareMathDelimiter} should be used (see section~\vref{subsec:delim}).
+
+In the following example \verb+\tdela+ is the character $0x22$ ($\uparrow$) from
+font number $2$ (\verb+csmy+) and character $0x78$ from font number $3$ (\verb+cmex+)
+for the big version. \verb+\tdelb+ is the same vice versa ($\downarrow$).
+\begin{LTXexample}[width=0.35\linewidth]
\def\tdela{\delimiter"4222378\relax}
\def\tdelb{\delimiter"5223379\relax}
@@ -4912,7 +4988,7 @@ $\tdela x-y\tdelb(x+y)=x^2-y^2$
\[\tdela\sum_{n=0}^\infty {1\over2^n}\tdelb^2 = 4\]
\[\left\tdela\sum_{n=0}^\infty {1\over2^n}\right\tdelb^2 = 4\]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{displaystyle}}
\cIndex{displaystyle}See section~\ref{sec:Styles} for an example.
@@ -4939,32 +5015,32 @@ possible families of fonts. \verb+\fam+ in an internal register where other macr
\end{center}
-\begin{showexample}[width=0.3\linewidth]
+\begin{LTXexample}[width=0.3\linewidth]
$\mathrm{123abcABC\alpha\beta\gamma (\the\fam)}$\\[5pt]
$\mathbf{123abcABC\alpha\beta\gamma (\the\fam)}$\\[5pt]
$\mathit{123abcABC\alpha\beta\gamma (\the\fam)}$\\[5pt]
$\mathtt{123abcABC\alpha\beta\gamma (\the\fam)}$\\[5pt]
$\mathsf{123abcABC\alpha\beta\gamma (\the\fam)}$\\[5pt]
$\mathnormal{123abcABC\alpha\beta\gamma (\the\fam)}$
-\end{showexample}
+\end{LTXexample}
\fi
\subsection{\CMD{mathaccent}}
\cIndex{mathaccent}Requires three parameter as one number, the class, the font family and the character.
-\begin{showexample}[width=0.3\linewidth]
+\begin{LTXexample}[width=0.3\linewidth]
\def\dA{\mathaccent"7015\relax}
{\Large $\dA{A}$}
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{mathbin}}
-\cIndex{mathbin}Declares a following character as a binary symbol with another spacing before and behind such
-a symbol.
+\cIndex{mathbin}Declares a following character as a binary symbol with another
+spacing before and behind such a symbol.
-\begin{showexample}[width=0.3\linewidth]
+\begin{LTXexample}[width=0.3\linewidth]
{\Large
$a|b \quad a\mathbin| b$}
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{mathchar}}
\cIndex{mathchar}Declares a math character by three integer numbers as Parameters, giving its class, %%% ----- Martin -----
@@ -4972,30 +5048,32 @@ font family, and font position. In the following example \verb+\mathchar+ define
character of class 1 (big operators), font family 3 (math extension font) and number
58 (big sum character).
-\begin{showexample}[width=0.3\linewidth]
+\begin{LTXexample}[width=0.3\linewidth]
{\Large
$a\sum\limits_{i=1}^{\infty} b \quad
a\mathchar"1358\limits_{i=1}^{\infty} b$}
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{mathchardef}}
-\cIndex{mathchardef}This is in principle the same as \verb+\mathchar+, it only allows to make such definitions permanent. %%% ----- Martin -----
+\cIndex{mathchardef}This is in principle the same as \CIndex{mathchar},
+it only allows to make such definitions permanent.
-\begin{showexample}[width=0.25\linewidth]
+\begin{LTXexample}[width=0.25\linewidth]
\bgroup
\mathchardef\sum="1358
$a\sum\limits_{i=1}^{\infty}\sqrt{i+1}$\\[5pt]
\egroup
$a\sum\limits_{i=1}^{\infty}\sqrt{i+1}$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{mathchoice}}
-\cIndex{mathchoice}Specifies specific subformula sizes for the 4 main styles: \verb+displaystyle+ -- \verb+textstyle+ --
-\verb+scriptstyle+ -- \verb+scriptscriptstyle+.
+\cIndex{mathchoice}Specifies specific subformula sizes for the 4 main styles:
+\CIndex{displaystyle} -- \CIndex{textstyle} --
+\CIndex{scriptstyle} -- \CIndex{scriptscriptstyle}.
-\begin{showexample}[width=0.15\linewidth]
+\begin{LTXexample}[width=0.15\linewidth]
\Large
\def\myRule{{%
\color{red}%
@@ -5004,32 +5082,32 @@ $a\sum\limits_{i=1}^{\infty}\sqrt{i+1}$
\mkern2mu}}
$\myRule\sum\limits_{\myRule i=1}^{\myRule\infty}%
\myRule\frac{\myRule\sqrt{\myRule i+1}}{\myRule i^2}$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{mathclose}}\label{subsec:mathclose}
-\cIndex{mathclose}Assigns class 5 (closing character) to the following parameter, which can hold a single character
-or a subformula.
+\cIndex{mathclose}Assigns class 5 (closing character) to the following
+parameter, which can hold a single character or a subformula.
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
{\large
$A:\frac{B}{C}:D$\\[5pt]
$A\mathopen:\frac{B}{C}\mathclose: D $}
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{mathcode}}
\cIndex{mathcode}A math font is far different from a text font. A lot of the characters has to be defined with
-\verb+\mathcode+, which defines the character with its class, font family and character number, e.g.
+\verb+\mathcode+, which defines the character with its class, font family and character number, \eg
\verb+\mathcode`\<="313C+. It defines the character ``<''{} as a realtion symbol (class 3) from
the font family 1 and the character number 0x3C, which is 60 decimal.
\subsection{\CMD{mathop}}
\cIndex{mathop}Assigns class 1 (large operator) to the parameter, which can be a single character or a subformula.
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
\[ A_{i=1}^{\infty} \]
\[ \mathop{A}_{i=1}^{\infty} \]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{mathopen}}
\cIndex{mathopen}Vice versa to \verb+\mathclose+ (see section~\ref{subsec:mathclose}).
@@ -5039,11 +5117,11 @@ the font family 1 and the character number 0x3C, which is 60 decimal.
\cIndex{mathord}Assigns class 0 (ordinary character) to the following parameter, which can be a single character
or a subformula.
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
{\large
$y = f(x)$\\[5pt]
$y \mathord= f(x)$}
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{mathpunct}}
\cIndex{mathpunct}Assigns class 6 (punctuation) to the following parameter, which can be a single character
@@ -5053,22 +5131,22 @@ or a subformula (see section~\ref{subsec:dot-comma} for an example).
\cIndex{mathrel}Assigns class 3 (relation) to the following parameter, which can be a single character
or a subformula.
-\begin{showexample}[width=0.25\linewidth]
+\begin{LTXexample}[width=0.25\linewidth]
{\large
$x_1 o x_2 o x_3$\\[5pt]
$x_1\mathrel o x_2\mathrel o x_3$}
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{scriptfont}}
\cIndex{scriptfont}Specifies the scriptstyle font (used for super/subscript) for a family.
-\begin{showexample}[width=0.25\linewidth]
+\begin{LTXexample}[width=0.25\linewidth]
$A_1$
\font\tenxii=cmr12
\scriptfont0=\tenxii
$A_1$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{scriptscriptfont}}
@@ -5090,14 +5168,14 @@ $A_1$
\end{description}
\AmSmath\ redefines the setting of double accents. This is the reason why there are only a few
-cases where someone has to use \verb+\skew+ when \verb+amsmath.sty+ is loaded, like
+cases where someone has to use \verb+\skew+ when the package \PIndex{amsmath} is loaded, like
in this document.
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
\large
$\tilde i$ \qquad $\tilde{A}$\\[5pt]
$\skew{3}{\tilde}{i}$ \qquad $\skew{7}{\tilde}{A}$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{skewchar}}
\cIndex{skewchar}Is -1 or the character (reference symbol) used to fine-tune the positioning of math accents.
@@ -5115,7 +5193,7 @@ $\skew{3}{\tilde}{i}$ \qquad $\skew{7}{\tilde}{A}$
\subsection{\CMD{above}}
\cIndex{above}
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
$a\above0pt b$\\[8pt]
${a\above1pt b}$\\[8pt]
@@ -5123,13 +5201,13 @@ ${a\above1pt b}$\\[8pt]
${a\above2.5pt b}$\\[8pt]
$\displaystyle{a\above0pt b}$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{abovewithdelims}}
\cIndex{abovewithdelims}
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
$a\abovewithdelims()0pt b$\\[8pt]
\def\fdelimA{\abovewithdelims\{)1.0pt}
@@ -5140,29 +5218,29 @@ ${a\fdelimB b}$\\[8pt]
\def\fdelimC{\abovewithdelims\{.0pt}
$\displaystyle{a\fdelimC b}$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{atop}}
\cIndex{atop}
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
$a\atop b$\\[8pt]
$({n \atop k}) = {n!\above1pt k!(n-k)!}$\\[8pt]
$\displaystyle{a\atop b}$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{atopwithdelims}}
\cIndex{atopwithdelims}
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
$a\atopwithdelims() b$\\[8pt]
${n \atopwithdelims() k} = {n!\above1pt k!(n-k)!}$\\[8pt]
$\displaystyle{a\atopwithdelims\{. b}$
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{displaylimits}}
\cIndex{displaylimits}Resets the conventions for using limits with operators to the standard for the used environment.
@@ -5171,33 +5249,34 @@ $\displaystyle{a\atopwithdelims\{. b}$
\cIndex{eqno}Puts an equation number at the right margin, the parameter can hold anything. \verb+\eqno+ places
only the parameter, but doesn't increase any equation counter.
-\begin{showexample}[width=0.5\linewidth]
+\begin{LTXexample}[width=0.5\linewidth]
\[ y=f(x) \eqno{(A12)} \]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{everydisplay}}
\cIndex{everydisplay}Inserts the parameter at the start of every switch to display math mode.
-\begin{showexample}[width=0.4\linewidth]
+\begin{LTXexample}[width=0.4\linewidth]
\everydisplay{\color{red}
}
\[ f(x) = \int \frac{\sin x}{x}dx \]
\[ g(x) = \int \frac{\sin^2 x}{x^2}dx \]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{everymath}}
-\cIndex{everymath}Same as \verb+\everydisplay+, but now for the inline mode. In the following example
-the displaystyle is used (besides using color red) for every inline math expression. %%% ----- Martin -----
+\cIndex{everymath}Same as \CIndex{everydisplay}, but now for the inline mode.
+In the following example
+the displaystyle is used (besides using color red) for every inline math expression.
\bgroup
-\begin{showexample}[width=0.45\linewidth]
+\begin{LTXexample}[width=0.45\linewidth]
\everymath{\color{red}%
\displaystyle}
\[ f(x) = \int \frac{\sin x}{x}dx \]
Instead of $\frac{\sin x}{x}$
now with $\frac{\cos x}{x}$:
\[ g(x) = \int \frac{\cos x}{x}dx \]
-\end{showexample}
+\end{LTXexample}
\egroup
Pay attention for side effects on footnotes and other macros which use the math mode for superscript
@@ -5208,54 +5287,54 @@ and other math related modes. In this case you'll get the footnotes also in red.
Requires an additional \verb+right+.
\subsection{\CMD{leqno}}
-\cIndex{leqno}Vice versa to \verb+\eqno+ (see section~\ref{subsec:eqno}).
+\cIndex{leqno}Vice versa to \verb+\eqno+ (see section~\vref{subsec:eqno}).
\subsection{\CMD{limits}}
-\cIndex{limits}Typesets limits above and/or below operators (see section~\ref{sec:limits}).
+\cIndex{limits}Typesets limits above and/or below operators (see section~\vref{sec:limits}).
\subsection{\CMD{mathinner}}
\cIndex{mathinner}Defines the following parameter as subformula.
\subsection{\CMD{nolimits}}
-\cIndex{nolimits}The opposit of \verb+\limits+, instead of above/below limits are placed to the right of large
+\cIndex{nolimits}The opposit of \CIndex{limits}, instead of above/below limits are placed to the right of large
operators (class 1).
\subsection{\CMD{over}}
\cIndex{over}Is equivalent to the fraction macro of \LaTeX{} and equivalent to the
-\verb+\overwithdelims+, see section~\ref{subsec:overwithdelims}.
+\verb+\overwithdelims+, see section~\vref{subsec:overwithdelims}.
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
$ {a\over b} \qquad {{m\over n}\over{a+b}} $
\[ {m\over n}\over{a+b} \]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{overline}}
\cIndex{overline}Puts a line over the following character or subformula and has the same problems with different
heights as underlines (see section~\ref{subsec:underline}).
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
$\overline{x}+\overline{y}=\overline{z}$\\
\let\ol\overline
$ \ol{x} + \ol{A} = \ol{z} $\\[5pt]
\def\yPh{\vphantom{A}}
$ \ol{x\yPh} + \ol{A} = \ol{z\yPh} $
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{overwithdelims}}\label{subsec:overwithdelims}
\cIndex{overwithdelims}Is a generalized fraction command with preset fraction bar thickness. %%% ----- Martin -----
-\begin{showexample}[width=0.25\linewidth]
+\begin{LTXexample}[width=0.25\linewidth]
$ {a\overwithdelims() b} \qquad {{m\over n}\overwithdelims[]{a+b}} $
\[ {m\over n}\overwithdelims\{.{a+b} \]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{radical}}
\cIndex{radical}Makes a radical atom from the delimiter (27-bit number) and the math field.
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
\def\mySqrt{\radical"0270371\relax}
$ \mySqrt{\frac{1}{7}} $\\[5pt]
@@ -5267,16 +5346,17 @@ $ \mySqrt{\frac{1}{7}} $\\[5pt]
\def\mySqrt{\radical"0270374\relax}
$ \mySqrt{\frac{1}{7}} $\\[5pt]
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{right}}
-\cIndex{right}Opposite to \verb+\left+, makes \TeX{} calculate the size of the delimiter needed at the right of a formula.
+\cIndex{right}Opposite to \verb+\left+, makes \TeX{} calculate the size of the
+delimiter needed at the right of a formula.
\subsection{\CMD{underline}}\label{subsec:underline}
\cIndex{underline}When there is a combination of variables with and without an index, the underlines are typeset %%% ----- Martin -----
with a different depth. Using \verb+\vphantom+ in this case is a good choice.
-\begin{showexample}[width=0.2\linewidth]
+\begin{LTXexample}[width=0.2\linewidth]
$\underline{x}+\underline{y}=\underline{z}$\\
\let\ul\underline
@@ -5284,7 +5364,7 @@ $\underline{x}+\underline{y}=\underline{z}$\\
$ \ul{x\yPh} + \ul{y} = \ul{z\yPh} $\\
$ \ul{x_1} + \ul{y_2} = \ul{z_3} $
-\end{showexample}
+\end{LTXexample}
\subsection{\CMD{vcenter}}
\cIndex{vcenter}Centers vertical material with respect to the axis.
@@ -5313,7 +5393,6 @@ when the binary symbol is not the last one and when the penalty is below 10,000.
The following sections are not a replacement for the package documentation!
\section{List of available math packages}
-
\begin{center}
\noindent
\begin{tabular}{llll}
@@ -5389,8 +5468,8 @@ delarray.sty 1994/03/14 v1.01 array delimiter package (DPC)
}
-\section{\texttt{accents}}\label{sec:package-accent}
-\index{Accent}If you want to write for example an underlined M, then you can do it by %%% ----- Martin -----
+\subsection{\texttt{accents}}\label{sec:package-accent}
+If you want to write for example an underlined M, then you can do it by %%% ----- Martin -----
\medskip
\begin{tabular}{ll}
@@ -5400,21 +5479,21 @@ delarray.sty 1994/03/14 v1.01 array delimiter package (DPC)
\end{tabular}
\medskip
-As seen, there is no difference between \verb|\underline| and \verb|\underbar|. For %%% ----- Martin -----
-some reasons it may be better to use the package \verb|accents.sty| with the
-\verb|\underaccents| macro.
+As seen, there is no difference between \CMD{underline} and \CMD{underbar}. For %%% ----- Martin -----
+some reasons it may be better to use the \PIndex{accent} package with the
+\CMD{underaccents} macro.
-\section{\texttt{amscd} -- commutative diagrams}
+\subsection{\texttt{amscd} -- commutative diagrams}
-\verb|amscd.sty|\index{amscd.sty} is part of the \AmSmath bundle
+The \PIndex{amscd} package is part of the \AmSmath bundle
or available at CTAN%
\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/required/amslatex/math/amscd.dtx}%
{CTAN://macros/latex/required/amslatex/math/amscd.dtx}} and has no options for the
\verb|\usepackage| command.
-\texttt{amscd.sty} does not support diagonal arrows but is much %%% ----- Martin -----
-easier to handle than the complex pstricks\index{pstricks.sty} or
-the xypic\index{xypic.sty} package. On the other hand simple diagrams
-can be written with the array environment or look at \cite{taylor00}.
+\texttt{amscd} does not support diagonal arrows but is much %%% ----- Martin -----
+easier to handle than the complex \PIndex{pstricks} package or
+the \PIndex{xypic} package. On the other hand simple diagrams
+can be written with the \UIndex{array} or look at \cite{taylor00}.
\[
\begin{CD}
@@ -5435,8 +5514,8 @@ can be written with the array environment or look at \cite{taylor00}.
\end{lstlisting}
-\section{\texttt{amsopn}}\label{sec:amsopn}
-With this package it is very easy to declare new math operators, which are written in
+\subsection{\texttt{amsopn}}\label{sec:amsopn}
+With the \PIndex{amsopn} package it is very easy to declare new math operators, which are written in
upright mode:
$\underset{s=p}{Res}\quad\text{versus}\quad\underset{s=p}{\Res}$
@@ -5474,13 +5553,13 @@ Table~\ref{tab:amsopn} shows the predefined operatornames of \verb+amsopn+.
\end{table}
-\section{\texttt{bigdel}}\label{sec:bigdelim}
-This is a very useful package together with the \verb|multirow.sty| package.
+\subsection{\texttt{bigdel}}\label{sec:bigdelim}
+This is a very useful package together with the \PIndex{multirow} package.
In the following example we need additional parentheses for a different
-number of rows. This is also possible with the \verb|array| environment,
-but not as easy as with \verb|bigdelim.sty|. The trick is that you need one
+number of rows. This is also possible with the \UIndex{array},
+but not as easy as with the \PIndex{bigdelim} package. The trick is that you need one
separate column for a big delimiter, but with empty cells in all rows, which
-the delimiter spans.
+the delimiter spans.
\[
\begin{pmatrix}
@@ -5514,26 +5593,27 @@ the delimiter spans.
As seen in the above listing the left big delimiter is placed in the first
column, all other rows start with second column. It is possible to use all
-columns above and below the delimiter. For the \verb|array| environment
+columns above and below the delimiter. For the \UIndex{array}
there must be two more columns defined, in case of a big delimiter left and
-right. The syntax of \verb|\ldelim| and \verb|\rdelim| is:
+right. The syntax of \CIndex{ldelim} and \CIndex{rdelim} is:
+%
\begin{verbatim}
\ldelim<delimiter>{<n rows>}{<added horizontal space>}[<text>]
\rdelim<delimiter>{<n rows>}{<added horizontal space>}[<text>]
\end{verbatim}
-Any delimiter which is possible for the \verb|\left| or \verb|\right| command
-is allowed, e.g.: ``\verb/()[]{}|/''. The text is an optional argument and %%% ----- Martin -----
+Any delimiter which is possible for the \CIndex{left} or \CIndex{right} command
+is allowed, \eg ``\verb/()[]{}|/''. The text is an optional argument and
always typeset in text mode.
-\section{\texttt{bm}}\label{sec:bm}
-By default the math macro \verb|mathbf| writes everything in bold and in upright mode
+\subsection{\texttt{bm}}\label{sec:bm}
+By default the math macro \CIndex{mathbf} writes everything in bold and in upright mode
$\mathbf{y=f(x)}$ (\verb|$\mathbf{y=f(x)}$|), but it should be in italic mode especially
-for variables $\bm{y=f(x)}$ (\verb|$\bm{y=f(x)}$|). For writing a whole formula in bold
-have a look at section \vref{sec:boldmath}.
+for variables $\bm{y=f(x)}$ (\verb|$\bm{y=f(x)}$|), which is possible with the package \PIndex{bm}.
+For writing a whole formula in bold have a look at section~\vref{sec:boldmath}.
-\section{\texttt{braket}}\label{sec:braket}
+\subsection{\texttt{braket}}\label{sec:braket}
It is available at
\href{http://www.ctan.org/tex-archive/macros/latex/contrib/other/misc/braket.sty}%
{CTAN://macros/latex/contrib/other/misc/braket.sty}
@@ -5546,7 +5626,7 @@ and provides several styles for writing math expressions inside brakets. For exa
\end{lstlisting}
\noindent looks not quit right and it is not really easy to get the first vertical line in the same
-size as the outer braces. Some solution may be using \CMD{vphantom}: %%% ----- Martin -----
+size as the outer braces. Some solution may be using \CIndex{vphantom}:
\[
\left\{\vphantom{\frac{5}{3}}x\in\mathbf{R} \right|\left. 0<{|x|}<\frac{5}{3}\right\}
@@ -5558,7 +5638,7 @@ size as the outer braces. Some solution may be using \CMD{vphantom}: %%% ----
\]
\end{lstlisting}
-\verb|braket.sty| has the macros
+The package \PIndex{braket} has the macros
\begin{lstlisting}
\Bra{<math expression>}
@@ -5583,9 +5663,9 @@ size as the outer braces. Some solution may be using \CMD{vphantom}: %%% ----
\[ \Set{x\in\mathbf{R} | 0<|x|<\frac{5}{3}} \]
\end{lstlisting}
-The difference between the \CMD{Set} and the \CMD{Braket} macro is the handling of the
-vertical lines. In \CMD{Set} only the first one gets the same size as the
-braces\index{Braces} and in \CMD{Braket} all.
+The difference between the \CIndex{Set} and the \CIndex{Braket} macro is the handling of the
+vertical lines. In \CIndex{Set} only the first one gets the same size as the
+braces\index{Braces} and in \CIndex{Braket} all.
\[ \Braket{ \phi | \frac{\partial^2}{\partial t^2} | \psi }\]
\[ \Set{ \phi | \frac{\partial^2}{\partial t^2} | \psi }\]
@@ -5598,17 +5678,21 @@ braces\index{Braces} and in \CMD{Braket} all.
\CMD{Bra} and \CMD{Ket} do nothing with the inner vertical lines.
-\section{\texttt{cancel}}\label{cancel.sty}
-This is a nice package for canceling anything in mathmode with a slash, backslash or a \verb+X+. To get
-a horizontal line we can define an additional macro called \verb+hcancel+ with an optional argument
-for the line color (requires package \verb+color+):
+\subsection{\texttt{cancel}}\label{cancel.sty}
+This is a nice package for canceling anything in mathmode with a slash,
+backslash or a \verb+X+. To get
+a horizontal line we can define an additional macro called \CIndex{hcancel}
+with an optional argument
+for the line color (requires package \PIndex{color}):
+%
\begin{lstlisting}
\newcommand\hcancel[2][black]{\setbox0=\hbox{#2}%
\rlap{\raisebox{.45\ht0}{\textcolor{#1}{\rule{\wd0}{1pt}}}}#2}
\end{lstlisting}
-It is no problem to redefine the \verb+cancel+ macros to get also colored lines. A horizontal line for
-single characters is also decribed in section \vref{sec:Accents}.
+It is no problem to redefine the \CIndex{cancel} macros to get also colored lines.
+A horizontal line for
+single characters is also decribed in section~\vref{sec:Accents}.
\medskip
\noindent
@@ -5626,9 +5710,9 @@ $\hcancel{3}\qquad\hcancel[red]{1234567}$
\end{lstlisting}
-\section{\texttt{delarray}}\label{delarray}
+\subsection{\texttt{delarray}}\label{delarray}
-Package \texttt{delarray.sty}%
+Package \PIndex{delarray}%
\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/required/tools/delarray.dtx}{CTAN://macros/latex/required/tools/delarray.dtx}%
} supports different delimiters which are defined together with the
beginning of an array:
@@ -5639,7 +5723,7 @@ beginning of an array:
\end{lstlisting}
\noindent defines an array with two centered columns and the delimiters\\
-``\texttt{<delLeft><delRight>}{}'', e.g. ``\texttt{()}{}''.
+``\texttt{<delLeft><delRight>}{}'', \eg ``\texttt{()}{}''.
\medskip{}
\begin{minipage}[c]{0.45\textwidth}%
@@ -5664,9 +5748,9 @@ c & d
\medskip{}
-\verb|delarray.sty| expects a pair of delimiters. If you need only
+The \PIndex{delarray} package expects a pair of delimiters. If you need only
one (like the cases structure) then use the dot for an ``empty''
-delimiter, e.g.
+delimiter, \eg
\medskip{}
\begin{minipage}[c]{0.45\textwidth}%
@@ -5689,17 +5773,18 @@ c & d
\medskip{}
-\noindent which is a useful command for a cases structure without the \AmSmath package, which is described in the \AmSmath part.
+\noindent which is a useful command for a cases structure without the \AmSmath
+package, which is described in the \AmSmath part.
-\section{\texttt{empheq}}\label{sec:empheq}
+\subsection{\texttt{empheq}}\label{sec:empheq}
This package supports different frames for math environments of the \AmSmath
package. It doesn't support all the environments from standard \LaTeX{} which %%% ----- Martin -----
-are not modified by \AmSmath, e.g. \verb|eqnarray|.
+are not modified by \AmSmath, \eg \UIndex{eqnarray}.
-With the optional argument of the environment \verb|empheq| the preferred box type
-can be specified. A simple one is \verb|\fbox|
+With the optional argument of the \UIndex{empheq} the preferred box type
+can be specified. A simple one is \CIndex{fbox}
\begin{empheq}[box=\fbox]{align}
f(x)=\int_1^{\infty}\frac{1}{x^2}\,dt=1
@@ -5723,7 +5808,7 @@ The same is possible with the macro \verb|\colorbox|:
\end{lstlisting}
The key \verb|box| can hold any possible \LaTeX{} command sequence. Boxing
-subequations is also no problem, the \verb|empheq| environment works in the same way:
+subequations is also no problem, the \UIndex{empheq} works in the same way:
\begin{subequations}
\begin{empheq}[box={\fboxsep=10pt\colorbox{cyan}}]{align}
@@ -5741,12 +5826,12 @@ subequations is also no problem, the \verb|empheq| environment works in the same
\end{subequations}
\end{lstlisting}
-For more information on \verb|empheq| have a look at the documentation of the package
+For more information on \PIndex{empheq} package have a look at the documentation of the package
which is available at any CTAN server.
-\section{\texttt{esint}}\label{sec:esint}
+\subsection{\texttt{esint}}\label{sec:esint}
This is a very useful package when you want nice double or triple integral or curve
-integral symbols. The ones from \verb|wasysym|%
+integral symbols. The ones from the \PIndex{wasysym} package%
\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/contrib/wasysym/}%
{CTAN://macros/latex/contrib/wasysym/}} are not the best.
\verb|esint|\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/contrib/esint/}%
@@ -5775,7 +5860,7 @@ integral symbols. The ones from \verb|wasysym|%
\end{align}
-\section{\texttt{eucal} and \texttt{euscript.sty}}\label{sec:euscript.sty}
+\subsection{\texttt{eucal} and \texttt{euscript}}\label{sec:euscript.sty}
These packages should be part of your local \TeX{} installation, because
they come with the \AmSmath packages. Otherwise get them from CTAN%
@@ -5791,10 +5876,10 @@ letters:
Read the documentation for the interdependence to the %%% ----- Martin -----
\verb|\mathcal| command. For the above example the
-package \verb|eucal.sty| was loaded with the option \verb|mathscr|.
+package \PIndex{eucal} was loaded with the option \verb|mathscr|.
-\section{\texttt{exscale}}\label{sec:exscale}
+\subsection{\texttt{exscale}}\label{sec:exscale}
The following formula is written with the default fontsize where everything
looks more or less well:
@@ -5804,9 +5889,9 @@ looks more or less well:
dx\approx\frac{\pi}{n}\sum_{i=1}^{n}f\left(\cos\left(\frac{2i-1}{2n}\right)\right)\]
-Writing the same with the fontsize \texttt{\textbackslash{}huge} gives
+Writing the same with the fontsize \CIndex{huge} gives
a surprising result, which belongs to the historical development of
-\LaTeX{}, the int\index{int@\textbackslash int} and sum\index{sum@\textbackslash sum} symbols
+\LaTeX{}, the \CIndex{int} and \CIndex{sum} symbols
are not stretched. This extreme fontsize is often needed for slides
and not only written ``just for fun{}''.
@@ -5814,7 +5899,7 @@ and not only written ``just for fun{}''.
\includegraphics{exscale}
\end{center}
-Using the \texttt{exscale.sty}%
+Using the \PIndex{exscale} package%
\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/base/}%
{CTAN://macros/latex/base/}} package, which should be part of any local \TeX{}
installation, all symbols get the right size.
@@ -5825,13 +5910,13 @@ installation, all symbols get the right size.
\sum_{i=1}^{n}f\left(\cos\left(\frac{2i-1}{2n}\right)\right)\]
\end{minipage}%
-\section{\texttt{mathtools}}\label{sec:mathtools}
-This package comes with a lot of additional features for setting math code.
+\subsection{\texttt{mathtools}}\label{sec:mathtools}
+This package comes with a lot of additional features for typesetting math code.
Sometimes it is useful when only such equations are numbered which are
referenced in the text. This is possible with the switch \verb+\showonlyrefs+.
Matrices are set by default with a centered horizontal alignment, which is
-often not the best way. \verb+mathtools+ provides a starred version of
+often not the best way. The \PIndex{mathtools} package provides a starred version of
the matrix environments which allow an optional argument for the horizontal
alignment:
@@ -5855,17 +5940,48 @@ alignment:
\]
\end{lstlisting}
-\verb+mathtools+ also provides a also some more environments for setting equations.
+\PIndex{mathtools} also provides some more environments for setting equations.
+Very interesting is the \UIndex{lgathered}, which allows to typeset a formula in
+the following way:
+
+\begin{LTXexample}[width=0.6\linewidth]
+\begin{align}
+ x &=
+ \begin{lgathered}[t]
+ a + b + c \\
+ d + e +
+ \!\begin{gathered}[t]
+ f + g + h \\
+ i + j + k
+ \end{gathered}
+ \end{lgathered}
+\end{align}
+\end{LTXexample}
+
+The \CMD{!}\index{*@\textbackslash\char033} revokes the internal horizontal space
+in front of the \UIndex{gathered}.
+
+
+\subsection{\texttt{nicefrac}}\label{sec:nicefrac}
+Typesetting fractions\index{Fraction} in the inline mode is often a bad choice, the vertical spacing
+increases in fact of the fraction. The \PIndex{nicefrac} package defines the macro
+\CIndex{nicefrac}, which is used in the same way as the \CIndex{frac} command, but it
+typesets the fraction with a less height: \nicefrac{2}{3} \lstinline|\nicefrac{2}{3}|.
+The package is part of the \PIndex{units} package bundle and can be found in the
+directory of \PIndex{units}.
-\section{\texttt{relsize}}\label{sec:relsize}
-Often consecutives math operators are used, like two sum symbols, e.g.:
+
+
+\subsection{\texttt{relsize}}\label{sec:relsize}
+Often consecutives math operators are used, like two sum symbols, \eg
+%
\[ \sum\sum_{i=1}^n i^2 \]
As seen the sums are of the same size. To increase the first operator size, someone
-can use the \verb+\scalebox+ macro from \verb+graphicx+ and write an own macro %%% ----- Martin -----
-\verb+\Sum+, e.g.:\index{Operator!size}\index{Size!Operator}
+can use the \CIndex{scalebox} macro from package \UIndex{graphicx} and write an own macro %%% ----- Martin -----
+\verb+\Sum+, \eg \index{Operator!size}\index{Size!Operator}
\begin{lstlisting}
\def\Sum{\ensuremath\mathop{\scalebox{1.2}{$\displaystyle\sum$}}}
@@ -5875,24 +5991,23 @@ can use the \verb+\scalebox+ macro from \verb+graphicx+ and write an own macro
\def\Sum{\ensuremath\mathop{\scalebox{1.2}{$\displaystyle\sum$}}}
\[ \Sum_{j=1}\sum_{i=1}^\infty i \]
-Another solution is to use the \verb+relsize+\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/ltxmisc/}%
-{CTAN://macros/latex/ltxmisc/}} package together with the \verb+exscale+
-one. \verb+relsize+ defines a useful macro \verb+mathlarger+:
+Another solution is to use the \PIndex{relsize} package%
+\footnote{\href{http://www.ctan.org/tex-archive/macros/latex/ltxmisc/}{CTAN://macros/latex/ltxmisc/}}
+together with the \PIndex{exscale} one. \PIndex{relsize} defines a useful macro \CIndex{mathlarger}:
-\begin{showexample}
+\begin{LTXexample}
\[ \mathlarger{\sum}\sum_{i=1}^n i^2 \]
-\end{showexample}
+\end{LTXexample}
-\section{\texttt{xypic}}\label{xypic.sty}
+\subsection{\texttt{xypic}}\label{xypic.sty}
-The \texttt{xymatrix}\index{xymatrix@\textbackslash xymatrix} macro is part of the
-\verb+xypic+ package%
+The \CIndex{xymatrix} macro is part of the \PIndex{xypic} package%
\footnote{\href{http://www.ctan.org/tex-archive/support/latex2html/}%
{CTAN://macros/generic/diagrams/xypic/xy-3.7/}} which can be loaded with several options
-which are not so important.%
-\footnote{For more information look at the style file \texttt{xy.sty}, which
-is often saved in \texttt{/usr/share/texmf/tex/generic}}.
+which are not so important here.%
+\footnote{For more information look at the package documentation or the
+package \PIndex{xy} itself, which is often saved in \texttt{/usr/share/texmf/tex/generic}}.
\begin{equation}
\xymatrix{A\POS[];[d]**\dir{~},[];[dr]**\dir{-} & B & C\\
@@ -5912,10 +6027,13 @@ This matrix was created with
\]
\end{lstlisting}
+
+
+
\part{Math fonts}
Typesetting text and math is far different. There exist a lot of free text fonts without
additional math characters. This is the reason why we have to buy a commercial math font, e.\,g.
-\Index{Palatino} (\verb+pamath+) or \Index{Helvetica} (\verb+hvmath+), or to
+\Index{Palatino} (\PIndex{pamath}) or \Index{Helvetica} (\PIndex{hvmath}), or to
combine the free text font with another free math font.
\section{Computer modern}
@@ -5925,17 +6043,17 @@ the Type 1 fonts cm-super and BlueSkye were used.
\Mbox{cm-crop}
\section{Latin modern}
-This is the new designed font which comes with an own Type 1 version.\index{lm}\index{Latin modern}
+This is the new designed font which comes with an own Type 1 version.\FIndex{lm}\index{Latin modern}
\Mbox{lm-crop}
\section{Palatino}
-There is a free package mathpazo.\index{mathpazo}\index{Palatino}
+There is a free package mathpazo.\PIndex{mathpazo}\index{Palatino}
\Mbox{pazo-crop}
\section{Palatino -- microimp}
-There is the package \verb+pamath+ for the nonfree palatino font.\index{mathpazo}\index{Palatino}
+There is the package \PIndex{pamath} for the nonfree palatino font.\PIndex{mathpazo}\index{Palatino}
\Mbox{pamath-crop}
@@ -5999,6 +6117,7 @@ Name & Symbol\\\hline
\end{tabular}
\end{center}
+%$
For all new integral symbols limits can be used in the usual way:
\begin{equation}
@@ -6090,6 +6209,7 @@ The following code defines several harpoon symbols.%
\verb|\xrightleftharpoons[under]{over}|& $\xrightleftharpoons[under]{over}$
\end{tabular}
+%$
\section{Bijective mapping arrow}
@@ -6102,12 +6222,12 @@ To get something like \bijmap~we can define:
}
\end{lstlisting}
-This uses the \verb+\mathrlap+ definition from section~\vref{subsec:ams-limits}. With this
+This uses the \CIndex{mathrlap} definition from section~\vref{subsec:ams-limits}. With this
definition a huge symbol is also possible: \verb+{\Huge\bijmap}+ {\Huge\bijmap}.
\section{Stacked equal sign}
-There are several symbols stacked with an equal sign, e.g. \verb+\doteq+, \verb+\equiv+ or
-\verb+\cong+ ($\doteq$, $\equiv{}$, $\cong$ ). But there are still some missing, which are
+There are several symbols stacked with an equal sign, \eg \CIndex{doteq}, \CIndex{equiv} or
+\CIndex{cong} ($\doteq$, $\equiv{}$, $\cong$ ). But there are still some missing, which are
shown in table~\ref{tab:equal} and the following definitions.
\begin{table}[htb]
@@ -6206,6 +6326,10 @@ X_z & Y_z & Z_z & T_z \\
\end{tabular}
\end{LTXexample}
+%$
+
+
+
\section{Cases structure}
@@ -6315,7 +6439,7 @@ use the \verb+tabular+, the \verb+tabularx+ and the \verb+array+ environment.
\]
\end{lstlisting}
-
+%$
\section{Arrays}
@@ -6595,6 +6719,48 @@ shows how one can put \index{color}colors in rows, columns and cells.
\end{lstlisting}
+\subsection{Boxed rows and columns}
+
+\begin{LTXexample}[width=0.35\linewidth]
+\[
+\overrightarrow{A}=\left[
+ \begin{array}{cccc}
+ 1 & 2 & 3 & 4\\
+ 1 & 2 & 3 & 4\\\hline
+ \multicolumn{1}{|c}{1} & 2 & 3 &
+ \multicolumn{1}{c|}{4}\\\hline
+ 1 & 2 & 3 & 4
+ \end{array}\right]
+\]
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=0.35\linewidth]
+\[
+\overrightarrow{A}=\left[
+ \begin{array}{cc|c|c}\cline{3-3}
+ 1 & 2 & 3 & 4\\
+ 1 & 2 & 3 & 4\\
+ 1 & 2 & 3 & 4\\
+ 1 & 2 & 3 & 4\\\cline{3-3}
+ \end{array}\right]
+\]
+\end{LTXexample}
+
+\begin{LTXexample}[width=0.35\linewidth]
+\[
+\overrightarrow{A}=\left[
+ \begin{array}{cc|c|c}\cline{3-3}
+ 1 & 2 & 3 & 4\\
+ 1 & 2 & 3 & 4\\\hline
+ \multicolumn{1}{|c}{1} & 2 & 3 &
+ \multicolumn{1}{c|}{4}\\\hline
+ 1 & 2 & 3 & 4\\\cline{3-3}
+ \end{array}\right]
+\]
+\end{LTXexample}
+
+
\section{Over- and underbraces}
\subsection{Braces and roots}
@@ -6666,7 +6832,7 @@ y\textcolor{blue}{-\frac{31}{8}}
\subsection[Vertical alignment]{Vertical alignment of different braces}
When having several braces in one formula line, then it looks better when all
-braces are also on the same line, e.g.:
+braces are also on the same line, \eg
\begin{equation}
\binom{x_R}{y_R} = \underbrace{r\vphantom{\binom{A}{B}}}_{\text{Scaling}}\cdot%
@@ -6852,14 +7018,14 @@ Sometimes it may be useful to have a vertical alignment over the whole page with
formulas and text. Section \ref{sec:Text-in-math mode} shows the use of \CMD{intertext}.
There is another trick to get all formulas vertical aligned. Let's have the following
formulas distributed over the whole page:
-
+%
\begin{align*}
f(x) &= a\\
g(x) &= x2-4x\\
f(x)-g(x) &= x2+x3+x\\
g &= x2+x3+x4+x5+b
\end{align*}
-
+%
They all have a different length of the left and right side. Now we want to write some
text and other objects between them, but let the alignment untouched. We choose the
longest left and the longest right side and take them for scaling with the \CMD{hphantom}
@@ -6872,79 +7038,77 @@ command:
This is the first (empty) line in every equation where now all other lines are aligned to
this one. For example:
+\bgroup
\medskip\noindent
\rule{\columnwidth}{1pt}
\newcommand{\x}{blah blah blah blah blah blah blah blah }
-\addtolength{\abovedisplayshortskip}{-1cm} % decrease the skip
-\addtolength{\abovedisplayskip}{-1cm}
-\x\x\x\x\x
+\addtolength\abovedisplayshortskip{-.5cm}% decrease the skip
+\addtolength\abovedisplayskip{-.5cm}
+\x\x\x
\begin{align}
\hphantom{\mbox{$f(x)-g(x)$}} & \hphantom{\mbox{$= x^2+x^3+x^4+x^5+b$}}\nonumber\\
f(x) &= a\\
g(x) &= x^2-4x
\end{align}
-
-\x\x\x\x\x
+%
+\x\x\x
\begin{align}
\hphantom{\mbox{$f(x)-g(x)$}} & \hphantom{\mbox{$= x^2+x^3+x^4+x^5+b$}}\nonumber\\
f(x)-g(x) &= x^2+x^3+x
\end{align}
-\x\x\x\x\x
-
+\x\x\x
+%
\begin{align}
\hphantom{\mbox{$f(x)-g(x)$}} & \hphantom{\mbox{$= x^2+x^3+x^4+x^5+b$}}\nonumber\\
g(x) &= x^2+x^3+x^4+x^5+b
\end{align}
-\x\x\x\x\x
-% restore old values
-\addtolength{\abovedisplayshortskip}{1cm}
-\addtolength{\abovedisplayskip}{1cm}
+\x\x\x
\noindent
\rule{\columnwidth}{1pt}
+\egroup
\medskip
The phantom line is empty but leaves the vertical space for a line. This could be
-corrected with decreasing the \CMD{abovedisplayshortskip} length and restoring them
-after the whole sequence of commands. The code of the above looks like:
+corrected with decreasing the \CMD{abovedisplayshortskip} length and done all
+inside a group.
\begin{lstlisting}
\newcommand{\x}{blah blah blah blah blah blah blah blah }
-\addtolength{\abovedisplayshortskip}{-1cm} % decrease the skip
-\addtolength{\abovedisplayskip}{-1cm}
-\x\x\x\x\x
+\bgroup
+\addtolength\abovedisplayshortskip{-0.5cm}% decrease the skip
+\addtolength\abovedisplayskip{-0.5cm}
+\x\x\x
\begin{align}
\hphantom{\mbox{$f(x)-g(x)$}} & \hphantom{\mbox{$= x^2+x^3+x^4+x^5+b$}}\nonumber\\
f(x) &= a\\
g(x) &= x^2-4x
\end{align}
-
-\x\x\x\x\x
+%
+\x\x\x
\begin{align}
\hphantom{\mbox{$f(x)-g(x)$}} & \hphantom{\mbox{$= x^2+x^3+x^4+x^5+b$}}\nonumber\\
f(x)-g(x) &= x^2+x^3+x
\end{align}
-\x\x\x\x\x
-
+\x\x\x
+%
\begin{align}
\hphantom{\mbox{$f(x)-g(x)$}} & \hphantom{\mbox{$= x^2+x^3+x^4+x^5+b$}}\nonumber\\
g(x) &= x^2+x^3+x^4+x^5+b
\end{align}
-\x\x\x\x\x
-% restore old values
-\addtolength{\abovedisplayshortskip}{1cm}
-\addtolength{\abovedisplayskip}{1cm}
+\x\x\x
+\egroup
\end{lstlisting}
Another case of aligning equations inside an itemize environment is the following one.
-With the \verb+\makebox+ macro one can have the same size on the left side of the
+With the \CIndex{makebox} macro one can have the same size on the left side of the
equal sign to get a vertical alignment.
\newsavebox\lW
-\sbox\lW{$P_{3}+P_{2}-P_{1}$}% $
+\sbox\lW{$P_{3}+P_{2}-P_{1}$}% $
\begin{itemize}
\item first function \\
@@ -6975,12 +7139,11 @@ equal sign to get a vertical alignment.
\subsection{Example 2}
%--------------------------------------------------------------------------
This one comes from Hartmut Henkel and offers a special form of placing
-additional text between the equation and the equationnumber. This makes only
+additional text between the equation and the \Index{equation number}. This makes only
sense when you load the documentclass with the option \verb+fleqn+. The example
places the additional text at \verb+0.5\textwidth+, changing this value is no
problem.
-\clearpage
\medskip
\noindent\rule{\linewidth}{1pt}
\begingroup
@@ -7045,12 +7208,12 @@ This solution works only with \AmSmath{}, without you have to redefine the
\LaTeX{} macro, which creates the equation number.
\begin{lstlisting}
-\newsavebox{\myendhook} % hier gehen die Tabellen rein
+\newsavebox{\myendhook} % for the tabulars
\def\tagform@#1{{(\maketag@@@{\ignorespaces#1\unskip\@@italiccorr)}
- \makebox[0pt][r]{% hinter der Zeilennummer aufgehaengt
+ \makebox[0pt][r]{% after the equation number
\makebox[0.4\textwidth][l]{\usebox{\myendhook}}%
}%
- \global\sbox{\myendhook}{}% Box wird geleert
+ \global\sbox{\myendhook}{}% clear box content
}}
[ ... ]
@@ -7090,7 +7253,7 @@ z = 9
\section{Node connections}
%------------------------------------------------------------------------------
This is a typical application for PSTricks and it needs the package \verb+pst-node+
-and doesn't work with \verb+pdflatex+. Use \verb+VTeX+, \verb+ps4pdf+ or \verb+ps2pdf+.
+and doesn't work with \verb+pdflatex+. Use \verb+vlatex+, \verb+ps4pdf+ or \verb+ps2pdf+.
\medskip
\noindent\fbox{\includegraphics[width=\linewidth]{node}}
@@ -7173,9 +7336,6 @@ E =
\section[Special Placement]{Special placement of displayed equations}
%-----------------------------------------------------------------------------
-
-
-
%-----------------------------------------------------------------------------
\subsection{Formulas side by side}\label{sec:sidebyside}
%-----------------------------------------------------------------------------
@@ -7260,10 +7420,10 @@ To define all these macros write into the preamble:
As seen in equation~\ref{blub} and equation~\ref{blah}, everything is
-nonsense ... And the following tabular is defined as a longtable to enable pagebreaks.
+nonsense ... And the following tabular is defined as a \Index{longtable} to enable pagebreaks.
-\vspace*{10cm}
+%\vspace*{10cm}
%\begin{framed}
\begin{mtabular}[long]{*{2}{m{0.35\linewidth}m{0.15\linewidth}}}
\begin{align*} \oint E ds=0 \end{align*} & \eqnCnt %