### The design of tables

In recent years, several authors have argued that the examples, set out by Lamport in his LaTeX manual, have cramped authors’ style and have led to extremely poor table design. It is in fact difficult even to work out what many of the examples in Lamport’s book “mean”.

The criticism focuses on the excessive use of rules (both horizontal and vertical) and on the poor vertical spacing that Lamport’s macros offer.

The problem of vertical spacing is plain for all to see, and is addressed in several packages — see “spacing of lines in tables”.

The argument about rules is presented in the excellent essay that prefaces the documentation of Simon Fear’s booktabs package, which (of course) implements Fear’s scheme for ‘comfortable’ rules. (The same rule commands are implemented in the memoir class.)

Lamport’s LaTeX was also inflexibly wrong in “insisting” that captions should come at the bottom of a table. Since a table may extend over several pages, traditional typography places the caption at the top of a table float. The `\``caption` command will get its position wrong (by `10pt`) if you simply write:

>     \begin{table}
>       \caption{Example table}
>       \begin{tabular}{...}
>         ...
>       \end{tabular}
>     \end{table}

The topcapt package solves this problem:

>     \usepackage{topcaption}
>     ...
>     \begin{table}
>       \topcaption{Example table}
>       \begin{tabular}{...}
>         ...
>       \end{tabular}
>     \end{table}

The KOMA-script classes provide a similar command `\``captionabove`; they also have a class option `tablecaptionabove` which arranges that `\``caption` means `\``captionabove`, in table environments. The caption (from the release of 23 January, 2004) may be loaded with an option that has the same effect:

>     \usepackage[tableposition=top]{caption}

Doing the job yourself is pretty easy: topcapt switches the values of the LaTeX2e parameters `\``abovecaptionskip` (default value `10pt`) and `\``belowcaptionskip` (default value `0pt`), so:

>     \begin{table}
>       \setlength{\abovecaptionskip}{0pt}
>       \setlength{\belowcaptionskip}{10pt}
>       \caption{Example table}
>       \begin{tabular}{...}
>         ...
>       \end{tabular}
>     \end{table}

does the job. (The package itself is very slightly more elaborate...)

`booktabs.sty`
  macros/latex/contrib/booktabs (gzipped tar, browse)
`KOMA script bundle`
  macros/latex/contrib/koma-script (gzipped tar, browse)
`memoir.cls`
  macros/latex/contrib/memoir (gzipped tar, browse)
`topcapt.sty`
  macros/latex/contrib/misc/topcapt.sty

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=destable