summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/mathmode/Mathmode.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-doc/doc/english/mathmode/Mathmode.tex')
-rw-r--r--Master/texmf-doc/doc/english/mathmode/Mathmode.tex194
1 files changed, 163 insertions, 31 deletions
diff --git a/Master/texmf-doc/doc/english/mathmode/Mathmode.tex b/Master/texmf-doc/doc/english/mathmode/Mathmode.tex
index 5fde86ff401..55324a19915 100644
--- a/Master/texmf-doc/doc/english/mathmode/Mathmode.tex
+++ b/Master/texmf-doc/doc/english/mathmode/Mathmode.tex
@@ -13,14 +13,16 @@
%% DESCRIPTION:
%% `Mathmode' is a document how the math mode works inside LaTeX
%%
-\def\MathmodeVersion{2.09}
-\ifvtex\title{\logo Math mode - v.\MathmodeVersion}\else
+\def\MathmodeVersion{2.13}
+%\ifvtex\title{\logo Math mode - v.\MathmodeVersion}\else
\ifpdf\title{Math mode - v.\MathmodeVersion}\else
- \title{\logo Math mode - v.\MathmodeVersion}\fi\fi
+ \title{\logo Math mode - v.\MathmodeVersion}\fi%\fi
%
\author{Herbert Vo\ss\footnote{\sloppy Thanks for the feedback to:
Hendri Adriaens;
- Alexander Boronka; Christian Faulhammer; Jos\'e{} Luis G\'omez Dans;
+ Alexander Boronka; Walter Brown;
+ Christian Faulhammer; Jos\'e{} Luis G\'omez Dans;
+ Zongbao Fang;
Azzam Hassam; Martin Hensel;
Morten H\o{}gholm; M. Kalidoss; Dan Lasley;
Angus Leeming; Tim Love;
@@ -32,6 +34,7 @@
Carsten Thiel;
David Weenink;
Zou Yuan-Chuan;
+ Philipp Wook;
Michael Zedler;
and last but not least a special thanks to Monika Hattenbach for her
excellent job of proofreading.
@@ -41,14 +44,18 @@
\maketitle
\begin{abstract}
-More than once people say that \TeX{} was designed for mathematical or technical purpose.
-This maybe true when we remember the reasons why Donald Knuth created \TeX{}. But nowadays
-there are a lot
-of examples where \TeX{} was used for publications without any mathematical or technical background.
-Nevertheless, we have to consider, that writing publications with a lot of mathematical
-material is one of the important advantages of \TeX{} and it seems that is impossible to
+It is often said that \TeX{} was designed for mathematical or technical purposes.
+This may be true when we remember the reasons why Donald Knuth created \TeX{}. But nowadays
+there are many examples in which \TeX\ is
+ used for publications with no mathematical or technical background content. However,
+%we have to consider, that
+writing publications with such %a lot of mathematical
+material is one of the important advantages of \TeX{}. Because it
+seems impossible to
know all existing macros and options of \AllTeX{} and the several additional packages,
-especially \AmSmath. This is the reason why I tried to collect all important
+especially of \AmSmath. This is the reason why I have attempted to gather
+all the relevant
+%I tried to collect all important
facts in this paper.
\vspace{3cm}
@@ -66,6 +73,7 @@ in directory \url{CTAN://macros/latex/base/lppl.txt}.
\end{abstract}
+
\clearpage
\tableofcontents{}
@@ -183,7 +191,7 @@ All commands which appear in positions like contents, index, header,
\texttt{robust} means that the macro is not expanded before it is moved
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+\(\...\)+.
+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},
@@ -1313,7 +1321,7 @@ $\bigg[\bigg]$ $\biggl/\bigg\backslash\bigg\{\bigg\}$%
$\bigg|$ $\bigg\Vert$ $\bigg\lfloor\bigg\rfloor$ $\bigg\lceil\bigg\rceil$
$\bigg\langle\bigg\rangle$ $\bigg\uparrow\bigg\Uparrow$
$\bigg\downarrow\bigg\Downarrow$ $\bigg\updownarrow\bigg\Updownarrow$\\[8pt]
-\CMD{Big}gX & $\Bigg(\Bigg)$
+\CMD{BiggX} & $\Bigg(\Bigg)$
$\Bigg[\Bigg]$ $\Biggl/\Bigg\backslash\Bigg\{\Bigg\}$
$\Bigg|$ $\Bigg\Vert$ $\Bigg\lfloor\Bigg\rfloor$
$\Bigg\lceil\Bigg\rceil$ $\Bigg\langle\Bigg\rangle$
@@ -1345,19 +1353,25 @@ and so on, which only makes sense when writing things like:
\LaTeX{} takes the \verb|\biggl)| as a mathopen symbol, which has by default
another horizontal spacing.
-In addition to the above additional 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},
+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},
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}).
+
+
+%$3\bigg|a^2-b^2-c^2\bigg|+2$
+%$3\biggm|a^2-b^2-c^2\biggm|+2$
+
\begin{table}[htb]
\begin{showexample}
-$3\bigg|a^2-b^2-c^2\bigg|+2$
+$\bigg(\dfrac{1}{3}\bigg|\dfrac{3}{4}\bigg)$
\end{showexample}
\vspace{-15pt}
\begin{showexample}
-$3\biggm|a^2-b^2-c^2\biggm|+2$
+$\bigg(\dfrac{1}{3}\biggm|\dfrac{3}{4}\bigg)$
\end{showexample}
\caption{Difference between the default
\CMD{bigg} and the \CMD{biggm} command}\label{cap:Difference-between-the-bigg}
@@ -1653,7 +1667,6 @@ replaced for the XX. See section \vref{sec:euscript.sty} for additional packages
\begin{table}[htb]
\includegraphics{styles}
-
\iffalse
%\vspace{0.5ex}
%\rule{0.3\columnwidth}{0.5pt}\\
@@ -1701,7 +1714,6 @@ $\mathbf{abcdefghijklmnopqrstuvwxyz}$\tabularnewline
\end{tabularx}
\end{minipage}
\fi
-
\caption{Fonts in math mode}\label{cap:Fonts-in-math-mode}
\end{table}
@@ -1874,7 +1886,7 @@ 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 thousends a lot of
+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
comma has to be changed:
@@ -2500,7 +2512,7 @@ lower & default & upper & default & \verb|\mathbf| & \verb|\mathit|\\\hline
\verb|\vartheta| & $\vartheta$\\
\verb|\iota| & $\iota$\\
\verb|\kappa| & $\kappa$\\
-\verb|\delta| & $\lambda$
+\verb|\lamda| & $\lambda$
& \verb|\Lambda| & $\Lambda$ & $\mathbf{\Lambda}$ & $\mathit{\Lambda}$\\
\verb|\mu| & $\mu$ \\
\verb|\nu| & $\nu$\\
@@ -2903,6 +2915,10 @@ in two parts. In general the ampersand should be before the symbol to get the ri
\verb+y &= x+. Compare the following three equations, the second one has a wrong spacing. %%% ----- Martin -----
+\noindent
+~\hfill\includegraphics{amsalign}
+
+\iffalse
\begin{minipage}{0.4\linewidth}
\begin{align}
\rnode[lt]{a}{y} &= \rnode[rt]{A}{x}
@@ -2925,6 +2941,7 @@ y =& x
y ={}& x
\end{lstlisting}
\end{minipage}
+\fi
\subsection{The default \texttt{align} environment}
@@ -3066,7 +3083,7 @@ i_{31} & =0.33i_{22}
\medskip
As seen, the equations are not really left aligned, when they have only one
ampersand. In this case \verb+flalign+ has the same behaviour as the \verb+align+
-environment.
+environment.\index{Alignment!left}\index{Indentation}
When there are more than one tabbing characters (\verb+&+), then the equations are
@@ -4489,6 +4506,58 @@ $\overset{over}{baseline}$\tabularnewline
\CMD{underset} is a useful macro for having limits under non-operators (see page~\pageref{sec:amsopn}). %%% ----- Martin -----
+\section{Problems with \texttt{amsmath}}
+\AmSmath{} is an excellent package with some "'funny features"`.
+When using an \verb+align+ environment inside a \verb+gather+ environment, it should
+be centered just like the other lines. This is only true, when there is a number/tag or
+an additional ampersand:
+
+
+\begin{LTXexample}[pos=t]
+\begin{gather*}
+ \begin{align*}
+ m_2 &= m_2' + m_2''\\
+ &= \frac{V_2'}{v_2'} + \frac{V_2''}{v_2''}
+ \end{align*}\\
+ \Rightarrow m_2 v_2' = V - V_2'' + V_2''\frac{v_2'}{v_2''}\\
+\end{gather*}
+\begin{gather*}
+ \begin{align*}
+ m_2 &= m_2' + m_2''\\
+ &= \frac{V_2'}{v_2'} + \frac{V_2''}{v_2''} & %<<<====
+ \end{align*}\\
+ \Rightarrow m_2 v_2' = V - V_2'' + V_2''\frac{v_2'}{v_2''}\\
+\end{gather*}
+\end{LTXexample}
+
+
+
+This effect depends to the horizontal width, which is wrong in the first example,
+in fact of a missing tag or number the right whitespace is cut, but the left one
+is still there. The additional ampersand prevents \AmSmath{} to change the right
+margin.
+
+Another kind of curiousity is the following example, which depends to the
+same problem of cutting whitespace only on one side.
+
+\begin{LTXexample}[pos=t]
+\fbox{%
+\begin{minipage}{10cm}
+\begin{align*}
+ a&=b \\ c&=d
+\end{align*}
+\end{minipage}}
+
+\fbox{%
+\begin{minipage}{10cm}
+\noindent\begin{align*}
+ a&=b \\ c&=d
+\end{align*}
+\end{minipage}}
+\end{LTXexample}
+
+
+
\part{\TeX{} and math}
@@ -4571,14 +4640,16 @@ $\delimitershortfall-1pt
\subsection{\CMD{displayindent}}
-\cIndex{displayindent}This is the left shift amount of a line holding displayed equation. By default it is $0pt$ but
-gets the value of an indented paragraph when there is an environment like the quotation one.
+\cIndex{displayindent}This is the left shift amount of a line holding displayed equation.
+By default it is $0pt$ but
+gets the value of an indented paragraph when there is an environment like the quotation one.\index{Indentation}
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 greater %%% ----- Martin -----
+Now we start a quotation environment which sets \verb+\labelwidth+ to new values for a
+greater %%% ----- Martin -----
left margin.
\begin{itemize}
@@ -4603,7 +4674,8 @@ the negative \verb+\labelwidth+:
\end{lstlisting}
\subsection{\CMD{displaywidth}}
-\cIndex{displaywidth}The width of the line holding a displayed equation, which is by default \verb+\linewidth+. In the
+\cIndex{displaywidth}The width of the line holding a displayed equation, which is by default
+\verb+\linewidth+. In the
second example the formula is centered for a display width of \verb+0.5\linewidth+.
\[ f(x) = \int \frac{\sin x}{x}dx \]
@@ -4712,6 +4784,10 @@ $\tdela x-y\tdelb(x+y)=x^2-y^2$
possible families of fonts. \verb+\fam+ in an internal register where other macros can check which font is the actual one. At the beginning \TeX{} starts with \verb+\fam=-1+.
\bigskip
+\noindent
+\includegraphics{family}
+\iffalse
+
\begin{center}
\begin{tabular}{ll}
\verb+\fam=-1+ & $\fam=-1 123abcABC\alpha\beta\gamma$\\
@@ -4733,7 +4809,7 @@ $\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}
-
+\fi
\subsection{\CMD{mathaccent}}
\cIndex{mathaccent}Requires three parameter as one number, the class, the font family and the character.
@@ -5569,8 +5645,9 @@ they come with the \AmSmath packages. Otherwise get them from CTAN%
letters:
\begin{center}
-\texttt{\textbackslash{}mathscr\{...\}}\index{EuScript@\textbackslash EuScript}
-{$\EuScript{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$}
+\includegraphics{EuScript}
+%\texttt{\textbackslash{}mathscr\{...\}}\index{EuScript@\textbackslash EuScript}
+%{$\EuScript{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$}
\end{center}
Read the documentation for the interdependence to the %%% ----- Martin -----
@@ -5663,6 +5740,41 @@ 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 combine the free texttt font with another free math font.
+
+\section{Computer modern}
+This is the default font, designed by Knuth.\index{cmr}\index{Computer modern} For the PDF output
+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}
+
+\Mbox{lm-crop}
+
+\section{Palatino}
+There is a free package mathpazo.\index{mathpazo}\index{Palatino}
+
+\Mbox{pazo-crop}
+
+\section{Palatino -- microimp}
+There is the package \verb+pamath+ for the nonfree palatino font.\index{mathpazo}\index{Palatino}
+
+\Mbox{pamath-crop}
+
+\section{cmbright}
+
+\Mbox{cmbright-crop}
+
+\section{minion}
+
+\Mbox{minionpro-crop}
+
+
\part{Special symbols}
@@ -5903,6 +6015,25 @@ y_n & x_{n1} & x_{n2} & x_{n3} & \dots & x_{(n-1)(n-1)} & x_{nn}
\]
\end{LTXexample}
+\subsection{Matrix with comments on top}
+
+
+\begin{LTXexample}[width=0.35\linewidth]
+\def\rb#1{\rotatebox{90}{$\xleftarrow{#1}$}}
+\begin{tabular}{c}
+$\begin{matrix}
+\rb{text1}&\rb{text1}&\rb{text1}&\rb{text1}\\
+\end{matrix}$\\
+$\begin{bmatrix}
+X_x & Y_x & Z_x & T_x \\
+X_y & Y_y & Z_y & T_y \\
+X_z & Y_z & Z_z & T_z \\
+0 & 0 & 0 & 1
+\end{bmatrix}$
+\end{tabular}
+\end{LTXexample}
+
+
\section{Cases structure}
\index{Cases!numbered lines}Sometimes it is better to use the array environment instead of amsmath's %%% ----- Martin -----
@@ -6240,8 +6371,9 @@ In general there is no difference in coloring tabular or array cells. The follow
shows how one can put \index{color}colors in rows, columns and cells.
\index{rowcolor@\textbackslash rowcolor}\index{columncolor@\textbackslash columncolor}
-\medskip
-\includegraphics[width=\columnwidth]{colArray}
+\medskip\noindent
+\includegraphics[width=\columnwidth]{colArray.pdf}
+
%\[
%\left[\,
%\begin{array}{*{5}{>{\columncolor[gray]{0.95}}c}}