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.

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

1 Answer 1

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .