# Footnotes in tables

Problem: you want to put a footnote in a table, but Latex does it all wrong.

Solution: use the threeparttable package.

The documentation is unhelpfully in the threeparttable.sty file, but don’t worry, it’s easy to use. There are many guides on the internet that tell you how to use this. Most tell you to put the caption at the top of the table, which is no use if you want your captions at the bottom. There is nothing to stop you putting your caption at the bottom, but bear in mind that the width of the caption will be the width of the table. However, there is a way round this.

The official CTAN documentation, although not specifying how to use the package, does have an incredibly useful tip: put the whole threeparttable environment in an ordinary table or table* environment. This means that you can put your caption under the table, outside the threeparttable environment, but inside the table environment, and you can also use the \centering command as you might normally do, so you don’t have to use the center environment.

## Example

The example here uses the booktabs package, which produces prettier tables than the default LaTeX tables. It also omits the lines between columns.

\documentclass[a4paper,12pt]{article}
\usepackage{threeparttable}
\usepackage{booktabs}

\begin{document}

\begin{table}[ht]
\centering
\begin{threeparttable}
\begin{tabular}{ll}
\toprule
animal & number of legs \\
\midrule
cat & 4 \\
dog & 4 \\
duck & 2 \\
chimp & 2\tnote{a} \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item[a]I think chimps are probably more comfortable walking on all fours, but the limbs nearest their heads look a lot like arms to me.
\end{tablenotes}
\end{threeparttable}
\caption{Number of legs various animals have}
\label{table:legs}
\end{table}

\end{document}


This site uses Akismet to reduce spam. Learn how your comment data is processed.