9

I would like to set some global option so that the content of all beamer frames is horizontally centered with respect to the page. In other words, I want to achieve the effect of wrapping all frame content in \centering ... \par, but without actually having to type that in every frame:

\documentclass{beamer}
%% This is the sort of thing I want, but it only works in article mode
% \setbeamertemplate{frame begin}{\centering}
% \setbeamertemplate{frame end}{\par}
\begin{document}
\begin{frame}
  \framebox{Automatically centered -- how?}
\end{frame}
\begin{frame}
  \centering
  \framebox{Centered by hand}
  \par
\end{frame}
\end{document}

I have searched the documentation for some sort of hook that I can set, but to no avail. The tantalizingly named frame begin and frame end templates work only in article mode. How can this effect be achieved?

1 Answer 1

10

You could use centering

\documentclass[center]{beamer}

\begin{document}
\centering
\begin{frame}
  \framebox{Automatically centered!}
\end{frame}

\end{document}

result: screenshot

1
  • It works! And so simple too. I feel really stupid for not thinking of just moving the \centering command to the document-level scope. Thanks!
    – deprecated
    Commented Oct 24, 2012 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .