Table notes and footnotes in a LaTeX table (threeparttable)
Help centre › LaTeX › Tables · Packages: threeparttable, booktabs
Load \usepackage{threeparttable}, wrap the caption and tabular in \begin{threeparttable} … \end{threeparttable}, mark cells with \tnote{a}, and write the notes after the tabular in \begin{tablenotes} \item[a] … \end{tablenotes}. The notes are set under the table, exactly as wide as the table.
A complete example
A whole document: paste it into an empty project and compile it.
\documentclass{article}
\usepackage{threeparttable}
\usepackage{booktabs}
\begin{document}
\begin{table}[htbp]
\centering
\begin{threeparttable}
\caption{Baseline characteristics.}\label{tab:baseline}
\begin{tabular}{lrr}
\toprule
& Control & Treated \\
\midrule
Age (years)\tnote{a} & 54.2 & 53.8 \\
Women (\%) & 48 & 51 \\
BMI\tnote{b} & 27.1 & 26.9 \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\small
\item[a] Mean at enrollment.
\item[b] Body mass index, kg/m$^2$.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}Why \footnote does not work in a table
In a tabular inside a table float, \footnote prints the mark but loses the note text. Footnotes belong to pages, and a float may be moved to another page. Table notes belong to the table, so they are set under it; that is what threeparttable does, and what journals expect.
Layout options of tablenotes
\begin{tablenotes}[flushleft]: no hanging indent for the marks.\begin{tablenotes}[para]: all notes run on in one paragraph.\smallor\footnotesizeright after\begin{tablenotes}sets the notes in smaller type.- A general note without a mark:
\item[] \textit{Note:} Values are means. - The marks can be letters, numbers or symbols:
\tnote{*}with\item[*].
A simple note without a package
For one general note ("Source: …") under a table, a short paragraph after the tabular inside the table environment is enough. Put it in a minipage of the table's width if it should not run wider than the table.
\documentclass{article}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Response rates.}
\begin{tabular}{lr}
\hline
Wave & Rate (\%) \\
\hline
1 & 71 \\
2 & 64 \\
\hline
\end{tabular}
\smallskip
\footnotesize Source: the study's own survey records.
\end{table}
\end{document}Notes in a long table
threeparttable cannot wrap a longtable. The threeparttablex package provides ThreePartTable and TableNotes for it: the notes are defined before the table and printed with \insertTableNotes in the \endlastfoot part.
Common mistakes
- Putting
tablenotesoutsidethreeparttable: the environment is undefined there. - A
\tnotewithout a matching\item(or the reverse): nothing checks it; read the marks and the notes together. - Placing
\captionoutsidethreeparttablewhen the notes should line up with a caption of the table's width: put the caption inside, as in the example. - Using
\footnotein a table in a float and wondering where the text went.
In journal templates
- Most journal styles want table notes under the table marked with superscript letters, not page footnotes, which is what threeparttable gives. Some classes (elsarticle, revtex) have their own table-note conventions or commands; when the template shows one, use it.
Errors you may meet
- LaTeX Error: Environment <name> undefined\begin{…} names an environment no loaded package defines: load the package (amsmath for align), fix the spelling, or define it with \newtheorem.
- Undefined control sequence.LaTeX met a command it does not know: usually a typo, or a command whose package is not loaded. The log's l. line ends with the culprit.
In Manulyx
Insert → Table puts a table environment in place, and pasting a range copied from a spreadsheet (two or more rows and columns) goes in as a LaTeX table, with booktabs rules when the paper loads booktabs and \hline otherwise; a notice offers the plain text back.
Write in Manulyx for free · Journal templates
Related
- Professional-looking tables in LaTeX with booktabsMake LaTeX tables look typeset: booktabs rules (\toprule, \midrule, \bottomrule, \cmidrule), no vertical lines, and aligned numbers.
- A table across several pages in LaTeX (longtable)Break a long LaTeX table across pages with longtable, repeating the header on each page and adding a "continued" note, with booktabs rules.
- Merge cells in a LaTeX table: multirow and multicolumnMerge table cells across columns with \multicolumn and across rows with \multirow (multirow package), with booktabs rules and \cline/\cmidrule.
- A landscape table or page in LaTeXTurn a wide table sideways: pdflscape's landscape environment rotates whole pages (upright on screen); rotating's sidewaystable rotates a float.
- Make a LaTeX table fit the page widthFit a too-wide LaTeX table: tabularx X columns, p{} columns that wrap, a smaller font, less column spacing, and why \resizebox is a last resort.
The examples on this page were compiled with pdfLaTeX to check that they work as shown. LaTeX quick reference · LaTeX errors explained