Longtable 和 threeparttablex:当表格为 textwidth 时 tablenote 位置错误

Longtable 和 threeparttablex:当表格为 textwidth 时 tablenote 位置错误

longtable我对 创建的表格注释的位置有疑问threeparttablex,如下面的 MWE 所示。第一个表格延伸到整个文本宽度,表格注释的位置不正确。第二个表格没有指定任何表格大小,表格注释是正确的。我做错了什么吗?

\documentclass[11pt]{scrartcl}

\usepackage[showframe]{geometry}
\usepackage{longtable,threeparttablex,booktabs}

\begin{document}

\begin{ThreePartTable}
 \begin{TableNotes}[para,flushleft]This is a wrong tablenote\end{TableNotes}
 \setlength\LTleft{0pt}
 \setlength\LTright{0pt}
 \begin{longtable}{@{\hskip\tabcolsep\extracolsep\fill}l*{3}{c}}
  \caption{Longtable with Full Textwidth}\\
  \toprule
   Variable 1 & 1.85   & 0.92   & 1.11   \\
              & (0.34) & (0.24) & (0.14) \\
  \bottomrule
  \insertTableNotes
 \end{longtable}
\end{ThreePartTable}

\begin{ThreePartTable}
 \begin{TableNotes}[para,flushleft]This is a good tablenote\end{TableNotes}
 \begin{longtable}[c]{l*{3}{c}}
  \caption{Normal Longtable}\\
  \toprule
   Variable 1 & 1.85   & 0.92   & 1.11   \\
              & (0.34) & (0.24) & (0.14) \\
  \bottomrule
  \insertTableNotes
 \end{longtable}
\end{ThreePartTable}

\end{document}

在此处输入图片描述

答案1

似乎threeparttablex只能测量表格的自然宽度,因此\fill不考虑“ ”组件。但是由于您知道宽度,在这种情况下,您可以重新定义\TPTminimum环境的持续时间:

\documentclass[11pt]{scrartcl}

\usepackage[showframe]{geometry}
\usepackage{longtable,threeparttablex,booktabs}

\begin{document}

\begin{ThreePartTable}
 \setlength\LTleft{0pt}
 \setlength\LTright{0pt}
 \renewcommand\TPTminimum{\textwidth} %%% we want full width
 \begin{TableNotes}[para,flushleft]
  This is a wrong tablenote
  This is a wrong tablenote
  This is a wrong tablenote
  This is a wrong tablenote
  This is a wrong tablenote
\end{TableNotes}
 \begin{longtable}{@{\hskip\tabcolsep\extracolsep\fill}l*{3}{c}}
  \caption{Longtable with Full Textwidth}\\
  \toprule
   Variable 1 & 1.85   & 0.92   & 1.11   \\
              & (0.34) & (0.24) & (0.14) \\
  \bottomrule
  \insertTableNotes
 \end{longtable}
\end{ThreePartTable}

\begin{ThreePartTable}
 \begin{TableNotes}[para,flushleft]This is a good tablenote\end{TableNotes}
 \begin{longtable}[c]{l*{3}{c}}
  \caption{Normal Longtable}\\
  \toprule
   Variable 1 & 1.85   & 0.92   & 1.11   \\
              & (0.34) & (0.24) & (0.14) \\
  \bottomrule
  \insertTableNotes
 \end{longtable}
\end{ThreePartTable}

\end{document}

在此处输入图片描述

相关内容