繁体   English   中英

LaTeX 中表格的脚注

[英]Footnotes for tables in LaTeX

当我对表中的值执行\\footnote{} ,脚注不会显示。 我如何让它显示出来? 另外,是否可以让它显示在表格底部而不是页面底部?

这是 LaTeX 中的一个经典难题。

问题是如何使用浮动(图形和表格,类似的对象)和脚注进行布局。 特别是,很难确定为相关脚注腾出空间不会造成麻烦的浮动位置。 所以标准的tabularfigure环境甚至不要尝试。

你能做什么:

  1. 假装。 只需在标题底部放置一个硬编码的垂直跳过,然后自己编写脚注(使用\\footnotesize作为大小)。 您还必须使用\\footnotemark自己管理符号或数字。 简单,但不是很吸引人,脚注也不会出现在页面底部。
  2. 使用支持此行为的tabularxlongtablethreeparttable[x] (对Joseph 表示ctable )或ctable
  3. 手动管理。 使用[h!] (或[H]与 float 包)控制浮动出现的位置,并在同一页面上使用\\footnotetext将脚注放在您想要的位置。 再次使用\\footnotemark安装符号。 脆弱,每个实例都需要手工工具。
  4. footnote包提供了savenote环境,可用于执行此操作。
  5. Minipage it(代码完全被盗,并在这种情况下阅读有关长标题文本的免责声明):
\begin{figure}
      \begin{minipage}{\textwidth}
        ...
        \caption[Caption for LOF]%
          {Real caption\footnote{blah}}
      \end{minipage}
    \end{figure}

附加参考:TeX FAQ item Footnotes in tables

没有任何麻烦的最好方法是使用tablefootnote包中的\\tablefootnote命令。 将以下内容添加到您的序言中:

\usepackage{tablefootnote}

它不需要额外的技巧就可以工作。

一种可能不太优雅的方法,我认为这只是其他人所说的一种变体,就是对其进行硬编码。 许多期刊都有一个模板,以某种方式允许表格脚注,所以我尽量保持基本的东西。 尽管如此,确实已经有一些令人难以置信的软件包,我认为这个线程很好地指出了这一点。

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

使用 minipage 环境。 下面是一个例子:

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

可能最好的解决方案是查看threeparttable/threeparttablex 包。

在此处输入图片说明

你可以在最后添加一个\\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{figure}[H]
\centering
{\includegraphics[width=1.0\textwidth]{image}}
\caption{captiontext\protect\footnotemark}
\label{fig:}
\end{figure}
\footnotetext{Footnotetext} 

在表格中,我使用了 \\footnotetext。

@dmckee 所说的。

编写自己的定制脚注排队代码并不难。 你需要做的是:

  1. 编写代码来排队 Latex 代码——就像 emacs 中的一个钩子:非常标准的技术,如果不是每个 Latex 黑客实际上都能做到这一点的话;
  2. 临时重新定义\\footnote以将脚注宏添加到您的队列中;
  3. 确保在表格/图形退出时调用钩子,我们返回到常规垂直模式。

如果这很有趣,我会展示一些执行此操作的代码。

使用“表格笔记”

\begin{table*}

\centering
\caption{}
\begin{tabular}{|c|c|}
--------
\end{tabular}

##################
\begin{tablenotes}
   \item[*] \\Insert footnote here
\end{tablenotes}
################## 

\label{tab: label}
\end{table*}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM