2

In my beamer presentation, the bibliography frames (which are the last frames) are set not to be included in the numbering. Hence the total number of frames (printed as "current frame number/ total frame number") does not count the bibliography frames. I was using the following code for that:

\documentclass[xcolor={dvipsnames,table},11pt]{beamer}
\setbeamertemplate{footline}{\insertframenumber/\inserttotalframenumber}
\begin{document}
\begin{frame}[noframenumbering]
\begin{thebibliography}{}
\bibitem{} The total frame number is displayed as zero,
\bibitem{} which means the frames are not countered.
\end{thebibliography}
\end{frame}
\end{document}

It was working fine. Then I decided to include framebreaks, using the command:

\begin{frame}[noframenumbering, allowframebreaks]

The frames are broken correctly, but the blibliography frames are now numbered, except the first one. For example, if three bibliography slides are there, the total number gets increased to "x+(3-1)=x+2". What I need is an unchanged total frame number (ie "x+0").

Any suggestion would be helpful. Thanks in advance.

  • 1
    you can turn it off globally, if you use \setbeamertemplate{frametitle continuation}{} in the preamble – naphaneal Nov 7 '16 at 19:10
  • 1
    @naphaneal This just removes the displayed continuation in the frametitel, the framenumber is nevertheless increased. – user36296 Nov 7 '16 at 19:26
3

Manual hack:

\documentclass[xcolor={dvipsnames,table},11pt]{beamer}
\setbeamertemplate{footline}{\insertframenumber/\inserttotalframenumber}
\begin{document}
\frame{}

\begin{frame}[allowframebreaks]
\begin{thebibliography}{}
\bibitem{} The total frame number is displayed as zero,
\framebreak
\bibitem{} which means the frames are not countered.
\end{thebibliography}
\end{frame}
\addtocounter{framenumber}{-2}
\end{document}

Or an automatic solution if you can live with all allowframebreak frames to be unnumbered:

\documentclass[xcolor={dvipsnames,table},11pt]{beamer}

\setbeamertemplate{footline}{%
    \ifnum\insertcontinuationcount>0
        \addtocounter{framenumber}{-1}
    \fi
    \insertframenumber/\inserttotalframenumber
}

\begin{document}
\frame{}

\begin{frame}[allowframebreaks]
\begin{thebibliography}{}
\bibitem{} The total frame number is displayed as zero,
\framebreak
\bibitem{} which means the frames are not countered.
\end{thebibliography}
\end{frame}

\end{document}

enter image description here

2

samcarters answer can even be improved, by incrementing the first framenumber of a framebreak sequence, and not incrementing the appended ones.

    \documentclass[11pt]{beamer}

\newcounter{continuationFirstSlide}
\setcounter{continuationFirstSlide}{1}

  \setbeamertemplate{footline}{%
    \ifnum\insertcontinuationcount>0 % decide is this a framebreak slide ("split frame"), if yes, decide whether its the first slide of the split or a continuation, if second, then reduce frame number by one to omit counting
        \ifnum\thecontinuationFirstSlide=1
            \setcounter{continuationFirstSlide}{0}
        \else
             \addtocounter{framenumber}{-1}
        \fi
    \else % no continuation, so the next framebreak slide is a first slide, that gets a new number
        \setcounter{continuationFirstSlide}{1}
    \fi
    \insertframenumber/\inserttotalframenumber
}

\begin{document}
\frame{}

\begin{frame}[allowframebreaks]
abc

\framebreak

XYZ
\end{frame}

\frame{last frame}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.