我正在使用该类acmart
撰写一篇文章,并按照手册建议的方法在表格中添加脚注。但是,脚注在小页面中居中,我觉得这很丑陋。有没有办法将它们左对齐?
以下是带有脚注的表格示例以供说明:
\documentclass[sigconf,authordraft]{acmart}
\begin{document}
\begin{table}
\caption{Team statistics}
\label{tab:team-stats}
\begin{minipage}{\columnwidth}
% \raggedright here makes no difference
\begin{center}
\begin{tabular}{lrr}
\toprule
Name & Height\footnote{I didn't have a tape measure to hand, so I asked each person their height. They may have been lying.} (cm) & Age (years)\\
\midrule
\multicolumn{3}{l}{\textbf{Team A}}\\
Alice & 190 & 12\\
Bob\footnote{Standing in for Bart}
& 175 & 11\\
\midrule
\multicolumn{3}{l}{\textbf{Team B}}\\
Clare & 175 & 13\\
David & 165 & 12\\
\bottomrule
\end{tabular}
\end{center}
\end{minipage}
\end{table}
\end{document}
答案1
如果你没有加载艾克玛特,它们tablenotes
不居中(当然仍然很丑)。因此,显然,艾克玛特或它加载的某个包做了一些令人讨厌的重新定义。要纠正标题的错误间距,可以使用命令
\captionsetup[table]{skip=5pt}
在文件序言中,因为艾克玛特加载标题包。解决定心问题的一个简单方法是使用三部分表\centering
,请参见第二个示例。此外,请使用 -environment内的命令\table
,除非您想要在表格上方和下方有额外的垂直空间。
标准文章类,无三部分表
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}
\caption{Team statistics}
\label{tab:team-stats}
\begin{minipage}{\columnwidth}
% \raggedright here makes no difference
\begin{center}
\begin{tabular}{lrr}
\toprule
Name & Height\footnote{I didn't have a tape measure to hand, so I asked each person their height. They may have been lying.} (cm) & Age (years)\\
\midrule
\multicolumn{3}{l}{\textbf{Team A}}\\
Alice & 190 & 12\\
Bob\footnote{Standing in for Bart}
& 175 & 11\\
\midrule
\multicolumn{3}{l}{\textbf{Team B}}\\
Clare & 175 & 13\\
David & 165 & 12\\
\bottomrule
\end{tabular}
\end{center}
\end{minipage}
\end{table}
\end{document}
和三部分表
幸运的是,三部分表正确排版表格注释,即使您使用艾克玛特,这在更新的示例中得到了演示。我稍微改变了表格的布局,使用固定宽度的w
列大批和两行标题使用制造细胞(强烈推荐的软件包。(您应该避免在窄表格中使用长脚注。)
\documentclass{acmart}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{makecell}
\captionsetup[table]{skip=5pt}
\begin{document}
\begin{table}
\centering
\begin{threeparttable}[c]
\caption{Team statistics\label{tab:team-stats}}
\begin{tabular}{@{}wl{1.5cm}*{2}{wr{1.5cm}}@{}}
\toprule
\makecell{\\Name} & \makecell{Height\\(cm)\tnote{a}} & \makecell{Age\\(years)}\\
\midrule
\multicolumn{3}{@{}l}{\textbf{Team A}}\\
Alice & 190 & 12\\
Bob\tnote{b}
& 175 & 11\\
\midrule
\multicolumn{3}{@{}l}{\textbf{Team B}}\\
Clare & 175 & 13\\
David & 165 & 12\\
\bottomrule
\end{tabular}
\begin{tablenotes}[flushleft]
\item [a] I didn't have a tape measure to hand, so I asked each person their height. They may have been lying.
\item [b] Standing in for Bart.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
答案2
小页面中脚注的居中显示似乎是 acmart 样式的有意改变。Boris Veytsman 刚刚解释了这一点在 GitHub 上大部头书:
这是自 2016 年以来预期的行为。该文件指出:
% \begin{macro}{\@mpfootnotetext} % \changes{v1.13}{2016/06/06}{Made minipage footnotes centered} % We want the footnotes in minipages centered:
我认为这种行为是 ACM 设计者要求的。我不建议你在自己的论文中改变它,但如果你坚持的话,你可以这样做(再次强调,我不保证会议委员会或期刊编辑会喜欢它):
\makeatletter \long\def\@mpfootnotetext#1{% \global\setbox\@mpfootins\vbox{% \unvbox\@mpfootins \reset@font\footnotesize \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel {\csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup%\centering - commented out centering footnotes \@makefntext{% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \color@endgroup}} \makeatother