I have [framebreaks]
frames in a Beamer presentation. I want to have all generated slides there to have the same slide nubmber, e.g., if I have a listing
or some text that spans across two or more slides, but within the same frame I want to prevent slide number increase until I start a new frame. In the MWE below "Slide 1" should be numbered 1/2 for the first 3 PDF slides, whereas "Slide 2" should be 2/2. Using \addtocounter{framenumber}{-1}
or \setcounter{framenumber}{x}
simply starts counting at current-1 or x. I am aware of this post, but unless I am missing something, I don't see how I can adapt the material there to my problem at this hour.
MWE
\documentclass{beamer}
\mode<presentation>
\usetheme{Boadilla}
\usepackage{lipsum}
\begin{document}
% "Slide 1"
\begin{frame}[allowframebreaks]
\begin{itemize}
\item Foo
\item Bar
\item Baz
\end{itemize}
\lipsum[1-5]
\end{frame}
% "Slide 2"
\begin{frame}
test
\end{frame}
\end{document}
Best Answer
This can be a solution.
We use a new counter
multipleslide
where we save the current value of the counterframenumber
We also define two new commands
\multipleframe
and\restoreframe
to be inserted, respectively, before and after aframe
withallowframebreaks
The first one takes care of numbering all the slides with the same number, the latter restores the normal numbering.
The following MWE explains a bit better how it works:
This is the output