
感謝這個救生論壇,我能夠在 LaTeX-Beamer 中創建一張幻燈片,看起來幾乎如我所願:
\documentclass{beamer}
\usetheme{Hannover}
\begin{document}
\begin{frame}{MyTitle}
\begin{columns}[T]
\begin{column}{.5\textwidth}
\begin{block}{}
\begin{itemize}
\item Item1
\item Item2
\item Item3
\end{itemize}
\end{block}
\end{column}
\begin{column}{.5\textwidth}
\begin{block}{}
\includegraphics[width=0.6\textwidth {imgs/Image1.jpg}
\includegraphics[width=0.6\textwidth]{imgs/Image2.jpg}
\end{block}
\end{column}
\end{columns}
\end{frame}
\end{document}
現在,我希望右欄中的兩個圖像居中。它們是左對齊的。此外,我希望它們之間有一點垂直空間。我已經嘗試過addvspace{2pt}
,vspace*{2pt}
但這些似乎都不起作用。
答案1
Beamer 使用 TeX 的常規規則來定位文字和圖形。例如,您可以center
為影像使用環境。至於垂直空間,請確保首先以空白行結束段落(請參閱這個答案獲取資訊)。
\documentclass{beamer}
\usepackage{graphicx}
\usetheme{Hannover}
\begin{document}
\begin{frame}{MyTitle}
\begin{columns}[T]
\begin{column}{.5\textwidth}
\begin{block}{}
\begin{itemize}
\item Item1
\item Item2
\item Item3
\end{itemize}
\end{block}
\end{column}
\begin{column}{.5\textwidth}
\begin{block}{}
\begin{center}
\includegraphics[width=0.5\textwidth]{example-image-a}
\vspace{1cm}
\includegraphics[width=0.5\textwidth]{example-image-b}
\end{center}
\end{block}
\end{column}
\end{columns}
\end{frame}
\end{document}
輸出: