2

I have two figures with multiple subfigures in each. The subfigures in my first figure are named a), b), c), d). In my second figure, I want my subfigures to start numbering where my first figure ends, e), f), g)). Does anyone know how to do this? Thanks in advance

\usepackage{subcaption}

code:

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth,trim={2cm 7cm 2cm 6cm},clip]{figures/Ellipse10.pdf}
    \caption{}
    \label{}
\end{subfigure}

\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth,trim={2cm 7cm 2cm 6cm},clip]{figures/Ellipse25.pdf}
    \caption{}
    \label{}
\end{subfigure}
%
\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth,trim={2cm 7cm 2cm 6cm},clip]{figures/Ellipse15.pdf}
    \caption{}
    \label{}
\end{subfigure}
%
    \begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth,trim={2cm 7cm 2cm 6cm},clip]{figures/Ellipse30.pdf}
    \caption{}
    \label{}
\end{subfigure}
\caption{}
\label{}
\end{figure}



\begin{figure}
\centering
    \begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth,trim={2cm 7cm 2cm 6cm},clip]{figures/Ellipse50.pdf}
    \caption{}
    \label{}
\end{subfigure}
%
    \begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth,trim={2cm 7cm 2cm 6cm},clip]{figures/Ellipse70.pdf}
    \caption{}
    \label{}
\end{subfigure}
%
    \begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth,trim={2cm 7cm 2cm 6cm},clip]{figures/Ellipse90.pdf}
    \caption{}
    \label{}
\end{subfigure}

\caption{}
\label{}
\end{figure}
  • 4
    Welcome to TeX.SX! I know of at least four ways to get “subfigures”, you should tell us which one you're using. – egreg Dec 2 '18 at 17:42
  • I'm sorry for that. i'm using the same aproach as in this question: tex.stackexchange.com/questions/119984/… – Eirik Ulstein Dec 2 '18 at 17:46
  • instead of link please provide in question a complete small document beginning with \documentclass ... and ending \end{document}. help us to help you! – Zarko Dec 2 '18 at 18:03
  • 1
    Put \setcounter{subfigure}{4} inside the 1st subfigure within the 2nd figure. \begin{subfigure}[b]{0.49\textwidth}\setcounter{subfigure}{3} – Sigur Dec 2 '18 at 18:03
  • 2
    No, don't use the dirty \setcounter hack. This would not suppress the increasing of the main figure counter, and it would make trouble when using hyperref. Use \ContinuedFloat instead. – Axel Sommerfeldt Dec 2 '18 at 21:50
3

With the \ContinuedFloat macro from the caption package, the previous figure will be continued and the numbering will be correct:

\documentclass{article}

\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth]{example-image}
    \caption{}
    \label{}
\end{subfigure}

\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth]{example-image}
    \caption{}
    \label{}
\end{subfigure}
%
\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth]{example-image}
    \caption{}
    \label{}
\end{subfigure}
%
\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth]{example-image}
    \caption{}
    \label{}
\end{subfigure}
\caption{}
\label{}
\end{figure}

\clearpage

\begin{figure}[htbp]
\ContinuedFloat
\centering
    \begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth]{example-image}
    \caption{}
    \label{}
\end{subfigure}
%
\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth]{example-image}
    \caption{}
    \label{}
\end{subfigure}
%
\begin{subfigure}[b]{0.49\textwidth}
    \includegraphics[width=\textwidth]{example-image}
    \caption{}
    \label{}
\end{subfigure}

\caption{}
\label{}
\end{figure}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.