416 4 1MB
English Pages 130 Year 2005
Documentation
Math mode - v.1.91 Herbert Voß∗ 30th January 2005
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 know all existing macros and options of (LA)TEX and the several additional packages, especially AMSmath. This is the reason why I tried to collect all important facts in this paper.
Please report typos or any other comments to this documentation to [email protected]. This document was written with the LATEX editor Kile 1.7b2 (Qt 3.2 KDE 3.2) http://sourceforge.net/projects/kile/ and the PDF output was built with the Linux version of VTEX/Free, Version 8.46 (http://www.micropress-inc.com/linux/)
Thanks for the feedback to: Alexander Boronka; Christian Faulhammer; José Luis Gómez Dans; Azzam Hassam; Martin Hensel; Morten Høgholm; Dan Lasley; Angus Leeming; Tim Love; Hendrik Maryns; Heinz Mezera; David Neuway; Joachim Punter; Carl Riehm; Will Robertson; Christoph Rumsmüller; José Carlos Santos; Uwe Siart; Heiko Stamer; Uwe Stöhr; David Weenink; Michael Zedler; and last but not least a special thanks to Monika Hattenbach for her excellent job of proofreading.
(LA)TEX
∗
1
CONTENTS
CONTENTS
Contents Page
I
Standard LATEX math mode
10
1 Introduction 2 The 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8
Inlinemode Limits . . . . . . . . . . . . . . Fraction command . . . . . . . Math in Chapter/Section Titles Equation numbering . . . . . . Framed math . . . . . . . . . . Linebreak . . . . . . . . . . . . Whitespace . . . . . . . . . . . AMSmath for the inline mode .
10 . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
3 Displaymath mode 3.1 equation environment . . . . . . . . . . . . 3.2 eqnarray environment . . . . . . . . . . . . 3.2.1 Short commands . . . . . . . . . . . 3.3 Equation numbering . . . . . . . . . . . . . 3.3.1 Changing the style . . . . . . . . . . 3.3.2 Resetting a counter style . . . . . . . 3.3.3 Equation numbers on the left side . 3.3.4 Changing the equation number style 3.3.5 More than one equation counter . . 3.4 Labels . . . . . . . . . . . . . . . . . . . . . 3.5 Frames . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . .
10 10 11 11 12 12 12 13 13
. . . . . . . . . . .
13 13 14 15 16 16 16 16 17 17 18 18
4 array environment 20 4.1 Cases structure . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2 arraycolsep . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5 Matrix
22
6 Super/Subscript and limits 24 6.1 Multiple limits . . . . . . . . . . . . . . . . . . . . . . . . . . 24 6.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7 Roots
Mathmode.tex
25
2
CONTENTS
8 Brackets, braces . . . 8.1 Examples . . . . . . . . . . . . 8.1.1 Braces over several lines 8.1.2 Middle bar . . . . . . . 8.2 New delimiters . . . . . . . . . 8.3 Problems with parentheses . . .
CONTENTS
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
9 Text in math mode
26 28 28 29 29 29 30
10 Font commands 31 10.1 Old-style font commands . . . . . . . . . . . . . . . . . . . . . 31 10.2 New-style font commands . . . . . . . . . . . . . . . . . . . . 31 11 Space 11.1 Math typesetting . . . . . . . . . . . . . 11.2 Additional horizontal spacing . . . . . . 11.3 Problems . . . . . . . . . . . . . . . . . 11.4 Dot versus comma . . . . . . . . . . . . 11.5 Vertical whitespace . . . . . . . . . . . . 11.5.1 Before/behind math expressions 11.5.2 Inside math expressions . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
31 31 32 33 34 35 35 36
12 Styles
36
13 Dots
38
14 Accents 14.1 Over- and underbrackets . . . . . . . 14.1.1 Use of \underbracket{...} . 14.1.2 Overbracket . . . . . . . . . . 14.2 Vectors . . . . . . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
38 39 39 40 40
15 Exponents and indices
40
16 Operators
41
17 Greek letters
42
18 Pagebreaks
43
19 \stackrel
44
20 \choose
44
21 Color in math expressions
45
Mathmode.tex
3
CONTENTS
CONTENTS
22 Boldmath 45 22.1 Bold math titles and items . . . . . . . . . . . . . . . . . . . . 46 23 Multiplying numbers
47
24 Other macros
47
II
AMSmath package
48
25 align environments 25.1 The default align environment 25.2 alignat environment . . . . . . 25.3 flalign environment . . . . . . 25.4 xalignat environment . . . . . 25.5 xxalignat environment . . . . 25.6 aligned environment . . . . . . 25.7 Problems . . . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
49 50 51 52 53 54 54 54
26 Other environments 26.1 gather environment . 26.2 multline environment 26.3 split environment . . 26.4 Specials . . . . . . . . 26.5 cases environment . . 26.6 Matrix environments .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
55 55 55 57 59 59 60
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
27 Vertical whitespace
61
28 Dots
61
29 fraction commands 62 29.1 Standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 29.2 Binoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 30 Roots 63 30.1 Roots with \smash command . . . . . . . . . . . . . . . . . . 64 31 Accents
64
32 \mod command
65
33 Equation numbering 65 33.1 Subequations . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 34 Labels and tags
Mathmode.tex
67 4
CONTENTS
CONTENTS
35 Limits 67 35.1 Multiple limits . . . . . . . . . . . . . . . . . . . . . . . . . . 68 35.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 35.3 \sideset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 36 Operator names
70
37 Text in math mode 70 37.1 \text command . . . . . . . . . . . . . . . . . . . . . . . . . 71 37.2 \intertext command . . . . . . . . . . . . . . . . . . . . . . 72 38 Extensible arrows
73
39 Frames
74
40 Greek letters
74
41 Miscellaneous commands
75
III
76
TEX and math
42 Length registers 42.1 \abovedisplayshortskip 42.2 \abovedisplayskip . . . 42.3 \belowdisplayshortskip 42.4 \belowdisplayskip . . . 42.5 \delimiterfactor . . . . 42.6 \delimitershortfall . . 42.7 \displayindent . . . . . 42.8 \displaywidth . . . . . . 42.9 \mathsurround . . . . . . 42.10\medmuskip . . . . . . . . 42.11\mkern . . . . . . . . . . . 42.12\mskip . . . . . . . . . . . 42.13\muskip . . . . . . . . . . 42.14\muskipdef . . . . . . . . 42.15\nonscript . . . . . . . . 42.16\nulldelimiterspace . . 42.17\predisplaysize . . . . . 42.18\scriptspace . . . . . . . 42.19\thickmuskip . . . . . . . 42.20\thinmuskip . . . . . . . 42.21\thinmuskip . . . . . . .
Mathmode.tex
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
76 76 76 76 76 76 77 77 78 78 78 78 78 79 79 79 79 79 79 79 79 80
5
CONTENTS
CONTENTS
43 Math font macros 43.1 \delcode . . . . . . 43.2 \delimiter . . . . . 43.3 \displaystyle . . . 43.4 \fam . . . . . . . . . 43.5 \mathaccent . . . . 43.6 \mathbin . . . . . . 43.7 \mathchar . . . . . . 43.8 \mathchardef . . . . 43.9 \mathchoice . . . . 43.10\mathclose . . . . . 43.11\mathcode . . . . . . 43.12\mathop . . . . . . . 43.13\mathopen . . . . . . 43.14\mathord . . . . . . 43.15\mathpunct . . . . . 43.16\mathrel . . . . . . 43.17\scriptfont . . . . 43.18\scriptscriptfont 43.19\scriptscriptstyle 43.20\scriptstyle . . . . 43.21\skew . . . . . . . . 43.22\skewchar . . . . . . 43.23\textfont . . . . . . 43.24\textstyle . . . . . 44 Math macros 44.1 \above . . . . . . . 44.2 \abovewithdelims 44.3 \atop . . . . . . . 44.4 \atopwithdelims . 44.5 \displaylimits . 44.6 \eqno . . . . . . . 44.7 \everydisplay . . 44.8 \everymath . . . . 44.9 \left . . . . . . . 44.10\leqno . . . . . . . 44.11\limits . . . . . . 44.12\mathinner . . . . 44.13\nolimits . . . . . 44.14\over . . . . . . . 44.15\overline . . . . . 44.16\overwithdelims . 44.17\radical . . . . . Mathmode.tex
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
80 80 80 80 81 81 81 82 82 82 82 82 83 83 83 83 83 83 83 84 84 84 84 84 84
. . . . . . . . . . . . . . . . .
84 84 85 85 85 85 85 86 86 86 86 86 86 86 87 87 87 87 6
CONTENTS
CONTENTS
44.18\right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.19\underline . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.20\vcenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Math penalties 45.1 \binoppenalty . . . . . 45.2 \displaywidowpenalty 45.3 \postdisplaypenalty . 45.4 \predisplaypenalty . . 45.5 \relpenalty . . . . . .
IV
. . . . .
. . . . .
. . . . .
Other packages
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
87 88 88 88 88 88 88 88 88
89
46 List of available math packages
89
47 accents
89
48 amscd – commutative diagrams
90
49 amsopn
90
50 bigdel
91
51 bm
92
52 braket
92
53 cancel
93
54 delarray
94
55 empheq
94
56 esint
95
57 eucal and euscript.sty
96
58 exscale
97
59 relsize
97
60 xypic
98
V
99
Special symbols
Mathmode.tex
7
CONTENTS
CONTENTS
61 Integral symbols
99
62 Harpoons
100
63 Bijective mapping arrow
101
64 Stacked equal sign
101
65 Other symbols
102
VI
103
Examples
66 Identity matrix
103
67 Cases structure 103 67.1 Cases with numbered lines . . . . . . . . . . . . . . . . . . . . 104 68 Arrays 68.1 Quadratic equation . . . . . . . . . 68.2 Vectors and matrices . . . . . . . . 68.3 Cases with (eqn)array environment 68.4 Arrays inside arrays . . . . . . . . 68.5 Colored cells . . . . . . . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
105 105 106 106 107 108
69 Over- and underbraces 69.1 Braces and roots . . 69.2 Overlapping braces . 69.3 Vertical alignment . 69.4 Alignment . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
109 109 110 110 111
70 Integrals
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
112
71 Vertical alignment 113 71.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 71.2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 72 Node connections
117
73 Special Placement 118 73.1 Formulas side by side . . . . . . . . . . . . . . . . . . . . . . . 118 73.2 Itemize environment . . . . . . . . . . . . . . . . . . . . . . . 121 List of Figures
122
List of Tables
123
Mathmode.tex
8
CONTENTS
CONTENTS
Bibliography
124
Index
126
Mathmode.tex
9
2 THE INLINEMODE
Part I
Standard LATEX math mode 1
Introduction
The following sections describe all the math commands which are available without any additional package. Most of them also work with special packages and some of them are redefined. At first some important facts for typesetting math expressions.
2
The Inlinemode
As the name says this are always ´ bmath expressions which are in a standard textline, like this one: f (x) = a sinx x dx. There are no limitations for the height of the math expressions, so that the layout may if you be very lousy a b c insert a big matrix in an inline mode like this: A = d e f . In this g h i a b c case it is better to use the \smallmatrix environment A = d e f from the g h i
AMSmath package (see section 26.6 on page 60) or the displaymath mode (section 3 on page 13). This inline mode is possible with three different commands: Pn
i=1 i
Pn
i=1 i
Pn
i=1 i
= 21 n · (n + 1) = 12 n · (n + 1) = 12 n · (n + 1)
\(\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)\)\\[10pt] $\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)$\\[10pt] 3 \begin{math} 4 \sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1) 5 \end{math} 1 2
1. \( ... \) , the problem is that \( is not a robust macro (see sec- \(...\) tion 2.3 on the next page). 2. \small $ ...
$
$...$
3. \begin{math} ... \end{math}, also not robust In general $...$ is the best choice, but this does not work in environments like verbatim or alltt. In this case \(...\) works.
2.1
Limits
In the inline mode the limits are by default only in super or subscript mode and the fractions are always in the scriptstyle1 font size. For example:
Mathmode.tex
10
\begin{math} ... \end{math}
2 THE INLINEMODE ´∞
2.2 Fraction command
1 dx x2
= 1, which is not too big for the textline. You can change this with the command \limits, which must follows a mathoperator2 like an integral (\int), a sum (\sum), a product (\prod) or a limes (\lim). But this ´∞ 1 dx = 1 looks not very nice in a text line when it appears between two x2 1
1
\limits \int \lim \prod \sum
lines, especially when there are multiline limits.3
2.2
Fraction command
For inlined formulas the fractions are by default in the scriptstyle (see taba ular 8 on page 37), which is good for the typesetting y = b+1 , because the linespacing is nearly the same, but not optimal, when the formula shows \frac some important facts. There are two solutions to get a better reading: 1. choose the display mode instead of the inline mode, which is the better one; 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.4
2. set the fontstyle to displaystyle, which makes the fraction y =
y=
2.3
a b+1
=
a b+1
1
$y=\frac{a}{b+1}={\displaystyle\frac{a}{b+1}}$
Math in \part, \chapter, \section, ... titles like f (x) = Q n 1 i − i=1 2i
All commands which appear in positions like contents, index, header, ... must be robust5 which is the case for $...$ but not for \(\...\). If you do not have any contents, index, a.s.o. you can write the mathstuff in \chapter, \section, a.s.o without any restriction. Otherwise use \protect\( and \protect\) or the $...$ version. The whole math expression appears in the default font shape and not in bold like the other text. Section 22.1 on page 46 describes how the math expressions can be printed also in bold. \texorpdfstring There are problems with hyperref when there is a non text part in a title. It is possible to tell hyperref to use different commands, one for the title and another one for the bookmarks: 1
See section 12 on page 36. To define a new operator see section 70 3 For more information about limits see section 6.1 on page 24 or section 35 on page 67. 4 For an abbreviation see section 29 on page 62, there is a special \dfrac macro. 5 robust means that the macro is not expanded before it is moved into for example the tableofcontents file (*.toc). No robustness is often a problem, when a macro is part of another macro. 2
Mathmode.tex
11
2 THE INLINEMODE
2.4 Equation numbering
\texorpdfstring{}{} E.g. 1
\ texorpdfstring {$\ int f ( x ) \ , dx $}{ Integral function }+.
2.4
Equation numbering
It is obvious that the numbering of inline mathstuff makes no sense!
2.5
Framed math
With the \fbox macro everything of inline math can be framed, like the following one: f (x) =
Qn
i=1
i−
1 2i
1
\fbox{$f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\right)$}
Parameters are the width of \fboxsep and \fboxrule, the predefined values from latex.ltx are: 1 2
\ fboxsep = 3 pt \ fboxrule = .4 pt
The same is possible with the \colorbox f (x) = color package. 1
Qn
i=1
i−
1 2i
from the
\ colorbox { yellow }{$ f ( x ) =\ prod _{ i =1}^{ n }\ left (i -\ frac {1}{2 i }\ right ) $}
2.6
Linebreak
LATEX can break an inline formula only when a relation symbol (=, , . . .) or a binary operation symbol (+, −, . . .) exists and at least one of these symbols appears at the outer level of a formula. Thus $a+b+c$ can be broken across lines, but ${a+b+c}$ not. • The default: a 2 x2 + a 1 x1 + a 0
f (x) = an xn + an−1 xn−1 + an−2 xn−2 + . . . + ai xi +
• The same inside a group {...}: f (x) = an xn + an−1 xn−1 + an−2 xn−2 + . . . + ai xi + a2 x2 + a1 x1 + • Without any symbol:
f (x) = an (an−1 (an−2 (. . .) . . .) . . .)
If it is not possible to have any mathsymbol, then split the inline formula in two or more pieces ($...$ $...$). If you do not want a linebreak for the whole document, you can set in the preamble: \relpenalty=9999 \binoppenalty=9999 which is the extreme case of grudgingly allowing breaks in extreme cases. Mathmode.tex
12
3 DISPLAYMATH MODE
2.7
2.7 Whitespace
Whitespace
LATEX defines the length \mathsurround with the default value of 0pt. This length is added before and after an inlined math expression (see table 1).
foo f (x) =
´∞
1 dx x2
foo
f (x) =
´∞
1 dx x2
=1
bar
foo
f (x) =
´∞
1 dx x2
=1
bar
1
1
1
= 1 bar
1
foo \fbox{$ f(x)=\int_1^{\infty}\frac{1}{x ^2}dx=1 $} bar
1
foo \rule{20pt}{\ht\strutbox}\fbox{$ f(x)=\ int_1^{\infty}\frac{1}{x^2}dx=1 $}\rule{20 pt}{\ht\strutbox} bar
1
\setlength{\mathsurround}{20pt}foo \fbox{$ f (x)=\int_1^{\infty}\frac{1}{x^2}dx=1 $} bar
Table 1: Meaning of \mathsurround
2.8
AMSmath for the inline mode
None of the AMSmath-functions are available in inline mode.
3
Displaymath mode
This means, that every formula gets its own paragraph (line). There are some differences in the layout to the one from the title of 2.3.
3.1
equation environment
For example: \begin{equation} f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\ right) 3 \end{equation} 1
f (x) =
n Y i=1
i−
1 2i
2
(1)
The delimiters \begin{equation} ... \end{equation} are the only difference to the inline version. There are some equivalent commands for the display-math mode: \begin{displaymath} ... \end{displaymath}
1. \begin{displaymath}. . . \end{displaymath}, same as \[ . . . \]
2. \[...\]. (see above) the short form of a displayed formula, no number \[...\] n Y 1 i− f (x) = 2i i=1
Mathmode.tex
13
3 DISPLAYMATH MODE
3.2 eqnarray environment
displayed, no number. Same as 1. 3. \begin{equation}...\end{equation} f (x) =
n Y i=1
1 i− 2i
(2)
\begin{equation} ... \end{equation}
displayed, a sequential equation number, which may be reset when starting a new chapter or section. (a) There is only one equation number for the whole environment.
\nonumber
(b) There exists no star-version of the equation environment because \[...\] is the equivalent. With the tag \nonumber it is possible to suppress the equation number: \begin{equation} f(x)= [...] \nonumber 3 \end{equation} 1 2
f (x) = [...]
3.2
eqnarray environment
This is by default an array with three columns and as many rows as you like. It is nearly the same as an array with a rcl column definition. \begin{eqnarray} It is not possible to change the internal behaviour of the eqnarray en- ... vironment without rewriting the environment. It is always an implicit array \end{eqnarray} with three columns and the horizontal alignment right-center-left (rcl) and small symbol sizes for the middle column. All this can not be changed by the user without rewriting the whole environment in latex.ltx. \begin{eqnarray*} \mathrm{left} & \mathrm{middle} & \mathrm{ right}\\ 3 \frac{1}{\sqrt{n}}= & \frac{\sqrt{n}}{n}= & \ frac{n}{n\sqrt{n}} 4 \end{eqnarray*} 1 2
left middle right √ 1 n n √ √ = = n n n n
The eqnarray environment 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 3.4): \begin{eqnarray} y & = & d\label{eq:2}\\ 3 y & = & cx+d\\ 4 y & = & bx^{2}+cx+d\\ 5 y & = & ax^{3}+bx^{2}+cx+d\label{eq:5} 6 \end{eqnarray} 1
y = d
(3)
y = cx + d
(4)
2
y = bx + cx + d
(5)
3
(6)
2
y = ax + bx + cx + d Mathmode.tex
2
14
3 DISPLAYMATH MODE
3.3 Equation numbering
Toggling numbering off/on for all rows is possible with the starred version of eqnarray. \begin{eqnarray*} y & = & d\label{eq:3}\\ 3 y & = & cx+d\\ 4 y & = & bx^{2}+cx+d\\ 5 y & = & ax^{3}+bx^{2}+cx+d\label{eq:4} 6 \end{eqnarray*} 1 2
y = d y = cx + d y = bx2 + cx + d y = ax3 + bx2 + cx + d
Toggling off/on for single rows is possible with the above mentioned \nonumber tag at the end of a row (before the newline command). For example: \begin{eqnarray} y & = & d\nonumber \\ 3 y & = & cx+d\nonumber \\ 4 y & = & bx^{2}+cx+d\nonumber \\ 5 y & = & ax^{3}+bx^{2}+cx+d 6 \end{eqnarray} 1
y = d
2
y = cx + d y = bx2 + cx + d 3.2.1
y = ax3 + bx2 + cx + d Short commands
(7)
It is possible to define short commands for the eqnarray environment 1 2 3 4 5 6 7 8 9
\ makeatletter \ newcommand {\ be }{ % \ begingroup % \ setlength {\ arraycolsep }{2 pt } \ eqnarray % \ @ifstar {\ nonumber }{} % } \ newcommand {\ ee }{\ endeqnarray \ endgroup } \ makeatother
Now you can write the whole equation as \be f(x) &=& \int\frac{\sin x}{x}dx 3 \ee 1
f (x) =
ˆ
sin x dx x
2
(8)
or, if you do not want to have a numbered equation as \be* f(x) &=& \int\frac{\sin x}{x}dx 3 \ee 1
f (x) =
Mathmode.tex
ˆ
sin x dx x
2
15
3 DISPLAYMATH MODE
3.3
3.3 Equation numbering
Equation numbering
For all equations which can have one or more equation numbers (for every \nonumber 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 \nonumber tag. • This doc is written with the article-class, which counts the equations continuously over all parts/sections. You can change this behaviour in different ways (see the following subsections). • 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 28 on page 28). • For counting subequations see section 33.1 on page 66. 3.3.1
Changing the style
\theequation
With the beginning of Section 25.2 on page 51 the counting changes from “47” into the new style “II-54”. The command sequence is 1 2 3
\ renewcommand \{\ theequation }{ % \ thepart -\ arabic { equation } % }
See section 33 on page 65 for the AMSmath command. 3.3.2
Resetting a counter style
Removing a given reset is possible with the package remreset.6 Write into the preamble \@removefromreset 1 2 3
\ makeatletter \ @removefromreset { equation }{ section } \ makeatother
or anywhere in the text. Now the equation counter is no longer reset when a new section starts. You can see this after section 26.3 on page 57. 3.3.3
Equation numbers on the left side
Choose package leqno7 or have a look at your document class, if such an option exists. 6 7
CTAN://macros/latex/contrib/supported/carlisle/remreset.sty CTAN://macros/latex/unpacked/leqno.sty
Mathmode.tex
16
3 DISPLAYMATH MODE
3.3.4
3.3 Equation numbering
Changing the equation number style
The number style can be changed with a redefinition of \def\@eqnnum{{\normalfont \normalcolor (\theequation)}} For example: if you want the numbers not in parentheses write 1 2 3
\ makeatletter \ def \ @eqnnum {{\ normalfont \ normalcolor \ theequation }} \ makeatother
For AMSmath there is another macro, see section 33 on page 65. 3.3.5
More than one equation counter
You can have more than the default equation counter. With the following code you can easily toggle between roman and arabic equation counting. 1 2 3 4 5
% code by Heiko Oberdiek \ makeatletter % Roman counter \ newcounter { roem } \ renewcommand {\ theroem }{\ roman { roem }}
6 7 8 9 10 11
% save the original counter \ newcommand {\ c@org@eq }{} \ let \ c@org@eq \ c@equation \ newcommand {\ org@theeq }{} \ let \ org@theeq \ theequation
12 13 14 15 16
% \ setroem sets roman counting \ newcommand {\ setroem }{ \ let \ c@equation \ c@roem \ let \ theequation \ theroem }
17 18 19 20 21 22
% \ setarab the arabic counting \ newcommand {\ setarab }{ \ let \ c@equation \ c@org@eq \ let \ theequation \ org@theeq } \ makeatother
The following examples show how it works:
Mathmode.tex
17
3 DISPLAYMATH MODE
3.4 Labels
\begin{align} f(x) &= \int\sin x dx\label{eq:arab1}\\ 3 g(x) &= \int\frac{1}{x}dx 4 \end{align} 5% 6 \setroem 7% 8 \begin{align} 9 F(x) &=-\cos x\\ 10 G(x) &=\ln x\label{eq:rom1} 11 \end{align} 12 % 13 \setarab 14 % 15 \begin{align} 16 f^{\prime} (x) &= \sin x\\ 17 g^{\prime} (x) &= \frac{1}{x}\label{eq:arab2} 18 \end{align} 1 2
f (x) =
ˆ
sin xdx
g(x) =
ˆ
1 dx x
F (x) = − cos x
G(x) = ln x
f ′ (x) = sin x 1 g ′ (x) = x
(9) (10)
(i) (ii) (11) (12)
There can be references to these equations in the usual way, like eq.9, 12 and for the roman one eq.ii.
3.4
Labels
Every numbered equation can have a label to which a reference is possible. • There is one restriction for the label names, they cannot include one of LATEX’s command characters.8 • The label names are replaced by the equation number.
\tag
If you do not want a reference to the equation number but to an self defined name then use the AMSmath command \tag..., which is described in section 34 on page 67.
3.5
Frames
Similiar to the inline mode, displayed equations can also be framed with the \fbox command, like equation 13. 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 \fbox{...} has to be replaced with \colorbox{yellow}{...}. The package color.sty must be loaded and – important– the calc.sty package to get a correct boxwidth. ˆ inf 1 dx = 1 (13) f (x) = x2 1
8
$_ˆ\&%{}
Mathmode.tex
18
3 DISPLAYMATH MODE
1 2 3 4 5
3.5 Frames
\ noindent \ fbox {\ parbox {\ linewidth -2\ fboxsep -2\ fboxrule }{ % \ begin { equation }\ label { eq : frame 0} f ( x ) =\ int _1^{\ inf }\ dfrac {1}{ x ^2} dx =1 \ end { equation } % }}
If the equation number should not be part of the frame, then it is a bit complicated. There is one tricky solution, which puts an unnumbered equation just beside an empty numbered equation. The \hfill is only useful for placing the equation number right aligned, which is not the default. The following four equations 14-17 are the same, only the second one written with the \myMathBox macro which has the border and background color as optional arguments with the defaults white for background and black for the frame. If there is only one optional argument, then it is still the one for the frame color (15). 1 2 3
4 5 6 7
8 9 10 11 12 13 14
\ makeatletter \ def \ myMathBox {\ @ifnextchar [{\ my@MBoxi }{\ my@MBoxi [ black ]}} \ def \ my@MBoxi [#1]{\ @ifnextchar [{\ my@MBoxii [#1]}{\ my@MBoxii [#1][ white ]}} \ def \ my@MBoxii [#1][#2]#3#4{ % \ par \ noindent % \ fcolorbox {#1}{#2}{ % \ parbox {\ linewidth -\ labelwidth -2\ fboxrule -2\ fboxsep }{#3} % }% \ parbox {\ labelwidth }{ % \ begin { eqnarray }\ label {#4}\ end { eqnarray } % }% \ par % } \ makeatother
f (x) = x2 + x
1 2 3 4
(14)
f (x) = x2 + x
(15)
f (x) = x2 + x
(16)
f (x) = x2 + x
(17)
\ begin { equation }\ label { eq : frame 2} f ( x ) = x ^2 + x \ end { equation } \ myMathBox [ red ]{\[ f ( x ) = x ^2 + x \]}{ eq : frame 3}
Mathmode.tex
19
4 ARRAY ENVIRONMENT
5 6
\ myMathBox [ red ][ yellow ]{\[ f ( x ) = x ^2 + x \]}{ eq : frame 4} \ myMathBox {\[ f ( x ) = x ^2 + x \]}{ eq : frame 5}
If you are using the AMSmath package, then try the solutions from section 39 on page 74.
4
array environment \begin{array}
This is simply the same as the eqnarray environment only with the possibility ... of variable rows and columns and the fact, that the whole formula has only \end{array} one equation number and that the array environment can only be part of another math environment, like equation or displaymath. a) y = c (constant) b) y = cx + d (linear) Polynomes (18) 2 c) y = bx + cx + d (square) d) y = ax3 + bx2 + cx + d (cubic)
1 2 3 4 5 6 7 8 9 10 11
\ begin { equation } \ left . % \ begin { array }{ r@ {\\ \ quad } ccrr } \ textrm { a }) & y & = & c & ( constant ) \\ \ textrm { b }) & y & = & cx + d & ( linear ) \\ \ textrm { c }) & y & = & bx ^{2}+ cx + d & ( square ) \\ \ textrm { d }) & y & = & ax ^{3}+ bx ^{2}+ cx + d & ( cubic ) \ end { array } % \ right \} \ textrm { Polynomes } \ end { equation }
The horizontal alignment of the columns is the same than the one from the tabular environment. For arrays with delimiters see section 54 on page 94.
4.1
Cases structure
If you do not want to use the AMSmath package then write your own cases structure with the array environment:
Mathmode.tex
20
4 ARRAY ENVIRONMENT
4.2 arraycolsep
\begin{equation} x=\left\{ \begin{array}{cl} 3 0 & \textrm{if A=...}\\ 4 1 & \textrm{if B=...}\\ 5 x & \textrm{this runs with as much text as you like, but without an raggeright text.}\end{array}\right. 6 \end{equation} 1 2
0 if A=... 1 if B=... x= x this runs with as much text as you like, but without an raggeright text. (19) It is obvious, that we need a \parbox if the text is longer than the possible linewidth. \begin{equation} x = \left\{% 3 \begin{array}{l>{\raggedright}p{.5\textwidth}}% 4 0 & if A=...\tabularnewline 5 1 & if B=...\tabularnewline 6 x & \parbox{0.5\columnwidth}{this runs with as much text as you like , % 7 because an automatic linebreak is given with % 8 an raggedright text. Without this % 9 \raggedright command, you’ll get a formatted % 10 text, like the following one ... but with a parbox ... it works} 11 \end{array}% 12 \right. % 13 \end{equation} 1 2
4.2
0 if A=... 1 if B=... this runs with as much text as you like, because an automatic linebreak x= is given with an raggedright text. x Without this command, you’ll get a formatted text, like the following one ... but with a parbox ... it works
(20)
arraycolsep
\arraycolsep
All the foregoing math environments use the array to typeset the math expression. The predefined separation between two columns is the length \arraycolsep, which is set by nearly all document classes to 5pt, which seems to be too big. The following equation is typeset with the default value and the second one with \arraycolsep=1.4pt Mathmode.tex
21
5 MATRIX
f (x) =
f (x) =
sin x dx x
ˆ ˆ
sin x dx x
If this modification should be valid for all arrays/equations, then write it into the preamble, otherwise put it into a group or define your own environment as done in section 3.2.1 on page 15. 1 2 3 4 5 6
1 2 3 4 5
5
\ bgroup \ arraycolsep =1.4 pt \ begin { eqnarray } f ( x ) & = & \ int \ frac {\ sin x }{ x } dx \ end { eqnarray } \ egroup \ makeatletter \ newcommand {\ be }{ % \ begingroup \ setlength {\ arraycolsep }{1.4 pt } [ ... ]
Matrix
TEX knows two macros and
\matrix \bordermatrix
LAT
EX one more for typesetting a matrix: $\begin{matrix} A & B & C \\ 3 d & e & f \\ 4 1 & 2 & 3 \\ 5 \end{matrix}$ 1
A B C d e f 1 2 3
2
$\bordermatrix{% & 0 & 1 & 2 \cr 3 0 & A & B & C \cr 4 1 & d & e & f \cr 5 2 & 1 & 2 & 3 \cr 6 }$ 1
0 1 0 A B 1 d e 2 1 2
2 C f 3
2
The first two macros are listed here for some historical reason, because the array or especially the AMSmath package offer the same or better macros/environments. Nevertheless it is possible to redefine the bordermatrix macro to get other parentheses and a star version which takes the left top part as matrix:
Mathmode.tex
22
5 MATRIX
$\bordermatrix{% & 1 & 2 \cr 3 1 & x1 & x2 \cr 4 2 & x3 & x4 \cr 5 3 & x5 & x6 6 }$ 1
1 2 1 x1 x2 2 x3 x4 3 x5 x6
2
$\bordermatrix[{[]}]{% & 1 & 2 \cr 3 1 & x1 & x2 \cr 4 2 & x3 & x4 \cr 5 3 & x5 & x6 6 }$ 1
1 2 1 x1 x2 2 x3 x4 3 x5 x6
2
$\bordermatrix[\{\}]{% & 1 & 2 \cr 3 1 & x1 & x2 \cr 4 2 & x3 & x4 \cr 5 3 & x5 & x6 6 }$ 1
1 2 1 x1 x2 2 x3 x4 3 x5 x6
x1 x3 x5 1
x2 1 x4 2 x6 3 2
2
$\bordermatrix*{% x1 & x2 & 1 \cr 3 x3 & x4 & 2 \cr 4 x5 & x6 & 3 \cr 5 1 & 2 6 }$ 1 2
$\bordermatrix*[{[]}]{% x1 & x2 & 1 \cr 3 x3 & x4 & 2 \cr 4 x5 & x6 & 3 \cr 5 1 & 2 6 }$ 1
x1 x3 x5 1
x2 1 x4 2 x6 3 2
2
1
$\bordermatrix*[\{\}]{%
2 x1 & x2 & 1 \cr 3 x3 & x4 & 2 \cr x1 x2 1 4 x5 & x6 & 3 \cr x3 x4 2 5 1 & 2 x5 x6 3 6 }$ 1 2 There is now an optional argument for the parenthesis with () as the default one. To get such a behaviour, write into the preamble: 1 2 3 4 5 6
\ makeatletter \ newif \ if@borderstar \ def \ bordermatrix {\ @ifnextchar *{ % \ @borderstartrue \ @bordermatrix@i }{\ @borderstarfalse \ @bordermatrix@i *} % } \ def \ @bordermatrix@i *{\ @ifnextchar [{\ @bordermatrix@ii }{\ @bordermatrix@ii [() ]}} Mathmode.tex
23
6 SUPER/SUBSCRIPT AND LIMITS
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 25 26 27
\ def \ @bordermatrix@ii [#1]#2{ % \ begingroup \ m@th \ @tempdima 8.75\ p@ \ setbox \ z@ \ vbox { % \ def \ cr {\ crcr \ noalign {\ kern 2\ p@ \ global \ let \ cr \ endline }} % \ ialign {$##$\ hfil \ kern 2\ p@ \ kern \ @tempdima & \ thinspace % \ hfil $##$\ hfil && \ quad \ hfil $##$\ hfil \ crcr \ omit \ strut % \ hfil \ crcr \ noalign {\ kern -\ baselineskip }#2\ crcr \ omit % \ strut \ cr }} % \ setbox \ tw@ \ vbox {\ unvcopy \ z@ \ global \ setbox \ @ne \ lastbox } % \ setbox \ tw@ \ hbox {\ unhbox \ @ne \ unskip \ global \ setbox \ @ne \ lastbox } % \ setbox \ tw@ \ hbox { % $\ kern \ wd \ @ne \ kern -\ @tempdima \ left \ @firstoftwo #1 % \ if@borderstar \ kern 2 pt \ else \ kern -\ wd \ @ne \ fi % \ global \ setbox \ @ne \ vbox {\ box \ @ne \ if@borderstar \ else \ kern 2\ p@ \ fi } % \ vcenter {\ if@borderstar \ else \ kern -\ ht \ @ne \ fi % \ unvbox \ z@ \ kern -\ if@borderstar 2\ fi \ baselineskip } % \ if@borderstar \ kern -2\ @tempdima \ kern 2\ p@ \ else \ ,\ fi \ right \ @secondoftwo #1 $ % }\ null \;\ vbox {\ kern \ ht \ @ne \ box \ tw@ } % \ endgroup } \ makeatother
The matrix macro cannot be used together with the AMSmath package, it redefines this macro (see section 26.6 on page 60).
6
Super/Subscript and limits
Writing amin and amax gives the same depth for the subscript, but writing them in upright mode with \mbox gives a different depth: amin and amax . The problem is the different height, which can be modified in several ways • $a_{\mbox{\vphantom{i}max}}: amin and amax ; • $a_{\mathrm{max}}: amin and amax ; • $a_{\max}: amin and amax . Both are predefined operators (see section 16 on page 41).
6.1
Multiple limits
\atop
For general information about limits read section 2.1 on page 10. With the \atop command multiple limits for a sum or prod are possible. The syntax is: 1 \[ {above \atop below} \] above below which is nearly the same as a fraction without a rule. This can be enhanced to a\atop b\atop c and so on. For equation 21 do the following steps:
Mathmode.tex
24
7 ROOTS
6.2 Problems
\begin{equation}\label{eq:atop} \sum_{{1\le j\le p\atop {% 3 {1\le j\le q\atop 1\le k\le r}}}% 4 }a_{ij}b_{jk}c_{ki} 5 \end{equation} 1
X
2
aij bjk cki
1≤j≤p 1≤j≤q 1≤k≤r
(21)
There are other solutions to get multiple limits, e.g. an array, which is not the best solution because the space between the lines is too big. The AMSmath package provides several commands for limits (section 35) and the \underset and \overset commands (see section 41).
6.2
Problems
X
aij bjk cki
(22)
1≤j≤p 1≤j≤q 1≤k≤r
The equation 22 shows that the horizontal alignment is not optimal, because the math expression on the right follows at the end of the limits which are a unit together with the sum symbol. There is an elegant solution with AMSmath, described in subsection 35.2 on page 68. If you do not want to use AMSmath, then use \makebox. But there is a problem when the general fontsize is increased, \makebox knows nothing about the actual math font size. Equation 23a shows the effect and equation 23b the view without the boxes. X X aij bjk cki (23a) aij bjk cki (23b) 1≤j≤p 1≤j≤q 1≤k≤r
1 2 3 4 5 6
7
1≤j≤p 1≤j≤q 1≤k≤r
\ begin { equation } \ sum _{\ makebox [0 pt ]{$ % {{\ scriptscriptstyle 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 }
Roots
The square root \sqrt is is the default for LATEX and the n-th root can be inserted with the optional parameter \sqrt[n].... . \sqrt \sqrt{x} \sqrt[3]{x}
Mathmode.tex
√ x √ 3 x
25
8 BRACKETS, BRACES . . .
There is a different typesetting in roots. Equation 24 has different heights for the roots, whereas equation 25 has the same one. This is possible with the \vphantom command, which reserves the vertical space (without a horizontal \vphantom one) of the parameter height. \begin{equation} \sqrt{a}\,% 3 \sqrt{T}\,% 4 \sqrt{2\alpha k_{B_1}T^i}\label{eq:root1} 5 \end{equation} 1
√ √ q a T 2αkB1 T i
2
(24)
\bgroup \begin{equation}\label{eq:root2} 3 \sqrt{a\vphantom{T}\vphantom{{}_B{_1}}}\,% 4 \sqrt{\vphantom{a}T\vphantom{{}_B{_1}}}\,% 5 \sqrt{2\alpha k_{B_1}T^i} 6 \end{equation} 7 \egroup 1 2
p p q a T 2αkB1 T i
(25)
The typesetting looks much more better, especially when the formula has different roots in a row, like equation 24. Using AMSmath with the \smash command9 gives some more possibilities for typesetting of roots (see section 30 on page 63).
8
Brackets, braces and parentheses
This is one of the major problems inside the math mode, because there is often a need for different brackets, braces and parentheses in different size. At first we had to admit, that there is a difference between the characters “()[]/\ {} | k ⌊⌋ ⌈⌉ hi ↑⇑ ↓⇓ lm” and their use as an argument of the \leftX \left and \right command, where LATEX stretches the size in a way that \rightX all between the pair of left and right parentheses is smaller than the parentheses. In some cases10 it may be useful to choose a fixed height, which is possible with the \big-series. Instead of writing \leftX or \rightX one of the following commands can be chosen: default \bigX \BigX \biggX \BiggX 9
\bigX \BigX \biggX \BiggX
()[]/\{}|k ⌊⌋ ⌈⌉ hi ↑⇑ ↓⇓lm x~ w x~ w y y hi ./no jk lm DE x~ w x~ w w w w y y x~ w x~ w w w w w w w y y ! "# ,-() $% &' *+ x~ wx~ w ww w ww w ww w yy
The \smash command exists also in LATEX but without an optional argument, which makes the use for roots possible. 10 See section 8.1.1 on page 28 for example. Mathmode.tex
26
8 BRACKETS, BRACES . . .
Only a few commands can be written in a short form like \big(. The “X” has to be replaced with one of the following characters or commands from table 3, which shows the parentheses character, its code for the use with one of the “big” commands and an example with the code for that. \biglX There exist for all commands a left/right version \bigl, \bigr, \Bigl \bigrX and so on, which only makes sense when writing things like:
a × × b
\begin{align} \biggl)\times \frac{a}{b} \times\biggr( 3 \end{align} 4 \begin{align} 5 \bigg)\times \frac{a}{b} \times\bigg( 6 \end{align} 1
(26)
2
a × × (27) b LATEX takes the \biggl) as a mathopen symbol, which has by default another horizontal spacing. In addition to the above additional commands there exists some more: \bigm, \Bigm, \biggm and \Biggm, which work as the standard ones (without the addtional “m”) but add some more horizontal space between the delimiter \bigmX \bigmX and the formula before and after (see table 2). 2 2 2 3 a − b − c + 2 2 2 2 3 a − b − c +2
1
$3\bigg|a^2-b^2-c^2\bigg|+2$
1
$3\biggm|a^2-b^2-c^2\biggm|+2$
Table 2: Difference between the default \bigg and the \biggm command Char
Code
()
()
[]
[]
/\
/\backslash
{}
\{\}
|k
| \Vert
⌊⌋
\lfloor \rfloor
⌈⌉
\lceil\rceil
Mathmode.tex
Example 2 3 a2 + bc h i 2 3 a2 + bc . / 2 3 a2 + bc n o 2 3 a2 + bc
2 3 a2 + bc k j 2 3 a2 + bc
l m 2 3 a2 + bc
Code 3\Big( aˆ2+bˆ{cˆ2}\Big) 3\Big[ aˆ2+bˆ{cˆ2}\Big] 3\Big/ aˆ2+bˆ{cˆ2}\Big\backslash 3\Big\{ aˆ2+bˆ{cˆ2}\Big\} 3\Big|aˆ2+bˆ{cˆ2}\Big\Vert 3\Big\lfloor aˆ2+bˆ{cˆ2} \Big\rfloor 3\Big\lceil aˆ2+bˆ{cˆ2} \Big\rceil 27
8 BRACKETS, BRACES . . . Char
Code
8.1 Examples Code
hi
Example D E 2 \langle\rangle3 a2 + bc
↑⇑
\uparrow \Uparrow
3\Big\uparrow aˆ2+bˆ{cˆ2}\Big\Uparrow
↓⇓
\downarrow \Downarrow
lm
\updownarrow \Updownarrow
x ~ 2w 3a2 + bc w
w 2w 3ya2 + bc
x ~ 2w 3ya2 + bc
3\Big\langle aˆ2+bˆ{cˆ2}\Big\rangle
3\Big\downarrow aˆ2+bˆ{cˆ2} \Big\Downarrow 3\Big\updownarrow aˆ2+bˆ{cˆ2} \Big\Updownarrow
Table 3: Use of the different parentheses for the “big” commands
8.1 8.1.1
Examples Braces over several lines
The following equation in the single line mode looks like X 1 χij (σi − σj )2 + f ij ∇j ∇i (∆f ) + ∇k fij ∇k f ij + f ij f k [2∇i Rjk − ∇k Rij ] ∆(fij f ij ) = 2 2 i ~> > ~ >~
G
H
I
This matrix was created with 1 2 3
4 5
\[ \ xymatrix { A \ POS [];[ d ]**\ dir {~} ,[];[ dr ]**\ dir { -} & B & C \\ D & E \ POS [];[ l ]**\ dir {.} ,[];[ r ]**\ dir {~} & F \ POS [];[ dl ]**\ dir {~}\\ G & H & I} \]
33
CTAN://macros/latex/ltxmisc/ CTAN://macros/generic/diagrams/xypic/xy-3.7/ 35 For more information look at the style file xy.sty, which is often saved in /usr/share/texmf/tex/generic 34
Mathmode.tex
98
61 INTEGRAL SYMBOLS
Part V
Special symbols In this section there are only those symbols defined, which are not part of the list of all available symbols: CTAN://info/symbols/comprehensive/symbolsa4.pdf. LATEX itself defines with fontmath.ltx the following special symbols for using inside math: Name \mathparagraph \mathsection \mathdollar \mathsterling \mathunderscore \mathellipsis
Meaning ¶ § $ £ ...
Table 21: Predefined math symbols from fontmath.ltx
61
Integral symbols Name \dashint \ddashint \clockint \counterint
Symbol ´ − ´ = ´ ´
For all new integral symbols limits can be used in the usual way: ˛∞ ˆ ˆ ˆ ˆ =1=−0< = 0
1
1
−∞
(61.1)
A
\ ddashint _01=\ dashint _10 2 &\\ x & = 3\ quad \ text { if } y \ le 2& \ end { flalign }} \ end { tabular }
some text hier 1
x = 2 if y > 2
x = 2 if y > 2 x = 3 if y ≤ 2
\ begin { tabularx }{\ linewidth }{ rXc } \ ldelim \{{2}{2.75 cm }[ some text hier ] & $ x = 2\ quad \ text { if } y > 2 $ & \ refstepcounter { equation }(\ theequation ) \\ & $ x = 3\ quad \ text { if } y \ le 2$ &\ refstepcounter { equation }(\ theequation ) \ end { tabularx }
x = 2 if y > 2 some text hier x = 3 if y ≤ 2 1 2 3 4
5
6 7
(67.4) (67.5)
(67.6) (67.7)
\[ \ begin { array }{ rc@ {\ qquad } c } \ ldelim \{{2}{2.75 cm }[ some text hier ] & x = 2\ quad \ text { if } y > 2 & \ refstepcounter { equation }(\ theequation ) \\ & x = 3\ quad \ text { if } y \ le 2& \ refstepcounter { equation }(\ theequation ) \ end { array } \]
Mathmode.tex
104
68 ARRAYS
68
Arrays
There is a general rule that a lot of mathematical stuff should be divided in smaller pieces. But sometimes it is difficult to get a nice horizontal alignment when splitting a formula. The following ones uses the array environment to get a proper alignment.
68.1
Quadratic equation y
2 b −c y+ 2 y − yS S(xS ; yS )
1 2 3 4 5
6 7 8
9 10 11
12
13 14 15
16 17
x2 + bx + c b = x2 + 2 · x + c 2 2 2 b b b 2 +c − = x +2· x+ 2 2 2 {z } | b 2 x+ 2 2 2 b b = x+ − +c 2 2 b 2 = x+ 2 = (x − xS )2 ! 2 b b −c bzw. S − ; 2 2 =
b 2 −c + 2
|(Scheitelpunktform)
(68.1)
\ begin { equation } \ begin { array }{ rcll } y & = & x ^{2}+ bx + c \\ & = & x ^{2}+2\ cdot {\ displaystyle \ frac { b }{2} x + c }\\ & = & \ underbrace { x ^{2}+2\ cdot \ frac { b }{2} x +\ left (\ frac { b }{2}\ right ) ^{2}} -{\ displaystyle % \ left (\ frac { b }{2}\ right ) ^{2}+ c }\\ & & \ qquad \ left ( x +{\ displaystyle \ frac { b }{2}}\ right ) ^{2}\\ & = & \ left ( x +{\ displaystyle \ frac { b }{2}}\ right ) ^{2} -\ left ({\ displaystyle % \ frac { b }{2}}\ right ) ^{2}+ c & \ left |+\ left ({\ displaystyle % \ frac { b }{2}}\ right ) ^{2} - c \ right .\\ y +\ left ({\ displaystyle \ frac { b }{2}}\ right ) ^{2} - c & = & \ left ( x +{\ displaystyle % \ frac { b }{2}}\ right ) ^{2} & \ left |(\ textrm { Scheitelpunktform }) \ right .\\ y - y _{ S } & = & ( x - x _{ S }) ^{2}\\ S ( x _{ S }; y _{ S }) & \ ,\ textrm { bzw .}\ , & S \ left ( -{\ displaystyle % \ frac { b }{2};\ ,\ left ({\ displaystyle \ frac { b }{2}}\ right ) ^{2} - c }\ right ) \ end { array } \ end { equation }
Mathmode.tex
105
68 ARRAYS
68.2
68.2 Vectors and matrices
Vectors and matrices
01 a4 RS = 02 a4
si,0 si,1 = RS · si,2 si,3 Si =
P3
a4 56 a1 55
55 82 fc 87
m8i+0 m8i+1 ··· m8i+6 m8i+7
j=0 si,j
· 28j
87 f3 c1 5a
5a 1e 47 58
58 c6 ae db
db 68 3d 9e
9e e5 19 03
(68.2)
i = 0, 1, ..., k − 1
S = (Sk−1 , Sk−2 , ..., S1 , S0 ) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 25 26 27
\ begin { equation } \ begin { array }{ rcl } \ underline { RS } & = & \ left (\ begin { array }{ cccccccc } 01 & a 4 & 55 & 87 & 5 a & 58 & db & 9 e \\ a 4 & 56 & 82 & f 3 & 1 e & c 6 & 68 & e 5\\ 02 & a 1 & fc & c 1 & 47 & ae & 3 d & 19\\ a 4 & 55 & 87 & 5 a & 58 & db & 9 e & 03\ end { array }\ right ) \\ \\ \ left (\ begin { array }{ c } s _{ i ,0}\\ s _{ i ,1}\\ s _{ i ,2}\\ s _{ i ,3} \ end { array }\ right ) & = & \ underline { RS }\ cdot % \ left (\ begin { array }{ c } m _{8 i +0}\\ m _{8 i +1}\\ \ cdots \\ m _{8 i +6}\\ m _{8 i +7} \ end { array }\ right ) \\ \\ S _{ i } & = & \ sum _{ j =0}^{3} s _{ i , j }\ cdot 2^{8 j }\ qquad i =0 ,1 ,... , k -1\\ \\ S & = & \ left ( S _{ k -1} , S _{ k -2} ,... , S _{1} , S _{0}\ right ) \ end { array } \ end { equation }
68.3
Cases with (eqn)array environment
This solution is important when AMSmath couldn’t be used. Mathmode.tex
106
68 ARRAYS
1 2 3 4 5 6 7
divergent q ≤ −1 0 |q| < 1 lim q n = n−>∞ 1 q = 1 ∞ q > 1
$\ lim \ limits _{ n - >\ infty } q ^{ n }=\ left \{ % \ begin { array }{ lc@ {\ kern 2 pt } c@ {\ kern 2 pt } r } \ textrm { divergent }\ & q & \ le & -1\\ 0 & | q | & < & 1\\ 1 & q & = & 1\\ \ infty & q & > & 1 \ end { array }\ right .$
68.4
Arrays inside arrays
The array environment is a powerful one ways: a11 a12 0 a 21 a22 b11 b12 b21 b22 0 b31 b32 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
68.4 Arrays inside arrays
because it can be nested in several
0 b13 b23 b33
0 c11 c12 c21 c22
\[ \ left ( \ begin { array }{ c@ {} c@ {} c } \ begin { array }{| cc |}\ hline a _{11} & a _{12} \\ a _{21} & a _{22} \\\ hline \ end { array } & \ mathbf {0} & \ mathbf {0} \\ \ mathbf {0} & \ begin { array }{| ccc |}\ hline b _{11} & b _{12} & b _{13}\\ b _{21} & b _{22} & b _{23}\\ b _{31} & b _{32} & b _{33}\\\ hline \ end { array } & \ mathbf {0} \\ \ mathbf {0} & \ mathbf {0} & \ begin { array }{| cc |}\ hline c _{11} & c _{12} \\ c _{21} & c _{22} \\\ hline \ end { array } \\ \ end { array } \ right ) \]
Mathmode.tex
107
68 ARRAYS
68.5 Colored cells
0 Y1 = 1 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 0 1 1
1 1 1 3
0 0 1 1
\[ Y ^1= \ begin { array }{ c } \ null \\[1 ex ] % only vor vertical alignment \ left [\ begin { array }{ rrrr } 0 & 0 & 1 & 0\\ 1 & 0 & 1 & 0\\ 1 & 1 & 1 & 1 \ end { array }\ right ]\\[3 ex ]\ hline \ begin { array }{ rrrr } % \ hdotsfor {4}\\%( needs \ AmSmath ) instead of \\[3 ex ]\ hline 2 & 1 &3 & 1 \ end { array } \ end { array } \]
68.5
Colored cells
In general there is no difference in coloring tabular or array cells. The following example shows how one can put colors in rows, columns and cells. 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4
1 2 3 4 5
hk,1,0(n) hk,2,0(n) hk,3,0(n) hk,4,0(n) 0 0 0 0 0 0 0 0
hk,1,1 (n) hk,2,1 (n) hk,3,1 (n) hk,4,1 (n) hk,1,0(n − 1) hk,2,0(n − 1) hk,3,0(n − 1) hk,4,0(n − 1) 0 0 0 0
hk,1,2 (n) hk,2,2 (n) hk,3,2 (n) hk,4,2 (n) hk,1,1(n − 1) hk,2,1(n − 1) hk,3,1(n − 1) hk,4,1(n − 1) hk,1,0 (n − 2) hk,2,0 (n − 2) hk,3,0 (n − 2) hk,4,0 (n − 2)
0 0 0 0 hk,1,2 (n − 1) hk,2,2 (n − 1) hk,3,2 (n − 1) hk,4,2 (n − 1) hk,1,1 (n − 2) hk,2,1 (n − 2) hk,3,1 (n − 2) hk,4,1 (n − 2)
0 0 0 0 0 0 0 0 hk,1,2 (n − 2) hk,2,2 (n − 2) hk,3,2 (n − 2) hk,4,2 (n − 2)
3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 12×5
... \ usepackage { array } \ usepackage { colortbl } \ definecolor { umbra }{ rgb }{0.8 ,0.8 ,0.5} \ def \ zero {\ multicolumn {1}{ >{\ columncolor { white }} c }{0}}
Mathmode.tex
108
69 OVER- AND UNDERBRACES
6 7 8 9 10 11 12 13
14
15
16
17
18
19
20
21 22 23
\ def \ colCell #1#2{\ multicolumn {1}{ >{\ columncolor {#1}} c }{#2}} \ begin { document } \[\ left [\ , \ begin { array }{*{5}{ >{\ columncolor [ gray ]{0.95}} c }} h _{ k ,1 ,0}( n ) & h _{ k ,1 ,1}( n ) & h _{ k ,1 ,2}( n ) & \ zero & \ zero \\ h _{ k ,2 ,0}( n ) & h _{ k ,2 ,1}( n ) & h _{ k ,2 ,2}( n ) & \ zero & \ zero \\ h _{ k ,3 ,0}( n ) & h _{ k ,3 ,1}( n ) & h _{ k ,3 ,2}( n ) & \ zero & \ zero \\ h _{ k ,4 ,0}( n ) } & \ colCell { umbra }{ h _{ k ,4 ,1}( n ) } & h _{ k ,4 ,2}( n ) & \ zero & \ zero \\ \ zero & h _{ k ,1 ,0}( n -1) & h _{ k ,1 ,1}( n -1) & h _{ k ,1 ,2}( n -1) & \ zero \\ \ zero & h _{ k ,2 ,0}( n -1) & h _{ k ,2 ,1}( n -1) & h _{ k ,2 ,2}( n -1) & \ zero \\ \ zero & h _{ k ,3 ,0}( n -1) & h _{ k ,3 ,1}( n -1) & h _{ k ,3 ,2}( n -1) & \ zero \\ \ zero & \ colCell { umbra }{ h _{ k ,4 ,0}( n -1) } & h _{ k ,4 ,1}( n -1) & h _{ k ,4 ,2}( n -1) & \ zero \\ \ zero & \ zero & h _{ k ,1 ,0}( n -2) & h _{ k ,1 ,1}( n -2) & h _{ k ,1 ,2}( n -2) \\ \ zero & \ zero & h _{ k ,2 ,0}( n -2) & h _{ k ,2 ,1}( n -2) & h _{ k ,2 ,2}( n -2) \\ \ zero & \ zero & h _{ k ,3 ,0}( n -2) & h _{ k ,3 ,1}( n -2) & h _{ k ,3 ,2}( n -2) \\ \ zero & \ zero & h _{ k ,4 ,0}( n -2) & h _{ k ,4 ,1}( n -2) & h _{ k ,4 ,2}( n -2) \ end { array } \ ,\ right ]_{12\ times 5}\] ...
69 69.1
Over- and underbraces Braces and roots
To put an underbrace in a root without enlarging the root symbol is possible with the \makebox macro: z=
1 2 3 4 5
p
x2 + y 2 | {z } =z 2
\[ z =\;\;\ underbrace { % \ makebox [\ widthof {~$ x ^2+ y ^2$}][ r ]{ % $\ sqrt { x ^2+ y ^2}$}}_{= z ^2} \]
Mathmode.tex
109
69 OVER- AND UNDERBRACES
69.2
69.2 Overlapping braces
Overlapping braces o
Overlapping under- and overbraces like |
z }| {z } | u1
{ {z u2
}
needs some
tricky code, because we cannot have parts of the argument inside overbrace and also underbrace. The following equation 69.1 is an example for such a construction: y = 2x2 − 3x + 5
=0
}| { 2 2 3 3 3 + = 2 x2 − x + − 2 4 4 {z }| {z | 2 31 3 + x− =2 4 16 2 31 3 y− = 2 x− 8 4
1 2 3 4
5
6 7 8 9 10 11 12 13
14 15 16 17
z
5 2 } !
(69.1)
y &= 2 x ^2 -3 x +5\ nonumber \\ & \ hphantom {= \ 2\ left ( x ^2 -\ frac {3}{2}\ , x \ right . } % \ textcolor { blue }{ % \ overbrace {\ hphantom {+\ left (\ frac {3}{4}\ right ) ^2 - % \ left (\ frac {3}{4}\ right ) ^2}}^{=0}}\ nonumber \\[ -11 pt ] &= 2\ left (\ textcolor { red }{ % \ underbrace { % x ^2 -\ frac {3}{2}\ , x + \ left (\ frac {3}{4}\ right ) ^2} % }% \ underbrace { % - \ left (\ frac {3}{4}\ right ) ^2 + \ frac {5}{2}} % \ right ) \\ &= 2\ left (\ qquad \ textcolor { red }{\ left (x -\ frac {3}{4}\ right ) ^2} \ qquad + \ \ frac {31}{16}\ qquad \ right ) \ nonumber \\ y \ textcolor { blue }{ -\ frac {31}{8}} &= 2\ left ( x \ textcolor { cyan }{ -\ frac {3}{4}}\ right ) ^2\ nonumber \ end { align }
69.3
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.:
Mathmode.tex
110
69 OVER- AND UNDERBRACES
xR = yR
tx xK sin γ − cos γ r · + cos γ sin γ yK ty |{z} | | {z } {z }
scaling 1 2
3 4 5 6 7 8 9 10 11
69.4 Alignment
(69.2)
Translation
Rotation
\ begin { equation } \ binom { x _ R }{ y _ R } = \ underbrace { r \ vphantom {\ binom { A }{ B }}}_{\ text { Skalierung }}\ cdot % \ underbrace { % \ begin { pmatrix } \ sin \ gamma & -\ cos \ gamma \\ \ cos \ gamma & \ sin \ gamma \\ \ end { pmatrix } % }_{\ text { Rotation }} \ binom { x _ K }{ y _ K } + \ underbrace {\ binom { t _ x }{ t _ y }}_{\ text { Translation }} \ end { equation }
It is again the \vphantom macro which reserves the needed vertical space. Nevertheless the horizontal space around the r of the first underbrace and the last + should be decreased to get a better typesetting. This is possible with \hspace or simply \kern: $ \binom{x_R}{y_R} = % \kern-10pt\underbrace{r\ vphantom{\binom{A}{B}}}_{\ text{Skalierung}}\kern-10pt % 3 \cdot\underbrace{% 4 \begin{pmatrix} 5 \sin \gamma & -\cos \gamma \\ 6 \cos \gamma & \sin \gamma \\ 7 \end{pmatrix}% 8 }_{\text{Rotation}} 9 \binom{x_K}{y_K} +\kern-5pt% 10 \underbrace{\binom{t_x}{t_y }}_{\text{Translation}} $ 1 2
xR yR
sin γ − cos γ = r · cos γ sin γ |{z} | {z } Skalierung Rotation tx ty | {z } Translation
69.4
xK yK
+
Vertical and horizontal alignment
The forgoing example simply uses \hspace to decrease the horizontal width between two underbraces. This maybe okay for a single solution, but in general it is better to have some code which works in any case. The following example looks simple but it need some tricky code to get vertical and horizontal alignment.
Mathmode.tex
111
70 INTEGRALS
29 9 1 1 300 19 8 7−→ 7−→ 7 → − 7−→ 7 → . . . 7−→ − 7−→ . . . 7−→ 5069 |{z} 490 | 321 152 135 16 {z } {z } {z }1 | | ∆a=271 ∆a=10 =h271i29 ∆b=4579 ∆b=169=h4579i490 1 iteration 2 iterations
∆a=1 =h10i9 ∆b=17=h169i152 8 iterations
∆a=0=h1i1 ∆b=1=h17i16 8 iterations
It uses the in section 35.2 on page 68 defined macro \mathclap, which gives a better result. It is also possible to use \makebox[0pt]{...} but it works only in text mode and this needs some more $...$. 1 2
\ def \ num #1{\ hphantom {#1}} \ def \ vsp {\ vphantom {\ rangle _1}}
3 4 5 6 7 8 9 10 11 12 13 14
15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
\ begin { equation *} \ frac {300}{5069} % \ underbrace {\ longmapsto \ vphantom {\ frac {1}{1}}}_{ % \ mathclap {\ substack { % \ Delta a =271\ num 9\ vsp \\[2 pt ] \ Delta b =4579\ vsp \\[2 pt ] \ text {$1$ iteration } % }}} \ frac {29}{490} % \ underbrace {\ longmapsto \ frac {19}{321}\ longmapsto }_{ % \ mathclap {\ substack { % \ Delta a =10\ num {9}=\ langle 271\ rangle _{29}\ num {20}\\[2 pt ] \ Delta b =169=\ langle 4579\ rangle _{490}\\[2 pt ] \ text {$2$ iterations } }}} \ frac {9}{152} \ underbrace {\ longmapsto \ frac {8}{135}\ longmapsto \ dots \ longmapsto }_{ % \ substack { % \ Delta a =1\ num {7}=\ langle 10\ rangle _{9}\ num {119}\\[2 pt ] \ Delta b =17=\ langle 169\ rangle _{152}\\[2 pt ] \ text {$8$ iterations } }} \ frac {1}{16} \ underbrace {\ longmapsto \ dots \ longmapsto \ vphantom {\ frac {8}{135}}}_{ % \ substack { % \ Delta a =0=\ langle 1\ rangle _{1}\ num {76} \\[2 pt ] \ Delta b =1=\ langle 17\ rangle _{16} \\[2 pt ] \ text {$8$ iterations } }} \ frac {1}{1} \ end { equation *}
70
Integrals
The first theorem of Green is: ˚ ‹ 2 ∂v u∇ v + (∇u, ∇v) d3 V = u d2 A ∂n G
Mathmode.tex
S
112
71 VERTICAL ALIGNMENT
The second theorem of Green is: ˚ ‹ 2 3 ∂u ∂v 2 d2 A −v u∇ v − v∇ u d V = u ∂n ∂n G
S
They are both written with the esint.sty package36 , which gives nice integral symbols. The LATEX code for the first equation is: 1 2 3
4 5
\[ \ underset {\ mathcal { G }\ quad }\ iiint \! % \ left [ u \ nabla ^{2} v +\ left (\ nabla u ,\ nabla v \ right ) \ right ] d ^{3} V % =\ underset {\ mathcal { S }\ quad }\ oiint u \ Q { v }{ n } d ^{2} A \]
with the following definition in the preamble for the partial derivation: 1
\ def \ Q #1#2{\ frac {\ partial #1}{\ partial #2}}
which makes things easier to write.
71
Vertical alignment
71.1
Example 1
Sometimes it maybe useful to have a vertical alignment over the whole page with a mix of formulas and text. Section 37 shows the use of \intertext. There is another trick to get all formulas vertical aligned. Let’s have the following formulas distributed over the whole page: f (x) = a g(x) = x2 − 4x
f (x) − g(x) = x2 + x3 + x
g = x2 + x3 + x4 + x5 + b
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 \hphantom command: \hphantom{\mbox{$f(x)-g(x)$}} & \hphantom{\mbox{$= x^2+x^3+x^4+x^5+b$}} This is the first (empty) line in every equation where now all other lines are aligned to this one. For example: 36
See section 70 on the previous page.
Mathmode.tex
113
71 VERTICAL ALIGNMENT
71.1 Example 1
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah f (x) = a (71.1) g(x) = x2 − 4x
(71.2)
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah f (x) − g(x) = x2 + x3 + x (71.3) blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah g(x) = x2 + x3 + x4 + x5 + b
(71.4)
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
The phantom line is empty but leaves the vertical space for a line. This could be corrected with decreasing the \abovedisplayshortskip length and restoring them after the whole sequence of commands. The code of the above looks like: 1 2
3 4 5 6
7 8 9
\ newcommand {\ x }{ blah blah blah blah blah blah blah blah } \ addtolength {\ a b o v e d i s p l a y s h o r t s k i p }{ -1 cm } % decrease the skip \ addtolength {\ abovedisplayskip }{ -1 cm } \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 ) &= a \\ g ( x ) &= x ^2 -4 x \ end { align }
10 11 12 13
14 15 16
\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
17
Mathmode.tex
114
71 VERTICAL ALIGNMENT
18 19
20 21 22 23 24 25
71.2 Example 2
\ 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 {\ a b o v e d i s p l a y s h o r t s k i p }{1 cm } \ addtolength {\ abovedisplayskip }{1 cm }
Another case of aligning equations inside an itemize environment is the following one. With the \makebox macro one can have the same size on the left side of the equal sign to get a vertical alignment. • first function X P1 = ∈A a
• but another one sin (P1 ) = blabla • or perhaps P3 + P2 − P1 = blablub 1 2
\ newsavebox \ lW \ sbox \ lW {$ P _{3}+ P _{2} - P _{1}$}
3 4 5 6 7 8 9 10 11
\ begin { itemize } \ item first function \\ $\ displaystyle \ makebox [\ wd \ lW ][ r ]{$ P _1$}=\ sum _ a \ in A $ \ item but another one \\ $\ makebox [\ wd \ lW ][ r ]{$\ sin \ left ( P _1\ right ) $}= blabla $ \ item or perhaps \\ $ P _{3}+ P _{2} - P _{1}= blablub $ \ end { itemize }
71.2
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 sense when you load the documentclass with the option fleqn. The example places the additional text at 0.5\textwidth, changing this value is no problem. text text text text
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
Mathmode.tex
115
71 VERTICAL ALIGNMENT
ε=
2 3
2 3
− 12
E · 4 · π · ε0 · a0 · Zi + ZSi Zi · ZSi · e2 · 1 + mmSii
a2 + b2 = c2
71.2 Example 2
;
a0 e Nsi m Z
Bohrsche Radiuns (= 0,53 Å) Elementarladung Anzahl der Siliziumatome (71.5) pro Einheitsvolumen Atomgewicht Kernladungszahl
abc
z=9 text text text text
(71.6)
(71.7)
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
This solution works only with AMSmath, without you have to redefine the LATEX macro, which creates the equation number. 1 2
3 4 5 6 7
\ newsavebox {\ myendhook } % hier gehen die Tabellen rein \ def \ tagform@ #1{{(\ maketag@@@ {\ ignorespaces #1\ unskip \ @@italiccorr ) } \ makebox [0 pt ][ r ]{ % hinter der Zeilennummer aufgehaengt \ makebox [0.4\ textwidth ][ l ]{\ usebox {\ myendhook }} % }% \ global \ sbox {\ myendhook }{} % Box wird geleert }}
8 9
[ ... ]
10 11 12 13 14 15 16 17 18 19 20 21
\ sbox {\ myendhook }{ % \ begin { footnotesize } % \ begin { tabular }{ @ {} ll } $ a _0$ & Bohrsche Radiuns ($\ mathrm {= 0{ ,}53\ ,\ mbox {\ AA }}$) \\ $ e $ & Elementarladung \\ $ N _{ si }$ & Anzahl der Siliziumatome \\ & pro Einheitsvolumen \\ $ m $ & Atomgewicht \\ $ Z $ & Kernladungszahl \ end { tabular } \ end { footnotesize }}
22 23 24 25
26
\ begin { equation } \ varepsilon = \ frac { E \ cdot 4 \ cdot \ pi \ cdot \ varepsilon _{0} \ cdot a _0 \ cdot \ left ( Z _ i ^{\ frac {2}{3}} + Z _{ Si }^{\ frac {2}{3}} \ right ) ^{ -\ frac {1}{2}}} { Z _ i \ cdot Z _{ Si } \ cdot e 2 \ cdot \ left ( 1
Mathmode.tex
116
72 NODE CONNECTIONS
27 28
+ \ frac { m _ i }{ m _{ Si }} \ right ) }\ ,; \ end { equation }
29 30
\ sbox {\ myendhook }{ abc }
31 32 33 34
\ begin { equation } a 2+ b 2= c 2 \ end { equation }
35 36 37 38
\ begin { equation } z = 9 \ end { equation }
72
Node connections
This is a typical application for PSTricks and it needs the package pst-node and doesn’t work with pdflatex. Use VTeX, ps4pdf or ps2pdf. Die Bindungsenergie im Tröpfchenmodell setzt sich aus folgenden Teilen zusammen: • dem Oberflächenanteil • Dem Volumenanteil,
2
E = av A + − af A2/3 + − ac Z(Z−1) + − as (A−2Z) + Ep (72.1) A A1/3
• dem Coulomb-Anteil • der Symmetrieenergie • sowie einem Paarbildungsbeitrag. 1 2 3 4 5 6 7 8 9 10 11
\ psset { nodesep =3 pt } \ newrgbcolor { lila }{0.6 0.2 0.5} \ newrgbcolor { darkyellow }{1 0.9 0} Die Bindungsenergie im Tröpfchenmodell setzt sich aus folgenden Teilen zusammen : \ begin { itemize } \ item dem \ rnode { b }{ Oberflächenanteil } \ item Dem \ rnode { a }{ Volumenanteil } ,\\[1 cm ] \ def \ xstrut {\ vphantom {\ frac {( A ) ^1}{( B ) ^1}}} \ begin { equation } E =
Mathmode.tex
117
73 SPECIAL PLACEMENT
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
\ rnode [ t ]{ ae }{\ psframebox *[ fillcolor = darkyellow , linestyle = none ]{\ xstrut a _ vA }} + \ rnode [ t ]{ be }{\ psframebox *[ fillcolor = lightgray , linestyle = none ]{\ xstrut - a _ fA ^{2/3}}} + \ rnode [ t ]{ ce }{\ psframebox *[ fillcolor = green , linestyle = none ]{\ xstrut - a _ c \ frac { Z (Z -1) }{ A ^{1/3}}}} + \ rnode [ t ]{ de }{\ psframebox *[ fillcolor = cyan , linestyle = none ]{\ xstrut - a _ s \ frac {( A -2 Z ) ^2}{ A }}} + \ rnode [ t ]{ ee }{\ psframebox *[ fillcolor = yellow , linestyle = none ]{\ xstrut E _ p }} \ end { equation }\\[0.25 cm ] \ item dem \ rnode { c }{ Coulomb - Anteil } \ item der \ rnode { d }{ Symmetrieenergie } \ item sowie einem \ rnode { e }{ P a a r b i l d u n g s b e i t r a g }. \ end { itemize } \ nccurve [ angleA = -90 , angleB =90]{ - >}{ a }{ ae } \ nccurve [ angleB =45]{ - >}{ b }{ be } \ nccurve [ angleB = -90]{ - >}{ c }{ ce } \ nccurve [ angleB = -90]{ - >}{ d }{ de } \ nccurve [ angleB = -90]{ - >}{ e }{ ee }
73
Special placement of displayed equations
73.1
Formulas side by side
Sometimes it may be useful to have numbered formulas side by side like the following ones: ˛
(73.1.a)
∇·B =0
(73.1.b)
c d
(73.2.a)
b=1
(73.2.b)
c=1
(73.3.a)
Eds = 0 a=
ˆ
2xdx = x2 + C
And again a default display equation: ˆ ∞ 1 dx F (x) = x 0 1 2 3
4 5 6
(73.3.b)
(73.4)
\ begin { mtabular }{*{2}{ m {0.35\ linewidth } m {0.15\ linewidth }}} \ begin { align *} \ oint E ds =0 \ end { align *} & \ eqnCnt % & \ begin { align *} \ nabla \ cdot B =0 \ end { align *} & \ eqnCnt [\ label { blah }]\\ \ begin { align *} a =\ frac { c }{ d } \ end { align *} & \ eqnCnt % & \ begin { align *} b = 1 \ end { align *} & \ eqnCnt \\ \ begin { align *} c =1 \ end { align *} & \ eqnCnt [\ label { blub }]
Mathmode.tex
118
73 SPECIAL PLACEMENT
7 8
73.1 Formulas side by side
& \ begin { align *} \ int 2 x dx = x ^2+ C \ end { align *} & \ eqnCnt \ end { mtabular }
The new environment mtabular has two arguments, one optional and one which is the same than the one from the tabular environment. With the option long it is possible to have all the formulas in a longtable environment, which allows a pagebreak. The new macro \eqnCnt controls the counting of these equations as subequations for one tabular line. This macro can have an optional argument for a label. At least it counts the equations. If the equation number is not centered to the foregoing equation, then it needs some more horizontal space in the tabular column. \eqnCnt[] The vertical space is controlled by the length mtabskip, which is by default -1.25cm and can be modified in the usual way. To define all these macros write into the preamble: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
\ usepackage { amsmath } \ newcounter { subequation } % \ newlength \ mtabskip \ mtabskip = -1.25 cm % \ newcommand \ eqnCnt [1][]{ % \ refstepcounter { subequation } % \ begin { align }#1\ end { align } % \ addtocounter { equation }{ -1} % } \ def \ mtabLong { long } \ makeatletter \ newenvironment { mtabular }[2][\ empty ]{ % \ def \ @xarraycr { % \ stepcounter { equation } % \ setcounter { subequation }{0} % \ @ifnextchar [\ @argarraycr {\ @argarraycr [\ mtabskip ]} % } \ let \ theoldequation \ theequation % \ renewcommand \ theequation {\ theoldequation .\ alph { subequation }} \ edef \ mtabOption {#1} \ setcounter { subequation }{0} % \ tabcolsep =0 pt \ ifx \ mtabOption \ mtabLong \ longtable {#2}\ else \ tabular {#2}\ fi % }{ % \ ifx \ mtabOption \ mtabLong \ endlongtable \ else \ endtabular \ fi % \ let \ theequation \ theoldequation % \ stepcounter { equation } } \ makeatother
As seen in equation 73.3.a and equation 73.1.b, everything is nonsense ... And the following tabular is defined as a longtable to enable pagebreaks.
Mathmode.tex
119
73 SPECIAL PLACEMENT
˛
(73.5.a)
∇·B =0
(73.5.b)
c d
(73.6.a)
b=1
(73.6.b)
c=1
(73.7.a)
Eds = 0
(73.8.a)
Eds = 0 a=
˛
a=
˛
c d
ˆ
2xdx = x2 + C ∇·B =0
(73.8.b)
b=1
(73.9.b)
(73.9.a) ˆ
(73.7.b)
2xdx = x2 + C
c=1
(73.10.a)
Eds = 0
(73.11.a)
∇·B =0
(73.11.b)
c d
(73.12.a)
b=1
(73.12.b)
c=1
(73.13.a)
Eds = 0
(73.14.a)
a=
˛
73.1 Formulas side by side
a=
c d
c=1
ˆ
2xdx = x2 + C
(73.16.a)
(73.13.b)
∇·B =0
(73.14.b)
b=1
(73.15.b)
(73.15.a) ˆ
(73.10.b)
2xdx = x2 + C
(73.16.b)
As seen in equation 73.13.a and equation 73.11.b, everything is nonsense ... And again a default display equation: ˆ ∞ 1 dx F (x) = x 0 1
2 3 4 5 6 7
(73.17)
\ begin { mtabular }[ long ]{*{2}{ m {0.375\ linewidth } m {0.125\ linewidth }}} \ begin { align *} \ oint E ds =0 \ end { align *} & \ eqnCnt % & \ begin { align *} \ nabla \ cdot B =0 \ end { align *} & \ eqnCnt \\ \ begin { align *} a =\ frac { c }{ d } \ end { align *} & \ eqnCnt % & \ begin { align *} b = 1 \ end { align *} & \ eqnCnt \\ \ begin { align *} c =1 \ end { align *} & \ eqnCnt & \ begin { align *} \ int 2 x dx = x ^2+ C \ end { align *} & \ eqnCnt \\
8 9
[ ... ]
Mathmode.tex
120
73.2
Formulas inside an itemize enviroment
Without any modification it is not possible to get a numbered equation at the same height as the symbol of the itemize environment. This depends to the \abovedisplayskip. The formula has to be raised up for exactly this length. 1 2 3 4 5 6 7 8 9
\ def \ itemMath #1{ % \ raisebox { -\ a b o v e d i s p l a y s h o r t s k i p }{ % \ parbox {0.75\ linewidth }{ % \ begin { equation }#1\ end { equation }}}} % \ begin { itemize } \ item \ itemMath { f = l } \ item \ itemMath { g ( x ) = \ int f ( x ) dx } \ end { itemize }
• •
Mathmode.tex
f =l
(73.18)
ˆ
(73.19)
g(x) =
f (x)dx
121
List of Figures Figure Page 1 multline Alignment demo (the fourth row is shifted to the right with \shoveright) . . . . . . . . . . . . . . . . . . . . . 56 2 Demonstration of \multlinegap (default is 0pt) . . . . . . . 56
Mathmode.tex
122
List of Tables Table 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Page Meaning of \mathsurround . . . . . . . . . . . . . . . . . . . 13 Difference between the default \bigg and the \biggm command 27 Use of the different parentheses for the “big” commands . . . 28 Old font style commands . . . . . . . . . . . . . . . . . . . . . 31 Fonts in math mode . . . . . . . . . . . . . . . . . . . . . . . 32 The meaning of the math spaces . . . . . . . . . . . . . . . . 32 Spaces in math mode . . . . . . . . . . . . . . . . . . . . . . . 33 Math styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Dots in math mode . . . . . . . . . . . . . . . . . . . . . . . . 38 Accents in math mode . . . . . . . . . . . . . . . . . . . . . . 38 Vectors with package esvect.sty (in the right column the default one from LATEX) . . . . . . . . . . . . . . . . . . . . . 41 The predefined operators of fontmath.ltx . . . . . . . . . . . 41 The predefined operators of latex.ltx . . . . . . . . . . . . . 42 The greek letters . . . . . . . . . . . . . . . . . . . . . . . . . 43 Comparison between the different align environments with the same code, where the first three can have an equation number 49 Matrix environments . . . . . . . . . . . . . . . . . . . . . . . 61 binom commands . . . . . . . . . . . . . . . . . . . . . . . . . 64 The modulo commands and their meaning . . . . . . . . . . . 65 Different mathcommands . . . . . . . . . . . . . . . . . . . . 75 The predefined operators of amsopn.sty . . . . . . . . . . . . 91 Predefined math symbols from fontmath.ltx . . . . . . . . . 99 New symbols in combination with the equal sign . . . . . . . 101
Mathmode.tex
123
References [1] Paul W. Abrahams, Karl Berry, and Kathryn Hargreaves. TEX for the Impatient. http://tug.org/ftp/tex/impatient/book.pdf, 2003. [2] Claudio Beccari. Typesetting mathematics for science and technology according to iso 31/xi. TUGboat Journal, 18(1):39–47, 1997. [3] Thierry Bouche. Diversity in math fonts. TUGboat Journal, 19(2):121–135, 1998. [4] David Cobac. Atelier documents mathématiques. http://crdp.ac-lille.fr/crdp2003/archives/latex/Ateliers/ Atelier2/Presentation4.pdf, 2004. [5] David Cobac. Ecrire des mathématiques avec LATEX. http://crdp.ac-lille.fr/crdp2003/archives/latex/Ateliers/ Atelier2/prepDocMaths.pdf, 2004. [6] Michael Downes. Technical Notes on the amsmath package. American Mathematical Society, ftp://ftp.ams.org/pub/tex/doc/amsmath/technote.pdf, 1999. [7] Michael Downes. Short Math Guide for LATEX. American Mathematical Society, http://www.ams.org/tex/short-math-guide.html, 2002. [8] Victor Eijkhout. TEX by Topic. http://www.eijkhout.net/tbt/, 1992. [9] J. Anthony Fitzgerald. Web Math Formulas Using TEX. http://www.unb.ca/web/Sample/math/, 1997. [10] Michel Goosens, Frank Mittelbach, and Alexander Samarin. The LATEX Companion. Addison Wesley, 13 edition, 1994. [11] George Grätzer. Math into LATEX. Birkhäuser Boston, third edition, 2000. [12] Donald E. Knuth. The TEXbook. Addison Wesley Professional, 21 edition, 1986. [13] Donald E. Knuth, Tracy Larrabee, and Paul M. Roberts. Mathematical Writing. Stanford University, Computer Science Department, http: //sunburn.stanford.edu/~knuth/papers/mathwriting.tex.gz, 1987.
Mathmode.tex
124
[14] R. Kuhn, R. Scott, and L. Andreev. An Introduction to using LATEX in the Harvard Mathematics Department. Harvard University, Department of Mathematics, http: //abel.math.harvard.edu/computing/latex/manual/texman.html. [15] Johannes Küster. Designing Math Fonts. http://www.typoma.com/publ/20040430-bachotex.pdf, apr 2004. Vortrag auf der polnischen TeX-Konferenz »BachoTeX«. [16] Johannes Küster. Fonts for Mathematics. http://www.typoma.com/publ/20041002-atypi.pdf, oct 2004. Vortrag auf der ATypI-Konferenz in Prag. [17] Richard Lawrence. Math=Typography? TUGboat Journal, 24(2):165–168, 2003. [18] NIST. Typefaces for Symbols in Scientific Manuscripts. http://physics.nist.gov/Document/typefaces.pdf, 2004. [19] Luca Padovani. Mathml formatting with tex rules and tex fonts. TUGboat Journal, 24(1):53–61, 2003. [20] Sebastian Rahtz and Leonor Barroca. A style option for rotated objects in LATEX. TUGboat Journal, 13(2):156–180, July 1992. [21] Steve Seiden. Math cheat sheet. TUG, http://www.tug.org/texshowcase/#math, 2000. [22] Carole Siegfried and Herbert Voß. Mathematik im Inline-modus. Die TEXnische Komödie, 3/04:25–32, November 2004. [23] Paul Taylor. Commutative Diagrams in TEX. Department of Computer Science, Queen Mary and Westfield College, http://www.dcs.qmw.ac.uk/~pt/diagrams/, 2000. [24] Herbert Voß. Farbige Mathematik. Die TEXnische Komödie, 2/04:81–87, March 2004.
Mathmode.tex
125
Index \Bmatrix, 61 \bmatrix, 61 Bold greek letters, 75 \boldmath, 45 \bordermatrix, 22 \boxed, 74 boxed inline math, 12 Braces, 93 \breve, 38
Symbols \„ 33 \:, 33 \;, 33 A \above, 84 \abovedisplayshortskip, 35 \abovedisplayshortskip, 76 \abovedisplayskip, 35 \abovedisplayskip, 76 \abovewithdelims, 85 Accent, 89 \acute, 38 \allowdisplaybreaks, 44 amscd.sty, 90 array, 54 \arraystretch, 36 \atop, 24, 44, 68 \atop, 85 \atopwithdelims, 85
C \cal, 31 Cases – numbered lines, 103 \cases, 20 \cdots, 38 centertags, 48 \cfrac, 62 \chapter, 11 \check, 38 \choose, 44 \clap, 69 cmex10, 29 Color, 45 color, 108 \columncolor, 108 comma, 34 ctagsplit, 67
B \bar, 38 \belowdisplayshortskip, 35 \belowdisplayshortskip, 76 \belowdisplayskip, 35 \belowdisplayskip, 76 \bf, 31 \Big, 26 \big, 26 \Bigg, 26 \bigg, 26 \Biggm, 27 \biggm, 27 \Bigl, 27 \bigl, 27 \Bigm, 27 \bigm, 27 \bigr, 27 Binom, 44 \binoppenalty, 88
D \ddddot, 61 \dddot, 38, 61 \ddot, 38 \ddots, 38 decimal point, 34 \delcode, 80 Delimiter, 13, 29 \delimiter, 80 \delimiterfactor, 30 \delimiterfactor, 76 \delimitershortfall, 30 \delimitershortfall, 77 126
\dfrac, 63 Display math mode, 10 \displaybreak, 44 \displayindent, 77 \displaylimits, 85 \displaystyle, 11, 36, 63 \displaystyle, 80 \displaywidowpenalty, 88 \displaywidth, 78 dot, 34 \dot, 38 \dotsb, 38 \dotsc, 38 \dotsi, 38 \dotsm, 38 \dotso, 38 E \ensuremath, 44 \eqno, 85 Equation – number, 67 – numbering, 65 Equation number, 67 esvect.sty, 40 \EuScript, 97 \everydisplay, 47 \everydisplay, 86 \everymath, 47 \everymath, 86 Exponent, 41 F \fam, 81 \fbox, 18 fleqn, 48 Font size, 37 fontmath.ltx, 29 \frac, 44 Fraction, 10, 11, 62 \frac, 62 Framed inline math, 12 G gather, 55 Mathmode.tex
\genfrac, 62 \grave, 38 Greek, 42 greek, 43 – bold, 43 – upright, 43 H Harpoon, 100 \hat, 38 \hdotsfor, 61 \hphantom, 33, 112 \hspace, 33 \Huge, 37 hyperref.sty, 11 I \imath, 38 Indices, 41 \int, 11, 97 Integral symbols, 99 \intertext, 72 intlimits, 48 \it, 31 Italic, 30, 70 itemize, 121 J \jmath, 38 \jot, 36 K \kern, 33 L Label, 18 \label, 67 \Large, 37 \large, 37 \ldots, 38 \left, 26 \left, 86 Left aligned, 53 leqno, 48 \leqno, 86 127
\lim, 11 Limits, 24, 42, 68, 70 \limits, 10 \limits, 86 M \mapstofill, 73 Math operator, 11 Math unit, 65 \mathaccent, 81 \mathbb, 31 \mathbf, 31 \mathbin, 81 \mathcal, 31 \mathchar, 82 \mathchardef, 82 \mathchoice, 82 \mathclap, 69, 112 \mathclose, 82 \mathcode, 82 \mathfrak, 31 \mathindent, 48 \mathinner, 86 \mathit, 31 \mathop, 83 \mathopen, 83 \mathord, 35 \mathord, 83 \mathpunct, 35 \mathpunct, 83 \mathrel, 83 \mathring, 38 \mathrm, 31, 71 \mathsf, 31 \mathsurround, 13 \mathsurround, 78 \mathtt, 31 \mathversion, 45 \matrix, 61 \mbox, 71 \medmuskip, 78 \medspace, 33 \mkern, 78 \mskip, 78 Mathmode.tex
Multiple exponents, 41 multline, 57 \multlinegap, 57 \muskip, 79 \muskipdef, 79 N namelimits, 48 \negmedspace, 33 \negthickspace, 33 \negthinspace, 33 nointlimits, 48 \nolimits, 86 nonamelimits, 48 \nonscript, 79 \nonumber, 14, 15 nosumlimits, 48 \nulldelimiterspace, 79 O Operator, 41 – names, 70 – size, 97 \operatornamewithlimits, 70 \over, 87 \overbrace, 38, 110 \overbracket, 39 \overleftarrow, 38 \overleftrightarrow, 38 \overline, 38 \overline, 87 \overrightarrow, 38, 40 \overset, 75 \overwithdelims, 87 P Pagebreak, 44 \parbox, 60 \phantom, 33, 103 \pmatrix, 61 \pmb, 75 \postdisplaypenalty, 88 \predisplaypenalty, 88 \predisplaystyle, 79 \prod, 11, 24 128
pstricks.sty, 90
Superscript, 10
Q \qquad, 33 \quad, 33
T \tag, 18 tbtags, 48 \texorpdfstring, 11 Text, 30 – \parbox, 30 \textfont, 84 \textstyle, 36 \textstyle, 84 \tfrac, 63 \thickmuskip, 79 \thickspace, 33 \thinmuskip, 79 \thinspace, 33 \tilde, 38 \tt, 31
R \radical, 87 Reference, 18 \reflectbox, 38 \relpenalty, 88 reqno, 48 \right, 26 \right, 87 righttag, 67 \rm, 31 Root, 25, 64 \rowcolor, 108 S \scriptfont, 83 \scriptscriptfont, 83 \scriptscriptstyle, 37 \scriptscriptstyle, 84 \scriptspace, 79 scriptstyle, 10 \scriptstyle, 11, 37, 63 \scriptstyle, 84 \section, 11 \shoveright, 57 \sideset, 69 Size – Operator, 97 \skew, 84 \skewchar, 84 \smallmatrix, 61 Split equation, 54 \sqrt, 25 \stackrel, 44 Style, 37 Subequations, 66 Subscript, 10 \substack, 68 \sum, 11, 24, 69, 97 sumlimits, 48 Mathmode.tex
U \unboldmath, 45 \underbar, 38 \underbrace, 38, 110, 111 \underbracket, 39 \underleftarrow, 38 \underleftrightarrow, 38 \underline, 38, 47 \underline, 88 \underrightarrow, 38 \underset, 75 \uproot, 63 V \vcenter, 88 \vdots, 38 \vec, 38 Vector, 40, 106 \Vmatrix, 61 \vmatrix, 61 \vphantom, 26, 112 W \widehat, 38 \widetilde, 38
129
X \xleftharpoondown, 100 \xleftharpoonup, 100 \xleftrightharpoons, 100 \xrightharpoondown, 100 \xrightharpoonup, 100 \xrightleftharpoons, 100 \xymatrix, 98 xypic.sty, 90
Mathmode.tex
130