# How to center the titleframe in Hannover theme (beamer)?

I am using the Hannover theme in beamer and I am using the title frame as plain

\documentclass{beamer}
\mode<presentation>
{
\usetheme{Hannover}%{CambridgeUS}%
\setbeamercovered{transparent}
}

\title[Title]{Centering Title frame}
\author[Gopi]{Gopi}

\begin{document}
\begin{frame}[plain]
\titlepage
\begin{figure}
\begin{center}
\includegraphics[scale=0.3]{logo}
\end{center}
\end{figure}
\end{frame}
\end{document}


Because it was not obvious on the first picture (white on white, I have added the same picture without the option "plain" on the frame). My point is that I would like that with the option plain the frame forget about the hannover theme and centers the whole frame.

I tried to put a \hspace{-xpt} before the frame but it did not seem to work.

-

You could \hoffset to move the content of the frame to the left, by the half amount of the sidebar width:

\begingroup
\makeatletter
\setlength{\hoffset}{-.5\beamer@sidebarwidth}
\makeatother
\begin{frame}[plain]
\titlepage
...
\end{frame}
\endgroup


I used \begingroupand \endgroup to limit the effect of the change to \hoffset to just this frame. \makeatletter and \makeatletter are necessary for accessing the internal macro \beamer@sidebarwidth.

-
Thanks! Works perfectly – Gopi Aug 1 '11 at 15:53
This solution doesn't work anymore. Any idea what might work now? – luchonacho Dec 18 '15 at 19:45
@luchonacho Perhaps tell us what "doesn't work" means in your case. And you may post a new question if you like. – Stefan Kottwitz Dec 18 '15 at 20:23
Sorry, my bad. I am trying to center the title for another beamer template, and it doesn't work. Is your solution unique to the Hannover theme? I get Undefined control sequence. \setlength{\hoffset}{-.5\beamer@sidebarwidth} – luchonacho Dec 21 '15 at 22:09
@luchonacho Possibly! For example, a beamer theme without a sidebar doesn't need a \beamer@sidebarwidth length. Your case may be different, so it would be a good idea to post a new question with all template information. – Stefan Kottwitz Dec 21 '15 at 22:36