2

Consider the following MWE

\documentclass{beamer}

\setbeamertemplate{frametitle continuation}[from second][
  \insertcontinuationcountroman]
\usepackage{lipsum}

\begin{document}

\begin{frame}[allowframebreaks]
  \frametitle{Foo}
  \framesubtitle{Bar}
  \lipsum[1]
  \framebreak
  \framesubtitle{Baz}
  \lipsum[2]
\end{frame}
\end{document}

As it can be seen in the image, the first frame has the proper title, Foo, but the wrong subtitle (it should be Bar instead of Baz). How I can fix this? I know that for the second frame I can just create a new frame like this:

\begin{frame}[allowframebreaks]
  \frametitle{Foo II}
  \framesubtitle{Baz}
  \lipsum[2]
\end{frame}

and avoid my current problem. However I was wondering if it is possible to place an explicit frame break with a new subtitle for the continuation frame without resetting the subtitle for the first frame.

enter image description here

Edit After @Mark showed me this question I can do this:

\documentclass{beamer}
\begin{document}
\begin{frame}
  \frametitle{Foo}
  \only<+>{
    \framesubtitle{Bar}
  }
  \only<+>{
    \framesubtitle{Baz}
  }
\end{frame}
\end{document} 

to get the correct subtitles in each frame. The problem with this approach, as seen in the image, is that I want the title on the second frame to be Foo II instead of Foo (I like the allowframebreaks behavior of showing a roman numeral appended to the title of a continuation frame).

enter image description here

So my question is, can I use the overlay approach to fix the subtitle reset problem but also somehow append roman numerals to the titles of the continuation frames as allow allowframebreaks does?

petobens
  • 3,306
  • http://tex.stackexchange.com/questions/59735/beamer-framebreaks-with-different-subtitles – Mark Apr 02 '15 at 05:21
  • @Mark thanks! I edited the question accordingly. – petobens Apr 02 '15 at 21:29
  • Maybe some one who understands beamer can help. I give up. I would suggest \Roman{beamerpauses}, but that fails. – Mark Apr 03 '15 at 03:32
  • 1
    Do you really want to encode those slides into just one (logical) frame? I mean, if you are going to type subtitles by hand, why not give each subtitle a frame? – Symbol 1 Apr 03 '15 at 08:45

1 Answers1

2

Based on your edited question and Beamer - How can I add sub-frame numbers? you could do something like this:

\documentclass{beamer}

\makeatletter
\def\c@slideinframe{\beamer@slideinframe}
\def\beamerslideinframe{\beamer@slideinframe}
\makeatother

\begin{document}
    \begin{frame}
        \frametitle{Foo}
        \only<+>{
            \framesubtitle{Bar}
        }
        \only<+>{
            \frametitle{Foo \Roman{slideinframe}}
            \framesubtitle{Baz}
        }
    \end{frame}
\end{document} 

enter image description here


EDIT:

To make this automatically

\documentclass{beamer}

\makeatletter

\def\c@slideinframe{\beamer@slideinframe}
\def\beamerslideinframe{\beamer@slideinframe}

\newcommand*{\augmentframetitle}[1]{%
    \expandafter\frametitle\expandafter
    {\beamer@frametitle #1 \expandafter\ifnum\beamer@slideinframe>1\relax\Roman{slideinframe}\fi}%
}

\makeatother

\begin{document}

    \begin{frame}
        \augmentframetitle{bar}
        \only<+>{
            \framesubtitle{Bar}
        }
        \only<+>{
            \framesubtitle{Baz}
        }
    \end{frame}

\end{document}