# Remove all frame content from article mode in beamer

What is the best way to remove all frame content from a beamer presentation when the article mode is being used? Below is a MWE:

\documentclass[ignorenonframetext]{beamer}
%\documentclass{article}\usepackage{beamerarticle}

\begin{document}

\begin{frame}{This is frame 1}
Content of frame 1, but shouldn't be in the article
\end{frame}

This text should appear in the article, but not within the presentation.

\begin{frame}{This is frame 2}
Content of frame 2, but shouldn't be in the article
\end{frame}

This text should appear in the article, but not within the presentation.

\end{document}


The idea is that the beamer presentation is the lecture, whereas the inter-frame text will be homework questions that will be typeset separately.

EDIT

I searched under global frame options and ideally I would like to have something like the solution to this question:

\documentclass[presentation]{beamer}


except the option somehow needs to be within the article class!

You can specify as overlay option if something is only meant to be in the presentation with <presentation>. In the same manner you can use <article>.

Some examples where you can use these overlay options are

\begin{frame}<presentation>


or

 \mode<article>{This text should appear in the article, but not within the presentation.}


%\documentclass[ignorenonframetext]{beamer}
\documentclass{article}\usepackage{beamerarticle}

\begin{document}

\begin{frame}<presentation>{This is frame 1}
Content of frame 1, but shouldn't be in the article
\end{frame}

This text should appear in the article, but not within the presentation.

\begin{frame}<presentation>{This is frame 2}
Content of frame 2, but shouldn't be in the article
\end{frame}

This text should appear in the article, but not within the presentation.

\end{document}

• Perhaps also mention \mode<article>? – Joseph Wright Jan 9 '17 at 11:27
• Thanks for the fast solution! Is it possible to globally add the <presentation> to all frames? – Geoff Jan 9 '17 at 11:27
• @Geoff If the entire content is different between the two versions then having it one source seems a bit odd! – Joseph Wright Jan 9 '17 at 11:39
• @Joseph I agree, but in this case there is sense (IMO): the idea is to keep exercises close to the input information, if I decide to move/remove parts of my lectures, the exercises move along accordingly. – Geoff Jan 9 '17 at 11:41
• @Geoff Currently I don't think this can be set (it requires \beamerdefaultoverlayspecification, which only applies in presentation mode): I'm working on some 'refresh' stuff for `beamer, so feel free to log an issue. – Joseph Wright Jan 9 '17 at 11:52