1

in a presentation i would like to use some overlays but for some reason one overlay moves everything above it. Here is an example. When you run it in presentation mode (full screen) you can see the annoying movement. I hope someone knows help.

\documentclass[12pt, a4paper,xcolor=dvipsnames]{beamer}
\usetheme{Dresden} 
\usecolortheme[named=red]{structure} 
\usepackage{xcolor} 
\usepackage[ngerman]{babel} 
\usepackage[utf8x]{inputenc} 
\usepackage{amsmath,amsfonts,amssymb} 
\usefonttheme[onlymath]{serif} 


\newcommand{\p}{\partial } 


\begin{document} 

\begin{frame}{} 
Test Test Test Test Test 
\begin{align*} 
\onslide<2->{ 
\only<1-6>{ 
\frac{\p r^2}{\p x}= 
\onslide<3->{2r\frac{\p r}{\p x}=} 
\onslide<4->{ 2x \Leftrightarrow } 
\fcolorbox{white}{white}{$\onslide<5-> {\dfrac{\p r}{\p x}=
\dfrac{x}{r}} 
\onslide<6->{=\cos\varphi.}$} 
} 
\only<7->{ 
\frac{\p r^2}{\p x}= 
2r\frac{\p r}{\p x}= 
2x 
\Leftrightarrow {\fcolorbox{red!70!black}{red!30!white}
{$\alert<11>{\dfrac{\p r}{\p x}}=\dfrac{x}{r}=\cos\varphi.$} 
} 
} 
} 
\end{align*} 
\onslide<8->{Here, the text above moves... 
} 
\onslide<9->{ 
\begin{align*} 
\only<8-12>{\frac{\p y}{\p x}= 
\onslide<10->{0= 
 \alert<11>{\frac{\p r}{\p x}} 
\sin\varphi + r\frac{\p \varphi}{\p x}\cos\varphi 
\onslide<12-> { 
\Leftrightarrow \fcolorbox{white}{white}
{$\dfrac{\p \varphi}{\p x}=-\dfrac{r}{\sin\varphi}.$} 
}}} 
\only<13->{\frac{\p y}{\p x}= 
0=\frac{\p r}{\p x} 
\sin\varphi + r\frac{\p \varphi}{\p x}\cos\varphi   
\Leftrightarrow 
\fcolorbox{red!70!black}{red!30!white}
{$\dfrac{\p \varphi}{\p x}=-\dfrac{r}{\sin\varphi}.$} 
} 
\end{align*} 
} 
\onslide<14->{ 
This is a Test 
} 
\onslide<15->{ 
\begin{align*}
\fcolorbox{red!70!black}{red!30!white}{$\dfrac{\p r}
{\p y}=\sin\varphi$} \quad 
\fcolorbox{red!70!black}{red!30!white}
{$\dfrac{\p \varphi}{\p y}=\dfrac{\cos\varphi}{r}.$} 
\end{align*} 
} 
\end{frame} 
\end{document}
1

2 Answers 2

2

\only and \onslide are two different commands: \onslide hides the content until the condition is satisfied, \only does not render it. The "jumps" are caused by the \only commands in the last align* environment.

However, you should not use \onslide in equations - this leads to horrible results. I would suggest to split the frame at this point, or to bear those jumps.


More detailed information about this can be found here: Which : \only or \onslide ? (Beamer)

2

As Stefan Braun already pointed out in his answer: your problem is, that you are mixing \only{} and \onslide{}. Some of your commands reserve room, some do not which leads to pages of of different length. This leads to jumping text as the default alignment is centred.

But instead of fixing this, you can simply top align the frame with \begin{frame}[t], like this one does not see the different length of the frames.

You must log in to answer this question.

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