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?

4
  • @Mark thanks! I edited the question accordingly.
    – petobens
    Apr 2, 2015 at 21:29
  • Maybe some one who understands beamer can help. I give up. I would suggest \Roman{beamerpauses}, but that fails.
    – Mark
    Apr 3, 2015 at 3: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 3, 2015 at 8:45

1 Answer 1

2

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

\documentclass{beamer}

\makeatletter
\setbeamertemplate{frametitle cont}{\ifnum\beamer@slideinframe>1~\@Roman\beamer@slideinframe\fi}
\makeatother

\begin{document}
    \begin{frame}
        \frametitle{Foo\usebeamertemplate{frametitle cont}}
        \framesubtitle<+>{Bar}
        \framesubtitle<+>{Baz}
    \end{frame}
\end{document} 

enter image description here


EDIT:

To make this automatically

\documentclass{beamer}

\makeatletter
\patchcmd\beamer@@tmpl@frametitle{\insertframetitle}{\insertframetitle\ifnum\beamer@slideinframe>1~\@Roman\beamer@slideinframe\fi}{}{}
\makeatother

\begin{document}

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

\end{document} 
4
  • Thank you. Two questions : i) can I avoid numbering the firsr frame? (i.e I want the first frame to be Foo and the second Foo II and ii) can this be done automatically from the preamble? I would like to have the \Roman{slideinframe} always appended to the frame title without having to manually place it each time.
    – petobens
    Apr 3, 2015 at 15:45
  • @petobens See the edit Apr 3, 2015 at 18:18
  • Awesome! Can you you also please add in the answer the non-automatic solution where the first frame is Foo instead of Foo I?
    – petobens
    Apr 4, 2015 at 16:32
  • @petobens done! Apr 4, 2015 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .