\begin{tabular}{|c|c|c|} \hline A & B & C\\ \hline\hline foo & bar & baz\\ \hline zab & rab & oof\\ \hline \end{tabular}(As usual, try this out here.) There's no reason at all for each cell to be boxed that way. I rather suspect this comes from looking at too many ugly HTML tables one gets by default. Fortunately, the solution is very simple. Use the booktabs package. I

*strongly*encourage anyone writing a table to read the documentation (pdf). The use is very simple.

\begin{tabular}{ccc} \toprule A & B & C\\ \midrule foo & bar & baz\\ zab & rab & oof\\ \bottomrule \end{tabular}(You'll need to select the booktabs package in the previewer above to try this out.) Notice that in addition to looking better, this actually requires less work to produce! There is a \cmidrule that works similar to \cline, but is more flexible and can actually be used in adjacent columns; however, I don't often find a use for any rules but the three above. Finally, the author of booktabs gives 2 guidelines for making publication quality tables. 1) Do not use vertical rules; and 2) Do not use double rules. These are excellent guidelines. Follow them.

## No comments:

## Post a Comment