2

I am making presentation in latex, I have two side by side figures with same size. I want to give caption (a) and (b) to the figures left and right respectively, and a main caption (some text) for both figures. I need help doing this. Here is my code:

\begin{frame}
     \scriptsize
     \begin{itemize}
         \item some text
         \adjustbox{valign=T}{\begin{tabular}[t]{@{}c@{}}
                \includegraphics[width=0.47\linewidth,left]{images/py.pdf}\\
                 main caption some text
            \end{tabular}}%
            \adjustbox{valign=T,llap}{\begin{tabular}[t]{@{}c@{}}
                    \includegraphics[scale=0.25,right]{images/cy.pdf}
                \end{tabular}}
            \end{itemize}
        \end{frame} 
4

You can use the subfig package with beamer; in this way, you can use the standard \caption command and the elements will adapt to your theme colors/formatting:

\documentclass{beamer}
\usepackage{subfig}

\begin{document}

\begin{frame}
  \begin{itemize}
    \item Some text

    \bigskip

    \begin{figure}
    \centering
      \subfloat[]{\includegraphics[width=.3\linewidth]{example-image-a}}\qquad
      \subfloat[]{\includegraphics[width=.3\linewidth]{example-image-b}}
      \caption{Some main caption for the above figures.}
    \end{figure}
  \end{itemize}
\end{frame}

\end{document}

enter image description here

2

Here's how I would do it:

enter image description here

\documentclass{beamer}

\begin{document}

\begin{frame}
  \begin{itemize}
    \item Some text

    \bigskip

    \centering
    \begin{tabular}{@{}c@{}}
      \begin{tabular}{c}
        \includegraphics[width=.3\linewidth]{example-image-a} \\ \small (a)
      \end{tabular} \qquad
      \begin{tabular}{c}
        \includegraphics[width=.3\linewidth]{example-image-b} \\ \small (b)
      \end{tabular} \\
      Some main caption for the above figures.
    \end{tabular}
  \end{itemize}
\end{frame}

\end{document}

There is no real need for using the figure environment and automated numbering, since referencing in presentations doesn't work the same way it does in a regular document setting. As such, I've manually placed the sub-float numbering (a) and (b), each inside a tabular for each stacking. The bigger/outer tabular provides the final stacking of the side-by-side figures and the main caption.

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.