附录中的表格编号错误

附录中的表格编号错误

我有一个包含 26 个表格的附录。奇怪的是,应该位于表格 21 之后的表格 22 却自动位于表格 2 之后(参见图片)。在此处输入图片描述

我使用环境“longtable”的两个表都发生了这种情况。

\documentclass[12pt]{report}
    \usepackage{tabulary}
    \usepackage[maxfloats=30,morefloats=12]{morefloats}
    \usepackage{booktabs}
    \usepackage{float,lscape}
    \usepackage{longtable}
   \usepackage{pdflscape}
    \usepackage{tabularx}
    \usepackage{multirow}
    \usepackage{bigstrut}

    \begin{document}

\begin{table}[htbp]
  \centering
  \caption{European gymnastics associations 1899}
  \tiny
    \begin{tabulary}{\textwidth}{LRRR}
    \hlinewd{1.25pt}
......
 \hlinewd{1.25pt}
    \end{tabulary}%
    \vspace{5pt}
    \captionsetup{font={scriptsize}}
    \caption*{Source: Eidgenössischer Turnverein (1899), own illustration}
  \label{tab:addlabel}%
\end{table}%

    \begingroup
    \centering
    \tiny
    \begin{longtable}[htbp]{*{5}1}
      \caption{Zurich gymnastics organization in 1907}
        \hline
        \multicolumn{1}{l}{Association} & Paying members & Non-paying members & Total & Active members \bigstrut\\
        \hline
......
\hline
        Total & 10840 & 2422  & 13262 & 2460 \bigstrut\\
        \hline
        \end{longtable}%
      \label{tab:addlabel}%
    \endgroup%

\begingroup
\centering
\tiny%
\begin{longtable}[h!]{*{7}l}
  \caption{Account of the Zurich gymnastics organization 1911}   
 \tabularnewline
...
 \hline
    Total &       &       & 13'359 & 2'812 & 16'171 & 2'767 \bigstrut\\
%    \hlinewd{1.25pt}
\end{longtable}
\label{tab:addlabel}%
\endgroup

    \end{document}

这可能与 \begingroup 和 \endgroup 命令有关吗?如何确保具有 longtable 环境的两个表位于正确的位置?

答案1

您无法(真正)使longtable浮动,(并且\centering对 也没有任何影响lingtable。最简单的修复方法是将 放在\clearpage之前longtable,这将在强制分页符处清除所有待处理的浮动,并阻止它们浮动过longtable

longtable文档确实警告过这种情况可能会发生)

相关内容