以下是代码:
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs,caption,fixltx2e}
\usepackage{threeparttable}
\usepackage[fleqn]{mathtools}
\usepackage{float}
\usepackage{lscape}
\usepackage{longtable}
\begin{document}
\begin{landscape}
\thispagestyle{empty}
\resizebox{\linewidth}{!}{\begin{threeparttable}
\begin{longtable}[c]{cllllll}
\caption{Table caption} \label{tablelabel} \\
\toprule
some toprule \\
\midrule
\endhead
longtable
\bottomrule
\end{longtable}
\begin{tablenotes}[para,flushleft]
Footnote tex
\end{tablenotes}
\end{threeparttable}
\end{landscape}
\end{document}
我得到的错误是:
[58])
Runaway argument?
{\begin {threeparttable} \begin {longtable}[c]{cllllll} \caption {Ads\ETC.
! File ended while scanning use of \Gscale@box@dd.
<inserted text>
\par
l.169 \input ch2
?
答案1
您收到的错误是由于\resizebox
没有右括号。但是,您不能\resizebox
在跨多页的内容上使用。此外,threeparttable
不适用于longtable
,您需要使用包threeparttablex
相反。下面是一个基于代码要点的示例:
\documentclass{article}
\usepackage{booktabs,fixltx2e}
\usepackage{threeparttablex}
\usepackage{longtable}
\begin{document}
\begin{ThreePartTable}
\begin{TableNotes}
\item[a] Footnote tex
\end{TableNotes}
\begin{longtable}[c]{cl}
\caption{Table caption} \label{tablelabel} \\
\toprule
some &headings\tnote{a} \\
\midrule
\endhead
\insertTableNotes
\endlastfoot
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
longtable &material\\
\bottomrule
\end{longtable}
\end{ThreePartTable}
\end{document}