GuidesFebruary 10, 202610 min read

The Complete Guide to LaTeX Tables (Without Losing Your Mind)

LaTeX tables are notoriously painful. This guide covers everything from basic tables to multi-row, multi-column, and styled tables with working code examples.

tablesformattingbooktabsmultirow

"Tables in LaTeX are absolutely terrible" is one of the most upvoted takes on r/LaTeX. And honestly? They have a point. The syntax is verbose, debugging is painful, and multirow/multicolumn interactions are a puzzle. But with the right approach, tables become manageable. Here's the definitive guide.

The Basic Table

Every LaTeX table has the same skeleton:

\begin{table}[htbp]
    \centering
    \caption{My Table Title}
    \label{tab:results}
    \begin{tabular}{lcc}
        \toprule
        Model & Accuracy & F1 Score \\
        \midrule
        Baseline & 0.82 & 0.79 \\
        Our Method & \textbf{0.91} & \textbf{0.88} \\
        \bottomrule
    \end{tabular}
\end{table}

Always use the booktabs package (\toprule, \midrule, \bottomrule) instead of \hline. It looks dramatically better.

Column Alignment

The {lcc} argument defines columns:

SpecifierMeaning
lLeft-aligned
cCentered
rRight-aligned
p{3cm}Paragraph column with fixed width
|Vertical line (avoid in academic papers)

Multi-Row and Multi-Column

This is where most people give up. Here's the pattern:

\usepackage{multirow}

\begin{tabular}{lccc}
    \toprule
    & \multicolumn{2}{c}{Metrics} & \\
    \cmidrule(lr){2-3}
    Model & Accuracy & F1 & Time (s) \\
    \midrule
    \multirow{2}{*}{CNN}
        & 0.85 & 0.82 & 12.3 \\
        & 0.86 & 0.83 & 12.1 \\
    \midrule
    Transformer & 0.91 & 0.88 & 45.2 \\
    \bottomrule
\end{tabular}

Key rules:

  • \multicolumn{2}{c}{Header} — span 2 columns, centered
  • \multirow{2}{*}{Label} — span 2 rows, auto-width
  • \cmidrule(lr){2-3} — partial horizontal rule under columns 2–3

Long Tables That Span Pages

For tables longer than one page, use longtable:

\usepackage{longtable}

\begin{longtable}{lcc}
    \caption{Results Across All Experiments} \\
    \toprule
    Experiment & Score & p-value \\
    \midrule
    \endfirsthead

    \multicolumn{3}{c}{\textit{Continued from previous page}} \\
    \toprule
    Experiment & Score & p-value \\
    \midrule
    \endhead

    \bottomrule
    \endfoot

    Exp 1 & 0.85 & 0.001 \\
    Exp 2 & 0.87 & 0.003 \\
    % ... many more rows
\end{longtable}

The Easy Way: Use a Visual Editor

Honestly, for complex tables, a visual editor saves hours. Our LaTeX Table Generator lets you:

  • Build tables visually with drag-and-drop
  • Merge cells with one click
  • Export to LaTeX, HTML, Markdown, or CSV
  • Style cells with colors and borders

Or import your data from a CSV file directly into LaTeX format.

Table Styling Tips for Academic Papers

  1. Never use vertical lines — use whitespace instead
  2. Use booktabs — always \toprule/\midrule/\bottomrule
  3. Bold the best results — standard in ML/NLP papers
  4. Keep it narrow — wide tables overflow margins. Use \resizebox{\textwidth}{!}{...} or reduce font size with \small
  5. Add notes below — use \parbox or the threeparttable package

For the complete tutorial with more examples, see our How to Create a Table in LaTeX guide.

Ready to try a better LaTeX editor? Bibby AI includes an AI table generator — describe your table in plain English and it writes the LaTeX code for you.

Try a LaTeX Editor Built for Researchers

AI-powered writing, smart citations, no compile timeouts. Join 5,000+ researchers using Bibby AI.

Start Writing Free
The Complete Guide to LaTeX Tables (Without Losing Your Mind) | Bibby AI Blog