LaTeX 中表格的脚注
当我对表中的值执行 \footnote{}
时,脚注不会显示。我怎样才能让它显示出来?另外,是否可以让它显示在表格底部而不是页面底部?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(12)
没有任何头痛的最好方法是使用
来自
tablefootnote
包的\tablefootnote
命令。将以下内容添加到您的序言中:它不需要额外的技巧就可以工作。
The best way to do it without any headache is to use the
\tablefootnote
command from thetablefootnote
package. Add the following to your preamble:It just works without the need of additional tricks.
这是 LaTeX 中的一个经典难点。
问题是如何使用浮动(图形和表格,类似的对象)和脚注进行布局。特别是,很难确定为相关脚注腾出空间不会造成麻烦来为浮动选择一个位置。因此,标准的
tabular
和figure
环境甚至不会尝试。你能做什么:
\footnotesize
作为大小)。您还必须使用\footnotemark
自行管理符号或编号。简单,但不是很吸引人,而且脚注不会出现在页面底部。thirdparttable[x]
(感谢约瑟夫)或ctable< /code>
支持这种行为。
[h!]< /code> (或带有 float 包的
[H]
)来控制浮动出现的位置,并在同一页面上使用\footnotetext
将脚注放在您想要的位置。再次使用\footnotemark
安装该符号。脆弱且每次都需要手动工具。footnote
包提供了savenote
环境,可以用来做到这一点。其他参考: TeX FAQ 项目表格中的脚注。
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
andfigure
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) orctable
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.footnote
package provides thesavenote
environment, which can be used to do this.Additional reference: TeX FAQ item Footnotes in tables.
一种可能不太优雅的方法是对其进行硬编码,我认为这只是其他人所说的一种变体。许多期刊都有一个模板,在某种程度上允许表脚注,所以我尽量保持基本的内容。尽管如此,确实已经有一些令人难以置信的软件包了,我认为这个线程很好地指出了这一点。
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.
你可以在最后添加一个
\multirow
。这是一个例子:you could just add a
\multirow
at the end. Here is an example:如果您的表格已经使用
tabular
,那么最简单的方法是将其切换到longtable
,记住添加例如:
If your table is already working with
tabular
, then easiest is to switch it tolongtable
, remembering to addFor example:
使用小型页面环境。这是一个例子:
Use minipage environment. Here is an example:
也许最好的解决方案是查看 Threeparttable/ Threeparttablex 包。
Probably the best solution is to look at the threeparttable/threeparttablex packages.
在表格中我使用了 \footnotetext。
In tables I have used \footnotetext.
我对
tabularx
脚注也有同样的问题,这些脚注没有出现在页面底部。最后,我可以使用以下结构在 PDF 文件的同一页面下显示带有适当计数器的表格脚注。I had a same problem with
tabularx
footnotes which are not appeared on the bottom of the page. Finally, I could use the following structure to appear the table's footnotes with proper counters under the same page of the PDF file.@dmckee 说的话。
编写您自己的定制脚注排队代码并不困难。你需要做的是:
\footnote
以将脚注宏添加到队列中;如果这很有趣,我会展示一些执行此操作的代码。
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 "tablenotes"