当我在表格中使用\footnote{}
命令时,脚注并不会显示出来。如何让它显示出来?而且,是否可能使脚注显示在表格底部而非页面底部?
当我在表格中使用\footnote{}
命令时,脚注并不会显示出来。如何让它显示出来?而且,是否可能使脚注显示在表格底部而非页面底部?
不费吹灰之力的最佳方法是使用\tablefootnote
命令,来自tablefootnote
软件包。将以下内容添加到您的导言部分:
\usepackage{tablefootnote}
它只需正常运作,无需额外的技巧。
这是LaTeX中经典的困难问题。
问题在于如何处理浮动体(如图表等对象)和脚注的布局。特别是,很难确定一个浮动体放置的位置,并保证为相应的脚注留出空间不会引起问题。因此,标准的tabular
和figure
环境甚至都没有尝试。
你可以做以下几种选择:
\footnotesize
来设置字体大小)。你还需要使用\footnotemark
自行管理符号或编号。简单,但不太有效,而且脚注不会出现在页面底部。tabularx
、longtable
、threeparttable[x]
(感谢Joseph)或ctable
等支持此行为的工具包。[h!]
(或带有float包的[H]
)来控制浮动体的位置,并在同一页上使用\footnotetext
将脚注放置在想要的位置。同样,使用\footnotemark
安装符号。这种方法容易出错,需要手工调整每个实例。footnote
包提供了savenote
环境,可用于此操作。\begin{figure} \begin{minipage}{\textwidth} ... \caption[LOF中的标题]% {真正的标题\footnote{blah}}其他参考资料:TeX FAQ条目表格中的脚注。
一种或许不太优雅的方法,我认为它只是其他人所说的一种变体,就是硬编码。许多期刊都有一些模板可以以某种方式允许表格脚注,因此我尽量保持基本。虽然已经有一些令人难以置信的软件包存在,我认为这个帖子很好地指出了这一点。
\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}
tabular
并且想要更改为longtable
,最简单的方法就是记得添加相应的代码。\usepackage{longtable}
例如:\begin{longtable}{ll}
2014--2015 & Something cool\footnote{first footnote} \\
2016-- & Something cooler\footnote{second footnote}
\end{longtable}
\multirow
。这是一个示例:\begin{table}[]
\centering
\caption{Caption}
\label{tab:my_label}
\begin{tabular}{l c c}
\toprule
\multirow{2}{*}{Propriedades} & \multicolumn{2}{c}{Resultados do modelo} & Dados \\
& MN S & MN F & experimentais \\ \midrule
Resistência de entrada ($R_{in}$), M$\Omega$ & 2,2 & 0,9 & \\
Constante de tempo ($\tau$), ms & 10,3 & 5,6 & \\
Reobase ($I_{rheo}$), nA & 4,5 & 17 & \\
Duração da AHP, ms & 137,2 & 66,2 & \\ \bottomrule
\multicolumn{4}{l}{\small *THIS IS A NICE FOOTNOTE.} \\
\end{tabular}
\end{table}
\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}
{10cm}
的宽度才能正确格式化我的表格,但这非常有效!您甚至可以通过将整个示例包装在 \begin{center} ... \end{center}
中来保持表格和脚注居中。 - thehale\begin{figure}[H]
\centering
{\includegraphics[width=1.0\textwidth]{image}}
\caption{captiontext\protect\footnotemark}
\label{fig:}
\end{figure}
\footnotetext{Footnotetext}
footnotetext
标签的位置,因为它可能会出现在页面之前。 - Minions最好的解决方案可能是查看threeparttable/threeparttablex包。
在表格中,我使用了 \footnotetext。
tabularx
脚注不显示在页面底部的同样问题。最后,我找到了以下结构,可以在PDF文件的同一页上正确显示表格的脚注计数器。\begin{table}
\begin{tabularx}{\textwidth }{SCCC}
\toprule
\shortstack{A} & B & C & D\\
\midrule
item 1 \footnotemark{} & item 2\footnotemark{} & item 3 & item 4\\ \hline
...
\bottomrule
\end{tabularx}
\end{table}
\addtocounter{footnote}{-2} %n=2
\stepcounter{footnote}\footnotetext{text foot 1}
\stepcounter{footnote}\footnotetext{text foot 2}