Debian Codegraph @

texmf-dist/doc/latex/bosisio/envmath.html

raw
1 <html>
2 <!--
3 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
4 | Copyright(C) 1997-2010 by F. Bosisio |
5 | |
6 | This program can be redistributed and/or modified under |
7 | the terms of the LaTeX Project Public License, either |
8 | version 1.3 of this license or (at your option) any later |
9 | version. The latest version of this license is in |
10 | http://www.latex-project.org/lppl.txt |
11 | and version 1.3 or later is part of all LaTeX distributions |
12 | version 2005/12/01 or later. |
13 | |
14 | This work has the LPPL maintenance status `maintained'. |
15 | The Current Maintainer of this work is F. Bosisio. |
16 | |
17 | This work consists of files envmath.dtx and envmath.html |
18 | and of the derived files envmath.sty and envmath.pdf. |
19 | |
20 | E-mail: [email protected] |
21 | CTAN location: macros/latex/contrib/bosisio/ |
22 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
23 -->
24 <head>
25 <title>Package envmath</title>
26 </head>
27 <body>
28
29 <h1 align="CENTER">
30 Package <tt>envmath</tt><br />
31 <small>
32 This is version 2.5, last revised 2010/02/10; documentation date 2005/04/09.
33 </small>
34 </h1>
35
36 <p align="CENTER">
37 <strong>
38 Author: <i>F. Bosisio</i><br />
39 <small>
40 E-mail: <a href="mailto:[email protected]">
41 <tt>[email protected]</tt>
42 </a><br />
43 CTAN location: <a href="http://mirror.ctan.org/macros/latex/contrib/bosisio">
44 <tt>macros/latex/contrib/bosisio</tt>
45 </a>
46 </small>
47 </strong>
48 </p>
49
50 <p align="LEFT"></p>
51
52 <!------------------------------------------------------------------------>
53 <p>
54
55 <h3>Abstract</h3>
56 <div>
57 Documentation for the package <tt>envmath</tt>.
58 </div>
59
60 <hr /><br />
61 <!------------------------------------------------------------------------>
62
63 <h2>Table of contents</h2>
64
65 <ul>
66 <li><a href="#SECTION01">Introduction</a></li>
67 <li><a href="#SECTION02">The options</a></li>
68 <li><a href="#SECTION03">Math-mode environments</a>
69 <ul>
70 <li><a href="#SECTION03a">The <tt>Equation</tt> environment</a></li>
71 <li><a href="#SECTION03b">The <tt>MultiLine</tt> equation environment</a></li>
72 <li><a href="#SECTION03c">The <tt>System</tt> environment</a></li>
73 <li><a href="#SECTION03d">The <tt>EqSystem</tt> environment</a></li>
74 </ul></li>
75 <li><a href="#SECTION04">Math-mode commands</a></li>
76 </ul>
77
78 <hr /><br />
79 <!------------------------------------------------------------------------>
80
81 <h2>
82 <a name="SECTION01">Introduction</a>
83 </h2>
84
85 <p>
86 This package provides some useful math-commands and enviroments, which
87 are simpler to use and prettier then their standard LaTeX counterpart.
88 </p>
89
90 <p>
91 In particular some commands are redefined
92 (see <a href="#SECTION02">next section</a> if you don't want them to be
93 redefined), so care should be taken, expecially when including this package
94 in an already existent LaTeX file.
95
96 <p>
97 The <a href="#SECTION04">redefined commands</a> are:<br />
98 <tt>\(</tt>, <tt>\)</tt>,
99 <tt>\[</tt>, <tt>\]</tt>,
100 <tt>\{</tt> and <tt>\}</tt>.<br />
101 The effect of ``<tt>\(</tt> ...<tt>\)</tt>'' can still be achieved by
102 the LaTeX equivalent commands ``<tt>\begin{math} ... \end{math}</tt>''
103 or ``<tt>$...$</tt>''.
104 </p>
105
106 <p>
107 Similarly, the effect of ``<tt>\[...\]</tt>'' can be achieved by the
108 LaTeX equivalent commands
109 ``<tt>\begin{displaymath}...\end{displaymath}</tt>'' or
110 ``<tt>$$...$$</tt>''.
111 </p>
112
113 <p>
114 The ``<tt>\{</tt>'' and ``<tt>\}</tt>'' commands are the more
115 error-prone, since one may try to use ``<tt>\left\{</tt>'', which now
116 is incorrect, because the ``<tt>\{</tt>'' command already contains a
117 ``<tt>\left</tt>'' declaration.
118 In the rare occasions where a brace of normal size is needed, one can use
119 the LaTeX commands ``<tt>\lbrace</tt>'' and ``<tt>\rbrace</tt>''.
120 </p>
121
122 <p>
123 Also the <a href="#SECTION03a">``<tt>equation</tt>'' environment</a> has been
124 changed, but it is completly compatible with the original definition, so it
125 should be safe, perhaps except when the first character of the equation is
126 an open square bracket or it is placed in a moving argument:
127 in fact, the new version of this command is fragile, and this is true also
128 for most of the commands defined by this package.
129 </p>
130
131 <hr /><br />
132 <!------------------------------------------------------------------------>
133
134 <h2>
135 <a name="SECTION02">The options</a>
136 </h2>
137
138 <p>
139 At now, five options are available with the <tt>envmath</tt> package.
140 </p>
141
142 <p>
143 The ``<tt>RedefEquation</tt>''/``<tt>StdEquation</tt>'' and
144 ``<tt>RedefBrackets</tt>''/``<tt>StdBrackets</tt>'' options control
145 whether the ``<tt>equation</tt>'' environment and the brace commands
146 ``<tt>\(</tt>'', ``<tt>\)</tt>'', ``<tt>\[</tt>'',
147 ``<tt>\]</tt>'', ``<tt>\{</tt>'' and ``<tt>\}</tt>'' should
148 be redefined or retain their original LaTeX meaning.
149 </p>
150
151 <p>
152 More precisely, ``<tt>RedefEquation</tt>'' (default) redefines the
153 ``equation'' environment to have an optional argument (used as a label),
154 while ``<tt>StdEquation</tt>'' leaves it unchanged.
155 In the first case, the ``equation'' environment will be equivalent to the
156 <a href="#SECTION03a">``Equation'' environment</a> (capitalized!) described
157 below, whereas in the second case they will be different.
158 </p>
159
160 <p>
161 Similarly, the ``<tt>RedefBrackets</tt>'' option (default) makes the
162 <a href="#SECTION04"> bracket commands</a> to be redefined, whilst
163 ``<tt>StdBrackets</tt>'' leave them their original meaning.
164 </p>
165
166 <p>
167 Also a ``<tt>Standard</tt>'' option exists, which amounts to specify both
168 the ``<tt>StdEquation</tt>'' and ``<tt>StdBrackets</tt>'' options, thus making
169 the package fully standard, which may be useful when sending your
170 LaTeX files to someone else.
171 </p>
172
173 <hr /><br />
174 <!------------------------------------------------------------------------>
175
176 <h2>
177 <a name="SECTION03">Math-mode environments</a>
178 </h2>
179
180 <p>
181 This package provides some math-mode environments, each with a ``*-form''
182 which does not generates numbers (or produce sub-numbering).
183 </p>
184
185 <hr /><br />
186 <!------------------------------------------------------------------------>
187
188 <h3>
189 <a name="SECTION03a">The <tt>Equation</tt> environment</a>
190 </h3>
191
192 <p>
193 The ``<tt>Equation</tt>'' environment has an optional argument which is used
194 as a label to reference it.
195 <pre>
196 \begin{Equation}[&lt;label&gt;]
197 ...
198 \end{Equation}
199 </pre>
200 </p>
201
202 <p>
203 If the ``<tt>RedefEquation</tt>'' option is in effect (default), then
204 the ``<tt>equation</tt>'' environment is redefined to have the same optional
205 argument as ``<tt>Equation</tt>''.
206 </p>
207
208 <p>
209 There is also a *-form, which does not generate a number (so this *-form is
210 really a ``displaymath'' and not an equation, but it has been added for
211 simmetry and for making it easier to add or remove the number to a formula).
212 </p>
213
214 <p>
215 The *-form has an optional argument like the non-* form, which is
216 disregarded by the environment and is added only for simmetry reasons.
217 <pre>
218 \begin{equation*}[&lt;disregarded-label&gt;]
219 ...
220 \end{equation*}
221 </pre>
222 </p>
223
224 <hr /><br />
225 <!------------------------------------------------------------------------>
226
227 <h3>
228 <a name="SECTION03b">The <tt>MultiLine</tt> equation environment</a>
229 </h3>
230
231 <p>
232 The ``<tt>MultiLine</tt>'' environment is intended for formulas that don't
233 fit on a single line, and so must be broken across lines.
234 </p>
235
236 <p>
237 As for the <a href="#SECTION03a"><tt>Equation</tt> environment</a> above,
238 it has an optional argument which is used as a label.
239 </p>
240
241 <p>
242 All the lines but the first are automatically indented by the lenght
243 ``<tt>\MultiLineIndent</tt>'', which is rougthly what one expects, but
244 can be changed at any time by the user with
245 ``<tt>\setlenght\MultiLineIndent{...}</tt>''.
246 You can also control the alignment of the continuation rows by placing an
247 optional <tt>&amp;</tt> in the first row: is such a case all the others line
248 will <em>not</em> be indented by ``<tt>\MultiLineIndent</tt>'' but wil behave
249 <em>as if</em> there were an ampersand in front of them (i.e. they will be
250 left-aligned at the right of the &amp; in the first row).
251 </p>
252
253 <p>
254 Each line but the last must end with a ``<tt>\\</tt>'' command
255 (which can have an optional argument to add some vertical space between
256 lines).
257 When the line is broken in the middle (e.g. after a ``+'' sign) and not at
258 the end (i.e. after a ``='' or similar), the *-form ``<tt>\\*</tt>''
259 may be used to indicate the line-break, the difference being in an extra
260 space added at the beginning of the next line.
261 The width of a this space defaults to 1em and can be changed by the user
262 with ``<tt>\setlenght\MultiLineStarIndent{...}</tt>''.
263 </p>
264
265 <p>
266 <pre>
267 \begin{MultiLine}[&lt;label&gt;]
268 ... [&amp;]= ... = \\
269 = ... + \\*
270 + ... = \\
271 = ...
272 \end{MultiLine}
273 </pre>
274 </p>
275
276 <p>
277 Also this environment has a *-form which differs only in that it does not
278 generate an equation number.
279 <pre>
280 \begin{MultiLine*}[&lt;disregarded-label&gt;]
281 ... [&amp;]= ... = \\
282 = ... + \\*
283 + ... = \\
284 = ...
285 \end{MultiLine*}
286 </pre>
287 </p>
288
289 <hr /><br />
290 <!------------------------------------------------------------------------>
291
292 <h3>
293 <a name="SECTION03c">The <tt>System</tt> environment</a>
294 </h3>
295
296 <p>
297 The ``<tt>System</tt>'' environment is used for grouping a set of equations
298 together inside a left brace, with one only equation number.
299 </p>
300
301 <p>
302 Again there is an optional argument to indicate a label and each equation
303 is separated by a ``<tt>\\</tt>'' or ``<tt>\\*</tt>'' command,
304 as for the <a href="#SECTION03b">``<tt>MultiLine</tt>'' environment</a>.
305 </p>
306
307 <p>
308 The rows (except the ones ended with the *-form ``<tt>\\*</tt>'')
309 may optionally contain one ``<tt>&amp;</tt>'', which is usually used when
310 some text should be added to the equation.
311 <pre>
312 \begin{System}[&lt;label&gt;]
313 ... = ... [&amp; ...] \\
314 ... = ... + \\*
315 + ... [&amp; ...] \\
316 ... = ... [&amp; ...]
317 \end{System}
318 </pre>
319 </p>
320
321 <p>
322 A *-form which does not generate any number is also provided.
323 <pre>
324 \begin{System*}[&lt;disregarded-label&gt;]
325 ... = ... [&amp; ...] \\
326 ... = ... + \\*
327 + ... [&amp; ...] \\
328 ... = ... [&amp; ...]
329 \end{System*}
330 </pre>
331 </p>
332
333 <hr /><br />
334 <!------------------------------------------------------------------------>
335
336 <h3>
337 <a name="SECTION03d">The <tt>EqSystem</tt> environment</a>
338 </h3>
339
340 <p>
341 The ``<tt>EqSystem</tt>'' environment is used for grouping a set of equations
342 together inside a left brace, each with its own equation number.
343 </p>
344
345 <p>
346 Again there is an optional argument to indicate a label and each equation is
347 separated by a ``<tt>\\</tt>'' or ``<tt>\\*</tt>'' command.
348 </p>
349
350 <p>
351 The rows may optionally contain one ``<tt>&amp;</tt>'', which is usually used
352 when some text should be added to the equation.
353 <pre>
354 \begin{EqSystem}[&lt;label&gt;]
355 ... = ... [&amp; ...] \\ % (1.1)
356 ... = ... + \\* %
357 + ... [&amp; ...] \\ % (1.2)
358 ... = ... [&amp; ...] % (1.3)
359 \end{EqSystem}
360 </pre>
361 </p>
362
363 <p>
364 A *-form is also provided: it differs in that each equation is numbered with
365 the same number but with a lowercase letter added, i.e. like (1.1a), (1.1b),
366 etc. instead of (1.1), (1.2) and so on.
367 <pre>
368 \begin{EqSystem*}[&lt;label&gt;]
369 ... = ... [&amp; ...] \\ % (1.5a)
370 ... = ... + \\* %
371 + ... [&amp; ...] \\ % (1.5b)
372 ... = ... [&amp; ...] % (1.5c)
373 \end{EqSystem*}
374 </pre>
375 In both cases, if the optional argument is present, each equation can be
376 referenced by <tt>\ref{&lt;label&gt;:a}</tt>,
377 <tt>\ref{&lt;label&gt;:b}</tt>, ..., where <tt>&lt;label&gt;</tt>,
378 stands for the string used as optional argument.
379 In the case of the *-form, a reference of the kind
380 <tt>\ref{&lt;label&gt;}</tt> will print the equation number without
381 any letter, thus referring to the system as a whole, whereas such a
382 reference is meaningless (and indeed does not exists) when dealing with
383 the non *-form.
384 </p>
385
386 <hr /><br />
387 <!------------------------------------------------------------------------>
388
389 <h2>
390 <a name="SECTION04">Math-mode commands</a>
391 </h2>
392
393 <p>
394 In addition to the previously mentioned environments, the <tt>envmath</tt>
395 package defines also some of math-mode commands which considerably simplify
396 the use of adjustable-size parentheses.
397 </p>
398
399 <p>
400 The ``<tt>\(</tt>'', ``<tt>\[</tt>'', ``<tt>\{</tt>'',
401 ``<tt>\)</tt>'', ``<tt>\]</tt>'' and ``<tt>\}</tt>'' generates
402 the corresponding parenthesis but with a ``<tt>\left</tt>'' or
403 ``<tt>\right</tt>'' declaration (respectively) added, so they must come
404 in matched pairs or coupled with a ``<tt>\left.</tt>'' or
405 ``<tt>\rigtht.</tt>'' or another adjustable-size delimiter.
406 </p>
407
408 <hr /><br />
409 <!------------------------------------------------------------------------>
410
411 <address>
412 <i>F. Bosisio</i><br />
413 E-mail: <a href="mailto:[email protected]"><tt>[email protected]</tt></a>
414 </address>
415
416 <!------------------------------------------------------------------------>
417
418 </body>
419 </html>