為什麼 \usepackage{tablefootnote} 將腳註放在隨機位置

為什麼 \usepackage{tablefootnote} 將腳註放在隨機位置

我想footnote在桌子上做一個。所以我用了tablefootnote http://www.ctan.org/tex-archive/macros/latex/contrib/tablefootnote按照谷歌搜尋的建議執行此操作,因為正常情況\footnote不適用於表內。

然而,實際的腳註有時會出現在上一頁的底部,有時會出現在下一頁的底部。

我希望腳註顯示在同一頁上。

範例 1,註腳顯示在上一頁底部

\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}

數學圖形

範例 2,註腳顯示在下一頁

\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,最新的。

答案1

頁面底部的浮動腳註會產生這種不良效果,因為浮動可能會飄到另一頁。如果確實需要表格(或一般情況下的浮動)的腳註,最好在浮動之後立即使用腳註,可以使用例如threeparttable或者ctable包。

使用的範例threeparttable

\documentclass[12pt,notitlepage]{article}%
\usepackage{lipsum}
\usepackage{threeparttable}

\begin{document}

\section{A}
\lipsum[4-6]
\section{B}
\begin{table}
\centering
\begin{threeparttable}
\caption{Summary table for non-tangential per and post flyby the moon}
\label{tab:part_3_1_summary}
\begin{tabular}{|l|l|l|}\hline
semimajor axis $a$       & 300000  & 262413    \\ \hline
true anamoly $f$         & 163.76   & 176.08   \\\hline
$r_p$                    & 6678 & 1689\tnote{1} \\ \hline
\end{tabular}
\begin{tablenotes}
\item[1] spacecraft will hit earth on way back since $r_p<r_{earth}$
\end{tablenotes}
\end{threeparttable}
\end{table}
\section{C}
\lipsum[4-10]

\end{document}

在此輸入影像描述

並使用同一張表ctable

\documentclass[12pt,notitlepage]{article}%
\usepackage{lipsum}
\usepackage{ctable}

\begin{document}

\section{A}
\lipsum[4-6]
\section{B}
\ctable[
caption = Summary table for non-tangential per and post flyby the moon.
label={tab:part_3_1_summary}
]{|l|l|l|}
{\tnote[1]{spacecraft will hit earth on way back since $r_p<r_{earth}$}}
{
\hline
semimajor axis $a$       & 300000  & 262413  \\ \hline
true anamoly $f$         & 163.76   & 176.08   \\ \hline
$r_p$ & 6678 & 1689 \\ 
\hline
}
\section{C}
\lipsum[4-10]

\end{document}

在此輸入影像描述

這兩個軟體包都提供了一些註釋格式的自訂可能性;請參閱軟體包的文檔

答案2

我遵循了以下建議貢薩洛·梅迪納的答案使用threeparttable,但我在將標題正確居中於表格上方時遇到了一些麻煩。它固定在表格的左邊緣,但由於標題很長,它超出了表格的左邊緣。

我的解決方案是移動\begin{threeparttable}到標題下方、表格環境之前。這樣,標題就會在浮動中居中並使用其完整寬度(這可能是也可能不是您想要的)。如預期的那樣,腳註位於表格下方,並且僅延伸表格的整個寬度。

\documentclass[12pt,notitlepage]{article}%
\usepackage{threeparttable}

\begin{document}

\begin{table}
\centering
\caption{Here's my long caption text that I want centered on the page.
\label{tab:simulation_parameters}}
\begin{threeparttable}
\begin{tabular}{lp{1.7in}}
\hline
Material & Index of refraction\\ 
\hline
silicon & 3.47772\\
silicon dioxide & 1.54\\
silicon nitride & 2.217\\
HSQ\tnote{a} & 1.39\\ \hline
\end{tabular}
\begin{tablenotes}
\item[a] Here's my footnote.
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}

在此輸入影像描述

相關內容