I'm using \includeslide to create copies of my Beamer presentation slides in handouts, but have hit a small snag. By default, it appears to choose the first slide in a frame unless I specify the page number with an option or a suffix:

% assume 4 slides in the frame
\includeslide{mylabel}  % this shows the first slide
\includeslide{mylabel<4>} % this shows the fourth slide

Now, my presentation is very big, so I'm using a lot of new commands and environments to speed things up. Is there some way I can convince \includeslide to default to the last slide in a frame? e.g. is there a Beamer variable that contains the number of slides, or an option to pgfimage I can somehow hack into a new version of includeslide?

  • 1
    Why aren't you using the handout option? That defaults to the last slide, I believe...
    – Seamus
    Sep 27, 2010 at 14:39
  • @Seamus: not quite, I find it gets a bit confused on a slide with lots of \onlys - it tends to include them all. Nonetheless, using the handout specification would be a way to ensure that you get exactly what you want - except that it would involve manually editing every frame (or at least, those that were a little off-kilter). Depending on the size of the presentation, this could be a lot. Oct 27, 2010 at 10:42
  • Yes, if you have a lot of \only commands, you'd need to put \only<2|handout:0> or soemthing like that, to stop the handout printing all the intermediates.
    – Seamus
    Oct 27, 2010 at 14:50
  • It's ten full days worth of bespoke training/talks on four different topics. That's what I meant by "very big" :) Oct 28, 2010 at 8:02

2 Answers 2


When I started doing presentations with beamer, I kept getting caught out by the fact that I'd forget exactly when the end of a frame was going to happen so I'd jump to the next frame before I intended as I wasn't sure that everything on the current frame had been displayed. (Now, of course, I print out the handout version and have it in front of me.) So I came up with a hack that modified the title when it was on the last frame to give me a visual clue that it was the last frame. This might be adaptable to what you want (though there may well be a better solution) as it uses a counter to keep track of the last frame number. It's not completely robust as it can get confused if a frame changes size radically between compilations (in which case, delete the aux file).

This was my "experiment" file to test the system. It also allows for one to define an "offset".






\frametitle{\color<\value{last}| trans:0>{last}#1}

% Either: \reset redefines \last
% Or: just redefine the \lastframetitle and \lastlabel to the originals.



\lastframetitle{Example Frame}


\hyperlink{ex}{\beamergotobutton{Last Slide}}

This is an example frame.

Wait here    

Paws for Thought

Visible all along?    

\lastframetitle{Second Frame}


This is the second frame.    

Another slide appears    

Yet more appear

Wait until the end    

Should be here any time soon    

What's going on?    

When do all these appear?    

Phew, that's all folks.


A solution could be achieved by using three main files:

  • main.beamer.tex with \documentclass{beamer}
  • main.handout.tex with \documentclass[handout]{beamer}
  • main.article.tex with \documentclass{article}

In main.handout.pdf there are only the final slides for each frame. By including \setjobnamebeamerversion{main.handout} into main.article.tex each \includeslide{<label>} will produce a picture of the last slide of the referenced frame.

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.