Next: Figures Up: Common LaTeX Operations Previous: Footnotes   Contents

## Tables

Table are something that we all use in our documents. LaTeX enables you to create high-quality tables through the table and tabular environments. Using these environments, you can easily produce very well-structured and readable tables of information. The basic syntax for creating a table is as follows:

\begin{table}[where]
\caption{Table caption}
\centering
\begin{tabular}[pos]{cols}
column 1 & column 2 ... & column k \\
...
\end{tabular}
\end{table}


Where LaTeX places a table is very important. For example, if you have a large table in your document, you would rather see it on a single page, rather than broken up across pages. In the LaTeX literature, you will see the term "float'" or "floating object" to refer to this idea. This describes the situation where a table or figure can not fit on its current page, and is placed on a separate so-called floating page. LaTeX enables control over the placement of tables through the where parameter. The where parameter defines where the table is displayed on the page. A value of b places the table at the bottom of the page, h places the table here, t at the top of the page, and p on a separate float page containing no text, only floats. The concept of floating objects also applied to figures and footnotes.

You use the tabular environment to construct the table. The pos and cols parameters control how the table is formatted. The pos parameter controls the vertical position of the whole tabular environment. The values are either t (align with top row) or b (align with bottom row). The cols parameter controls the column formatting; l = format text left, r = format text right, c = format text center. The p{wd} parameter controls the size of a column and makes columns with multi lines.

Next: Figures Up: Common LaTeX Operations Previous: Footnotes   Contents
Kevin O'Malley 2004-03-05