I have the following piece of code in a beamer slide to put the curly brackets under the equation on the second slide:

    a = \alt<1>{b+c+d}{\underbrace{b+c+d}_{\text{some text}}}.

This causes jumps in the slides. I was wondering how I should avoid this?

I tried to wrap the equation inside an overprint environment (as suggested in Avoiding jumping frames in beamer) but it didn't help.

Thanks for your helps in advance!

  • 3
    Add a phantom of the underbrace to the first slide
    – MaxNoe
    Sep 28, 2015 at 8:53
  • Which part of underbrace should be put inside phantom?
    – MikeL
    Sep 28, 2015 at 8:56
  • 1
    This code does not reproduce the problem even when the obvious document structure is added because the underbrace is never shown. Since only one slide is produced, no jump is possible.
    – cfr
    Sep 28, 2015 at 22:14

1 Answer 1


This creates a new environment overlayauto which works like overlayarea but computes the height, width and depth from the data.

Note: this is like putting an \mbox in a math environment in that you need to use $...$ inside.


% used to replace \only
\NewEnviron{overlayauto}[1][\normalfont\raggedright]% #1 = minipage optons
{% get dimentsions from data
\only<2>{$\underbrace{b+c+d}_{\text{some text}}$}
\only<3>{$\overbrace{b+c+d}^{\text{some text}}$}

You must log in to answer this question.

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