centering titles when using the beamer class in latex
Asked Answered
L

3

18

I want to center the frametitles on my talk. I understand that the beamer class has a built-in ability to center frametitles, but I can't figure out how to do it. It is something like:

\begin{frame}
\frametitle[alignment=center]{title}
\end{frame}

but that doesn't work.

Can I get a little help?

Liquescent answered 2/3, 2010 at 18:9 Comment(0)
W
31

Try

\setbeamertemplate{frametitle}[default][center]

before all slides.

Whaleback answered 2/3, 2010 at 18:42 Comment(0)
I
3

Manually, i always did it like this:

\begin{frame}
\frametitle{\centerline{Hello World!}}
\end{frame}
Inadvisable answered 2/3, 2010 at 20:3 Comment(0)
R
0

I think it's much better to put this code at preamble of your document. So you'll have both frame title and subtitle centered:

\makeatletter 
\long\def\beamer@@frametitle[#1]#2{% 
  \beamer@ifempty{#2}{}{% 
    \gdef\insertframetitle{\centering{#2\ifnum\beamer@autobreakcount>0
        \relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}% 
  \gdef\beamer@frametitle{#2}% 
  \gdef\beamer@shortframetitle{#1}% 
}% 
} 
\makeatother 
Rumen answered 4/4, 2012 at 1:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.