Graphics, Figures & TablesContinuedFloat resetting figure numbers

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
samrat
Posts: 1
Joined: Tue Nov 05, 2013 1:41 pm

ContinuedFloat resetting figure numbers

Post by samrat »

Hi,

I am writing my thesis using \documentclass[oneside,12pt]{classes/CUEDthesisPSnPDF}

Thing is i had successfully written it on my CentOS 5 machine with an old texlive 2007 version. Now i removed the old version and replaced it with the texlive 2013 version.

And then my problems began with \ContinuedFloat. I am splitting 8 figures into 2 pages with 4 figures in each page. So each page has a subfloat caption and a main caption.

Unfortunately the figure caption in the 2nd page has a number preceding the 1st. On page 1 i have Figure 2.1, on page 2 i have Figure 2.0!! this is happening even for the tables.

In the preamble i have

Code: Select all

\documentclass[oneside,12pt]{classes/CUEDthesisPSnPDF}

\usepackage{graphicx}
\usepackage[font={sf,scriptsize}]{subfig}
\captionsetup{font={sf,small},labelfont=bf}
\usepackage{acronym}
\usepackage{alphalph}
\usepackage[usenames]{color}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{multirow}
\usepackage{array}
\usepackage{rotating}
\usepackage{natbib}
\usepackage{appendix}
\usepackage{comment}
\usepackage{booktabs}
\usepackage{url}
\usepackage{enumerate}
This is an example of the figures that is causing a problem:

Code: Select all

\begin{sidewaysfigure}[!htbp]
% +++ NCEP +++
   \begin{center}
%----------
   \subfloat[June]{\label{nc-jun-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/nc_Jun_Umax_80-02_xy.eps}}
   \hspace{10mm}
   \subfloat[July]{\label{nc-jul-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/nc_Jul_Umax_80-02_xy.eps}}
   \vskip 10mm
   \subfloat[August]{\label{nc-aug-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/nc_Aug_Umax_80-02_xy.eps}}
   \hspace{10mm}
   \subfloat[September]{\label{nc-sep-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/nc_Sep_Umax_80-02_xy.eps}}
%----------
   \end{center}
   \caption[(A) Zonal wind contours at 150hPa (\nc{}: JJAS)]{(A) Zonal wind contours (\ms{}) at 150hPa; black line passing through TEJ centre is jet axis. Contour intervals are 10\ms{}. \nc{}: 1980-2002 avg.}
   \label{fig: nc-jjas-Umax-80-02-xy}
\end{sidewaysfigure}
%++++++++++
\begin{sidewaysfigure}[!htbp]
% +++ ERA40 +++
\ContinuedFloat
   \begin{center}
%----------
   \subfloat[June]{\label{era40-jun-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/era40_Jun_Umax_80-02_xy.eps}}
   \hspace{10mm}
   \subfloat[July]{\label{era40-jul-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/era40_Jul_Umax_80-02_xy.eps}}
   \vskip 10mm
   \subfloat[August]{\label{era40-aug-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/era40_Aug_Umax_80-02_xy.eps}}
   \hspace{10mm}
   \subfloat[September]{\label{era40-sep-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/era40_Sep_Umax_80-02_xy.eps}}
%----------
   \end{center}
   \caption[(B) Zonal wind contours at 150hPa (\er{}: JJAS)]{(B) Zonal wind contours (\ms{}) at 150hPa; black line passing through TEJ centre is jet axis. Contour intervals are 10\ms{}. \er{}: 1980-2002 avg.}
   \label{fig: era40-jjas-Umax-80-02-xy}
\end{sidewaysfigure}
For the 1st set i am getting Figure 2.1: (A) some text
For the 2nd set i am getting Figure 2.0: (B) some text

After this the next figure restarts as Figure 2.1.

I had no problems earlier.

But in this minimal working example (same as above figures) no such problem occurs:

Code: Select all

\documentclass[12pt]{article}

\usepackage{graphicx}
\usepackage[font={sf,scriptsize}]{subfig}
\captionsetup{font={sf,small},labelfont=bf}
\usepackage{rotating}

\begin{document}

\newcommand{\nc}{\textit{NCEP}}
\newcommand{\er}{\textit{ERA40}}
\newcommand{\ms}{ m s$^{-1}$}

\begin{sidewaysfigure}[!htbp]
% +++ NCEP +++
   \begin{center}
%----------
   \subfloat[June]{\label{nc-jun-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/nc_Jun_Umax_80-02_xy.eps}}
%   \hspace{10mm}
   \subfloat[July]{\label{nc-jul-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/nc_Jul_Umax_80-02_xy.eps}}
%   \vskip 10mm
   \subfloat[August]{\label{nc-aug-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/nc_Aug_Umax_80-02_xy.eps}}
%   \hspace{10mm}
   \subfloat[September]{\label{nc-sep-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/nc_Sep_Umax_80-02_xy.eps}}
%----------
   \end{center}
   \caption[(A) Zonal wind contours at 150hPa (\nc{}: JJAS)]{(A) Zonal wind contours (\ms{}) at 150hPa; black line passing through TEJ centre is jet axis. Contour intervals are 10\ms{}. \nc{}: 1980-2002 avg.}
   \label{fig: nc-jjas-Umax-80-02-xy}
\end{sidewaysfigure}
%++++++++++
\begin{sidewaysfigure}[!htbp]
% +++ ERA40 +++
\ContinuedFloat
   \begin{center}
%----------
   \subfloat[June]{\label{era40-jun-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/era40_Jun_Umax_80-02_xy.eps}}
%   \hspace{10mm}
   \subfloat[July]{\label{era40-jul-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/era40_Jul_Umax_80-02_xy.eps}}
%   \vskip 10mm
   \subfloat[August]{\label{era40-aug-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/era40_Aug_Umax_80-02_xy.eps}}
%   \hspace{10mm}
   \subfloat[September]{\label{era40-sep-Umax-xy}\includegraphics[trim = 5mm 20mm 10mm 60mm, clip, scale=0.5]{/media/work/iisc/phd/profs/js/thesis/chapter_2/chapter_2_figs/eps/rean/era40_Sep_Umax_80-02_xy.eps}}
%----------
   \end{center}
   \caption[(B) Zonal wind contours at 150hPa (\er{}: JJAS)]{(B) Zonal wind contours (\ms{}) at 150hPa; black line passing through TEJ centre is jet axis. Contour intervals are 10\ms{}. \er{}: 1980-2002 avg.}
   \label{fig: era40-jjas-Umax-80-02-xy}
\end{sidewaysfigure}

\end{document}
Any advise is appreciated. Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

ContinuedFloat resetting figure numbers

Post by sommerfee »

samrat wrote:I am writing my thesis using \documentclass[oneside,12pt]{classes/CUEDthesisPSnPDF}
What document class is CUEDthesisPSnPDF based on?

Could you please offer me an example document showing the problem so I can examine and fix it?
But in this minimal working example (same as above figures) no such problem occurs
But what happens it you replace \documentclass[12pt]{article} with \documentclass[oneside,12pt]{classes/CUEDthesisPSnPDF}, does the problem occur afterwards?
Post Reply