Beamer class differentiates between pages and frames. To get the first page of a part beamer provides the command \insertpartstartpage and for the last page \insertpartendpage.

Is there a chance to get the first and the last frame of the current part?


There seems to be no built-in way to access the frame number of the first and last slide of a part, but you can define the necessary macros \insertpartstartframe and \insertpartendframe yourself:


% How can I get the first and the last frame of an part in beamer class?
% (http://tex.stackexchange.com/q/73142/3323)
\apptocmd{\beamer@part}{\beamer@partstartframe=\c@framenumber\advance\beamer@partstartframe by1\relax}{}{}

\setbeamertemplate{footline}{\insertpart: \insertpartstartframe--\insertpartendframe}

\part{Part 1}
\frame{1\pause 2\pause 3}
\frame{1\pause 2}
\part{Part 2}
\frame{1\pause 2}
\frame{1\pause 2\pause 3}
\part{Part 3}
\frame{1\pause 2\pause 3\pause 4}

The code (between \usepackage{etoolbox} and \makeatother) is basically the same as the one beamer uses to access the start and end page of a part, but stores the frame number instead of the page number.

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.