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"]

  • You can use \visible<handout:0>{stuff to hide in handout}.
    – Herr K.
    Jan 27, 2015 at 3:08
  • @kevin Thanks -- this was driving me insane. I just found out that I can do \onslide<handout:0> too, but \invisible<handout> seems cleaner.
    – Mark
    Jan 27, 2015 at 3:11
  • 1
    Related, maybe duplicate?: tex.stackexchange.com/questions/220723/…, using a modified censor package. Jan 27, 2015 at 3:19
  • @StevenB.Segletes I don't think this is a duplicate because, at least as stated, the requirements here are much simpler and can be met by beamer. censor seems unnecessary here. [It may be a duplicate of something else - I just don't see it as a duplicate of that particular question.]
    – cfr
    Jan 27, 2015 at 3:38
  • @cfr A good point you make. Jan 27, 2015 at 3:48

1 Answer 1


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

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


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


The handout:


The presentation:


  • +1, a challenge also: could you make \handoutgap overlay aware :P
    – Herr K.
    Jan 27, 2015 at 3:24
  • @KevinC In what sense? Overlays have no meaning for handouts, do they? That is, what should the overlay specification do?
    – cfr
    Jan 27, 2015 at 3:26
  • @KevinC Note that it is trivial to make the command overlay aware because beamer alters the syntax of \newcommand. In a sense, it already is overlay aware but no use is made of any overlay specification in the macro. I just don't see what such a specification could usefully be used for.
    – cfr
    Jan 27, 2015 at 3:32
  • Yes, it's easy to define overlay aware commands in Beamer, but not so much if you want to have the <handout:1-> option as its default. I haven't thought of an easy way to do that, well, other than introducing conditional statements like \if.
    – Herr K.
    Jan 27, 2015 at 20:33
  • 1
    @KevinC I think you should ask your own question with a full MWE. It isn't possible to deal with it properly in comments and it isn't appropriate to post a response as an answer to a different question. The need in this question was relatively simple and a simple solution is the best one. Doing stuff with TiKZ raises different issues.
    – cfr
    Jan 27, 2015 at 22:21

You must log in to answer this question.

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