我想以 Heiko Oberdiek 的threeparttable
解决方案为基础这里并询问是否可以保留编号脚注项的缩进,同时将左侧方括号中没有任何内容的项目刷新到右侧,如下所示:
我对缩进的深度没有特别要求;上标 a 可能与它上面的两行对齐。我尝试修改对齐方式,\renewcommand{\TPTnoteSettings}
但我很难将编号和非编号项目区别对待。
如果你想玩弄我的表格,这是结合 Heiko Oberdiek 提示的代码,但其中仅第一行编号脚注的缩进为:
\documentclass{article}
\usepackage{threeparttable}
\usepackage{booktabs}
\begin{document}
\begin{center}
\begin{threeparttable}
\caption{flushleft}
\begin{tabular}{l c c c c}
\toprule
type & cyl & disp & hp & drat \\
\midrule
Ferrari & 6 & 160 & 110 & 3.9 \\
VW & 6 & 160 & 110 & 3.9 \\
Chevrolet & 4\tnote{a} & 108 & 93 & 3.85 \\
Tesla & 6 & 258 & 110 & 3.08 \\
Ford & 8 & 360 & 175 & 3.15 \\
\bottomrule
\end{tabular}
\begin{tablenotes}[flushleft]\footnotesize
\item \leavevmode\kern-\scriptspace\kern-\labelsep Some longer note that may span several rows below the table.
\item [a] A note that might as well span multiple rows despite being a footnote.
\end{tablenotes}
\end{threeparttable}
\end{center}
\end{document}
答案1
看来 Zarko 只是在不知不觉中给出了一个解决方案:我想要的布局可以通过在表格环境和 tablenotes 环境之间添加所有源注释,然后保留 tablenotes 环境的默认选项(即不使用 flushleft、online 或 para)来实现。
\documentclass{article}
\usepackage{threeparttable}
\usepackage{booktabs}
\begin{document}
\begin{center}
\begin{threeparttable}
\caption{Solved!}
\begin{tabular}{l c c c c}
\toprule
type & cyl & disp & hp & drat \\
\midrule
Ferrari & 6 & 160 & 110 & 3.9 \\
VW & 6 & 160 & 110 & 3.9 \\
Chevrolet & 4\tnote{a} & 108 & 93 & 3.85 \\
Tesla & 6 & 258 & 110 & 3.08 \\
Ford & 8 & 360 & 175\tnote{b} & 3.15 \\
\bottomrule
\end{tabular}\footnotesize
\emph{Note:} Here is some text that is not actually part of the footnotes and might contain source notes.
\begin{tablenotes}\footnotesize
\item [a] A note that might as well span multiple rows despite being a footnote.
\item [b] Another short note.
\end{tablenotes}
\emph{Source: } Here is some other stuff outside the tablenotes environment that might span multiple lines.
\end{threeparttable}
\end{center}
\end{document}
我不确定这是否threeparttable
应该被使用,但至少它不会在编译期间引发错误,并且没有任何东西比表格宽度更宽。