[Tex/LaTex] Beamer, framebreaks with different subtitles

beamertitles

A frame in Beamer presentation can be broken in number frames with the same frame title. Those titles can be subsequently enumerated. Is there way, that in such cases each slide in common frame with common title have individual subtitles for belonging slides? As you can see from minimal example, now is considered last subtitle as common subtitle for slides …

\documentclass{beamer}
%---------------------------------------------------------------%
\usepackage{graphics,tikz}
%---------------------------------------------------------------%
\begin{document}
%---------------------------------------------------------------%
\begin{frame}[allowframebreaks]
\frametitle{Common title, appearing on all slides in one frame}
\framesubtitle{The first frame subtitle}
%------------------------------------------------------------ 1
\begin{itemize}
\item some text
\item some text
\item some text
\item   \dots

\end{itemize}
%------------------------------------------------------------ 2
\framebreak
\framesubtitle{The second frame subtitle}
\begin{itemize}
\item some text
\item some text
\item some text
\item   \dots
\end{itemize}
%------------------------------------------------------------ 3
\framebreak
\framesubtitle{The third frame subtitle}
\begin{itemize}
\item some text
\item some text
\item some text
\item   \dots
\end{itemize}


\end{frame}
%---------------------------------------------------------------%
\end{document}

Best Answer

Don't use allowframebreaks; the documentation of beamer has the following recommendation:

Using the allowframebreaks option invites the creation of horrible, endless presentations that resemble more a "paper projected on the wall" than a presentation. Nevertheless, the option does have its uses. Most noticeably, it can be convenient for automatically splitting bibliographies or long equations.

You can use overlay specifications instead; here's an example using \only:

\documentclass{beamer}
%---------------------------------------------------------------%
\usepackage{graphics,tikz}
%---------------------------------------------------------------%
\begin{document}
%---------------------------------------------------------------%
\begin{frame}
\frametitle{Common title, appearing on all slides in one frame}
%------------------------------------------------------------ 1
\only<1>{
\framesubtitle{The first frame subtitle}
\begin{itemize}
\item some text on slide 1
\item some text
\item some text
\item   \dots

\end{itemize}}
%------------------------------------------------------------ 2
\only<2>{
\framesubtitle{The second frame subtitle}
\begin{itemize}
\item some text on slide 2
\item some text
\item some text
\item   \dots

\end{itemize}}
%------------------------------------------------------------ 3
\only<3>{
\framesubtitle{The third frame subtitle}
\begin{itemize}
\item some text on slide 3
\item some text
\item some text
\item   \dots

\end{itemize}}
\end{frame}
%---------------------------------------------------------------%
\end{document}

enter image description here

If verbatim material created with the listings package must be in the argument of \only (or any other command), then some precautions must be taken; the additional work is described in Section 5.1 Listings inside arguments of the listings documentation (notice that this is an experimental feature):

\documentclass[compress]{beamer}
\usepackage[english]{babel}
\usepackage{listings} 


 %---------------------------------------------------------------%
\begin{document}
%---------------------------------------------------------------%

\begin{frame}[fragile]

\begin{lstlisting}
\usepackage{graphicx}
\end{lstlisting}

\end{frame}
%------------------------------------------------------------------------------------

\begin{frame}[fragile]
\frametitle{Figures and Graphics}

%------------------------------------------------------------------------------------
\only<1>{
\framesubtitle{Including Graphics}
\begin{lstlisting}^^J
\\usepackage\{graphicx\}^^J
\end{lstlisting}
}
%------------------------------------------------------------ 2
\only<2>{
\framesubtitle{The second frame subtitle}
\begin{itemize}
\item some text on slide 2
\item some text
\item some text
\item   \dots

\end{itemize}}
%%------------------------------------------------------------ 3
\only<3>{
\framesubtitle{The third frame subtitle}
\begin{itemize}
\item some text on slide 3
\item some text
\item some text
\item   \dots

\end{itemize}}
\end{frame}
%---------------------------------------------------------------%
\end{document}

enter image description here

Related Question