The Basic tabular
The tabular environment takes a column specification — l, c, r for alignment, | for vertical rules — with & separating cells and \\ ending rows:
This works, and it’s how most people write their first table. It is also instantly recognizable as a draft: the boxed-in grid look with | and \hline everywhere is exactly what publishers’ style guides advise against.
The Professional Version: booktabs
The booktabs package encodes the typographic rules used by actual book and journal typesetters: three horizontal rules of varying weight, no vertical rules at all, and better spacing around each rule:
Same data, different table. The rules: \toprule and \bottomrule frame the table, \midrule separates the header — and that’s it. If you take one thing from this guide: delete the vertical bars. White space and alignment do the separating; the eye doesn’t need fences.
Grouped Headers: multicolumn and multirow
Real result tables usually need one more device: headers that span columns (for grouped conditions) and cells that span rows. \multicolumn{2}{c}{...} spans two columns; \cmidrule(lr){2-3} draws a partial rule under just that group; \multirow (from the package of the same name) spans rows:
This is the standard layout for “two conditions × two statistics” results — the pattern behind most tables in experimental papers.
Habits That Keep Tables Maintainable
Let the table float. Wraptabular in a table environment with \caption and \label so it’s numbered and referenceable with \ref. Fight the urge to force placement with [H] until the text is final — floats exist so LaTeX can avoid half-empty pages.
Numbers align right, text aligns left. Decimal-heavy columns read best right-aligned (or decimal-aligned with the siunitx package’s S column, the next step beyond this guide).
Wide table? Before shrinking the font, try tabular*, sideways placement with rotating, or simply cutting a column — a table too wide for the page usually contains a column readers don’t need.
Generate, don’t hand-edit. If the numbers come from an analysis pipeline, emit the table body from the script (pandas’ to_latex, for instance) and keep only the header and caption by hand. Hand-transcribed numbers are where table errors come from.
Iterate with the Preview Next to You
Tables are the most iterative part of LaTeX writing — column spec, compile, adjust, repeat. That loop is fastest when the PDF preview sits beside the source and recompiles in the cloud without a local toolchain. Build your table in the editor →Related Guides
- LaTeX Academic Writing Guide - The paper around the tables
- Common LaTeX Errors - Including the misplaced
&that breaks every first table - Article Template - A starting point with sensible table defaults
