81

I would like to have footnotes in tables, but the \footnote command does not work inside a table environment. Googling one finds that this is a frequently asked question, at least in the UK. That link contains a list of solutions to the problem, but since the author of the FAQ does not believe that this is good style, no comparison is made between the different methods.

I am sure that there are good typographical reasons why in most situations it is undesirable to have footnotes in tables (although I have never come across them), however I have recently felt the need to do just this in a paper I am currently writing.

Therefore I'd like to ask two questions:

  1. What are the arguments against footnotes in tables?

  2. If one really must go against the advice in 1., which method (whether considered in the FAQ above or not) would you recommend?

Thanks in advance.

Added

In response to ShreevatsaR's comment: I do not much care for where the text of the footnote appears. I do however insist on the footnote marks being attached to the relevant entries in the table, so that I can avoid having to reference "the second entry in the eighth line of the table", etc...

4
  • 12
    The author of the FAQ entry distinguishes between (1) table notes, where the "footnote text" appears at the bottom of the table, and (2) "real" footnotes, where it appears at the bottom of the page outside the table. The author expresses his preference for the former; I also feel it makes sense to attach the footnote text to the table itself. This can be achieved by using either threeparttable or ctable. If you really want footnotes at the bottom of the page, outside the table, I'd just use tabularx, if only because it looks like minimal effort among the options. Aug 12, 2010 at 1:52
  • 3
    @ShreevatsaR: I think your comment qualifies as an answer...
    – Vivi
    Aug 12, 2010 at 9:42
  • For the record, writing philological notes on Chinese prosody, it has been very useful to me to be able to place footnotes (real footnotes, in ShreevatsaR's parlance) on individual Chinese characters or their monosyllabic transcriptions, each of which appears in a single table cell. There is no clearer or more easily examined way that I can find. May 3, 2011 at 0:32
  • observation: the question is phrased in terms of "tables", which are floats. it is not really useful even to try to set footnotes at the bottom of the page where a float happens to appear. however, most of the answers seem to relate to footnotes in tabulars (or -alike); whether one likes it or not (i don't) footnotes in tabulars are do-able. the faq offers options, iirc (as well as suggesting means of creating table notes. Nov 18, 2011 at 11:18

9 Answers 9

28

I had this kind of problem about 10 years ago, and no package provided any trick at this time. My solution was the following. I managed \footnotemarks and \footnotetexts separately. Semantically it is not really satisfactory, but it works quite well. The only problem may be that the table could be placed in another page than the \footnotetext :-(

footnotes in hostile environments: compilation result

\section{Footnotes in hostile environments}



\begin{table}[h] 
\begin{center}
\begin{tabular}{c|c|c}
O & X\protect\footnotemark & O \\
\hline
X & O\protect\footnotemark & X \\
\hline
X & O & O
\end{tabular}
\end{center}
\caption{Victory for Gilles\protect\footnotemark}
\end{table}
\addtocounter{footnote}{-2}
\footnotetext{X}
\addtocounter{footnote}{1}
\footnotetext{O}
\addtocounter{footnote}{1}
\footnotetext{happy birthday Gilles ;-)}

bla\raisebox{0.8ex}{\addtocounter{footnote}{1}\scriptsize\thefootnote}\footnotetext{forced test}blabla\footnote{footnote test}

and now, more difficult: two footnotes in a \fbox{hostile\footnotemark environment\footnotemark}~... 
\addtocounter{footnote}{-1}
\footnotetext{or very hostile}
\addtocounter{footnote}{1}
\footnotetext{area}
3
  • 3
    When hyperref is used, the hyperlinks unfortunately will not point to the right footnotes.
    – Stephen
    Nov 18, 2011 at 18:56
  • Very pragmatic solution!
    – Benny Code
    Feb 8, 2013 at 11:52
  • @Stephen I used the tablefootnote package to get around this in the solution: tex.stackexchange.com/a/35328/200521
    – Alfie
    Apr 26, 2020 at 7:54
30

You could use the tablefootnote package and \tablefootnote{...} inside the table:

\documentclass{article}
\usepackage{hyperref}
\usepackage{tablefootnote}
\begin{document}
\begin{table}
\centering
\begin{tabular}{ c  c }
Test1\tablefootnote{Footnote 1} & Test2\tablefootnote{Footnote 2} \\ 
\end{tabular}
\caption{This is a table.\label{FirstTable}}
\end{table}

A newpage:

\newpage

and a second page, so that you can see that the hyperlinks really work.

\end{document}
3
  • 1
    If rotating package is used: tablefootnote should be after rotating. Mar 7, 2017 at 14:34
  • 2
    Note: If you use \tablefootnote not only in a tabular but a table the footnote can be placed on a different page than the table. Apr 26, 2017 at 6:02
  • 2
    ...which is not a good thing most of the time. they not only "can" but "are" placed there.
    – ivo Welch
    May 22, 2017 at 17:22
20

With the threeparttables you can add table notes. Example of threeparttable LaTeX package

MWE

\documentclass{article}
\usepackage{booktabs,caption,fixltx2e}
\usepackage[flushleft]{threeparttable}
\begin{document}

\begin{table}
  \begin{threeparttable}
    \caption{Sample ANOVA table}
     \begin{tabular}{lllll}
        \toprule
        Stubhead & \( df \) & \( f \) & \( \eta \) & \( p \) \\
        \midrule
                 &     \multicolumn{4}{c}{Spanning text}     \\
        Row 1    & 1        & 0.67    & 0.55       & 0.41    \\
        Row 2    & 2        & 0.02    & 0.01       & 0.39    \\
        Row 3    & 3        & 0.15    & 0.33       & 0.34    \\
        Row 4    & 4        & 1.00    & 0.76       & 0.54    \\
        \bottomrule
     \end{tabular}
    \begin{tablenotes}
      \small
      \item This is where authors provide additional information about
      the data, including whatever notes are needed.
    \end{tablenotes}
  \end{threeparttable}
\end{table}

\end{document}

(Stolen from this answer)

2
16

I have just been playing with this and thought my solution just might help somebody else at some point. I wanted the following:

  • table notes i.e. notes at the bottom of the tabular, within the table environment - not at the bottom of the page;

  • automatic numbering of notes within the list of notes;

  • automatic numbering of note markers within the table itself;

  • numbering with small letters, to avoid any confusion with the Arabic numerals used to number footnotes and in the table and text to track content;

  • note markers in the list of notes to be left aligned with text in the first column of the tabular.

My solution involves an unholy mixture of

  • threeparttablex with option referable: this manages the automatic numbering of the note markers, on the basis of labels inserted into the list of notes;

  • enumitem: to customise the list of notes.

This is a bit complex in terms of number of cooks responsible for the broth. To say that enumitem is used to 'customise' the list is a bit misleading. Essentially, my solution redefines it. More specifically, threeparttable provides tablenotes. threeparttablex redefines it and provides \tnotex{} and some other enhancements. enumitem is then used to redefine tablenotes again.

Caveat emptor...

Anyway, for what it is worth:

\documentclass{article}
\usepackage{enumitem,booktabs,cfr-lm}
\usepackage[referable]{threeparttablex}
\renewlist{tablenotes}{enumerate}{1}
\makeatletter
\setlist[tablenotes]{label=\tnote{\alph*},ref=\alph*,itemsep=\z@,topsep=\z@skip,partopsep=\z@skip,parsep=\z@,itemindent=\z@,labelindent=\tabcolsep,labelsep=.2em,leftmargin=*,align=left,before={\footnotesize}}
\makeatother

\begin{document}
\begin{table}
  \centering\tlstyle
  \begin{threeparttable}
    \begin{tabular}{lcccc}
      \toprule
      & \multicolumn{4}{c}{Great Value}\\
      \cmidrule(lr){2-5}
      Option    &   Robot 1 &    Robot 2    & Robot 3 & Total\\
      \midrule
      Develop Robot 1 brilliant eye\tnotex{tnote:robots-r1}
      & 5   & 78    & 54    & 56\\
      Develop Robot 2 extended ears\tnotex{tnote:robots-r2}
      & 24  & 87    & 42    & 23\\
      Develop Robot 3 brilliant eye\tnotex{tnote:robots-r3}
      & 0.5 & $\pi$ & 61    & $<19.3$\\
      \bottomrule
    \end{tabular}
    \begin{tablenotes}
      \item\label{tnote:robots-r1}That is, $360^\circ$ vision, as proposed by Noddy Norris.
      \item\label{tnote:robots-r2}As recommended by \emph{Robot Review}.
      \item\label{tnote:robots-r3}That is, X-Ray vision, as proposed by \emph{Mechanical Maniacs}.
    \end{tablenotes}
  \end{threeparttable}
  \caption{\label{tab:robots}Total values of Jim's technological options for robot projects he thinks possible.}
\end{table}
\end{document}

robot notes in tables

14

I think these two Q&A's ought to be merged; this answer (by dmckee) is my favourite:

This is a classic difficulty in LaTeX.

The problem is how to do layout with floats (figures and tables, an similar objects) and footnotes. In particular, it is hard to pick a place for a float with certainty that making room for the associated footnotes won't cause trouble. So the standard tabular and figure environments don't even try.

What can you do:

  1. Fake it. Just put a hardcoded vertical skip at the bottom of the caption and then write the footnote yourself (use \footnotesize for the size). You also have to manage the symbols or number yourself with \footnotemark. Simple, but not very attractive, and the footnote does not appear at the bottom of the page.
  2. Use the tabularx, longtable, threeparttable[x] (kudos to Joseph) or ctable which support this behavior.
  3. Manage it by hand. Use [h!] (or [H] with the float package) to control where the float will appear, and \footnotetext on the same page to put the footnote where you want it. Again, use \footnotemark to install the symbol. Fragile and requires hand-tooling every instance.
  4. The footnote package provides the savenote environment, which can be used to do this.
  5. Minipage it (code stolen outright, and read the discalimer about long caption texts in that case):
    \begin{figure}
      \begin{minipage}{\textwidth}
        ...
        \caption[Caption for LOF]%
          {Real caption\footnote{blah}}
      \end{minipage}
    \end{figure} 

Additional reference: https://texfaq.org/FAQ-footintab.

5

Imho, I don't see any specific reason not to put footnotes in a table; however, if the content of the footnotes can be explained in the caption of the table itself, I'd prefer to use the caption. I'm used to write in the caption a short explanation of what in the table is, rather than a short title.

I suggest you to use the ctable package, using the \tnote command. From the package documentation:

The ctable package lets you easily typeset captioned table and figure floats with optional footnotes.

At page 3 of the documentation the \tnote command is explained, and at page 4 you can see a clear example.

4

You can add table footnotes in talltblr or longtblr environments of the new LaTeX3 package tabularray.

\begin{document}

\begin{table}
  \centering
  \begin{talltblr}[
    caption = {A Simple Table},
    label = {talltblr:test},
    note{a} = {First Footnote.},
    note{b} = {Second Footnote.},
    remark{Note} = {Some Long Long Long Long Long Long Long Long Text.},
    remark{Source} = {Some Long Long Long Long Long Long Long Long Text.},    
  ]{XXXXX}
    \toprule
        Head  & A   & B                 & C                & D   \\
    \midrule
        Row 1 & 1   & 0.67\TblrNote{a}  & 0.55             & 0.41 \\
        Row 2 & 2   & 0.02              & 0.01             & 0.39 \\
        Row 3 & 3   & 0.15              & 0.33\TblrNote{b} & 0.34 \\
        Row 4 & 4   & 1.00              & 0.76             & 0.54 \\
    \bottomrule
  \end{talltblr}
\end{table}

\end{document}

enter image description here

2

The commands \savenotes and \spewnotes from the footnote package might help you.

1
2

The environment {NiceTabular} of nicematrix has its own built-in command \tabularnote and many possibilities of customization.

\documentclass{article}
\usepackage{nicematrix,enumitem,booktabs}

\begin{document}

\begin{table}[hb]
\setlength{\belowcaptionskip}{1ex}
\centering
\caption{Use of \texttt{\textbackslash tabularnote}\tabularnote{It's possible
    to put a note in the caption.}}
\label{t:tabularnote}
\begin{NiceTabular}{@{}llc@{}}[notes/bottomrule, 
   tabularnote = Some text before the notes.] 
\toprule
Last name & First name & Length of life \\
\midrule
Churchill & Wiston &  91\\
Nightingale\tabularnote{Considered as the first nurse of
history.}\tabularnote{Nicknamed ``the Lady with the Lamp''.} 
& Florence & 90 \\
Schoelcher & Victor & 89\tabularnote{The label of the note is overlapping.}\\
Touchet & Marie & 89 \\
Wallis & John & 87 \\
\bottomrule
\end{NiceTabular}
\end{table}

\end{document}

Output of the above code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .