An introduction to tabular

To create a table in LaTeX, requires the use of an environment such as tabular. While there are better environments to create tables, tabular is considered the basic table environment. This article will focus on the tabular environment with an explanation for how it works and some examples to start using it.

The environment tabular has an optional argument for position and an argument that specifies the columns in the table. The accepted values for columns follow:

ccentered
lleft justified
rright justified
p[]paragraph top aligned
m[]paragraph middle aligned
b[]paragraph bottom aligned
|vertical line
||double vertical line

\begin{tabular}{lcr} item1 && item2 && item3 \\ item4 && item5 && item6 \\ item7 && item8 && item9 \\ \end{tabular}

To create a table with a border and some seperators, one would use the | character for vertical lines and \hline for horizontal lines. A simple example follows:

\begin{tabular}{|l|c|r|} \hline item1 && item2 && item3 \\ \hline item4 && item5 && item6 \\ item7 && item8 && item9 \\ \hline \end{tabular}

This is just a little insight into the art of creating tables in LaTeX. More articles will follow about the subject, the first will further explore the tabular environment. The latter will explore other, more powerful environments.