6

Is there a way to globally set the vertical alignment of the contents in a frame to be bottom aligned? In other words, I'm tired of adding [b] to every frame:

\begin{frame}[b]
...
\end{frame}

I know there are class options c and t to center and top align, but as far as I know, no b option exists.

Any help would be appreciated.

MWE:

\documentclass{beamer}

\begin{document}
\begin{frame}[b]
This is bottom aligned.
\end{frame}

\begin{frame}
This is not\ldots
\end{frame}
\end{document}
4

You can modify the t key which is defined in the file beamerbaseframe.sty like this:

\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{}%
}

To obtain what you need (bottom align)

\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{}%
} 

And your code become

\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}

Update

\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}

Output

enter image description here

  • 2
    Maybe it would be nicer to define a new option b than to redefine t. Would that be feasible? – moewe Sep 23 '15 at 14:09
  • Answer updated . – Salim Bou Sep 24 '15 at 16:53
  • I find that still a bit of cheating, since you still re-define the t formatting option. So when using the global b option t doesn't work as expected any more. But I have seen that implementing a real b option requires a bit more code, – moewe Sep 25 '15 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.