
在套件tablenotes
定義的環境中threeparttable
,我想在整個文件中全域調整筆記的大小。
我找到了有人針對類似問題發布的問題的答案:使用套件\appto
中的etoolbox
內容附加到\TPTnoteSettings
。
threeparttable
現在事實證明:如果使用諸如 之類的選項呼叫此解決方案,則該解決方案不起作用flushleft
,請參閱 MWE。結果如下所示(請注意,表格下方的文字與表格中的文字大小相同):
將此與不帶任何選項或使用 呼叫包進行比較[normal]
,這也有效:
\documentclass{scrartcl}
\usepackage{booktabs}
\usepackage[flushleft]{threeparttable}
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}
\begin{document}
\begin{table}
\begin{threeparttable}[b]
\caption{A caption}
\begin{tabular}{llll}
\toprule
42& some & text & to have room\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item the first note
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
答案1
合作\TPT@defaults
(使用\g@addto@macro
你不需要的etoolbox
):
\documentclass{scrartcl}
\usepackage{booktabs}
\usepackage[flushleft]{threeparttable}
\makeatletter
\g@addto@macro\TPT@defaults{\footnotesize}
\makeatother
\begin{document}
\begin{table}
\begin{threeparttable}[b]
\caption{A caption}
\begin{tabular}{llll}
\toprule
42& some & text & to have room\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item the first note
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}