1

In a chapter of my thesis, I have 3 figures where the third one consists of many subfigures that must be split over 3 pages. For that, I used \ContinuedFloat and works fine. The problem, however, is the figure number is 4.1 which is not what I expect; I expect 4.3 as there are two figures before this one where they have the correct numbers. The third figure is:

\documentclass[demo]{report} % remove 'demo' option in real document
\usepackage{subcaption,graphicx,geometry}
\begin{document}
\counterwithin{figure}{chapter} 
\setcounter{chapter}{4} % just for this example

\begin{figure}[tb]
    \centering
    \subfloat[FS -- Entropy]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/FS_Entropy_.pdf}%
        \label{fig:fse}%
    }
    \subfloat[FS -- Phenotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/FS_Phenotype_.pdf}%
        \label{fig:fsp}%
    }\par
    \subfloat[FS -- Genotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/FS_Genotype_.pdf}%
        \label{fig:fsg}%
    }\par
    \subfloat[CL -- Entropy]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/CL_Entropy_.pdf}%
        \label{fig:cle}%
    }
    \subfloat[CL -- Phenotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/CL_Phenotype_.pdf}%
        \label{fig:clp}%
    }\par
    \subfloat[CL -- Genotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/CL_Genotype_.pdf}%
        \label{fig:clg}%
    }\par
    \subfloat{%
        \includegraphics[width=0.6\textwidth]{Images/Chapter4/RQ2/legend_crop.pdf}%
        \label{fig:leg1}%
    }
\end{figure}
\begin{figure}[tb]\ContinuedFloat
    \centering
    \subfloat[DIP -- Entropy]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/DIP_Entropy_.pdf}%
        \label{fig:dipe}%
    }
    \subfloat[DIP -- Phenotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/DIP_Phenotype_.pdf}%
        \label{fig:dipp}%
    }\par
    \subfloat[DIP -- Genotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/DIP_Genotype_.pdf}%
        \label{fig:dipg}%
    }\par
    \subfloat[AR -- Entropy]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/AR_Entropy_.pdf}%
        \label{fig:are}%
    }
    \subfloat[AR -- Phenotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/AR_Phenotype_.pdf}%
        \label{fig:arp}%
    }\par
    \subfloat[AR -- Genotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/AR_Genotype_.pdf}%
        \label{fig:arg}%
    }\par
    \subfloat{%
        \includegraphics[width=0.6\textwidth]{Images/Chapter4/RQ2/legend_crop.pdf}%
        \label{fig:leg2}%
    }
\end{figure}
\begin{figure}[tb]\ContinuedFloat
    \centering
    \subfloat[DE -- Entropy]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/ED_Entropy_.pdf}%
        \label{fig:dee}%
    }
    \subfloat[DE -- Phenotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/ED_Phenotype_.pdf}%
        \label{fig:dep}%
    }\par
    \subfloat[DE -- Genotype]{%
        \includegraphics[width=0.5\textwidth]{Images/Chapter4/RQ2/ED_Genotype_.pdf}%
        \label{fig:deg}%
    }\par
    \subfloat{%
        \includegraphics[width=0.6\textwidth]{Images/Chapter4/RQ2/legend_crop.pdf}%
        \label{fig:leg3}%
    }
    \caption{Different techniques with different measures}
    \label{fig:RQ2_plot}
\end{figure}

\end{document}

As I mentioned, the figure number of this is Figure 4.1 where in fact it should be Figure 4.3.

Do you have any idea what the problem is?

3
  • 2
    As always on this site please post a full minimal self contained example that others can copy and test as is. Here we don't have your images, no preamble or document class. Where does \ContinuedFloat even come from?
    – daleif
    Aug 13, 2020 at 18:55
  • Check tex.stackexchange.com/a/15693/91556
    – hesham
    Aug 13, 2020 at 19:07
  • 1
    I've taken the liberty of editing/augmenting your code to make it minimally compilable. If I missed or misunderstood something essential about your document setup, please do edit the code to make it consistent with your actual document setup.
    – Mico
    Aug 13, 2020 at 19:57

1 Answer 1

1

You claim,

"... the figure number [in the third figure environment] is Figure 4.1 where in fact it should be Figure 4.3".

Within the context of the code snippet you provided, this claim is false for two separate reasons.

  1. The first and second figure environments don't contain \caption statements. Hence, they don't provide the standard mechanism for incrementing the figure counter. The first time a figure-related \caption statement is encountered is in the third figure environment. Hence, its number must be 4.1 (assuming we're in Chapter 4 and figure numbers are prefixed with the chapter number).

  2. Even if the first and second figure environments contained \caption statements, their \ContinuedFloat statements serve to make sure that the figure counter is not incremented by any \caption directives.

What to do? I suggest you provide the directives

\caption{Different techniques with different measures, Part 1 of 3}
\label{fig:RQ2_plot}

at the top of the first figure environment and

\caption{Different techniques with different measures, Part 2 of 3}

and

\caption{Different techniques with different measures, Part 3 of 3}

immediately after the \ContinuedFloat statements in the second and third figure environments.


Of course, if I added the instruction

\addtocounter{figure}{2}

immediately before the first figure environment, its caption number would indeed be 4.3, not 4.1.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .