[Tex/LaTex] Beamer: how to skip only some `notes’ frames

beamerpage-breaking

I'd like to hand out a printout of some slides, including some printed
notes and a bit of space for handwriting. The following is (more or less)
working:

\documentclass[handout,notes]{beamer}
  \usepackage{pgfpages}

  \pgfpagesuselayout{2 on 1}
  \AtBeginSection[]{\frame{\Huge\insertsectionhead}}
  \AtBeginNote{Notes:\par}

  \makeatletter
    \def\beamer@framenotesbegin{% at beginning of slide
      \gdef\beamer@noteitems{}%
      \gdef\beamer@notes{{}}% used to be totally empty.
    }
  \makeatother

\begin{document}
  \section{1st section}
  \frame{The first slide\note[item]{With a note}}
  \frame{The second, and last, slide}
\end{document}

The \makeatletter\makeatother fragment makes every normal frame
being followed by a notes frame. With pgfpages, each frame and its
note frame are printed on the same page. Finally, each section gets its
own frame (\AtBeginSection).

But I don't want the section frame to be followed by a notes
frame, as is currently happening. I've unsucessfully tried to:

  • Make \makeatletter\makeatother check (with \ifx…?)
    whether it's being used from within a normal frame, or not. The
    problem is that I don't know what condition could be used to tell if
    this is a normal page, a sectioning one, or whatever.

  • Force, with pgfpages, a blank page; thus, the section frame and
    the blank page will be printed on the same page.

Some more details: I'm using org-mode within Emacs to write the slides.
Also, I'm using Beamer's command \AtBeginNote to heavily customize the
appearance of the notes frames (thus, I can't simply drop the
\AtBeginNote line).

Any ideas? Many thanks in advance!

Best Answer

The following basically takes the idea of Gonzalo, but puts everything you need into the \AtBeginSection command:

\documentclass[handout,notes]{beamer}
\usepackage{pgfpages}

\pgfpagesuselayout{2 on 1}
\AtBeginSection[]{\setbeameroption{hide notes}\frame{\Huge\insertsectionhead}\frame{}\setbeameroption{show notes}}
\AtBeginNote{Notes:\par}

\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
  \gdef\beamer@noteitems{}%
  \gdef\beamer@notes{{}}% used to be totally empty.
}
\makeatother

\begin{document}

\section{1st section}
\frame{The first slide\note[item]{With a note}}
\frame{The second, and last, slide}

\end{document}

enter image description here enter image description here