7

I'm following the answer in the linked question to align two images side by side in beamer in one slide: How to align two images side by side and to scale them automatically to use whole slide?

However, I want to add captions under each image. How can I do that?

3 Answers3

6

You can use columns environment and include one figure in each column:

\documentclass{beamer}

\begin{document}

\begin{frame}

\begin{columns}[onlytextwidth]
\begin{column}{.45\textwidth}
\begin{figure}
  \includegraphics[width=\textwidth]{example-image-a}
  \caption{First image}
\end{figure}
\end{column}
\hfill
\begin{column}{.45\textwidth}
\begin{figure}
  \includegraphics[width=\textwidth]{example-image-b}
  \caption{Second image}
\end{figure}
\end{column}
\end{columns}

\end{frame}

\end{document}

enter image description here

Ignasi
  • 136,588
4

Typically one should not include floats in a presentation and reference them. It's far better to repeat an image with additional context if you want to reference it. As such, you can set the images in a box-like structure without a number. I've done this using a full-width tabular:

enter image description here

\documentclass{beamer}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}@{}}
\begin{document}

\begin{frame}

\begin{tabular}{@{} *{2}{C{.5\linewidth}} }
  \includegraphics[width=.8\linewidth]{example-image-a} &
    \includegraphics[width=.8\linewidth]{example-image-b} \\[\abovecaptionskip]
  First caption &
    Second caption
\end{tabular}

\end{frame}

\end{document}
Werner
  • 603,163
2

Inside a figure environment you can use \caption many times. Use a minipage for each image with its corresponding \caption:

\documentclass{beamer}

\begin{document}

\begin{frame}

\begin{figure}
\begin{minipage}{.45\textwidth}
  \includegraphics[width=\linewidth]{example-image-a}
  \caption{First image}
\end{minipage}\hfill
\begin{minipage}{.45\textwidth}
  \includegraphics[width=\linewidth]{example-image-b}
  \caption{Second image}
\end{minipage}
\end{figure}

\end{frame}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128