我在插入图形及其标题时遇到问题,我的代码如下
\documentclass{beamer}
\begin{document}
\begin{frame}
\centering
\caption {example1}
\includegraphics[width=5cm, height=4cm]{example-image-a}
\vspace{0.01em}
\caption {example2}
\includegraphics[width=5cm, height=4cm]{example-image-b}
\caption {example3}
\includegraphics[width=5cm, height=4cm]{example-image-c}
\end{frame}
\end{document}
答案1
您的选择不多。
第一的:
使用figure
环境。
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{figure}
\centering
\caption {example1}
\includegraphics[width=3cm]{example-image-a}
\vspace{0.01em}
\begin{columns}
\column{0.5\textwidth}
\centering
\caption {example2}
\includegraphics[width=3cm]{example-image-b}
\column{0.5\textwidth}
\centering
\caption {example3}
\includegraphics[width=3cm]{example-image-c}
\end{columns}
\end{figure}
\end{frame}
\end{document}
第二
用一个tabular
\documentclass{beamer}
\begin{document}
\begin{frame}
\centering
\begin{tabular}{c}
example1\\
\includegraphics[width=3cm]{example-image-a}
\end{tabular}
\vspace{0.01em}
\begin{tabular}{cc}
example2 & example3 \\
\includegraphics[width=3cm]{example-image-b}
&
\includegraphics[width=3cm]{example-image-c}
\end{tabular}
\end{frame}
\end{document}
第三
使用\captionof
\documentclass{beamer}
\usepackage{capt-of}
\begin{document}
\begin{frame}
\centering
{\captionof{figure}{example1}
\includegraphics[width=3cm]{example-image-a}
}
\vspace{0.01em}
\begin{columns}
\column{0.5\textwidth}
\centering
\captionof{figure}{example2}
\includegraphics[width=3cm]{example-image-b}
\column{0.5\textwidth}
\centering
\captionof{figure}{example3}
\includegraphics[width=3cm]{example-image-c}
\end{columns}
\end{frame}
\end{document}