Footnotes in a table in LaTeX (threeparttable, tablenotes)
A \footnote in a tabular inside a table environment prints its mark, but the text never appears. For notes directly below the table, use the threeparttable package with \tnote and the tablenotes environment.
Preamble
The snippets on this page need these lines before \begin{document}:
\usepackage{booktabs}
\usepackage{threeparttable}Put notes below the table
The threeparttable environment holds the caption, the tabular and the notes, and makes caption and notes as wide as the table. \tnote{a} prints the raised mark in a cell, and \item[a] in tablenotes starts the matching note. You choose the marks yourself; nothing is numbered automatically.
\begin{table}
\centering
\begin{threeparttable}
\caption{Fruit prices}
\begin{tabular}{llr}
\toprule
Item & Origin & Price \\
\midrule
Apple\tnote{a} & Lake Constance & 0.50 \\
Banana & Ecuador & 0.25\tnote{b} \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item[a] From organic farming.
\item[b] Price per piece.
\end{tablenotes}
\end{threeparttable}
\end{table}Put the footnote at the bottom of the page
\footnotemark prints the mark in the cell and raises the footnote counter. \footnotetext{...} after the table environment prints the text for that number at the bottom of the page.
\begin{table}[h]
\centering
\begin{tabular}{lr}
\toprule
Item & Price \\
\midrule
Apple\footnotemark & 0.50 \\
Banana & 0.25 \\
\bottomrule
\end{tabular}
\caption{Fruit prices}
\end{table}
\footnotetext{From organic farming.}Footnotes in a tabular without a float
Inside a minipage, \footnote works in a tabular. The notes appear at the bottom of the minipage and are marked with letters.
\begin{minipage}{6cm}
\begin{tabular}{lr}
\toprule
Item & Price \\
\midrule
Apple\footnote{From organic farming.} & 0.50 \\
Banana & 0.25 \\
\bottomrule
\end{tabular}
\end{minipage}Footnotes in a longtable
In the body rows of a longtable, \footnote works as in normal text: the note goes to the bottom of the page that holds the row.
Complete document:
\documentclass{article}
\usepackage{longtable}
\usepackage{booktabs}
\begin{document}
\begin{longtable}{lr}
\toprule
Item & Price \\
\midrule
\endhead
Apple\footnote{From organic farming.} & 0.50 \\
Banana & 0.25 \\
\bottomrule
\end{longtable}
\end{document}Pitfalls
- LaTeX reports no error and no warning when the text of a
\footnotein atabularis lost. Check the PDF. - A
tableenvironment can move to another page, while\footnotetextprints its text on the page where the command stands. With\footnotemark, check that mark and text end up on the same page.
Compiled with pdfLaTeX from TeX Live 2023.
Related pages
- Package
threeparttable - Package
longtable - How-to Footnotes in LaTeX
- How-to Table caption and label in LaTeX
- How-to Create a table in LaTeX
- Package
booktabs