Constructing Tables

To construct a table, surround the entries with a \begin{tabular}{justification} command and an \end{tabular} command. The justification should consist of l for left justification, c for centered justification, or r for right justification. Separate column entries by a &, and end each line with a $\backslash\backslash$. Use \hline to construct a horizontal line, and separate the l, c, and r's by a | wherever you want a vertical line. For example:

\begin{tabular}{|r|c|l|}
\hline
Right & Center & Left\\
\hline
alpha&beta&gamma\\
delta&epsilon&zeta\\
eta&theta&iota\\
\hline
\end{tabular}

produces

Right Center Left
alpha beta gamma
delta epsilon zeta
eta theta iota

Practice: Create your own document with a table with a mix of left, center, and right-justified columns.


2002-02-28