
我正在使用threeparttable
和tablenotes
包為表格建立腳註。我發現要獲得我想要的設計(懸掛符號,而不是上標),我可以簡單地使用該para
選項並手動輸入腳註,而不是使用傳統的\item[]
語法。然而,這樣做會在符號和文字之間產生一些奇怪的空間(即使我將其用大括號括起來,或使用很短的文字行)。在註釋周圍放置一個mbox
註釋可以解決問題,但文字超出了表格寬度。繞過去pbox
也解決不了問題。
我很好奇為什麼會發生這種情況,以及可能有什麼簡單的解決方案。請參閱下面的圖片和程式碼以取得解釋。
微量元素
\documentclass{scrartcl}
\usepackage{booktabs}
\usepackage[para]{threeparttable}
\usepackage{tablefootnote}
\renewcommand{\TPTnoteSettings}{\footnotesize}
\newcommand{\tabfnote}[2]{\llap{#1. }#2}
\begin{document}
\begin{table}[tbph]
\begin{threeparttable}[t]
\begin{tabular}{ll} \toprule
Alpha & Beta \\
Gamma & Delta \\ \bottomrule
\end{tabular}
\begin{tablenotes}
\tabfnote{a}{Why is there space above?}\\
\tabfnote{b}{But not above this one...}\\
\tabfnote{c}{Or this one}
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
答案1
vertical mode
在 的開頭發生了一些事情tablenotes
,我不太明白,但\leavevmode
在 的定義開頭加上 a\tabfnote
解決了問題:
\documentclass{scrartcl}
\usepackage{booktabs}
\usepackage[para]{threeparttable}
\usepackage{tablefootnote}
\renewcommand{\TPTnoteSettings}{\footnotesize}
\newcommand{\tabfnote}[2]{\leavevmode\llap{#1. }#2}
\begin{document}
\begin{table}[tbph]
\begin{threeparttable}[t]
\begin{tabular}{ll} \toprule
Alpha & Beta \\
Gamma & Delta \\ \bottomrule
\end{tabular}
\begin{tablenotes}
\tabfnote{a}{Why is there space above?}\\
\tabfnote{b}{But not above this one...}\\
\tabfnote{c}{Or this one}
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}