3

I was wondering if there was a way of creating a footnote within a table.

Right now I have:

\documentclass[12pt,letterpaper]{report}
\usepackage[masters,4committee,nonsequential]{cuthesis}
\usepackage{array}
\usepackage{graphicx}
\usepackage{cite}
%\usepackage{subfigure}
\usepackage{amsmath}
\usepackage[indent,bf]{caption}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{float}
%\restylefloat{table}
\usepackage{subcaption}
\usepackage{multirow}
\usepackage{amsfonts}
\usepackage[table]{xcolor}
\usepackage{color}
\usepackage{colortbl}
\usepackage{alltt}
\usepackage{url}
\usepackage{verbatim}
\usepackage{makecell}
\usepackage{placeins}
\usepackage{arydshln}

\begin{document}


    \begin{table}[ht]
    \centering
    \caption{Footnote within a table} 
    \begin{tabular}{ll}
      how to enter a footnote & this does not work \footnote{} \\
    \end{tabular}
    \end{table}

\end{document}

I have tried \usepackage{tablefootnote} and it doesn't seem to work (it actually seems to break something and not be able to compile).

Any help is appreciated!

Werner
  • 603,163
Sherine
  • 31

1 Answers1

7

There are two packages for footnotes in tables, but they do not aim at the same result:

  • threeparttable (extended by \threepartablex to long tables and footnotes referencing) puts footnotes at the bottom of the table. The numbering of the footnotes is independent of the numbering of “ general” footnotes.
  • tablefootnotes puts table footnotes at the bottom of the page. It uses the footnotes counter and is intended for the case when the \footnotemark … \footnotetext way doesn't work.

Here is an example of both:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[x11names]{xcolor}
\usepackage{fourier}
\usepackage{booktabs}
\usepackage{threeparttable, tablefootnote}

\begin{document}
Here is a footnote\footnote{This is a “normal” footnote.} in the main text.

\begin{table}[!h]
\centering
\begin{threeparttable}
\caption{Footnote within a table}
\begin{tabular}{ll}
\toprule
\addlinespace
  How to enter a footnote & this does work \tnote{a} \\
\addlinespace
\bottomrule
\end{tabular}
\begin{tablenotes}\footnotesize
\item [a] A cute little footnote
\end{tablenotes}
\end{threeparttable}
\end{table}

And now…
\begin{table}[!h]
\centering
\caption{Footnote within a table}
\begin{tabular}{ll}
\addlinespace
\toprule
\addlinespace
  How to enter a footnote & this also does work \tablefootnote{Another cute little footnote} \\
\addlinespace
\bottomrule
\end{tabular}
\end{table}

\end{document} 

enter image description here

Bernard
  • 271,350