3

I have the code:

\renewcommand{\thesubfigure}{\roman{subfigure}}

\begin{figure}[h!]
    \begin{subfigure}{.32\textwidth}
    \includegraphics[scale=.21]{figures/201.pdf}
    \caption{}
    \end{subfigure}
    \begin{subfigure}{.33\textwidth}
        \includegraphics[scale=.21]{figures/202.pdf}
        \caption{}
    \end{subfigure}
\end{figure}

\begin{figure}[h!]
    \begin{subfigure}{.32\textwidth}
        \includegraphics[scale=.21]{figures/204.pdf}
        \caption{\roman{4}}
    \end{subfigure}
\end{figure}

and I want the roman numbering to continue to the new figure subfigure? Is it possible? Now the captions of the subfigures are I, II and again I. I would like them to be I,II,III. Thanks!

  • 2
    Yes, it is possible. Insert \ContinuedFloat right after \begin{figure}[h!] of the 2nd figure (and change \caption{\roman{4}} to \caption{}).. – Axel Sommerfeldt Apr 10 '16 at 19:56
  • @AxelSommerfeldt thank you very much! It works now! – freebil Apr 10 '16 at 20:21
4

Yes, it is possible. Insert \ContinuedFloat right after \begin{figure}[h!] of the 2nd figure (and change \caption{\roman{4}} to \caption{}), i.e.:

\documentclass{article}
\usepackage[demo]{graphicx}

\usepackage{subcaption}
\renewcommand{\thesubfigure}{\roman{subfigure}}

\begin{document}

\begin{figure}[h!]
    \begin{subfigure}{.32\textwidth}
        \includegraphics[scale=.21]{figures/201.pdf}
        \caption{}
    \end{subfigure}
    \hfill
    \begin{subfigure}{.33\textwidth}
        \includegraphics[scale=.21]{figures/202.pdf}
        \caption{}
    \end{subfigure}
\end{figure}

\begin{figure}[h!]
    \ContinuedFloat   % --- This line added
    \begin{subfigure}{.32\textwidth}
        \includegraphics[scale=.21]{figures/204.pdf}
        \caption{}
    \end{subfigure}
\end{figure}

\end{document}

See also section 3.3 "Continued floats" of the caption package documentation.

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.