有没有办法将框架中内容的垂直对齐方式全局设置为底部对齐?换句话说,我厌倦了[b]
在每个框架中添加:
\begin{frame}[b]
...
\end{frame}
我知道有类别选项c
以及t
居中和顶部对齐,但据我所知,没有 b 选项。
任何帮助,将不胜感激。
梅威瑟:
\documentclass{beamer}
\begin{document}
\begin{frame}[b]
This is bottom aligned.
\end{frame}
\begin{frame}
This is not\ldots
\end{frame}
\end{document}
答案1
您可以 像这样修改t
文件中定义的键:beamerbaseframe.sty
\define@key{beamerframe}{t}[true]{% top
\beamer@frametopskip=.2cm plus .5\paperheight\relax%
\beamer@framebottomskip=0pt plus 1fill\relax%
\beamer@frametopskipautobreak=\beamer@frametopskip\relax%
\beamer@framebottomskipautobreak=\beamer@framebottomskip\relax%
\def\beamer@initfirstlineunskip{}%
}
获得你需要的东西(底部对齐)
\define@key{beamerframe}{t}[true]{% bottom
\beamer@frametopskip=0pt plus 1fill\relax%
\beamer@framebottomskip=0.2cm plus .5\paperheight\relax%
\beamer@frametopskipautobreak=\beamer@frametopskip\relax%
\beamer@framebottomskipautobreak=\beamer@framebottomskip\relax%
\def\beamer@initfirstlineunskip{}%
}
你的代码变成
\documentclass{beamer}
\makeatletter
\define@key{beamerframe}{t}[true]{% bottom
\beamer@frametopskip=0pt plus 1fill\relax%
\beamer@framebottomskip=0.2cm plus .5\paperheight\relax%
\beamer@frametopskipautobreak=\beamer@frametopskip\relax%
\beamer@framebottomskipautobreak=\beamer@framebottomskip\relax%
\def\beamer@initfirstlineunskip{}%
}
\beamer@centeredfalse
\makeatother
\begin{document}
\begin{frame}
This is bottom aligned.
\end{frame}
\begin{frame}
This is also
\end{frame}
\end{document}
更新
\documentclass[b]{beamer}
\makeatletter
\DeclareOptionBeamer{b}{\beamer@centeredfalse\define@key{beamerframe}{t}[true]{% bottom
\beamer@frametopskip=0pt plus 1fill\relax%
\beamer@framebottomskip=0.2cm plus .5\paperheight\relax%
\beamer@frametopskipautobreak=\beamer@frametopskip\relax%
\beamer@framebottomskipautobreak=\beamer@framebottomskip\relax%
\def\beamer@initfirstlineunskip{}%
}}
\ProcessOptionsBeamer
\makeatother
\begin{document}
\begin{frame}
This is bottom aligned.
\end{frame}
\begin{frame}
This is also
\end{frame}
\end{document}
输出