4

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!

5

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 Maybe? But with a good editor that knows "replace all" it should be easy to change all frames at once [unless you are already using overlay options for frames]. – user36296 Jan 9 '17 at 11:36
  • 2
    @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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.