我需要帮助使长表可与一行中的表注释一起中断。在我的示例中,注释分为 5 行,并且表格和注释之间有空格。
这是我的代码:
\documentclass[review]{elsarticle}
\usepackage{lineno,hyperref}
\usepackage{enumitem,booktabs,cfr-lm}
\usepackage[referable]{threeparttablex}
\usepackage{longtable,booktabs,threeparttablex}
\renewlist{tablenotes}{enumerate}{1}
\makeatletter
\setlist[tablenotes]{label=\tnote{\alph*},ref=\alph*,itemsep=\z@,topsep=\z@skip,partopsep=\z@skip,parsep=\z@,itemindent=\z@,labelindent=\tabcolsep,labelsep=.8em,leftmargin=*,align=left,before={\footnotesize}}
\makeatother
\usepackage{subfig,graphicx}
\newlength{\maxfigurewidth}
\usepackage{float}
\usepackage{tikz}
\hypersetup{colorlinks,linkcolor={red},citecolor={red},urlcolor={red}}
\hypersetup{pdfborder=0 0 0}
\begin{document}
\begin{ThreePartTable}
\renewcommand\TPTminimum{\textwidth}
%% Arrange for "longtable" to take up full width of text block
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\setlength\tabcolsep{0pt}
\begin{longtable}{ l @{\extracolsep{\fill}} *{7}{c} }
\caption{\label{tab:table1} longtable with tablenotes}\\
\toprule
year &$ x $ &Source&A&B&C\\
\midrule
\endhead
\midrule[\heavyrulewidth]
\multicolumn{8}{r}{\textit{continued}}\\
\endfoot
\midrule[\heavyrulewidth]
% \insertTableNotes % tell LaTeX where to insert the table-related notes
\endlastfoot
2001& 0 &This work &3& 32& 10& 27\\
2002& 1 &Other\tnotex{Calc1} &29&19&23& 27\\
2003& 2 &Other\tnotex{Calc2} &330& 321& 40 & 202\\
2004& 3 &Other\tnotex{Calc3} &336& 361&203 &60\\
2005& 4 &Other\tnotex{Calc4} &360& 32& 118 &275\\
2006& 5 &Other\tnotex{Calc5} &350& 432& 118 &275\\
\midrule[\heavyrulewidth]
2001& 0 &This work &3& 32& 10& 27\\
2002& 1 &Other\tnotex{Calc1} &29&19&23& 27\\
2003& 2 &Other\tnotex{Calc2} &330& 321& 40 & 202\\
2004& 3 &Other\tnotex{Calc3} &336& 361&203 &60\\
2005& 4 &Other\tnotex{Calc4} &360& 32& 118 &275\\
2006& 5 &Other\tnotex{Calc5} &350& 432& 118 &275\\
\midrule[\heavyrulewidth]
2001& 0 &This work &3& 32& 10& 27\\
2002& 1 &Other\tnotex{Calc1} &29&19&23& 27\\
2003& 2 &Other\tnotex{Calc2} &330& 321& 40 & 202\\
2004& 3 &Other\tnotex{Calc3} &336& 361&203 &60\\
2005& 4 &Other\tnotex{Calc4} &360& 32& 118 &275\\
2006& 5 &Other\tnotex{Calc5} &350& 432& 118 &275\\
\midrule[\heavyrulewidth]
2001& 0 &This work &3& 32& 10& 27\\
2002& 1 &Other\tnotex{Calc1} &29&19&23& 27\\
2003& 2 &Other\tnotex{Calc2} &330& 321& 40 & 202\\
2004& 3 &Other\tnotex{Calc3} &336& 361&203 &60\\
2005& 4 &Other\tnotex{Calc4} &360& 32& 118 &275\\
2006& 5 &Other\tnotex{Calc5} &350& 432& 118 &275\\
\midrule[\heavyrulewidth]
2001& 0 &This work &3& 32& 10& 27\\
2002& 1 &Other\tnotex{Calc1} &29&19&23& 27\\
2003& 2 &Other\tnotex{Calc2} &330& 321& 40 & 202\\
2004& 3 &Other\tnotex{Calc3} &336& 361&203 &60\\
2005& 4 &Other\tnotex{Calc4} &360& 32& 118 &275\\
2006& 5 &Other\tnotex{Calc5} &350& 432& 118 &275\\
%\bottomrule
\end{longtable}
\begin{tablenotes}
\item Ref.\label{Calc1}
\item Ref.\label{Calc2}
\item Ref.\label{Calc3}
\item Ref.\label{Calc4}
\item Ref.\label{Calc5}
\end{tablenotes}
\end{ThreePartTable}
\end{document}
答案1
看看吧,下面的内容可以帮助到你:
\renewlist{tablenotes}{enumerate*}{1}
\makeatletter
\setlist[tablenotes]{label=\tnote{\alph*},
ref=\alph*,
itemsep=\z@,
topsep=\z@skip,
partopsep=\z@skip,
parsep=\z@,
itemindent=\z@,
labelindent=\tabcolsep,
labelsep=.8em,
leftmargin=*,
align=left,
before={\footnotesize}}
\makeatother
请注意,我没有关心您的tablenotes
阵型,但您可以尝试以下设置:
\setlist[tablenotes]{label=\tnote{\alph*}\ ,
before=\unskip{: }, itemjoin={{;\quad }}, itemjoin*={{, and }},
before={\footnotesize}
}
这使: