2

Consider the following MWE:

\documentclass{beamer}

\begin{document}

\begin{frame}

\frametitle{Displacement of text}

\only<1-2>{This text will be displaced.}

\only<2>{Did you see it?}

\end{frame}

\end{document}

The \only<1-2> text is vertically displaced from its original position. Why does this happen?

I also tried this:

\only<1-2>{

\only<1-2>{This text will be displaced}.

\only<2>{Did you see it?}

}

but the same phenomenon happens.

I would like for the text not to "move": if it appears at some position, to stay there during the whole frame.

I searched the internet and tex.stackexchange, but I couldn't solve this.

Adam
  • 4,684
Larara
  • 303
  • I don't understand what is the problem. – Adam Oct 29 '14 at 01:34
  • 1
    Have you seen this one http://tex.stackexchange.com/questions/148/avoiding-jumping-frames-in-beamer ? – percusse Oct 29 '14 at 01:36
  • 1
    You need to use overprint or overlayarea to ensure everything takes a constant space. Otherwise, it is displaced because there is less stuff on one slide than the other and beamer adjusts whatever is on the slide according to how much of it there is so that content is roughly vertically centred. – cfr Oct 29 '14 at 01:55
  • Yeah, the \overlayarea worked! The documention of it is at section 9.5 of the Beamer User Guide. Thank you guys very much. – Larara Oct 29 '14 at 02:03
  • @Adam didn't you see that the vertical position of "This text will be displaced" slightly changes before and after the "Did you see it?" – Larara Oct 29 '14 at 02:08
  • @Larara to tell you the truth no I didn't notice it. – Adam Oct 29 '14 at 02:11
  • Yeah, it is a subtle change. Anyway thanks for your attention and time spent on helping me! :) – Larara Oct 29 '14 at 02:31

1 Answers1

1

You can only use overprint if the slide specifications are disjoint so I think you need overlayarea in this case. For example:

\documentclass{beamer}

\begin{document}

  \begin{frame}

    \frametitle{Displacement of text}

    \begin{overlayarea}{\linewidth}{.3\textheight}

      \onslide<1-2>{This text will be displaced.}

      \onslide<2>{Did you see it?}

    \end{overlayarea}

  \end{frame}

\end{document}
cfr
  • 198,882