在投影机中对齐图形

在投影机中对齐图形

我想在投影仪幻灯片中包含三个图形。我应该在顶部放一个图形,在底部放两个图形。我尝试使用 minipage 来实现这一点,但没有显示所需的结果。我想我搞乱了图形的尺寸。我的 MWE 是:

\documentclass[xcolor=pdftex,t,11pt]{beamer}
\begin{document}

\begin{frame}
\frametitle{Example}
\framesubtitle{Example1}
\begin {figure}
\vspace{-2.5ex}
\begin{minipage}{0.5\textwidth}
\begin{center}
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-a}
\caption{First}
\end{center}
\end{minipage}
\pause[2]
\begin{minipage}{0.5\textwidth}
\begin{minipage}{0.5\textheight}
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-b}
\caption{Second}
\end{minipage}
\pause[3]
\begin{minipage}{0.5\textheight}
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-c}
\caption{Third}
\end{minipage}
\end{minipage}
\end{figure}
\end{frame}

\end{document}

你有什么提示可以分享吗?提前谢谢

答案1

minipage最后两行不需要环绕,但%在那里几行的末尾添加一个,以避免第二行的两行之间出现空格。或者,你可以让它们比一半的宽度稍微窄一点\textwidth

在此处输入图片描述

\documentclass[t,11pt]{beamer}
\begin{document}

\begin{frame}
\frametitle{Example}
\framesubtitle{Example1}
\begin {figure}
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-a}
\caption{First}
\end{minipage}
\pause[2]
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-b}
\caption{Second}
\end{minipage}%
\pause[3]%
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-c}
\caption{Third}
\end{minipage}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{Example}
\framesubtitle{Example1}
\begin {figure}
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-a}
\caption{First}
\end{minipage}
\pause[2]
% an empty line here, i.e. a paragraph break, ensures that the next minipage ends up on the next line.    

\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-b}
\caption{Second}
\end{minipage}
\pause[3]
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=3.5 cm,height=2.5 cm]{example-image-c}
\caption{Third}
\end{minipage}
\end{figure}
\end{frame}

\end{document}

答案2

另一种方法是使用投影仪columns环境将图形彼此并排放置。

\documentclass[xcolor=pdftex,t,11pt]{beamer}
\begin{document}

\begin{frame}
\frametitle{Example}
\framesubtitle{Example1}
\begin{figure}  
    \includegraphics[width=3.5cm]{example-image-a}
    \caption{First}
\end{figure}
\pause
\vskip-2\baselineskip
\begin{columns}[onlytextwidth, T]
    \begin{column}{.48\textwidth}
        \begin{figure}
            \includegraphics[width=3.5cm]{example-image-b}
            \caption{Second}
        \end{figure}
    \end{column}
    \pause
    \begin{column}{.48\textwidth}
        \begin{figure}
            \includegraphics[width=3.5cm]{example-image-c}
            \caption{Third}
        \end{figure}
    \end{column}    
\end{columns}
\end{frame}

\end{document}

在此处输入图片描述

相关内容