# beamer equation multislide

my Friends, I am working with beamer for slide generating. I wanna make a multi-frame slide which there is an equation on it. in the first frame, some equations exist. But at the second frame, I want a part of the equation to be highlighted. my example MWE is as follows:

\documentclass{beamer}

\begin{document}
\begin{frame}
\frametitle{governing equations}
\begin{exampleblock}{Reynolds-averaged Navier stokes}
\begin{itemize}
\item
continuity

$\frac{\partial (U_i)}{\partial x_i}=0$
\end{itemize}
\begin{itemize}
\item
momentum equations:

$\frac{\partial (U_jU_i)}{\partial x_j}=-\frac{1}{\rho}\frac{\partial P}{\partial x_i}+\frac{\partial }{\partial x_j}(\nu\frac{\partial U_i}{\partial x_j}-\overline{u_iu_j})$
\end{itemize}
\begin{itemize}
\item
energy equation:

$\frac{\partial (U_j\Theta )}{\partial x_j}=\frac{\partial }{\partial x_j}(\frac{\nu}{Pr}\frac{\partial \Theta}{\partial x_j}-\overline{u_j\theta})$
\end{itemize}
\end{exampleblock}
\end{frame}
\end{document}


For example, at the second frame, the \overline{u_iu_j} term in the second equation to be highlighted.

If changing the colour to highlight the term is enough, you could do:

\documentclass{beamer}

\begin{document}
\begin{frame}
\frametitle{governing equations}
\begin{exampleblock}{Reynolds-averaged Navier stokes}
\begin{itemize}
\item
continuity

$\frac{\partial (U_i)}{\partial x_i}=0$
\end{itemize}
\begin{itemize}
\item
momentum equations:

$\frac{\partial (U_jU_i)}{\partial x_j}=-\frac{1}{\rho}\frac{\partial P}{\partial x_i}+\frac{\partial }{\partial x_j}(\nu\frac{\partial U_i}{\partial x_j}-\textcolor<2->{red}{\overline{u_iu_j}})$
\end{itemize}
\begin{itemize}
\item
energy equation:

$\frac{\partial (U_j\Theta )}{\partial x_j}=\frac{\partial }{\partial x_j}(\frac{\nu}{Pr}\frac{\partial \Theta}{\partial x_j}-\overline{u_j\theta})$
\end{itemize}
\end{exampleblock}
\end{frame}
\end{document}

• can you define a colorbox for this term? – mohammad fazli Mar 1 '18 at 9:02

Use \alert with an overlay specification like <2>:

\documentclass{beamer}

\begin{document}
\begin{frame}
\frametitle{governing equations}
\begin{exampleblock}{Reynolds-averaged Navier stokes}
\begin{itemize}
\item
continuity

$\frac{\partial (U_i)}{\partial x_i}=0$
\end{itemize}
\begin{itemize}
\item
momentum equations:

$\frac{\partial (U_jU_i)}{\partial x_j}=-\frac{1}{\rho}\frac{\partial P}{\partial x_i}+\frac{\partial }{\partial x_j}(\nu\frac{\partial U_i}{\partial x_j}-\alert<2>{\overline{u_iu_j}})$
\end{itemize}
\begin{itemize}
\item
energy equation:

$\frac{\partial (U_j\Theta )}{\partial x_j}=\frac{\partial }{\partial x_j}(\frac{\nu}{Pr}\frac{\partial \Theta}{\partial x_j}-\overline{u_j\theta})$
\end{itemize}
\end{exampleblock}
\end{frame}
\end{document}


You can also change the definition of the \alert macro to match the specific way you want to use for highlighting. Here is an example that uses a red colorbox instead of red text color (but be aware: this only works for highlighting inside math environments):

\documentclass{beamer}

\renewcommand<>{\alert}[1]{\alt#2{\colorbox{red}{$#1$}}{#1}}

\begin{document}
\begin{frame}
\frametitle{governing equations}
\begin{exampleblock}{Reynolds-averaged Navier stokes}
\begin{itemize}
\item
continuity

$\frac{\partial (U_i)}{\partial x_i}=0$
\end{itemize}
\begin{itemize}
\item
momentum equations:

$\frac{\partial (U_jU_i)}{\partial x_j}=-\frac{1}{\rho}\frac{\partial P}{\partial x_i}+\frac{\partial }{\partial x_j}(\nu\frac{\partial U_i}{\partial x_j}-\alert<2>{\overline{u_iu_j}})$
\end{itemize}
\begin{itemize}
\item
energy equation:

$\frac{\partial (U_j\Theta )}{\partial x_j}=\frac{\partial }{\partial x_j}(\frac{\nu}{Pr}\frac{\partial \Theta}{\partial x_j}-\overline{u_j\theta})$
\end{itemize}
\end{exampleblock}
\end{frame}
\end{document}


• can you define a colorbox for this term? – mohammad fazli Mar 1 '18 at 9:02
• @mohammadfazli: See the update to my answer. – Tiuri Mar 1 '18 at 9:15