I have a picture in a beamer frame, and I want to add text and equations to it, but not all at once. Rather, I want to add them step by step.
I know how to do this using a combination of \only<..> and \begin{overpic}, but the problem is that I have to keep repeating everthing in each \only.
Any help about how to do that without repeating everything?
EDIT:
\documentclass{beamer}
\usefonttheme[onlymath]{serif}
\usepackage{mathrsfs}
\usepackage[percent]{overpic}
\usetheme{Warsaw}
\usetheme{Berlin}
\begin{document}
\begin{frame}{First Diagram}
%%%%%%%%%%%%%%%%%%%%%%%%
\only<1-1> {
\begin{columns}[T] % align columns
\begin{column}{.5\textwidth}
\begin{overpic}[scale=.5 ]{me.jpg}
\put(55,5) {$\bar{u}(3)$}
\end{overpic}
\end{column}%
%\hfill%
\begin{column}{.5\textwidth}
$\mathscr{M}=\int \bar u(3) $
\end{column}%
\end{columns}
}
\only<2-2> {
\begin{columns}[T] % align columns
\begin{column}{.5\textwidth}
\begin{overpic}[scale=.5 ]{me.jpg}
\put(55,5) {$\bar{u}(3)$}
\put (35,17) {$ ig \gamma^\mu$}
\end{overpic}
\end{column}%
%\hfill%
\begin{column}{.5\textwidth}
$\mathscr{M}=\int \bar u(3) ig \gamma^\mu$
\end{column}%
\end{columns}
}
\end{frame}
\end{document}
These two slides are the results of the code, and they're as I want them to be


\documentclass{...}and ending with\end{document}. – cryingshadow Jan 01 '15 at 13:42