Beamer:在一张幻灯片上放 8 个数字的最佳方法是什么?

Beamer:在一张幻灯片上放 8 个数字的最佳方法是什么?

我想在一张幻灯片上放 8 个数字,以便其布局如下:

X X X X
X X X X

我曾考虑过创建 4 列,每列 2 个数字,但后来发现还有更好的方法。有什么想法吗?

答案1

我认为,您不需要为每个图形添加标题,并且所有图形都同样大:

在此处输入图片描述

\documentclass{beamer}
\begin{document}
\begin{frame}
\includegraphics[width=0.225\linewidth]{example-image-a}\hfill
\includegraphics[width=0.225\linewidth]{example-image-b}\hfill
\includegraphics[width=0.225\linewidth]{example-image-c}\hfill
\includegraphics[width=0.225\linewidth]{example-image}\bigskip

\includegraphics[width=0.225\linewidth]{example-image-a}\hfill
\includegraphics[width=0.225\linewidth]{example-image-b}\hfill
\includegraphics[width=0.225\linewidth]{example-image-c}\hfill
\includegraphics[width=0.225\linewidth]{example-image}
\end{frame}
\end{document}

每个单独的图像都有一个编号的子标题(对于未编号的标题,请添加\captionsetup[subfigure]{labelformat=empty}到序言中):

在此处输入图片描述

\documentclass{beamer}
\usepackage{subcaption}
\begin{document}

\begin{frame}
\begin{figure}
\subfloat[caption text]{\includegraphics[width=.225\linewidth]{example-image-a}}\hfill
\subfloat[caption text]{\includegraphics[width=.225\linewidth]{example-image-b}}\hfill
\subfloat[caption text]{\includegraphics[width=.225\linewidth]{example-image-c}}\hfill
\subfloat[caption text]{\includegraphics[width=.225\linewidth]{example-image}}\bigskip

\subfloat[caption text]{\includegraphics[width=.225\linewidth]{example-image-a}}\hfill
\subfloat[caption text]{\includegraphics[width=.225\linewidth]{example-image-b}}\hfill
\subfloat[caption text]{\includegraphics[width=.225\linewidth]{example-image-c}}\hfill
\subfloat[caption text]{\includegraphics[width=.225\linewidth]{example-image}}
\caption{shared caption for all images}
\end{figure}
\end{frame}
\end{document}

答案2

我不知道最好的方式,但这是A方式:

\documentclass{beamer}
\usepackage{subcaption}
\begin{document}
\begin{frame}
\begin{figure}
\begin{subfigure}{.25\textwidth}
Figure 1
\end{subfigure}%
\begin{subfigure}{.25\textwidth}
Figure 2
\end{subfigure}%
\begin{subfigure}{.25\textwidth}
Figure 3
\end{subfigure}%
\begin{subfigure}{.25\textwidth}
Figure 4
\end{subfigure}
\begin{subfigure}{.25\textwidth}
Figure 5
\end{subfigure}%
\begin{subfigure}{.25\textwidth}
Figure 6
\end{subfigure}%
\begin{subfigure}{.25\textwidth}
Figure 7
\end{subfigure}%
\begin{subfigure}{.25\textwidth}
Figure 8
\end{subfigure}
\end{figure}
\end{frame}
\end{document}

相关内容