投影方程多幻灯片

投影方程多幻灯片

我的朋友们,我正在使用 Beamer 制作幻灯片。我想制作一个多帧幻灯片,上面有一个方程式。在第一帧中,存在一些方程式。但在第二帧,我想突出显示方程式的一部分。我的示例 MWE 如下:

\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}

例如,在第二帧,\overline{u_iu_j}要突出显示第二个方程中的项。

答案1

如果改变颜色来突出显示术语就足够了,您可以执行以下操作:

\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}

答案2

\alert与覆盖规范一起使用,例如<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}

在此处输入图片描述

您还可以更改宏的定义\alert以匹配您想要用于突出显示的特定方式。以下是使用红色颜色框而不是红色文本颜色的示例(但请注意:这仅适用于数学环境中的突出显示):

\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}

在此处输入图片描述

相关内容