0

Is it possible to continue the sub-figure numbering across two frames in beamer?

I have four figures which are placed using subfigure, and need to place two on one frame and two on another. The ones on the first should be numbered (a) and (b), and the ones on the second should be (c) and (d).

Basic code

\begin{frame}
\begin{figure}
\centering
\begin{subfigure}[b]{0.45\textwidth}
 \includegraphics[width=\textwidth]{1.png}
 \caption{Fig1}
 \label{fig:1}
 \end{subfigure}
\begin{subfigure}[b]{0.45\textwidth}
 \includegraphics[width=\textwidth]{2.png}
 \caption{Fig2}
 \label{fig:2}
 \end{subfigure}
\caption{Caption.}
\label{fig:caption}
\end{figure}
\end{frame}

\begin{frame}
\begin{figure}
\centering
\begin{subfigure}[b]{0.45\textwidth}
 \includegraphics[width=\textwidth]{3.png}
 \caption{Fig3}
 \label{fig:3}
 \end{subfigure}
\begin{subfigure}[b]{0.45\textwidth}
 \includegraphics[width=\textwidth]{4.png}
 \caption{Fig4}
 \label{fig:4}
 \end{subfigure}
\caption{Caption.}
\label{fig:caption}
\end{figure}

\end{frame}
  • 2
    Yes, it is possible, but probably not automatically. You need to adjust subfigure counter on next slide (frame) on desired value. If you will provide minimal working example, it will be more easy to help you. – Zarko Jun 21 '15 at 13:01
  • I have added an example in the question, please help. – S_S Jun 22 '15 at 4:10
1
\documentclass{beamer}
    \usepackage{graphicx}
    \usepackage{subfig}

    \begin{document}
\begin{frame}
    \begin{figure}
    \centering
\subfloat[Fig1 \label{fig:1}]{
    \includegraphics[width=0.45\textwidth]{example-image-a}}
\subfloat[Fig2 \label{fig:2}]{
    \includegraphics[width=0.45\textwidth]{example-image-b}}
\caption{Caption.}
\label{fig:caption}
    \end{figure}
\end{frame}

\begin{frame}
    \begin{figure}
    \addtocounter{subfigure}{2}
\centering
    \centering
\subfloat[Fig3 \label{fig:3}]{
    \includegraphics[width=0.45\textwidth]{example-image-a}}
\subfloat[Fig4 \label{fig:4}]{
    \includegraphics[width=0.45\textwidth]{example-image-b}}
\caption{Caption.}
\label{fig:caption}
    \end{figure}
\end{frame}
    \end{document}

I consider that subfigure is obsolete and it is replace width subfig or subcaption. In my MWE I select subfig.

enter image description here

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.