Hypertext Help with LaTeX
Arrays

 \begin{array}[pos]{vvvv}
 column 1 entry &: column 2 entry ... & column n entry \\
 ...
 ...
 ...
 \end{array}

The array environment, like the tabular environment, produces a box consisting of a sequence of rows of vertically aligned columns. It can be used only within the math environment.

There is a single mandatory argument describing the number of columns and the alignment within each of them. Each of the v's in the argument specifies a column and may be a l, c, or r indicating that the column should be flush left, centered, or flush right, respectively. For more complex options, see the tabular environment which uses the same format.

The optional pos argument specifies the alignment of the array with its surrounding environment (recall that LaTeX treats boxes as one, albeit large letter). The options are

The default is to align on the center of the array.

Column entries must be separated by an &. Column entries may include other LaTeX commands, even other arrays. Each row of the array must be terminated with the string \\. Note that there is no & after the last item in a row and no \\ after the last row. (An exception is if an \hline is used to place a line at the bottom; it follows a \\.)

Each item in the array is treated as if it were surrounded by braces. Thus, a declaration within an array item is local to that item, i.e., it is ended by an & or \\.

Horizontal and vertical lines in the array are produced with


See also Back to the Table of Contents
Revised: Sheldon Green, 31 May 1995.