Parnotes:如何将 parnote 的宽度设置为与表格相同的宽度?

Parnotes:如何将 parnote 的宽度设置为与表格相同的宽度?

考虑以下最小工作示例(MWE)

\documentclass{article}
\usepackage{tabularx,parnotes}

\begin{document}
    \begin{table}
        \begin{tabularx}{0.5\textwidth}{lcc}
            \parnoteclear
            c & c & c\parnote{This is a veeeeeeeery looooooooooooooooooong parnote and too wide}\\\hline
        \end{tabularx}
        \parnotes
    \end{table}
\end{document}

结果截图:

结果截图


问题说明:

如您所见,parnote比表格本身宽得多。如何将 的宽度调整parnote为与 的宽度相同table

答案1

您可以改用该threeparttable包:

在此处输入图片描述

\documentclass{article}
\usepackage{tabularx}
\usepackage{threeparttable}
\begin{document}
    \begin{table}
    \begin{threeparttable}
        \begin{tabularx}{0.5\textwidth}{lcc}
            c & c & c\tnote{1} \\\hline
        \end{tabularx}
    \begin{tablenotes}
    \item[1] {This is a very very very long table note and automatically as wide as the table}
    \end{tablenotes}
    \end{threeparttable}
    \end{table}
\end{document}

如果您希望继续使用parnotes,则可以使用parbox如下方式:

在此处输入图片描述

\documentclass{article}
\usepackage{tabularx,parnotes}

\begin{document}
    \begin{table}
        \begin{tabularx}{0.5\textwidth}{lcc}
            \parnoteclear
            c & c & c\parnote{This is a very very very very very very very very long parnote and too wide}\\\hline
        \end{tabularx}

        \parbox{0.5\textwidth}{\parnotes}
    \end{table}
\end{document}

对于您的实际表,您可能需要记住在环境X中至少使用一个类型列tabularx

相关内容