依次显示相似方程的两个部分

依次显示相似方程的两个部分

我想itemize在 beamer 模板上配置一个选项,以便连续显示类似方程的两个部分。不幸的是,它不起作用,因为我似乎没有正确实现它……

基本上,我想显示等式直到前两个彩色框(和链接的框),然后显示第 3 个绿色框。

在此处输入图片描述

\documentclass[french]{beamer}

\usepackage{pgf, tikz, adjustbox}
\usepackage[beamer,customcolors,norndcorners]{hf-tikz}

%%%%%%%CADRES DES EQUATIONS%%%%%
\usepackage[most]{tcolorbox}
\tcbset{highlight math style={enhanced,colframe=red,colback=red!10!white,boxsep=0pt,sharp corners,
equal height group=C,
minimum for equal height group=C:1.5cm,
valign=center,
}}

%%%%%%% MARGES CUSTOM%%%%%%%%
\newcommand\Wider[2][4em]{%
\makebox[\linewidth][c]{%
  \begin{minipage}{\dimexpr\textwidth+#1\relax}
  \raggedright#2
  \end{minipage}%
  }%

\begin{document}

    \begin{frame}{Equation des films minces}
        \begin{exampleblock}{Cas cylindrique : ajoutons un peu de tension !} 
            \begin{itemize}[<+-| alert@+>] 
        \Wider[4em]{        
        \item \begin{equation*}
          \frac{\partial h}{\partial t} = \frac{1}{12 \mu r}  \frac{\partial}{\partial r}  \left(r h^{3} \left(
          %
          \tcbhighmath[remember as=a,tcbox raise=-9mm]{
            \rho g \frac{\partial h}{\partial r}
          }
          + 
          \tcbhighmath[remember as=b,colback=blue!10,colframe=blue,tcbox raise=-9mm]{
           D \frac{\partial}{\partial r}(\Delta^2_r h) 
          } 
          \right) \right)
        \end{equation*}
        
        \vskip0.5cm

\begin{equation*}
    \tcbhighmath[
     tcbox raise=0mm,
      remember as=c,
      overlay={
        \node[anchor=north] at (frame.south) {Pesanteur};
        \draw[red,-latex,thick] (a.south) -- (frame.north);
      }
    ]{  
      \displaystyle R \propto t^{\frac{1}{2}} 
    } \qquad
  \tcbhighmath[
         tcbox raise=0mm,
         remember as=e,
         colback=blue!10,
         colframe=blue,
         overlay={
          \draw[blue,-latex,thick] (b.south) -- (frame.north);
          \node[anchor=north] at (frame.south) {Elastique};
        }
       ]{
    R \propto t^{\frac{1}{3}}
    } 
    \end{equation*}
    %%%%PART 2%%%%%%%
    \item \begin{equation*}
          \frac{\partial h}{\partial t} = \frac{1}{12 \mu r}  \frac{\partial}{\partial r}  \left(r h^{3} \left(
          %
          \tcbhighmath[remember as=a,tcbox raise=-9mm]{
            \rho g \frac{\partial h}{\partial r}
          }
          + 
          \tcbhighmath[remember as=b,colback=blue!10,colframe=blue,tcbox raise=-9mm]{
           D \frac{\partial}{\partial r}(\Delta^2_r h) 
          } 
          -
          \tcbhighmath[remember as=bb,colback=green!10,colframe=green,tcbox raise=-9mm]{
          T \frac{\partial}{\partial r}(\Delta_r h)  
          }
          \right) \right)
        \end{equation*}
        
        \vskip0.5cm

\begin{equation*}
    \tcbhighmath[
     tcbox raise=0mm,
      remember as=c,
      overlay={
        \node[anchor=north] at (frame.south) {Pesanteur};
        \draw[red,-latex,thick] (a.south) -- (frame.north);
      }
    ]{  
      \displaystyle R \propto t^{\frac{1}{2}} 
    } \qquad
  \tcbhighmath[
         tcbox raise=0mm,
         remember as=e,
         colback=blue!10,
         colframe=blue,
         overlay={
          \draw[blue,-latex,thick] (b.south) -- (frame.north);
          \node[anchor=north] at (frame.south) {Elastique};
        }
       ]{
    R \propto t^{\frac{1}{3}}
    } \qquad
      \tcbhighmath[
         tcbox raise=0mm,
         remember as=f,
         colback=green!10,
         colframe=green,
         overlay={
          \draw[green,-latex,thick] (bb.south) -- (frame.north);
          \node[anchor=north] at (frame.south) {Tension};
        }
       ]{
    R \propto t^{\frac{1}{5}}
    }     
    \end{equation*}
    }
    \end{itemize}
    \end{exampleblock}
    \end{frame}

/end{document}

有没有简单的方法可以做到这一点?我不知道为什么 \item 在这种情况下不起作用?

答案1

您可以使用投影仪叠加层来\visible<>{...}逐步揭示内容:

\documentclass[french]{beamer}

\usepackage{pgf, tikz, adjustbox}
\usepackage[beamer,customcolors,norndcorners]{hf-tikz}

%%%%%%%CADRES DES EQUATIONS%%%%%
\usepackage[most]{tcolorbox}
\tcbset{highlight math style={enhanced,colframe=red,colback=red!10!white,boxsep=0pt,sharp corners,
equal height group=C,
minimum for equal height group=C:1.5cm,
valign=center,
}}

%%%%%%% MARGES CUSTOM%%%%%%%%

\begin{document}

    \begin{frame}{Equation des films minces}
    \begin{columns}
    \begin{column}{.95\paperwidth}
        \begin{exampleblock}{Cas cylindrique : ajoutons un peu de tension !}     

     \begin{equation*}
          \frac{\partial h}{\partial t} = \frac{1}{12 \mu r}  \frac{\partial}{\partial r}  \left(r h^{3} \left(
          %
          \tcbhighmath[remember as=a,tcbox raise=-9mm]{
            \rho g \frac{\partial h}{\partial r}
          }
          + 
          \tcbhighmath[remember as=b,colback=blue!10,colframe=blue,tcbox raise=-9mm]{
           D \frac{\partial}{\partial r}(\Delta^2_r h) 
          } 
          \visible<2->{-
          \tcbhighmath[remember as=bb,colback=green!10,colframe=green,tcbox raise=-9mm]{
          T \frac{\partial}{\partial r}(\Delta_r h)  
          }}
          \right) \right)
        \end{equation*}
        
        \vskip0.5cm

\begin{equation*}
    \tcbhighmath[
     tcbox raise=0mm,
      remember as=c,
      overlay={
        \node[anchor=north] at (frame.south) {Pesanteur};
        \draw[red,-latex,thick] (a.south) -- (frame.north);
      }
    ]{  
      \displaystyle R \propto t^{\frac{1}{2}} 
    } \qquad
  \tcbhighmath[
         tcbox raise=0mm,
         remember as=e,
         colback=blue!10,
         colframe=blue,
         overlay={
          \draw[blue,-latex,thick] (b.south) -- (frame.north);
          \node[anchor=north] at (frame.south) {Elastique};
        }
       ]{
    R \propto t^{\frac{1}{3}}
    } \qquad
      \visible<2->{\tcbhighmath[
         tcbox raise=0mm,
         remember as=f,
         colback=green!10,
         colframe=green,
         overlay={
          \draw[green,-latex,thick] (bb.south) -- (frame.north);
          \node[anchor=north] at (frame.south) {Tension};
        }
       ]{
    R \propto t^{\frac{1}{5}}
    }}     
    \end{equation*}
    
    \end{exampleblock}
        \end{column}
        \end{columns}
    \end{frame}

\end{document}

在此处输入图片描述

相关内容