Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

You could use centering

\documentclass[center]{beamer}

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

\end{document}

result: screenshot

share|improve this answer
    
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 Oct 24 '12 at 17:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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