我想知道是否有办法在表格内创建脚注。
现在我有:
\documentclass[12pt,letterpaper]{report}
\usepackage[masters,4committee,nonsequential]{cuthesis}
\usepackage{array}
\usepackage{graphicx}
\usepackage{cite}
%\usepackage{subfigure}
\usepackage{amsmath}
\usepackage[indent,bf]{caption}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{float}
%\restylefloat{table}
\usepackage{subcaption}
\usepackage{multirow}
\usepackage{amsfonts}
\usepackage[table]{xcolor}
\usepackage{color}
\usepackage{colortbl}
\usepackage{alltt}
\usepackage{url}
\usepackage{verbatim}
\usepackage{makecell}
\usepackage{placeins}
\usepackage{arydshln}
\begin{document}
\begin{table}[ht]
\centering
\caption{Footnote within a table}
\begin{tabular}{ll}
how to enter a footnote & this does not work \footnote{} \\
\end{tabular}
\end{table}
\end{document}
我已尝试过\usepackage{tablefootnote}
,但似乎不起作用(它实际上似乎破坏了某些东西并且无法编译)。
任何帮助都将不胜感激!
答案1
有两个用于表格脚注的包,但它们的目的不同:
threeparttable
(扩展为\threepartablex
长表格和脚注引用)将脚注放在表格底部。脚注的编号与“一般”脚注的编号无关。- tablefootnotes 将表格脚注放在页面底部。它使用脚注计数器,用于当此
\footnotemark … \footnotetext
方式不起作用时的情况。
以下是两者的示例:
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[x11names]{xcolor}
\usepackage{fourier}
\usepackage{booktabs}
\usepackage{threeparttable, tablefootnote}
\begin{document}
Here is a footnote\footnote{This is a “normal” footnote.} in the main text.
\begin{table}[!h]
\centering
\begin{threeparttable}
\caption{Footnote within a table}
\begin{tabular}{ll}
\toprule
\addlinespace
How to enter a footnote & this does work \tnote{a} \\
\addlinespace
\bottomrule
\end{tabular}
\begin{tablenotes}\footnotesize
\item [a] A cute little footnote
\end{tablenotes}
\end{threeparttable}
\end{table}
And now…
\begin{table}[!h]
\centering
\caption{Footnote within a table}
\begin{tabular}{ll}
\addlinespace
\toprule
\addlinespace
How to enter a footnote & this also does work \tablefootnote{Another cute little footnote} \\
\addlinespace
\bottomrule
\end{tabular}
\end{table}
\end{document}