[Tex/LaTex] Two Side by side figures having problem with captions (a) and (b)

beamercaptionssubfloats

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} 

Best Answer

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

Related Question