2008-11-25

latex beamer

latex beamer class's command \inserttotalframenumber includes appendix frames and
the \insertpresentationendpage command includes all slides (not convenient when using overlays).

It could be pretty cool to have a \insertpresentationendframe but it doesn't exists.

A dirty solution I found is to define a new latex counter
\newcounter{presentationendframenumber}

to use it in the footer template (by the way I defined a footer with navigation symbols within it instead of within the default right hidden sidebar):

\defbeamertemplate{footline}{my page number}
{%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
% \hspace{1em}\insertframenumber\,/\,\inserttotalframenumber\hfill\usebeamertemplate***{navigation symbols}\vskip5pt%
\hspace{1em}\insertframenumber\,/\,\thepresentationendframenumber\hfill\usebeamertemplate***{navigation
symbols}\vskip5pt%
% \insertshortauthor\kern1em\vskip2pt%
}
\setbeamertemplate{footline}[my page number]{}
% remove default sidebar with navigation symbols
\setbeamertemplate{sidebar right}{}


And then to set this new counter to the correct value at the begining of the document:

\setcounter{presentationendframenumber}{\inserttotalframenumber}
% my presentation has one page in appendix
\addtocounter{presentationendframenumber}{-1}

It requires to set the number of appendix frame by hand, which is not perfect.
At least it works.

No comments: