I am very new to Beamer (and a latex novis) so I guess I am just missing some basics. I couldn't find an answer to my question, so I hope this isn't a repost.
I am trying to show my equation changing in the same frame and keep alignment of all things that do not change. As you can see I managed to set a new width of the 0 on slide 2-3 to take up as much space as the F that was there before but I can't figure out how to get it to stay still when i move the last term to the left side.
I have tried moving the &
around and now I have sprinkled with some \phantom
's but it still moves.
Sorry about all the packages. I have forgotten which does what so I included them all.
Is there an easy fix to get it to be still?
\documentclass[12pt]{beamer}
\usefonttheme[onlymath]{serif}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{parskip}
\usepackage{physics}
\usepackage{mathtools}
\usetheme{Frankfurt}
\usecolortheme{seagull}
\setbeamertemplate{footline}[frame number]
\DeclareFontShape{OT1}{cmss}{b}{n}{<->ssub * cmss/bx/n}{}
\newcommand{\inserteqstrut}[1]{%
\rlap{$\displaystyle#1$}%
\phantom{\biggesteq}}
\newcommand{\biggesteq}{\sum_{n=0}^{\infty}\dfrac{(-1)^{n}}{2n+1}x^{2n+1}}
\newlength{\slength}
\settowidth{\slength}{$\mathbf{F}$}
\newcommand*{\Sz}{\makebox[\slength][c]{0}}
\begin{document}
\begin{frame}
\frametitle{$\int \frac{dp}{\rho} + \frac{\partial \phi}{\partial t} + \frac{1}{2} \norm{\nabla \phi}^2 = constant$}
\begin{align*}
&\only<1-2>{\phantom{-\frac{1}{\rho }\nabla p +}\frac{\partial \mathbf{v}}{\partial t} + (\mathbf{v} \cdot \nabla)\mathbf{v}} \only<3->{\frac{1}{\rho }\nabla p + \frac{\partial \mathbf{v}}{\partial t} + (\mathbf{v} \cdot \nabla)\mathbf{v}} =
\only<1>{\mathbf{F}-\frac{1}{\rho }\nabla p}
\only<2>{\Sz-\frac{1}{\rho }\nabla p}
\only<3>{\Sz \phantom{-\frac{1}{\rho }\nabla p}}
\end{align*}
\end{frame}
\end{document}