
Ich möchte die Schriftgröße ändern tnotes
basierend threeparttables
aufdieser Ansatz des Benutzers egreg.
Minimales Arbeitsbeispiel (MWE) des funktionalen Ansatzes:
\documentclass{article}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}% <-- decreases font size of tnote
\begin{document}
\begin{table}
\begin{threeparttable}[b]
\caption{A caption}
\begin{tabular}{llll}
\toprule
Test\tnote{1} & some & text & to have room\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item [1] the first tnote
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
Diese Lösung funktioniert einwandfrei, solange ich NICHT flushleft
die Präambelkonfiguration von threeparttable
hinzufüge. Sobald ich diese zusätzliche Konfiguration hinzufüge, funktioniert die obige Lösung nicht mehr.
Minimales Arbeitsbeispiel (MWE) des nicht-funktionalen Ansatzes:
\documentclass{article}
\usepackage{booktabs}
\usepackage[flushleft]{threeparttable}% <-- added `para` and `flushleft`
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}% <-- decreases font size of tnote
\begin{document}
\begin{table}
\begin{threeparttable}[b]
\caption{A caption}
\begin{tabular}{llll}
\toprule
Test\tnote{1} & some & text & to have room\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item [1] the first tnote
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
Irgendwelche Ideen, wie man das lösen kann?
Antwort1
Sie können \footnotesize
zu einem anderen Makro hinzufügen:
\documentclass{article}
\usepackage{booktabs}
\usepackage[flushleft]{threeparttable}
\usepackage{etoolbox}
\appto\TPTdoTablenotes{\footnotesize}
\begin{document}
\begin{table}
\begin{threeparttable}[b]
\caption{A caption}
\begin{tabular}{llll}
\toprule
Test\tnote{1} & some & text & to have room\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item [1] the first tnote long enough to see at least a line break
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
Antwort2
Ihr Formatierungsziel kann stabil erreicht werden, indem Sie
\usepackage{etoolbox}
\AtBeginEnvironment{tablenotes}{\footnotesize}
in der Präambel.
Ein vollständiges MWE – beachten Sie, dass es sowohl \smallskip
als auch \footnotesize
beim Start jeder tablenotes
Umgebung ausgeführt wird:
\documentclass{article}
\usepackage{booktabs}
\usepackage[flushleft,para]{threeparttable}
\usepackage{etoolbox}
\AtBeginEnvironment{tablenotes}{\smallskip\footnotesize}
\begin{document}
\begin{table}
\centering
\begin{threeparttable}
\caption{A caption}
\begin{tabular}{llll}
\toprule
Test\tnote{1} & some & text & to have room\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item[1] The first tnote
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}