[Tex/LaTex] How to number slides in a beamer class presentation consisting of multiple parts

beamernumbering

I'm working on a series of presentations and uses LaTeX slides for each part. I would like to continue numbering the slides for each part according to the previous part; for example, part 1 slides numbers from 1 to 50, part 2 slides from 51 to 100, and so on. Each part has a separate .tex file.

Is there any command to accomplish this?

For example, I want this file to start numbering from 50, not from 1:

\documentclass{beamer}      

\usetheme{Boadilla}  

\setbeamertemplate{footline{\hfill\insertframenumber/\inserttotalframenumber}       

\begin{document}

\begin{frame}
   text
\end{frame}

\begin{frame}
   text
\end{frame}

\begin{frame}
   text
\end{frame}

\end{document}

Best Answer

\documentclass{beamer}      

\usetheme{Boadilla}  

\setbeamertemplate{footline}{\hfill\insertframenumber/\inserttotalframenumber}       

\addtocounter{framenumber}{50}

\begin{document}

\begin{frame}
   text
\end{frame}

  \begin{frame}
text

\end{frame}

\begin{frame}
text

\end{frame}

\end{document}

or if you want an automatic solution, give a custom label to the last frame in part 1, e.g.

\begin{frame}[label=lastframe]
text
\end{frame}

Assuming your first part is called part1.tex then you can do the following in your document to automatically resume the frame numbers:

\documentclass{beamer}      

\usetheme{Boadilla}  

\setbeamertemplate{footline}{\hfill\insertframenumber/\inserttotalframenumber}       

\usepackage{zref-xr}
\zxrsetup{toltxlabel}
\zexternaldocument*[main-]{part1}

\usepackage{refcount}

\setcounterref{framenumber}{main-lastframe}

\begin{document}

\begin{frame}
   text
\end{frame}

\begin{frame}
   text
\end{frame}

  \begin{frame}
text

\end{frame}

\begin{frame}
text

\end{frame}

\end{document}