Sometimes I want an element on a frame to change in steps. I do this by



But this causes the frame to jump due to different sizes of the included content. How can this be avoided?

6 Answers 6


Wrap your code fragment inside the overlayarea environment.


This issue is addressed in the beamer manual in section 9.5 Dynamically Changing Text or Images, p.85 for v.3.10.

You need to use either the overlayarea environment which is "more flexible but less user friendly" or the overprint environment.

\begin{overlayarea}{⟨area width⟩}{⟨area height⟩}
  ⟨environment contents⟩

\begin{overprint}[⟨area width⟩]
  ⟨environment contents⟩

You then need to use \onslide<⟨num⟩> instead of \only<⟨num⟩>{...}. The numbers must be disjoint.


  % on every slide (not sure if it is officially supported)
  % on first slide
  % on slide two
  % on slide three
  % etc.
  • 3
    Using \only within either an overprint or overlayarea environment seems to work fine. Also, \onslide doesn't behave the same as \only, so sometimes \only may be preferred.
    – Mark
    Aug 31, 2016 at 0:45
  • 3
    No, \only does not work as intended. Also, very important is to not use braces around onlide's "arguments" (even if they are necessary for the same construct in overlayarea). Using braces makes the elements not overlap at all as they should.
    – stefanct
    Aug 7, 2018 at 14:36
  • 3
    I am using overlayarea with only. Is it possible to make overlayarea choose its own area height, which should be equal to the height of the longest only<> entry?
    – kksagar
    Jan 24, 2019 at 14:21

The jumping occurs because beamer normally vertically centres the content on the frame.

One way to achieve a constant starting point for content of all heights(*) is to tell beamer to top align the frame. This can either be done on a frame-by-frame basis with


or globally for the whole presentation:






    \only<2>{abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc }


enter image description here

(*) at least for all heights which don't overflow the available text height.

  • Perfect, the simplest way out for many situations I'd imagine.
    – user4417
    Dec 20, 2019 at 17:54

When dealing with figures, it can be sufficient to use \tikz[overlay] inside \only:

  \tikz[overlay,xshift=0em,yshift=0ex]{\draw node {
      % content goes here

Use a command phantom to build a same size of the elements.

  • 1
    This can result in movement of common items. Using overprint as suggested in other answers avoids this problem.
    – Liam
    Feb 1, 2013 at 22:45
  • For many cases, this will probably suffice. This is exactly what i needed :)
    – bmurauer
    Jan 7, 2017 at 20:31

It seems that encapsulating the content of each step in textblocks often solves the problem of jumping frames. This is an example for a frame:

% first content
% second content
  • 2
    Welcome to TeX.SX. Please provide a full example, instead some fragments. Another reason of jumping frames could be omitted % characters ;-)
    – user31729
    May 8, 2015 at 15:45

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.