22

Consider the following:

\documentclass{beamer}
\begin{document}
\begin{frame}
  \begin{columns}
    \column{.5\textwidth}
    \only<1->{Why does this move? :-(}
    \column{.5\textwidth}
    \only<2->{
      \[\int\]\[\int\]\[\int\]\[\int\]\[\int\]\[\int\]
    }
  \end{columns}
\end{frame}
\end{document}

Why does the line of text move down from the first page to the second?

What is the proper way to avoid this?

2 Answers 2

31

\only does not reserve any space when the overlay is not active. Use \onslide instead, it leaves its contents as whitespace when not active:

\documentclass{beamer}
\begin{document}
\begin{frame}
  \begin{columns}
    \column{.5\textwidth}
    \onslide<1->{Why does this move? :-(}
    \column{.5\textwidth}
    \onslide<2->{
      \[\int\]\[\int\]\[\int\]\[\int\]\[\int\]\[\int\]
    }
  \end{columns}
\end{frame}
\end{document}
2
  • 1
    Great, that works! Is there a difference between \visible and \onslide?
    – user108903
    Commented Feb 15, 2012 at 16:50
  • 3
    \onslide can have an optional * or a +, so that it can act like \visible or \uncover. And the argument can also be missing, then all the follwoing text will be in the overlay or not
    – user2478
    Commented Feb 15, 2012 at 16:59
14

Use \visible instead:

\documentclass{beamer}
\begin{document}
\begin{frame}
  \begin{columns}
    \column{.5\textwidth}
    \only<1->{Why does this move? :-(}
    \column{.5\textwidth}
    \visible<2->{
      \[\int\]\[\int\]\[\int\]\[\int\]\[\int\]\[\int\]
    }
  \end{columns}
\end{frame}
\end{document}

Explanation

When using \only the content gets only displayed on the specified slide and uses no space for it. Whereas the usage of \visible always uses the space for the corresponding element even if it's not shown. Using the \visible command avoids "jumping" slides.

You must log in to answer this question.

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