
Quero modificar o tamanho da fonte com base tnotes
emthreeparttables
esta abordagem do usuário egreg.
Exemplo Mínimo de Trabalho (MWE) de abordagem funcional:
\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}
Esta solução funciona perfeitamente bem, desde que eu NÃO adicione flushleft
na configuração do preâmbulo do threeparttable
. Assim que adiciono esta configuração adicional, a solução superior não funciona mais.
Exemplo mínimo de trabalho (MWE) de abordagem não funcional:
\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}
Todas as ideias sobre como resolver isso?
Responder1
Você pode adicionar \footnotesize
a outra macro:
\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}
Responder2
Seu objetivo de formatação pode ser alcançado de forma robusta executando
\usepackage{etoolbox}
\AtBeginEnvironment{tablenotes}{\footnotesize}
no preâmbulo.
Um MWE completo – observe que ele é executado \smallskip
no \footnotesize
início de cada tablenotes
ambiente:
\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}