1

I want two figures to appear side by side in a beamer block. Can it be done? I have tried minipage and subfigure, but it all appears vertically. Here is a sample of what I have done (the scale was put randomly to try things out.)

\documentclass{beamer}
\usetheme{Boadilla}
\usepackage{tabularx}
\usepackage{booktabs}

\begin{document} \begin{frame}{1}

\begin{block}
1

\begin{figure} \begin{minipage}{.5\textwidth} \centering \includegraphics[width=0.3\linewidth]{ej3.png} \caption{1} \end{minipage} \begin{minipage}{.5\textwidth} \centering \includegraphics[width=0.3\linewidth]{ej3.png} \caption{1} \end{minipage} \end{figure}

\end{block}

\end{frame} \end{document}

Michael
  • 13
  • 2
    You are adding a space between the two minipages and there isn't enough room. Use \end{minipage}% or \end{minipage}\hfill. – John Kormylo Dec 12 '22 at 03:06

1 Answers1

0

I have noticed this problem (?) in beamer with minipage. If you reduce the width of the pages to be less than 1, it will work.

\documentclass{beamer}
\usetheme{Boadilla}
\usepackage{tabularx}
\usepackage{booktabs}

\begin{document} \begin{frame}{1}

\begin{block} 1 \begin{figure} \begin{minipage}{.45\textwidth} \centering \includegraphics[width=0.5\linewidth]{example-image-a} \caption{1} \end{minipage} \begin{minipage}{.45\textwidth} \centering \includegraphics[width=0.5\linewidth]{example-image-b} \caption{1} \end{minipage} \end{figure}

\end{block}

\end{frame} \end{document}

The output looks like this:

enter image description here

mas
  • 1,333