I am including some pages using pdfpages in beamer. I understand that these pages can not be included a frames. Rather these are included as simple texts. So far so good.

However, I get incorrect frame counts in slide footers. Please see this minimal example,





% Frame numbers


  \frametitle{First Frame}

  \setbeamercolor{background canvas}{bg=}

  \frametitle{Last Frame}


While I need the first slide to have the number 1/12, and the last slide 12/12, this actually comes out to be 1/2 and 2/2. I know that beamer is doing nothing wrong. This is mathematically 100% correct. But from a user point of view, this is not intended.

Is there any way I can incorporate non-frame pages in slide counts?


After a number of trial and errors and code hacking, I have found the solution like this.

  \setbeamercolor{background canvas}{bg=}

For the above macro, the first argument is the range of pages, the second one is the .pdf file name. So, you call it like this,





  • This doesn't work as expected with overlays such that there are multiple pdf pages for a single frame. If on frame 1, there is a \pause, and then a pdf page is included, then default beamer shows 1/1, 1/1, nothing in the bottom corner of each page, and your solution yields 1/3, 1/3, 3/3 – Fred Schoen Nov 16 '16 at 8:48

To expand on Masroor's answer, this produces incorrect frame numbers if you use overlays. To prevent this, use:


to count up by one for every frame instead of


which sets the framenumber counter to page. The two differ when using \pause/overlays.

(I would have commented on that post, but I don't have the necessary reputation)


For the special case where the included pdf is also a beamer presentation, one can use the following technique:

In the presentation which should be included in the other one, label the last frame with a name of your choice, e.g. lastframe



Then the framenumber can automatically be added in the main presentation:





\setbeamercolor{background canvas}{bg=}





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.