Wrapping xtable tablenotes

Is there a final way to add table notes in xtable that will end if the tab is longer than the width of the table? I referred to this question here , which suggests splitting a long table into several rows and adding it to the argument add.to.row.. Is there a way to avoid this and automatically wrap it?

If I used only Latex, I would \usepackage{threeparttable}[flushleft]use and use the code below. However, I do not believe that you can add a line \end{tabular}with an argument add.to.row.

Thanks in advance!

\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
source share

Source: https://habr.com/ru/post/1688224/


All Articles