方框文字解释了投影仪中方程的一部分

方框文字解释了投影仪中方程的一部分
\documentclass[10pt]{beamer}
\usetheme[progressbar=frametitle]{metropolis}
\usepackage[english]{babel}
\usepackage{booktabs}
\usefonttheme[onlymath]{serif}
\setbeamercolor{background canvas}{bg=white}
\setbeamertemplate{footline}[frame number]
\usetheme{Singapore}
\usepackage{xcolor}


\begin{document}

\begin{frame}{Standard Model}
Standard Model(SM) is gauge theory based on the gauge group-
\begin{equation}
G_{SM}=  SU(3)_C\times SU(2)_L\times U(1)_Y
\end{equation}
Complete SM lagrangian can be written as-

\[\mathcal{L}_{SM}=\textcolor{blue}{i\overline{\psi}\gamma^{\mu}\mathcal{D}_{\mu}\psi}\pause\textcolor{red}{ -\frac{1}{4}G^{\mu\nu A}G_{\mu\nu}^{A}-\frac{1}{4}W^{\mu\nu I}W_{\mu\nu}^{I}-\frac{1}{4}B^{\mu\nu}B_{\mu\nu}}\]
                              \[\pause\textcolor{magenta}{+h_{ij}^{u}\overline{Q}_{i}U_{j} \widetilde{H}+h_{ij}^{d}\overline{Q}_{i} D_{j}H+h_{ij}^{e}\overline{L}_{i}E_{j}H+h.c.}\]
                              \pause

\begin{equation}
\textcolor{violet}{+(\mathcal{D}_{\mu}H)^{\dag}\mathcal{D}_{\mu}H-\mu^{2}H^{\dag}H+\lambda(H^{\dag}H)^{2}}
\end{equation}
\end{frame}
\end{document}  

该代码提供以下四张幻灯片- 在此处输入图片描述 在此处输入图片描述 在此处输入图片描述 在此处输入图片描述

我希望这些幻灯片中包含每个术语的框式描述,但当我跳转到下一个术语或下一张幻灯片时,前一个描述应该消失。我该如何实现?

答案1

如果您只想在一张幻灯片中添加文本,请尝试\only<>{}

\documentclass{beamer}

\begin{document}

    \begin{frame}
        Complete SM lagrangian can be written as-
        \[\mathcal{L}_{SM}=\textcolor{blue}{i\overline{\psi}\gamma^{\mu}\mathcal{D}_{\mu}\psi}\only<1>{~\fbox{explain something}}\pause
        \textcolor{red}{ -\frac{1}{4}G^{\mu\nu A}G_{\mu\nu}^{A}-\frac{1}{4}W^{\mu\nu I}W_{\mu\nu}^{I}-\frac{1}{4}B^{\mu\nu}B_{\mu\nu}}\]
        \[\pause\textcolor{magenta}{+h_{ij}^{u}\overline{Q}_{i}U_{j} \widetilde{H}+h_{ij}^{d}\overline{Q}_{i} D_{j}H+h_{ij}^{e}\overline{L}_{i}E_{j}H+h.c.}\]
        \pause
        \begin{equation}
        \textcolor{violet}{+(\mathcal{D}_{\mu}H)^{\dag}\mathcal{D}_{\mu}H-\mu^{2}H^{\dag}H+\lambda(H^{\dag}H)^{2}}
        \end{equation}
    \end{frame} 

\end{document}

在此处输入图片描述

https://tex.stackexchange.com/a/205623/36296你也可以像这样解释术语

\documentclass{beamer}

\usepackage{mathtools}

\newcommand<>{\uncoverubrace}[2]{%
    \onslide#3 \underbrace{ \onslide<1->%
        #1%
        \onslide#3 }_{#2} \onslide<1->%
}
\newcommand<>{\uncoverobrace}[2]{%
    \onslide#3 \overbrace{ \onslide<1->%
        #1%
        \onslide#3 }^{#2} \onslide<1->%
}


\begin{document}

    \begin{frame}
        Complete SM lagrangian can be written as-
        \[\mathcal{L}_{SM}=\uncoverubrace<1>{\textcolor{blue}{i\overline{\psi}\gamma^{\mu}\mathcal{D}_{\mu}\psi}}{\only<1>{\fbox{matter}}}\pause
        \textcolor{red}{ -\frac{1}{4}G^{\mu\nu A}G_{\mu\nu}^{A}-\frac{1}{4}W^{\mu\nu I}W_{\mu\nu}^{I}-\frac{1}{4}B^{\mu\nu}B_{\mu\nu}}\]
        \[\pause\textcolor{magenta}{+h_{ij}^{u}\overline{Q}_{i}U_{j} \widetilde{H}+h_{ij}^{d}\overline{Q}_{i} D_{j}H+h_{ij}^{e}\overline{L}_{i}E_{j}H+h.c.}\]
        \pause
        \begin{equation}
        \textcolor{violet}{+(\mathcal{D}_{\mu}H)^{\dag}\mathcal{D}_{\mu}H-\mu^{2}H^{\dag}H+\lambda(H^{\dag}H)^{2}}
        \end{equation}
    \end{frame} 

\end{document}

在此处输入图片描述

相关内容