I'm doing slides with beamer using the mtheme. This theme includes the slide number in the bottom of the page using this code:

  \hfill\usebeamerfont{page number in head/foot}%

I wanted to the number to appear as x/X, being X the total number of slides, which can be displayed via \inserttotalframenumber. So i change the third line above to:


Now, the problem is that I have a slide at the end that should NOT count in the total number of frames, and so the result is that it's showing x/X, begin X one unit bigger than it should.

How could I do it so it displays \inserttotaframenumber-1. I saw calc allows for simple calculations but using the package and writing just \insertotalframenumber-1 does not work.

Can I do this some how?

Thank you.


1 Answer 1


You can use a counter:

%% Now use:
  • It's displaying a 0. And why do you use \themynumber instead of \mynumber? Jun 25, 2015 at 9:25
  • The 0 should be ok, if you have 1 frame. Keep in mind to compile twice!
    – Scz
    Jun 25, 2015 at 12:22
  • @MyUserIsThis: \the<counter> is the normal way to access the value of a counter.
    – Scz
    Jun 25, 2015 at 12:24

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.