横向环境中长桌的标签编号跳过了一个 - 帮忙?

横向环境中长桌的标签编号跳过了一个 - 帮忙?

我在两个小节中分别将 a 排版longtable为 a并排版landscape在一起(实际上是在我的文档的附录中)。

每个小节前面只有几句话,\begin{landscape}但第一个表的标题标签当然是以“表 A.1”开头的。但之后的下一个表的标题标签是“表 A.3”。这是怎么回事?我以前从未在 LaTeX 中遇到过这种情况。:(

编辑我用于\captionof{table}[Caption for Lot]{Longer caption}每个长表。

来自.aux文件的相关行(我只替换了此代码中标题的实际内容,没有其他内容):

\@writefile{lot}{\contentsline {table}{\numberline {A.1}{\ignorespaces contentDUMMY}{11}{table.A.1}}
\newlabel{tab:AAA}{{A.1}{11}{contentDUMMY }{table.A.1}{}}
\mph@setcol{ii:11}{\mph@nr}
\mph@setcol{ii:12}{\mph@nr}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {A.1.1.2}contentDUMMY}{13}{subsubsection.A.1.1.2}}
\newlabel{contentDUMMY}{{A.1.1.2}{13}{contentDUMMY}{subsubsection.A.1.1.2}{}}
\mph@setcol{ii:13}{\mph@nr}
\gdef \LT@iii {\LT@entry 
    {1}{30.32938pt}\LT@entry 
    {1}{27.90813pt}\LT@entry 
    {1}{51.8908pt}\LT@entry 
    {4}{36.35272pt}\LT@entry 
    {4}{30.26454pt}\LT@entry 
    {4}{30.26454pt}\LT@entry 
    {4}{30.26454pt}\LT@entry 
    {4}{36.35272pt}\LT@entry 
    {4}{36.35272pt}\LT@entry 
    {1}{58.51552pt}\LT@entry 
    {4}{39.3968pt}\LT@entry 
    {4}{42.42996pt}\LT@entry 
    {4}{39.3968pt}\LT@entry 
    {4}{42.42996pt}\LT@entry 
    {4}{30.26454pt}\LT@entry 
    {4}{30.26454pt}}
\@writefile{lot}{\contentsline {table}{\numberline {A.3}{\ignorespaces contentDUMMY}{14}{table.A.3}}

答案1

你有一个longtable没有标题的,但长表无论如何都会增加计数器table。这就是为什么以下tablelongtable环境 标题的数字有误。使用

\begin{longtable}{..}%% Which has _no_ caption
%% No caption here
...
\end{longtable}
\addtocounter{table}{-1}%%%%% decrease the counter

\begin{table}%% Or a tabular _with_ a caption
\caption{...}
...
\end{table}

\begin{longtable}%% a long tabular with a caption
\caption{...}\\
...
\end{longtable}

相关内容