# How to avoid beamer counter incrementing

In Latex beamer, I've created a handout environment for slides that are for the produced handout only (ie. not to be shown on the viewer). It looks like this:

\newenvironment{handout}[2][1]{
\begin{frame}<handout>[environment=handout,allowframebreaks]
}
{\end{frame}}


Key point in the above is: 1) <handout> ensures it is only visible on handout 2) allowframebreaks allows the handout to run over several slides.

OK so far. Only problem is that the framenumber counter (which is used to display page numbers) is incremented for each slide, which means that the handout material and the displayed material in the presentation gets out of sync. So I want to freeze the counter.

I tried simply to back up the current value of the framenumber counter to a temporary in the before part of the environment definition and reseting to that in the after part. That did however now work. Something like this:

\newenvironment{handout}[2][1]{
\begin{frame}<handout>[environment=handout,allowframebreaks]
}


So the question is basically, how do I avoid the counter incrementing over these slides?

-
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  N.N. Sep 6 '11 at 14:06

## migrated from stackoverflow.comAug 28 '11 at 12:08

This question came from our site for professional and enthusiast programmers.

\newenvironment{handout}{