我制作的幻灯片的宽高比为 16:9,因此我希望使用比 4:3 幻灯片更水平的流程。例如,我希望将定理及其证明并排放置,而不是将证明放在定理下方。例如:
\documentclass[aspectratio=169]{beamer}
\usepackage{tikz}
\usetheme{Rochester}
\begin{document}
\begin{frame}{There is no largest prime number}
\begin{columns}
\begin{column}[t]{0.45\textwidth}
\begin{theorem}
There are infinitely many primes.
\end{theorem}
\end{column}
\begin{column}[t]{0.45\textwidth}
\begin{proof}
Suppose $p$ were the largest prime number.
Let $q$ be the product of the first $p$ numbers.
Then $q+1$ is not divisible by any of them.
Thus it is prime, but is bigger than $p$.
This is a contradiction.
\end{proof}
\end{column}
\end{columns}
\end{frame}
\end{document}
结果如下:
如您所见,定理框比证明框短很多,效果有点难看。有没有好的方法可以为较短的框添加垂直空间,使其高度与较长的框相同?
答案1
我只能提供一个 hack ...
\begin{theorem}
There are infinitely many primes.\rule[-5\normalbaselineskip]{0pt}{0pt}
\end{theorem}
以及完整代码来直观地了解\normalbaselineskip
\documentclass[aspectratio=169]{beamer}
\usepackage{tikz}
\usetheme{Rochester}
\begin{document}
\begin{frame}{There is no largest prime number}
\begin{columns}
\begin{column}[t]{0.45\textwidth}
\begin{theorem}
There are infinitely many primes.%
\rule[-1\normalbaselineskip]{10pt}{1pt}\kern-10pt%
\rule[-2\normalbaselineskip]{10pt}{1pt}\kern-10pt%
\rule[-3\normalbaselineskip]{10pt}{1pt}\kern-10pt%
\rule[-4\normalbaselineskip]{10pt}{1pt}\kern-10pt%
\rule[-5\normalbaselineskip]{10pt}{1pt}
\end{theorem}
\end{column}
\begin{column}[t]{0.45\textwidth}
\begin{proof}
Suppose $p$ were the largest prime number.
Let $q$ be the product of the first $p$ numbers.
Then $q+1$ is not divisible by any of them.
Thus it is prime, but is bigger than $p$.
This is a contradiction.
\end{proof}
\end{column}
\end{columns}
\end{frame}
\end{document}
答案2
引入虚拟列似乎对我有用
\begin{block}{blocktitle}
\begin{columns}
% dummy column
\column{0cm}
~
\setlength{\rest}{0.25\textheight}
\vskip\rest
~
% now real column
\column{\textwidth}
words 123 \\
more words\\
\end{columns}