84

It seems as if footnotes would have only a problem with the table environment but in my minimal example non of those answers

seem to work for the tabular environment.

\documentclass{scrartcl}

\begin{document}
\begin{tabular}{l}
Content\footnote{Footnote}
\end{tabular}
\end{document}
  • 8
    what about the classic \footnotemark/\footnotetext approach? – clemens Apr 18 '13 at 18:45
60

another possibility is with the footnote package and \makesavenoteenv{tabular}:

\documentclass{scrartcl}
\usepackage{footnote}
\makesavenoteenv{tabular}
\begin{document}
\begin{tabular}{l}
Content\footnote{footnote text}
\end{tabular}
\end{document}

If one has both tabular-only environment and tabular inside table, it is possibile to load both \makesavenoteenv{tabular} and \makesavenoteenv{table} in the preamble, like this:

\documentclass{scrartcl}
\usepackage{footnote}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\begin{document}
\begin{table}
\begin{tabular}{l}
Content\footnote{footnote text}
\end{tabular}
\end{table}
\begin{tabular}{l}
Content\footnote{footnote text}
\end{tabular}
\end{document}

So to have a more general solution.

Also, a fairly comprehensive list of solutions can be found inside the documentation for the tablefootnotepackage, starting from page 3, section "Alternatives".

  • But this unfortunately works only if one has no table environment around it. – strpeter Apr 19 '13 at 8:43
  • 1
    ah! I thought the question was exactly to provide a solution for the case when there is only a tabular environment, not inside a table, as per your MWE. If your tabular is inside a table you can use the tablefootnote package, as per your first link – Nico Boni Apr 19 '13 at 8:49
  • Your first answer is completely right, but I am always interested in answers that can be generalized. – strpeter Apr 19 '13 at 8:52
  • I see it now... if you want a unified approach with the footnote package, just load both \makesavenoteenv{tabular} and \makesavenoteenv{table} and you're all set :) – Nico Boni Apr 19 '13 at 8:59
  • 1
    @jasikevicius23, I'd leave that to the footnote package documentation. However please feel free to edit the answer if you think it can be improved in any way. – Nico Boni Jun 3 '14 at 19:01
68

For some reason (my preferred choice) the tablefootnote package only works if you wrap the tabular in a table float. A way around is to use \footnotemark and \footnotetext:

\documentclass{scrartcl}

\begin{document}    
before

\begin{tabular}{l}
Content\footnotemark\\
\end{tabular}
\footnotetext{Footnote}

after
\end{document}

MWE outcome

  • 3
    I need to upvote this! Exactly what I commented, too ;) – clemens Apr 18 '13 at 18:55
  • @cgnieder: Thanks for appreciating my originality. :D I was typing up the answer when you posted your comment. – Count Zero Apr 18 '13 at 18:59
  • 3
    Didn't work for me, \footnotetext content was not rendered at all – Hennadii Madan Oct 12 '16 at 12:59
  • 1
    Placing multiple \footnotemark in the same table required manual numbering in the \footnotetext[number]{text} command in my case. – Hodossy Szabolcs May 25 '18 at 6:40
  • 3
    @HennadiiMadan: One has to put the \footnotetext outside the table environment. – strpeter Jul 3 '18 at 9:19
15

You can also use threeparttable package to insert footnotes in the tables.

\documentclass{article}
    \usepackage[flushleft]{threeparttable}
\begin{document}
\begin{table}[h]
\caption{Example of test session results}
\label{tab:test_results}
\centering
\begin{threeparttable}
  \begin{tabular}{|l|l|l|}
    \hline
    Mutants & CPU\tnote{1}     & Memory\tnote{2}    \\ \hline
    Mutant-1   & 23 & 15 \\ \hline
    Mutant-2   & 32 & 11 \\ \hline
  \end{tabular}
  \begin{tablenotes}
    \item[1] Measured in percentages.
    \item[2] Measured in kilobytes (KB).
  \end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
3

If you use bidiftnxtra (a part of bidi package), all combinations of table and tabular will work. Ofcourse, this only work if you are using xelatex but the approach can be ported to other packages too:

\documentclass{scrartcl}
\usepackage{bidi}
\usepackage{bidiftnxtra}
\begin{document}
\begin{tabular}{l}
Content\footnote{Footnote}
\end{tabular}

\begin{table}[h]
\centering
\begin{tabular}{l}
Content\footnote{Footnote}
\end{tabular}
\caption{This is a caption\footnote{Another footnote.}}
\end{table}
\end{document}
2

I particularly like @CountZero's answer, yet it may happen that your footnote mark is on a different page than your footnote text. In that case, you can move around the \footnotetext to solve that, but how do you become aware of it in the first place?

This code will issue a warning when that happens:

\documentclass{article}

% works with hyperref, too:
% \usepackage{hyperref}

% Footnotes in table with page-number check
\usepackage{refcount}
\newcommand{\myfootnotemark}{\footnotemark\label{fn:mark}}
\newcommand{\myfootnotetext}[1]{\footnotetext{#1\label{fn:text}%
        \edef\fnmark{\getpagerefnumber{fn:mark}}%
        \edef\fntext{\getpagerefnumber{fn:text}}%
        \ifx\fnmark\fntext\else\ClassWarning{}{footnote mark and text on different pages!}\fi}}

\begin{document}
    \begin{tabular}{l}
%       Table stuff \footnote{This does not work: the footnote is missing.}
        Table stuff \myfootnotemark
    \end{tabular}

% uncomment to see the warning:
% \pagebreak

\myfootnotetext{So we do this instead!}

\end{document}

It works only for a single \footnotemark/\footnotetext pair so far, but extension should not be too difficult and those who use this weird hack more than once in a document are hopefully apt enough to adapt my code accordingly :)

-1

I insert footnotes manually at the bottom of the table, which is pretty simple and requires no additional package:

\begin{table}
\caption{The Table.}
\centering
  \begin{tabular}{lrr}
   \hline
          & Variable A & Variable B \\
   \hline
      Item 1        & 234.5 & 678.9 \\
      Item 2~$^{1}$ & 432.1 & 876.5 \\
   \hline
   \multicolumn{3}{l}{$^{1}$\footnotesize{Here is a footnote.}} \\
  \end{tabular}
\end{table}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.