I wanted to make a footnote
in a table. So I used tablefootnote
http://www.ctan.org/tex-archive/macros/latex/contrib/tablefootnote to do that as was suggested by google search since normal \footnote
do not work inside tables.
However, it seems the actual footnote sometimes shows up at the bottom of the previous page, and sometimes it shows up at the bottom of the next page.
I'd like the footnote to show on the same page.
Example 1, footnote shows up at bottom of previous page
\documentclass[12pt,notitlepage]{article}%
\usepackage{float}%
\usepackage{lipsum}
\usepackage{tablefootnote}
\begin{document}
\section{A}
\lipsum[4-10]
\section{B}
\begin{table}[htp]
\begin{center}
\begin{tabular}{|l|l|l|}\hline
$e$ & 0.97774 & 0.9935 \\ \hline
semimajor axis $a$ & 300000 & 262413 \\ \hline
true anamoly $f$ & 163.76 & 176.08 \\\hline
semimajor axis $a$ & 300000 & 262413 \\ \hline
true anamoly $f$ & 163.76 & 176.08 \\\hline
$r_p$ & 6678 & 1689
\tablefootnote{spacecraft will hit earth on way back since $r_p<r_{earth}$} \\\hline
\end{tabular}
\caption{Summary table for non-tangential per and post flyby the moon}
\label{tab:part_3_1_summary}
\end{center}
\end{table}
\end{document}
Example 2, footnote shows up on next page
\documentclass[12pt,notitlepage]{article}%
\usepackage{float}%
\usepackage{lipsum}
\usepackage{tablefootnote}
\begin{document}
\section{A}
\lipsum[4-6]
\section{B}
\begin{table}[htp]
\begin{center}
\begin{tabular}{|l|l|l|}\hline
semimajor axis $a$ & 300000 & 262413 \\ \hline
true anamoly $f$ & 163.76 & 176.08 \\\hline
$r_p$ & 6678 & 1689
\tablefootnote{spacecraft will hit earth on way back since $r_p<r_{earth}$} \\\hline
\end{tabular}
\caption{Summary table for non-tangential per and post flyby the moon}
\label{tab:part_3_1_summary}
\end{center}
\end{table}
\section{C}
\lipsum[4-10]
\end{document}
Miktex 2.9, latest.
Best Answer
Footnotes at the bottom of the page to a float will produce this undesired effect since the float might float away to another page. In case footnotes to tables (or floats, in general) are really required, it's better to use footnotes immediately after the float which can be obtained using, for example the
threeparttable
orctable
packages.An exampe using
threeparttable
:And the same table using
ctable
:Both packages offer some customization possibilities for the note formatting; please refer to the documentation of the packages