4

是否有一种明确的方法可以将表格注释添加到 xtable 中,如果表格注释长于表格宽度,则该 xtable 将换行?我在这里引用了这个问题,它建议将长表笔记分成多行并将其添加到add.to.row.参数中。有没有办法避免这样做并让它自动包装?

如果我只使用 Latex,我会使用\usepackage{threeparttable}[flushleft]并使用下面的代码。但是,我不相信您可以在争论中添加\end{tabular}一行add.to.row

提前致谢!

\documentclass{article}
\usepackage{threeparttable}[flushleft]
\usepackage{booktabs}

\begin{document}

      \begin{table}
        \centering
        \caption{Here is a caption}
        \begin{threeparttable}
          \begin{tabular}{lll}
          \toprule
          Entry A\tnote{1}   &   Entry B   &  Entry C   \\
          Entry D\tnote{2}   &   Entry E   &  Entry F   \\
          Entry G   &   Entry H   &  Entry I   \\
          \bottomrule
          \end{tabular}%
          \begin{tablenotes}
            \item[1] Here is my first note.
            \item[2] And here is my second note.
          \end{tablenotes}
        \end{threeparttable}
        \label{tab:table}%
      \end{table}%

\end{document}
4

0 回答 0