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.

The example here uses the booktabs package, which produces prettier tables than the default Latex ones.

begin{table}[ht]
centering
begin{threeparttable}
begin{tabular}{ll}
toprule
animal & number of legs
midrule
cat & 4
dog & 4
duck & 2
chimp & 2tnote{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}

Leave a comment

What do you have to say about this?

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: