Writing a paper
Tables
Build tables with tabular, make them look professional with booktabs, merge cells and fit wide tables.
Open as a project 6 min read
A basic table
In tabular, the column spec says how each column is aligned (l, c, r); & separates cells and \\ ends a row. Put it in a table environment for a caption and a label. The Table button in the editor builds one for you.
\begin{table}[t]
\centering
\caption{Results on the test set.}
\label{tab:results}
\begin{tabular}{lcc}
\toprule
Method & Accuracy & Time (s) \\
\midrule
Baseline & 0.81 & 12 \\
Ours & \textbf{0.93} & 9 \\
\bottomrule
\end{tabular}
\end{table}Professional rules with booktabs
Load booktabs and use \toprule, \midrule and \bottomrule instead of \hline. Avoid vertical lines — journals prefer the clean look.
Merged cells and wide tables
\multicolumn{2}{c}{…} spans columns; \multirow (package multirow) spans rows. A table wider than the column can be scaled with \resizebox{\linewidth}{!}{…}, or placed across both columns with table* in two-column layouts.
\begin{tabular}{lcc}
\toprule
& \multicolumn{2}{c}{Noise level} \\
\cmidrule(lr){2-3}
Method & 5 dB & 10 dB \\
\midrule
Ours & 0.91 & 0.95 \\
\bottomrule
\end{tabular}Try it: the full example compiles as it is. Open as a project