threeparttable - anexar comandos a \TPTnoteSettings não funciona se o pacote for chamado com a opção flushleft

threeparttable - anexar comandos a \TPTnoteSettings não funciona se o pacote for chamado com a opção flushleft

No tablenotesambiente definido pelo threeparttablepacote, eu queria redimensionar minhas anotações globalmente em todo o documento.

Encontrei esta resposta para uma pergunta que alguém postou em relação a um problema semelhante:Usando \apptodo etoolboxpacote para anexar a\TPTnoteSettings.

Acontece que esta solução não funciona se threeparttablefor invocada com uma opção como flushleft, consulte o MWE. O resultado é assim (observe que o texto abaixo da tabela tem o mesmo tamanho que o texto da tabela): Nota de rodapé inalterada

Compare isso com chamar o pacote sem nenhuma opção ou com [normal], que também funciona:

Texto pequeno quando o pacote é chamado sem opção.

\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}

Responder1

Trabalhe com \TPT@defaults(usando \g@addto@macrovocê não precisa 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}

insira a descrição da imagem aqui

informação relacionada