When I do \footnote{}
for a value in a table, the footnote doesn't show up. How do I get it to show up? Also, is it possible to get it to show up at the bottom of the table rather than the bottom of the page?
This question is related to
latex
\begin{figure}[H]
\centering
{\includegraphics[width=1.0\textwidth]{image}}
\caption{captiontext\protect\footnotemark}
\label{fig:}
\end{figure}
\footnotetext{Footnotetext}
In tables I have used \footnotetext.
A maybe not-so-elegant method, which I think is just a variation of what some other people have said, is to just hardcode it. Many journals have a template that in some way allows for table footnotes, so I try to keep things pretty basic. Although, there really are some incredible packages already out there, and I think this thread does a good job of pointing that out.
\documentclass{article}
\begin{document}
\begin{table}[!th]
\renewcommand{\arraystretch}{1.3} % adds row cushion
\caption{Data, level$^a$, and sources$^b$}
\vspace{4mm}
\centering
\begin{tabular}{|l|l|c|c|}
\hline
\textbf{Data} & \textbf{Description} & \textbf{Level} & \textbf{Source} \\
\hline
\hline
Data1 & Description. . . . . . . . . . . . . . . . . . & cnty & USGS \\
\hline
Data2 & Description. . . . . . . . . . . . . . . . . . & MSA & USGS \\
\hline
Data3 & Description. . . . . . . . . . . . . . . . . . & cnty & Census \\
\hline
\end{tabular}
\end{table}
\footnotesize{$^a$ The smallest spatial unit is county, $^b$ more details in appendix A}\\
\end{document}
The best way to do it without any headache is to use the
\tablefootnote
command from the tablefootnote
package. Add the following to your preamble:
\usepackage{tablefootnote}
It just works without the need of additional tricks.
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:
\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.tabularx
, longtable
, threeparttable[x]
(kudos to Joseph) or ctable
which support this behavior.[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.footnotes
package provides the savenote
environment, which can be used to do this.\begin{figure} \begin{minipage}{\textwidth} ... \caption[Caption for LOF]% {Real caption\footnote{blah}} \end{minipage} \end{figure}
Additional reference: TeX FAQ item Footnotes in tables.
If your table is already working with tabular
, then easiest is to switch it to longtable
, remembering to add
\usepackage{longtable}
For example:
\begin{longtable}{ll}
2014--2015 & Something cool\footnote{first footnote} \\
2016-- & Something cooler\footnote{second footnote}
\end{longtable}
Probably the best solution is to look at the threeparttable/threeparttablex packages.
What @dmckee said.
It's not difficult to write your own bespoke footnote-queuing code. What you need to do is:
\footnote
to add a footnote macro to your queue;If this is interesting, I show some code that does this.
Use minipage environment. Here is an example:
\begin{minipage}{6cm}
\begin{tabular}{|l|c|c|}
\hline
A & 1 & 2 \footnote{This is a footnote.} \\
\hline
B & 2 & 1 \\
\hline
C & 3 & 3 \\
\hline
\end{tabular}
\end{minipage}
Source: Stackoverflow.com