threeparttable: Flushleft를 사용할 때 threeparttable의 테이블 메모 글꼴 크기를 변경하는 방법은 무엇입니까?

threeparttable: Flushleft를 사용할 때 threeparttable의 테이블 메모 글꼴 크기를 변경하는 방법은 무엇입니까?

tnotes다음을 threeparttables기준으로 의 글꼴 크기를 수정하고 싶습니다.사용자 egreg의 이러한 접근 방식.

기능적 접근 방식의 최소 작업 예(MWE):

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

flushleft이 솔루션은 의 프리앰블 구성에 추가하지 않는 한 완벽하게 작동합니다 threeparttable. 이 추가 구성을 추가하자마자 상위 솔루션이 더 이상 작동하지 않습니다.


비기능적 접근 방식의 최소 작업 예(MWE):

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

이 문제를 해결하는 방법에 대한 아이디어가 있습니까?

답변1

\footnotesize다른 매크로에 추가할 수 있습니다 :

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

여기에 이미지 설명을 입력하세요

답변2

다음을 실행하면 서식 지정 목표를 확실하게 달성할 수 있습니다.

\usepackage{etoolbox}
\AtBeginEnvironment{tablenotes}{\footnotesize}

서문에서.

전체 MWE - 각 환경이 시작될 때 \smallskip\footnotesize시작 시 모두 실행됩니다 tablenotes.

여기에 이미지 설명을 입력하세요

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

관련 정보