我有这个小例子,
\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}
我正在尝试使这些图像对齐,以便我的顶行有 2 张图像,然后是第 3 张图像和下一行,并位于顶部 2 张图像的中心。
但我尝试的所有格式化都变得越来越糟。
答案1
您可以使用以下列:
\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}
答案2
一些评论和意见:
- 在
beamer
文档中,figure
环境table
不会浮动。 - 事实上,在文档中,使用和环境
beamer
没有什么意义——除了作为和环境的容器,我想。哦,只需将标题材料放在的参数中即可。figure
table
subfigure
subtable
\frametitle
- 如果你真的想拟合所有三个图表和如果您要在一个框架中展示整个
itemize
环境,几乎肯定必须将所有三个图表并排放置,而不是将两个图表放在第一行,将第三个图表放在第二行。 - 在您提供的代码中,指令的宽度和比例选项
\includegraphics
相互冲突。请仅使用选项,而不要同时使用两者。
\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}