两张桌子有相同的号码

两张桌子有相同的号码

假设我在三个单独的页面上有三个表格。如果第一个表格的标题是表 1:基本估算,我希望第二个表格带有标题表 1:基本估算(续)第三个(逻辑)表格需要添加标题表 2:进一步估计

我该如何实现这一点?仅举一个例子,我使用以下命令手动更改第二个表格的标题。但这导致第三个表格的标题为表 3:进一步估计

\begin{table}
\centering
\renewcommand\thetable{1}
\caption{Basic Estimations (continued)}
\begin{tabular}{lcc} \hline
  1 & 2 & 3 \\ hline
\end{tabular}
\end{table}

答案1

您可以通过加载包并在第二个之后立即caption插入指令来实现排版目标。\ContinuedFloat\begin{table}

在此处输入图片描述

\documentclass{article}
\usepackage{caption} % for '\ContinuedFloat' directive
\begin{document}

\begin{table}[ht!]
\centering\caption{Basic Estimations}
\begin{tabular}{ccc} 1 & 2 & 3 \\ \end{tabular}
\end{table}

\begin{table}[h!]
\ContinuedFloat  %% <-- new
\centering\caption{Basic Estimations (continued)}
\begin{tabular}{ccc} 1 & 2 & 3 \\ \end{tabular}
\end{table}

\begin{table}[h!]
\centering\caption{Further Estimations}
\begin{tabular}{ccc} 1 & 2 & 3 \\ \end{tabular}
\end{table} 
\end{document}

附录回答了原帖作者的后续询问:采用此方法的一个附带好处\ContinuedFloat是,可以创建对 LaTeXtable或的初始部分和后续部分的单独交叉引用figure。(与往常一样,请务必发出\label说明说明\caption。)我们假设“表 1”分为两个部分。如果标签为\label{tab:1}和,则可以通过和 来\label{tab:1-cont}创建单独的交叉引用标注。两个标注都将编号为“1”;为了避免读者产生混淆,请务必编写类似和 的内容。\ref{tab:1}\ref{tab:1-cont}In the initial part of Table \ref{tab:1}in the continued part of Table \ref{tab:1}

以下 MWE(最小工作示例)使用hyperrefcleveref 包来更容易识别 LaTeX 生成的交叉引用调用。

在此处输入图片描述

\documentclass{article}
\usepackage{caption} % for '\ContinuedFloat' directive
\usepackage[colorlinks,allcolors=blue]{hyperref}
\usepackage[noabbrev,nameinlink]{cleveref} 
\begin{document}
\noindent
Cross-references to the first part of \cref{tab:1}, to the continued 
part of \cref{tab:1-cont}, and to \cref{tab:2}.

\clearpage
\begin{table}
\centering\caption{Basic Estimations} \label{tab:1}
\begin{tabular}{ccc} 1 & 2 & 3 \\ \end{tabular}
\end{table}
\clearpage
\begin{table}
\ContinuedFloat
\centering\caption{Basic Estimations (continued)} \label{tab:1-cont}
\begin{tabular}{ccc} 1 & 2 & 3 \\ \end{tabular}
\end{table}
\clearpage
\begin{table}
\centering\caption{Further Estimations} \label{tab:2}
\begin{tabular}{ccc} 1 & 2 & 3 \\ \end{tabular}
\end{table}
\end{document}

相关内容