Latex給表格加腳注
博主在用Latex撰寫論文的時候遇到了給表格加腳注的情況,然而,網上找到的方法對於博主不適用(表格下方無法顯示出腳注),因此在這里記錄下解決方案。更新於2019.01.10。
需要用到threeparttable這個包。
- 在頁面下方顯示腳注:
CODE: [SELECT ALL] [EXPAND/COLLAPSE] [DOWNLOAD] (UNTITLED.TEX) OPEN IN OVERLEAF
\documentclass{article}
\usepackage{threeparttable}
\begin{document}
%A table with footnotes appearing at the bottom of the page:
\begin{table}
\centering
\begin{tabular}{llll}
\hline
column 1 & column 2 & column 3\footnotemark[1] & column 4\footnotemark[2] \\
\hline
row 1 & data 1 & data 2 & data 3 \\
row 2 & data 1 & data 2 & data 3 \\
row 3 & data 1 & data 2 & data 3 \\
\hline
\end{tabular}
\caption{Table with footnotes at the bottom of the page}
\label{tab:test1}
\end{table}
\footnotetext[1]{table footnote 1}
\footnotetext[2]{table footnote 2}
\clearpage
- 在表格下面顯示腳注。
%A table with footnotes appearing at the bottom of the table:
\begin{table}
\centering
\begin{threeparttable}[b]
\caption{Table with footnotes after the table}
\label{tab:test2}
\begin{tabular}{llll}
\hline
column 1 & column 2 & column 3\tnote{1} & column 4\tnote{2} \\
\hline
row 1 & data 1 & data 2 & data 3 \\
row 2 & data 1 & data 2 & data 3 \\
row 3 & data 1 & data 2 & data 3 \\
\hline
\end{tabular}
\begin{tablenotes}
\item[1] tablefootnote 1
\item[2] tablefootnote 2
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}