奇怪的是,当我编译文档时,LaTeX 会跳过表格编号。它从表格 2 到表格 4。我使用两个表格环境和一个三部分表格。当我删除第二个表格时,编译文档时数字看起来正确。
不知道为什么会发生这种情况。下面是最简单的例子。
\documentclass[12pt,letterpaper]{article}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{float}
\usepackage{threeparttablex}
\usepackage{ltablex}
\usepackage[margin=1in]{geometry}
\usepackage{setspace}
\doublespacing
\frenchspacing
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\begin{document}
\begin{table}
\caption{First table}
\centering
\begin{tabular}[t]{lrllr}
\toprule
Column A & Column B & Column C & Column D & Column E \\
\midrule
Some text & 1 & Some text & Some text & 111 \\
Some text & 1 & Some text & Some text & 111 \\
Some text & 1 & Some text & Some text & 111 \\
Some ytexty & 1 & Some text & Some text & 111 \\
Some text & 1 & Some text & Some text & 1,111 \\
\addlinespace
Some text & 1 & Some text & Some text & 1,111 \\
Some text & 1 & Some text & Some text & 11,111\\
Some text & 1 & Some text & Some text & 1,111\\
Some text & 1 & Some text & Some text & 1,111\\
Some text & 1 & Some text & Some text & 111\\
\bottomrule
\end{tabular}
\end{table}
\begin{table}
\caption{Second table}
\centering
\begin{threeparttable}
\begin{tabularx}{\linewidth}{rD{.}{.}{3.8}D{.}{.}{3.8}}
\toprule
& \multicolumn{1}{X}{Column A} & \multicolumn{1}{X}{Column B}\\
\midrule
Some text & 0.11 & 0.1\\
& (0.11; 0.11) & (0.11; 0.11)\\
Some text & 0.11 & 0.1\\
& (0.1; 0.1) & (0.11; 0.11)\\
Some text & 0.11 & 0.11\\
\addlinespace
& (0.11; 0.11) & (0.11; 0.11)\\
Some text & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11)\\
Some text & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11)\\
\addlinespace
Some text & 0.1 & 0.11\\
& (0.11; 0.11) & (0.11; 0.1)\\
Some text & 0.11 & 0.11\\
& (0.11; 0.11) & (0.1; 0.11)\\
Some text & 0.11 & 0.11\\
\addlinespace
& (0.1; 0.11) & (0.11; 0.11)\\
Some text & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.1)\\
Some text & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11)\\
\bottomrule
\end{tabularx}
\begin{tablenotes}
\item Long table notes.
\end{tablenotes}
\end{threeparttable}
\end{table}
\begin{ThreePartTable}
\begin{TableNotes}
\item First long table notes
\end{TableNotes}
\begin{tabularx}{\linewidth}{rD{.}{.}{4.8}D{.}{.}{4.8}D{.}{.}{4.8}D{.}{.}{4.8}}
\caption{Third table}\\
\toprule
\multicolumn{1}{c}{ } & \multicolumn{1}{X}{Some text} & \multicolumn{1}{X}{Some text} \\
\cmidrule(l{3pt}r{3pt}){2-3} \cmidrule(l{3pt}r{3pt}){4-5}
& \multicolumn{1}{X}{Column A.1} & \multicolumn{1}{X}{Column A.2} & \multicolumn{1}{X}{Column B.1} & \multicolumn{1}{X}{Column B.2} \\
\midrule
\endfirsthead
\caption[]{Third table \textit{(continued)}}\\
\toprule
\multicolumn{1}{c}{ } & \multicolumn{1}{X}{Column A} & \multicolumn{1}{X}{Column B} \\
\cmidrule(l{3pt}r{3pt}){2-3} \cmidrule(l{3pt}r{3pt}){4-5}
& \multicolumn{1}{X}{Column A.1} & \multicolumn{1}{X}{Column A.2} & \multicolumn{1}{X}{Column B.1} & \multicolumn{1}{X}{Column B.2} \\
\midrule
\endhead
\midrule \multicolumn{5}{r}{\itshape continues on next page} \\
\midrule
\endfoot
\bottomrule
\insertTableNotes
\endlastfoot
111 & 0.11 & 0.11 & & \\
& (0.1; 0.11) & (0.11; 0.11) & & \\
1111 & 0.11 & 0.11 & & \\
& (0.11; 0.11) & (0.11; 0.1) & & \\
1111 & 0.11 & 0.11 & & \\
\addlinespace
& (0.11; 0.11) & (0.1; 0.11) & & \\
1111 & 0.11 & 0.11 & & \\
& (0.11; 0.11) & (0.11; 0.11) & & \\
1111 & 0.11 & 0.11 & & \\
& (0.11; 0.11) & (0.11; 0.11) & & \\
\addlinespace
1111 & 0.11 & 0.11 & & \\
& (0.11; 0.11) & (0.11; 0.11) & & \\
1111 & 0.1 & 0.11 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.1) & (0.1; 0.11)\\
1111 & 0.11 & 0.11 & 0.11 & 0.1\\
\addlinespace
& (0.11; 0.11) & (0.11; 0.1) & (0.1; 0.11) & (0.11; 0.11)\\
1111 & 0.1 & 0.11 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.1) & (0.11; 0.1) & (0.11; 0.11)\\
1111 & 0.11 & 0.11 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.1; 0.11) & (0.11; 0.1) & (0.11; 0.11)\\
\addlinespace
1111 & 0.11 & 0.1 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11)\\
1111 & 0.11 & 0.1 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11)\\
1111 & 0.11 & 0.11 & 0.11 & 0.11\\
\addlinespace
& (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11)\\
1111 & 0.11 & 0.11 & 0.11 & 0.1\\
& (0.11; 0.1) & (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11)\\
1111 & 0.11 & 0.1 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11) & (0.1; 0.11) & (0.11; 0.11)\\
\addlinespace
1111 & 0.11 & 0.11 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11)\\
1111 & 0.11 & 0.1 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.1)\\
1111 & 0.11 & 0.11 & 0.11 & 0.11\\
\addlinespace
& (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11)\\
11111 & 0.11 & 0.11 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.1; 0.11) & (0.11; 0.11) & (0.11; 0.11)\\
1111 & 0.11 & 0.11 & 0.11 & 0.11\\
& (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11) & (0.11; 0.11)\\
\end{tabularx}
\end{ThreePartTable}
\end{document}