The following code tries to put a vphantom around a definition environment in a Beamer document but it does not compile properly.
\documentclass{beamer}
\usepackage{mathtools}
\begin{document}
\begin{frame}
Before
\begin{definition}
inside
\end{definition}
after
\end{frame}
\begin{frame}
Before
\vphantom{
\begin{definition}
inside
\end{definition}
}
after
\end{frame}
\end{document}
The two frames created during the failed compilation are

and

What is going wrong?
\visible<#>{\begin{definition}...\end{definition}}and option for you? If you don't want to create overlays, why not usevskip? – Herr K. Jun 05 '14 at 21:09\vphantom– egreg Jun 05 '14 at 21:09\visibleand\only? What would the solution be using overlays? I don't want to use\vskipbecause the space I want to add depends on specific content. – Tyson Williams Jun 05 '14 at 21:24\phantomwas amathtoolscommand. – Tyson Williams Jun 05 '14 at 21:31\visible<#>{<content>}saves the space of<content>; whereas\only<#>{<content>}doesn't save the space. – Herr K. Jun 05 '14 at 21:33\visibleandonslide? – Tyson Williams Jun 05 '14 at 21:34\visibleis not affected by transparency settings, but\onslide(or similarly\uncover) is. For example, if you have set\setbeamercovered{transparent}, then that's going to make the content in\onslide(faintly) visible, but content in\visiblewill stay invisible. – Herr K. Jun 05 '14 at 21:46