2

For adding an existing PDF to a beamer document, it was explained to use \includepdf with the following code:

\documentclass{beamer}
\usepackage{pdfpages}
\usetheme{Montpellier}
\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{0.5cm}%
    \raisebox{1.5pt}{\insertframenumber/\inserttotalframenumber}
}
\begin{document}
{
\setbeamercolor{background canvas}{bg=}
\includepdf{filea.pdf}
}
\end{document}

This way, however, no frame is created and thus, the page (or frame) isn't counted for the numbering in the bottom right (I have two pages 0/20). Since this defies the purpose of numbering at a presentation, I'd like to change this.

  • Try \addtocounter{frame}{20} (whatever number of external pages you include) – user36296 Jan 30 at 17:28
  • Your MWE does not use any theme that would show framenumbers.... – user36296 Jan 30 at 17:30
  • @samcarter Fixed it, \addtocounter doesn't work anyhow. – Juan Jan 30 at 17:47
  • Sorry, my bad. The counter is called framenumber and not frame – user36296 Jan 30 at 21:54
3

You can manually increase the framenumber counter to take the included pdf into account:

\documentclass{beamer}
\usepackage{pdfpages}
\usetheme{Montpellier}
\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{0.5cm}%
    \raisebox{1.5pt}{\insertframenumber/\inserttotalframenumber}
}
\begin{document}

\begin{frame}
content...
\end{frame}

{
\addtocounter{framenumber}{1}
\setbeamercolor{background canvas}{bg=}
\includepdf{example-image-a4-numbered}
}

\begin{frame}
content...
\end{frame}

\end{document}

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.