LaTeX 图形编号不正确

LaTeX 图形编号不正确

我的 LaTeX 文件中有多个图形和子图形,但只有前几个编号正确。以下是导致我出现问题的代码部分:

\documentclass[11pt]{article}
\usepackage{graphicx}    
\usepackage{subcaption}
\usepackage{amsmath}

\begin{document}         

\begin{figure}[t]
\centering
  \includegraphics[width=5in]{figure1.png}
  \caption{Caption1}
\label{fig:fig1} 
\end{figure}

\begin{figure}[htp!]
 \caption{caption2}   \label{fig:fig2}
        \centering        
 \begin{subfigure}{\textwidth}
                \includegraphics[width=\textwidth]{subfig1.png}
                \caption{subfig1}
                \label{fig:subfig1}
        \end{subfigure}

          \begin{subfigure}{\textwidth}
                \includegraphics[width=\textwidth]{subfig2.png}
                \caption{subfig2}
                \label{fig:subfig2}
        \end{subfigure}
  \end{figure}

 \newpage
\begin{figure}[htp!]
\centering
\ContinuedFloat
          \begin{subfigure}{\textwidth}
                \includegraphics[width=\textwidth]{subfig3.png}
                \caption{subfig3}
                \label{fig:subfig3}
        \end{subfigure}


          \begin{subfigure}{\textwidth}
                \includegraphics[width=\textwidth]{subfig4.png}
                \caption{subfig4}
                \label{fig:subfig4}
        \end{subfigure}
 \end{figure}

 \newpage
\begin{figure}[htp!]
\centering 
  \includegraphics[width=5in]{figure3.png}
  \caption{Caption3}
\label{fig:fig3} 

\end{figure}

\end{document}

图 1 和图 2 的编号正确,但图 3 的编号为图 1。图 2 中的子图编号也不正确:前四个子图标记为 (a)-(d),但第三页的第五个子图又从 (a) 开始。\ContinuedFloat超过两页就不能用了吗?

以下是输出\listfiles

 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
subcaption.sty    2012/01/12 v1.1d Sub-captions (AR)
 caption.sty    2012/02/19 v3.2f Customizing captions (AR)
caption3.sty    2012/01/12 v1.4b caption3 kernel (AR)
 amsmath.sty    2000/07/18 v2.13 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
supp-pdf.mkii
  omscmr.fd    1999/05/25 v2.5h Standard LaTeX font definitions

相关内容