I have a beamer presentation in which I have some additional slides in an appendix. The additional slides are only there in case someone asks a specific question; I won't necessarily have to use any of them.
I am using a theme that prints both the current frame number and the total number of frames on the bottom of each page. My problem is that the total number of frames includes all of the "extra" frames I have in the appendix. Let's say I have 20 "real" frames and then 5 additional frames in the appendix. The problem now is that \inserttotalframenumber
(which is what the theme uses to print the total number of frames) returns 25. This is misleading to the audience because I may never even present any of the 5 additional frames.
The ideal behavior would be for \inserttotalframenumber
to return 20, not 25. If I did advance to one of the appendix frames then I would like the frame to be "26/25", "27/25", and so on. How can this be done?
Edit:
I see that \inserttotalframenumber
is defined in beamerbasemisc.sty
by writing the value of the \c@framenumber
counter to the .aux
file at the end of the document. I guess one way to achieve my desired behavior is to do something like
\AtEndDocument{
\immediate\write\@auxout{\string\@writefile{nav}%
{\noexpand\headcommand{\noexpand\def\noexpand\inserttotalframenumber{\insertframenumber}}}}
}
on the last "real" slide of my document. That seems like a bit of a hack though. Is there a better way?
appendixnumberbeamer
package performs a related function. It automatically counts only the number of frames before the appendix (and put only the total number of these frames before the appendix), and then restart the a separate count for the appendix frames (and put only the total number of appendix frames in the appendix).