I would like to have an overlay on the titlepage of my beamer presentation. More specifically I would like to have two versions of my title (one English, one German) that can be switched. Most preferably such that the surrounding box and the rest of this frame do not change (get shifted).
Schematically the document looks like this:
\documentclass{beamer}
\mode<presentation>
{
\usetheme{Madrid}
}
%more setup stuff
\title[]{Title A}
%\title[]{Title B}
\begin{document}
\begin{frame}
\titlepage
%some logos etc.
\end{frame}
\end{document}
Now my goal would be to have one slide with "Title A" and one with "Title B", just as if I would use overlay specifications on a normal slide. Is there a way to do this within beamer?
Edit:
Here's an explicit example of two titles that are of different length and for which there should be no change in the surrounding title box. See discussion below.
\title[]{%
\only<1>{This is a rather short title}%
\only<2>{Und dies ist eine deutlich längere Version, die sich über mehrere Zeilen erstreckt}%
}
Without any special treatment the titles are of different height and the rest of the frame shifts when switching.
Best Answer
You could use
\only
inside\title
:EDIT: here's a modified version when the titles have different length and have different heights; all the code between
\makeatletter
and\makeatother
was written by Martin Scharrer in his answer to Beamer alt command like visible instead of like only (all the credit goes to him and to Matthew Leingang for pointing this out to me). The only modification I added was a new command to use\parbox
es and to allow different vertical alignment for the titles.