![初心者向け - 1 枚のスライドに 3 枚の画像を配置し、上部に 2 枚、下部に 1 枚を配置する方法](https://rvso.com/image/370328/%E5%88%9D%E5%BF%83%E8%80%85%E5%90%91%E3%81%91%20-%201%20%E6%9E%9A%E3%81%AE%E3%82%B9%E3%83%A9%E3%82%A4%E3%83%89%E3%81%AB%203%20%E6%9E%9A%E3%81%AE%E7%94%BB%E5%83%8F%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%97%E3%80%81%E4%B8%8A%E9%83%A8%E3%81%AB%202%20%E6%9E%9A%E3%80%81%E4%B8%8B%E9%83%A8%E3%81%AB%201%20%E6%9E%9A%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95.png)
ちょっとした例を挙げると、
\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
- 3つのグラフすべてを当てはめたい場合はそして環境
itemize
を 1 つのフレームに収めるには、最初の行に 2 つ、2 番目の行に 3 つ目を配置するのではなく、3 つのグラフすべてを並べて配置する必要があります。 - 提供されたコードでは、
\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}