# Don't skip framenumbers in beamer in handout mode

Consider the following beamer example below. Is it possible to adjust this, that Frame 4 has framenumber 3 on the handout (and not 4 in my example). In other words the numbering in the handout should be as the code of frame 3 would be commented out (and not just have the option ).

\documentclass[handout,gray]{beamer}
\usepackage[utf8]{inputenc}

\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm,landscape]

\begin{document}

\begin{frame}
\frametitle{Frame 1}
Frame 1
\end{frame}

\begin{frame}<display:0>
\frametitle{Frame 2}
Frame 2
\end{frame}

\begin{frame}<handout:0>
\frametitle{Frame 3}
Frame 3
\end{frame}

\begin{frame}
\frametitle{Frame 4}
Frame 4
\end{frame}
\end{document}


-
I'm not sure I really understand. In your example, the numbers are hard-coded (not automatically generated) so you could do something like \alt<display>{4}{3} to put a 4 when in display mode and 3 otherwise (ie handout mode, though article would also get the 3). Would this help, or is the real case more complicated? –  Loop Space Mar 26 '12 at 19:57
@AndrewStacey The real example has a lot more frames and a lot more frames which should be skipped for the handout. So it's not a good idea to generate the framenumbers manually for the handout. Note that I don't need any numbers for display. I just want to have consecutive numbering for the handout frames (1,2,3,4,... without skipping a number though some frames are not on the handout). –  student Mar 27 '12 at 14:33

Since beamer version 3.08, there is an undocumented option noframenumbering that doesn't increase the slide counter for the current frame. So if you want to exclude a single frame from the numeration and the handout, you can use

\begin{frame}<handout:0>[noframenumbering]
...
\end{frame}


To automate this, i. e. to exclude all the frame that aren't displayed in the current mode (handout, trans) from the numeration, you can patch the internal beamer command responsible for generating the frames:

\usepackage{etoolbox}
\makeatletter
\makeatother


Include this code somewhere in the preamble (that's between \documentclass{beamer} and \begin{document}) of your document. It uses the overlay command \alt to activate noframenumbering on every slide which isn't displayed.

### Example code:

\documentclass[handout,gray]{beamer}
\usepackage[utf8]{inputenc}

\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm,landscape]

% http://tex.stackexchange.com/a/49806/3323
\usepackage{etoolbox}
\makeatletter
\makeatother

\begin{document}
\begin{frame}
Absolute frame number: 1\\
\end{frame}
\begin{frame}
Absolute frame number: 2\\
\end{frame}
\begin{frame}<handout:0>
Absolute frame number: 3\\