11

Is there a way to put a footnote in longtable caption?

\documentclass{book}
\usepackage{longtable}

\begin{document}

  \begin{longtable}{|c|}
    \caption{Table 
    %    \footnote{Footnote}    % Uncommenting results in error.
    } \\   
    \hline      
    Something \\
    \hline      
  \end{longtable}

\end{document}
David Carlisle
  • 757,742
Ivan Bychkov
  • 731
  • 1
  • 6
  • 13

2 Answers2

12

From longtable documentation:

Note however that \footnote will not work in the ‘head’ or ‘foot’ sections of the table. In order to put a footnote in those sections (e.g., inside a caption), use \footnotemark at that point, and \footnotetext anywhere in the table body that will fall on the same page.

Hence the MWE will be

\documentclass{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|c|}
    \caption[Table is very long]{Table is very long\protect\footnotemark}\\ %<------footnote mark here
    \hline
    Something \footnotetext{This is a caption} \\ %<------footnote text here
    \hline
\end{longtable}
\end{document}

Edit: Added short caption as per Gonzalo's suggestion. With short caption added, \protect won't be necessary.

enter image description here

3

You can keep the normal \footnote command by using the footnotehyper package:

\documentclass{book}
\usepackage{longtable}
\usepackage{footnotehyper}
\makesavenoteenv{longtable}

\begin{document}

\begin{longtable}{|c|}
  \caption[tab]{Table\footnote{Footnote}} \\   
  \hline
  Something \\
  \hline
\end{longtable}

\end{document}
Andrew Dunning
  • 1,714
  • 13
  • 21