While writing a presentation with beamer it may be convenient to have some backup/appendix slides ready as a support for answers to potential questions. By default, beamer will count the total number of slides, including the backup slides at the end of the presentation, leading to a wrong number of total slides intended for presentation.
The package appendixnumberbeamer
solves the problem through the \appendix
command which marks the end of the presentation and resets the page number counter. The total number of slides will be the page number of the last slide before \appendix
.
\usepackage{appendixnumberbeamer} %Presentation slides \appendix %Backup slides
Here is a minimal example to illustrate the result.
\documentclass{beamer} \usepackage{appendixnumberbeamer} \setbeamertemplate{footline}[page number] \newcommand{\myframe}[1]{% \begin{frame} \begin{center} \Large #1 slide \insertframenumber/\inserttotalframenumber\\ Page number \thepage/\inserttotalframenumber \end{center} \end{frame} } \begin{document} \myframe{Presentation} \myframe{Presentation} \appendix \myframe{Appendix/backup} \myframe{Appendix/backup} \end{document}
The documentation for the package is sparse, but there is not that much to be said. For those interested, the package description can be found in the header of the package (style file) itself. In case your distribution does not include the package, download the style file and place it into your project directory.
Ps. I used the following few lines of code in the preamble to print the handouts “4 on 1”:
\usepackage{pgfpages} \pgfpagesuselayout{4 on 1}[a4paper, landscape, border shrink=5mm] \pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}} \pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}} \pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke}} \pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke}}
Engraver
Oh, a five days ago I created my own code for solving this problem, but this approach looks more easy 🙂
tom
Would you mind sharing your code? I’d be interested to see how you did it. Thanks, Tom.
Engraver
I wrote a small article with code in my blog engraver.wordpress.com. Exuse my English in it 🙂
tom
Thanks for sharing this. Pretty cool and potentially useful for other problems where no package is available!
Best, Tom.