[Tex/LaTex] Producing lecture notes and handouts with spaces for students to fill in details

beamer

I'm trying to produce handouts for students of lecture notes that I've written using Beamer — I'd like the handouts and presentation slides to look exactly the same except have gaps in the handout version for students to fill in information. In other words, I'd like to preserve the spacing with say specific equations/text removed.

I've tried the \only command, but that doesn't seem to preserve the spacing (it removes it completely and closes up the gap).

Is there a simple way to do this without just setting the text to "white" or having to insert spacing commands everywhere? [I can do it this way, but would prefer something more "automatic"]

Best Answer

This creates a command \handoutgap{} which will leave a gap in handout mode, typesetting the content normally otherwise.

\documentclass[handout]{beamer}
\newcommand\handoutgap[1]{\invisible<0| handout:1->{#1}}

\begin{document}

  \begin{frame}
    This is some text and \handoutgap{that bit is} missing.
  \end{frame}

\end{document}

The handout:

handout

The presentation:

presentation

Related Question