In the following example the \section comand (and its argument) is ignored as expected. But not all the content of the frame: The text and the first \tikz are not printed but the unknown color gives two errors (as do also unknown commands) and the graphics appears on the page (eso-pic is needed to get this effect). A \stepcounter{section} in the frame is executed too.

I also tested the other way round: A \begin{frame}<article> in a beamer document: This doesn't work either. Is this a bug? (There is no problem if I use explicit \mode commands.)



\section<presentation>{This section exists 
  \tikz\draw[color=unknowncolorA] (1,1)rectangle (0,0); 
 only in the presentation modes}

  some text
 \tikz\draw[fill=red] (1,1)rectangle (0,0);
 \tikz\draw[color=unknowncolorB] (1,1)rectangle (0,0);


1 Answer 1


[Updated answer after full analysis]

Although the behaviour is perhaps not obvious, it is I think by design (certainly I'm extremely reluctant to alter it.). The relevant code lines in beamerbaseframe are

  \else% no slides in frame

In particular, notice \beamer@donoframe: this is quite correctly set as the action to take. However, what's non-obvious is that 'gobbling' a frame works by typesetting it into a box which is not then used. For that reason we need the commands in the box to be defined.

Given that the way the beamer/beamerarticle split works really starts from the assumption that the document will 'somewhere' define everything, I think this is 'perhaps odd but intentional'.

  • 1
    bitbucket.org/rivanvx/beamer/issue/256/… Commented Aug 30, 2013 at 8:49
  • I think beamer intentionally processes excluded frames (through \beamer@donoframe, putting them into \beamer@tempbox) so that side effects can still happen. Regardless, the most obvious difference between \mode<handout>{\begin{frame}Text\end{frame} and \begin{frame}<handout>Text\end{frame} is the frame numbering in non-handout mode, so the two specifications aren't intended to produce the same result. Commented Oct 4, 2013 at 9:33
  • @cyberSingularity Yup, having thought about it properly you are spot on!
    – Joseph Wright
    Commented Nov 27, 2016 at 20:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .