如何使用多个子表下的表注释的完整文本宽度?

如何使用多个子表下的表注释的完整文本宽度?

当我使用子表并希望包含一个同时描述所有表的表注时,表注仅为左侧表创建,而不使用整个文本宽度。如何制作利用整个文本宽度的表注?

\documentclass[11pt,a4paper]{article}

\usepackage[flushleft]{threeparttable}
\usepackage{booktabs}
\usepackage{a4wide}
\usepackage{subcaption}

\begin{document}

\begin{table}[!htbp]
    \caption{test}
    \begin{threeparttable}
        \begin{subtable}{0.426\linewidth}
            \caption{test1}
            \setlength\tabcolsep{0pt}
            \begin{tabular} l
                \toprule
                test \\
                \midrule 
                1 \\
                \bottomrule 
            \end{tabular}
        \end{subtable}
        \begin{subtable}{0.282\linewidth}
            \caption{test2}
            \setlength\tabcolsep{0pt}
            \begin{tabular} l
                \toprule
                test \\
                \midrule
                2 \\
                \bottomrule 
            \end{tabular}
        \end{subtable}
        \begin{subtable}{0.282\linewidth}
            \caption{test3}
            \setlength\tabcolsep{0pt}
            \begin{tabular} l
                \toprule
                test \\
                \midrule 
                3 \\
                \bottomrule
            \end{tabular}
        \end{subtable} 
        \begin{tablenotes}
            \item{\textit{Notes:}} test test test test test test test test test test test test 
        \end{tablenotes}
    \end{threeparttable}
\end{table}

\end{document}

在此处输入图片描述

答案1

您可以禁用threeparttable的测量:

\documentclass[11pt,a4paper]{article}

\usepackage[flushleft]{threeparttable}
\usepackage{booktabs}
\usepackage{a4wide} %better use geometry.
\usepackage{subcaption}

\begin{document}

\begin{table}[!htbp]
    \caption{test}
    \begin{threeparttable}    
        \begin{subtable}{0.426\linewidth}
            \caption{test1}
            \setlength\tabcolsep{0pt}
            \begin{tabular} l
                \toprule
                test \\
                \midrule
                1 \\
                \bottomrule
            \end{tabular}
        \end{subtable}
        \begin{subtable}{0.282\linewidth}
            \caption{test2}
            \setlength\tabcolsep{0pt}
            \begin{tabular} l
                \toprule
                test \\
                \midrule
                2 \\
                \bottomrule
            \end{tabular}
        \end{subtable}
        \begin{subtable}{0.282\linewidth}
            \caption{test3}
            \setlength\tabcolsep{0pt}
            \begin{tabular} l
                \toprule
                test \\
                \midrule
                3 \\
                \bottomrule
            \end{tabular}
        \end{subtable}

        \makeatletter\def\TPT@hsize{}\makeatletter

        \begin{tablenotes}
            \item{\textit{Notes:}} test test test test test test test test test test test test
        \end{tablenotes}
    \end{threeparttable}
\end{table}

\end{document}

相关内容