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