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
|
<html>
<head><title>Help On LaTeX arrays</title></head>
<body bgcolor="#ffffff" text="#000000" link="#000099" vlink="#cc0000" alink="#cc0000">
<h1><font size="-2">Hypertext Help with LaTeX</font><br><font color="#cc0000">Arrays</font></h1>
<p>
<p><pre>
\begin{array}[pos]{vvvv}
column 1 entry &: column 2 entry ... & column n entry \\
...
...
...
\end{array}
</pre><p>
The array environment, like the <a href="ltx-68.html">tabular</a>
environment, produces a <a href="ltx-143.html">box</a>
consisting of a sequence of rows of
vertically aligned columns. It can be used only within the
<a href="ltx-115.html">math environment</a>.
<p>
There is a single mandatory argument describing the number of columns and
the alignment within each of them.
Each of the <tt>v</tt>'s in the argument specifies a column and may be
a <tt>l</tt>, <tt>c</tt>, or <tt>r</tt> indicating that the column should
be flush left, centered, or flush right, respectively. For more
complex options, see the <a href="ltx-68.html">tabular environment</a>
which uses the same format.
<p>
The optional <tt>pos</tt> argument specifies the alignment of the array with
its surrounding environment (recall that LaTeX treats boxes as one,
albeit large letter). The options are
<ul>
<li><tt>t</tt> - align on top row
<li><tt>b</tt> - align on bottom row
</ul>
The default is to align on the center of the array.
<p>
Column entries must be separated by an <tt>&</tt>. Column entries
may include other LaTeX commands, even other arrays.
Each row of the array must be terminated with
the string <a href="ltx-181.html"><tt>\\</tt></a>.
Note that there is no <tt>&</tt> after the last
item in a row and no <tt>\\</tt> after the last row. (An exception is if
an <tt><a href="ltx-239.html">\hline</a></tt> is used to place a line
at the bottom; it follows a <tt>\\</tt>.)
<p>
Each item in the array is treated as if it were surrounded by braces. Thus,
a <a href="declarations.html">declaration</a> within an array item is
local to that item, i.e., it is ended by an <tt>&</tt> or <tt>\\</tt>.
<p>
Horizontal and vertical lines in the array are produced with
<ul>
<li><a href="ltx-214.html"><tt>\cline</tt></a>
<li><a href="ltx-239.html"><tt>\hline</tt></a>
<li><a href="ltx-346.html"><tt>\vline</tt></a>
</ul>
<hr>
See also
<ul>
<li><a href="ltx-68.html">tabular environment</a><br>
<li><a href="ltx-115.html">math environment</a>
</ul>
Back to the <a href="ltx-2.html">Table of Contents</a>
<hr>
<address>
Revised: Sheldon Green, 31 May 1995.
</address>
</body>
</html>
|