在 longtable 中使用 tablenotes 时出错

在 longtable 中使用 tablenotes 时出错

我正在尝试编译一个带有表格注释的长表,但是出现以下代码错误:

\begin{landscape}
\thispagestyle{empty}
\begin{threeparttable}
   \begin{longtable}{|c|c|c|c|c|c|c|}
 \toprule
 \midrule

some table

    \bottomrule
\begin{tablenotes}[para,flushleft]
     TS: The time span of relevant measurement.
     No: The number of measurements, those are given for the ease to refer the measurement, therefore they are not the arrangement of the measurements.
 \end{tablenotes}
     \end{threeparttable}  
   \end{longtable}  
\end{landscape}

错误是:

! You can't use `\prevdepth' in restricted horizontal mode.
\TPTdoTablenotes ->\par \prevdepth 
                                   \z@ \TPT@hsize \TPTnoteSettings \parinden...
l.231 \begin{tablenotes}[para,flushleft]

最后,我的序言是:

\usepackage{epstopdf}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{siunitx}
\usepackage{booktabs,caption,fixltx2e}
\usepackage{threeparttable}
\usepackage[fleqn]{mathtools}
\usepackage{float}
\usepackage{bigints}
\usepackage{cleveref}
\usepackage{lscape}
\usepackage{longtable}

一位 MWE 表示:

\documentclass[12pt]{article}
\usepackage{epstopdf}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{siunitx}
\usepackage{booktabs,caption,fixltx2e}
\usepackage{threeparttable}
\usepackage[fleqn]{mathtools}
\usepackage{float}
\usepackage{bigints}
\usepackage{cleveref}
\usepackage{lscape}
\usepackage{longtable}

\begin{document}


\begin{landscape}
\thispagestyle{empty}
\begin{threeparttable}
   \begin{longtable}{|c|c|c|c|c|c|c|}
   \caption{Adsorption and desorption measurement characteristics of MFU4.Br-1 and MFU4.Br-2.} \label{tab:meacon} \\
   some table
\begin{tablenotes}[para,flushleft]
     TS: The time span of relevant measurement.
     No: The number of measurements, those are given for the ease to refer the measurement, therefore they are not related with the arrangement of the measurements.
 \end{tablenotes}
\end{threeparttable}
   \end{longtable}%
\end{landscape}
\end{document}

答案1

更正后的代码应如下所示:

\begin{landscape}
\thispagestyle{empty}
\resizebox{\linewidth}{!}{\begin{threeparttable}
   \begin{longtable}{|c|c|c|c|c|c|c|}
   \caption{Adsorption and desorption measurement characteristics of MFU4.Br-1 and MFU4.Br-2.} \label{tab:meacon}\\
a & b&c&d&e&f&g\\
a & b&c&d&e&f&g\\
   \end{longtable}% The error corrected  here!!!
\begin{tablenotes}[para,flushleft]
     TS: The time span of relevant measurement.
     No: The number of measurements, those are given for the ease to refer the measurement, therefore they are not related with the arrangement of the measurements.
 \end{tablenotes}
\end{threeparttable}}
\end{landscape}

longtable启动前未关闭。tablenotes这导致了错误。

笔记:使用命令编辑代码\resizebox

相关内容