当前位置: 首页 > news >正文

【Latex】如何在表格中使用footnote

Latex table cell中是不支持\footnote的。

如果你在table中用\footnote,那么要么这个脚注根本不显示出来,要么就会出现计数出错等问题。总之非常麻烦。

解决策略

笔者在搜集大量资料后,也并没有找到一种“完美的”解决方案。我们只能用一些很简单的方法“模拟出”\footnote的效果。

以使用tabularray为例,我们能做的,也只有自己加\footnotemark\footnotetext

下面是只加一个footnote,比较简单:

\usepackage{xcolor}
\usepackage[vmargin=99mm]{geometry}\usepackage{tabularray}
\UseTblrLibrary{amsmath, booktabs, counter}
\usepackage{hyperref}\begin{document}
Blabla \footnote{First note}
Blabla \footnote{Second note}\begin{table}[ht]\centering\begin{tblr}{colspec={c},}%,\topruleRelated Works\\\hline[.6pt,white]Blabla\footnotemark{}\\ % 自己加上\footnotemark\bottomrule\end{tblr}\caption{My caption}\label{tab:comparisonRelatedWorks}
\end{table}
\footnotetext{Footnote in table.} % 在table环境之外,补上内容Blabla \footnote{Last note}
\end{document}

如果想要在同一个table里,用多个footnote,还得自己计数

\documentclass{scrartcl}
\begin{document}    
before\begin{tabular}{l}
Content\footnotemark\\
Content continued\footnotemark\\
Content continued further\footnotemark
\end{tabular}
\addtocounter{footnote}{-2} % 需要自己计数,-x需要根据自己的上下文确定
\footnotetext[1]{Footnote} % 也可以在\footnotetext中自己传入参数(如左,1),指定序号,但是不推荐
\addtocounter{footnote}{1} % 自己计数+1
\footnotetext{Second footnote}
\addtocounter{footnote}{1}
\footnotetext{Third footnote}after
\end{document}

笔者也尝试过其他第三方package,例如tablefootnote;和其他table环境,例如threeparttabletalltblr;均以失败告终。所以这里也就不建议了。

参考:

  • https://tex.stackexchange.com/questions/109467/footnote-in-tabular-environment
  • https://tex.stackexchange.com/questions/636963/footnotes-in-table-not-numbered-properly
http://www.lryc.cn/news/63503.html

相关文章:

  • 设计师常用的素材网站有哪个推荐
  • jmeter常用的命令行参数有哪些?常用的jmeter命令行如何编写
  • APP渗透—查脱壳、反编译、重打包签名
  • 【贪婪技术】
  • 谈「效」风生 | 如何找到现有研发体系的「内耗问题」?
  • Linux第四章
  • HCIA-RS实验-路由配置-静态路由缺省路由
  • Unity API详解——Quaternion类
  • 8个免费的PNG素材网站推荐
  • ChatGPT技术原理 第二章:自然语言处理基础
  • 国民技术N32G430开发笔记(8)- 内部Flash的读写操作
  • JVM 基本知识
  • 【源码解析】流控框架Sentinel源码解析
  • redis面试重点------源于黑马
  • jQuery知识点二
  • 4 月份 火火火火 的开源项目
  • PAT A1011 World Cup Betting
  • Android 拍照以及相册中选择(适配高版本)————上传头像并裁剪(一)
  • 带你了解现在的LED显示屏技术
  • AI模型推理(1)——入门篇
  • MySQL--表的基本查询--0410--15
  • Scala语言入门以及基本语法
  • Linux shell编程 循环语句for continue break
  • leetcode 643. 子数组最大平均数 I
  • TDA4VM/VH 芯片硬件 mailbox
  • 如何利用Trimble RealWorks三维激光扫描仪进行外业测量和内业处理?
  • mysql数据备份
  • 排队接水--贪心
  • 数字温度传感器-DS18B20
  • 【算法】【算法杂谈】从M个数中等概率的选出n个数,保证每一个数的选中概率都是n/m(蓄水池算法)