The common approach to typeset frames with verbatim content is the
fragile option, which works well with overlays:
I hardly remember the
containsverbatim option and my beamer manual (v3.10) does not mention it. The only reference I found for it is in the ChangeLog of the beamer class:
2004-02-18 Till Tantau , Version 2.00
- Added a containsverbatim option to the \frame command. Should be
used instead of the old \frame<all:1> (which is, however, still
So the observed effect is not a bug, but a feature :-), as
\frame<all:1> is the syntax in beamer to suppress all, but the first slide from a frame. The option name
containsverbatim seams to be pretty misleading; however, given how beamers overlay mechanism works (by scanning the frame content multiple times, which does not work well together with verbatim environments), I guess it was just the way to typeset verbatim contents.
Later, Till added the more powerful fragile option:
2004-10-11 Till Tantau
- Option "fragile" that allows the use of
overlays together with verbatims. *Extremely* useful.
fragile option works by externalizing the frame's code into an own file (with suffix
.vrb) and the overlay mechanism works by reading this file multiple times, which plays nicely together with verbatim contents. Of course, this is a lot slower than the
containsverbatim approach, which therefore was kept and documented under the additional (and better understandable) option name
fragile=singleslide. Section §8.1 (page 61) of the beamer user guide explains it in detail.