2

I have this small example,

\documentclass{beamer}

\mode<presentation>
{
  \usetheme{Boadilla}     
  \usecolortheme{wolverine}
  \usefonttheme{structurebold}  
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
\setbeamertemplate{itemize items}[ball]
} 

\usepackage{array,amsmath,booktabs}
\usepackage{amsmath}
\usepackage[version=4]{mhchem}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{frame}
\begin{figure}[H]
  \centering
  \begin{subfigure}[b]{0.28\linewidth}
    \includegraphics[clip, trim=1 1.75 3 1, width=50mm,scale=0.35]{Image1}
     \caption{Substrate-Enzyme association}
  \end{subfigure}
  \begin{subfigure}[b]{0.28\linewidth}
    \includegraphics[clip, trim=1 1.75 3 1, width=50mm,scale=0.35]{Image2}
    \caption{Complex dissociation}
  \end{subfigure} \\
  \begin{subfigure}[b]{0.3\linewidth}
    \includegraphics[clip, trim=1 1.75 3 1, width=50mm,scale=0.35]{Image3}
    \caption{Product formation}
  \end{subfigure}
  \caption{Prior and posterior after 100, 200 and 300 reactions for reaction in Micahelis-Menten model}
  \label{fig:boat2}
\end{figure}
\begin{itemize}
\item as more reactions take place, posterior becomes narrower 
\end{itemize}
\end{frame}

 \end{document}

And I am trying to get these images to align so that I have 2 images on my top row, then the 3rd image and the following line and centred between the 2 top images.

But everything I try the formatting keeps getting worse and worse.

Mico
  • 506,678
Gragbow
  • 279
  • 2
  • 13

2 Answers2

3

Some comments and observations:

  • In a beamer document, figure and table environments don't float.
  • Indeed, in a beamer document, there's little point in employing figure and table environments -- other than, say, as containers for subfigure and subtable environments, I suppose. Oh, and just place the caption material in the argument of \frametitle.
  • If you really want to fit all three graphs and the itemize environment in a single frame, you will almost certainly have to place all three graphs side by side, rather than 2 on the first row and the third on the second row.
  • In the code you provided, the width and scale options of the \includegraphics directives are in conflict with each other. Use only option, but not both.

enter image description here

\documentclass[demo]{beamer} % omit 'demo' option in real document
%% I've taken the liberty of streamling and de-duplicating the preamble.
\mode<presentation>%
{ \usetheme{Boadilla}     
  \usecolortheme{wolverine}
  \usefonttheme{structurebold}  
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
\setbeamertemplate{itemize items}[ball] } 
\usepackage{array,mathtools,booktabs}
\usepackage[version=4]{mhchem}
\usepackage{subcaption}
\begin{document}

\begin{frame}
\frametitle{Prior and posterior after 100, 200 and 300 reactions for reaction in Micahelis-Menten model}
\begin{figure}
\begin{subfigure}[t]{0.3\linewidth}
     \includegraphics[clip, trim=1 1.75 3 1, width=\textwidth]{Image1}
     \caption{Substrate-Enzyme association}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.3\linewidth}
    \includegraphics[clip, trim=1 1.75 3 1, width=\textwidth]{Image2}
    \caption{Complex dissociation}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.3\linewidth}
    \includegraphics[clip, trim=1 1.75 3 1, width=\textwidth]{Image3}
    \caption{Product formation}
\end{subfigure}
\end{figure}

\begin{itemize}
\item As more reactions take place, posterior becomes narrower.
\end{itemize}
\end{frame}
\end{document}
Mico
  • 506,678
  • 1
    As far as I know graphicx is loaded by beamer already, otherwise \includegraphics with overlay syntax would be pretty useless. (I know, the OP has the loading in his/her example) –  Feb 12 '18 at 20:36
  • 1
    @ChristianHupfer - Good point! Indeed, the beamer class loads graphicx automatically. I've edited the preamble to heave off one more package-loading directive. – Mico Feb 12 '18 at 20:41
  • Isn't the third image supposed to be below the first two? – cfr Feb 14 '18 at 03:31
  • @cfr - please see the third bulletpoint in my answer. :-) – Mico Feb 14 '18 at 05:34
  • 1
    Ah, yes. Sorry - missed that. I guess I'm even less clear what the OP actually wants the more I re-read the question. – cfr Feb 14 '18 at 19:33
3

You can make use of columns:

\documentclass{beamer}

\mode<presentation>
{
  \usetheme{Boadilla}     
  \usecolortheme{wolverine}
  \usefonttheme{structurebold}  
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
\setbeamertemplate{itemize items}[ball]
} 

\usepackage{array,amsmath,booktabs}
\usepackage{amsmath}
\usepackage[version=4]{mhchem}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{frame}\centering
  \begin{columns}
    \begin{column}{0.5\textwidth}
  \begin{figure}
    \includegraphics[clip, trim=1 1.75 3 1, width=30mm,scale=0.3]{Image1}
     \caption*{Substrate-Enzyme association}
  \end{figure}
    \end{column}
    \begin{column}{0.5\textwidth}
  \begin{figure}[b]
    \includegraphics[clip, trim=1 1.75 3 1, width=30mm,scale=0.3]{Image2}
    \caption*{Complex dissociation}
  \end{figure} 
    \end{column}
  \end{columns}
\vspace{-10px}  
  \begin{columns}
    \begin{column}{0.5\textwidth}
    \begin{figure}[b]
      \includegraphics[clip, trim=1 1.75 3 1, width=30mm,scale=0.3]{Image3}
      \caption*{Product formation}
  \end{figure}
    \end{column}
  \end{columns}
\vspace{-20px}  
\begin{columns}
  \begin{column}{\textwidth}
\begin{figure}[H]
  \caption{\centering{}Prior and posterior after 100, 200 and 300 reactions for reaction in Micahelis-Menten model}
  \label{fig:boat2}
\end{figure}
\vspace{-25px}
\begin{itemize}
\item as more reactions take place, posterior becomes narrower 
\end{itemize}
  \end{column}
\end{columns}
\end{frame}

 \end{document}

g

yantar92
  • 46
  • 2
  • Welcome! This definitely seems more Beamer-like. I'm not clear whether the OP wants the gap in the top row or not, but I agree that the question does seem to ask for the third on a new line. – cfr Feb 14 '18 at 03:33