在我创建的下一个 MWE 中,有 4 个分项文本与内联数学模式方程的四个组成部分相关联。我希望数学项暂停并与相应的彩色分项文本完全同步出现。我知道当数学项位于不同的行中时,这很容易做到\only<4>{}
。当所有内容都是内联时,我找不到方法。
\documentclass[fleqn,xcolor={dvipsnames,table}]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% Thème CambridgeUS
\usetheme{CambridgeUS}
\usecolortheme{rose}
\setbeamercovered{transparent}
\setbeamertemplate{itemize items}[circle]
\setbeamertemplate{itemize subitem}[circle]
\setbeamercolor{itemize item}{fg = darkred}
\setbeamercolor{itemize subitem}{fg = darkred}
\setbeamercolor*{block title}{fg=darkred!90,
bg= blue!5}
\setbeamercolor*{block title example}{fg=violet!90,
bg= darkred!5}
\setbeamercolor{section in toc}{fg=black}
\setbeamercolor*{title}{bg=blue!5,fg=darkred}
\setbeamercolor{section in head/foot}{fg=white}
\setbeamertemplate{enumerate items}[default]
% \setbeamercolor*{enumerate item}{fg=darkred}
\setbeamercolor{local structure}{fg=darkred}
\definecolor{darkred}{rgb}{0.8,0,0}
% \definecolor{lightgreen}{rgb}{0.2,0.8,0.2}
% \definecolor{lightgreen}{rgb}{0.5, 1.0, 0.83}
\definecolor{lightgreen}{rgb}{0.52, 0.73, 0.4}
\definecolor{darkgreen}{rgb}{0.09, 0.45, 0.27}
\definecolor{dauphineblue}{rgb}{0.19,0.267,0.5176}
\definecolor{javerianablue}{rgb}{0,0.388,0.639}
\definecolor{darkgrey}{rgb}{0.66,0.66,0.66}
\begin{document}
\begin{frame}
\frametitle{RRSP - Objective function and parameter $F$, time duration of the failure}
\begin{enumerate}[<+->]
\item[1.] \textcolor{darkred}{(a) MWE text 1}
\item[1.] \textcolor{darkred}{(b) MWE text 2}
\item[1.] \textcolor{teal}{(c) MWE text 3}
\item[2.] \textcolor{darkgreen}{MWE text 4}
\end{enumerate}
\pause\vspace*{0.5cm}\centering$\displaystyle \text{Minimize}\mathbin{\textcolor{darkred}{\sum_{h\in V} o_hy_{hh}}} + \mathbin{\textcolor{darkred}{\sum_{hh'\in E}r_{hh'}x_{hh'}}} + \mathbin{\textcolor{teal {\sum_{(c,h)\in A}s_{ch}y_{ch}}} + \mathbin{\textcolor{darkgreen}{B}}$
\end{frame}
\end{document}
答案1
您可以\uncover<>{}
在任何需要的地方使用,特别是在数学公式中。基于您的 MWE 的示例:
\documentclass[fleqn,xcolor={dvipsnames,table}]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% Thème CambridgeUS
\usetheme{CambridgeUS}
\usecolortheme{rose}
\setbeamercovered{transparent}
\setbeamertemplate{itemize items}[circle]
\setbeamertemplate{itemize subitem}[circle]
\setbeamercolor{itemize item}{fg = darkred}
\setbeamercolor{itemize subitem}{fg = darkred}
\setbeamercolor*{block title}{fg=darkred!90,
bg= blue!5}
\setbeamercolor*{block title example}{fg=violet!90,
bg= darkred!5}
\setbeamercolor{section in toc}{fg=black}
\setbeamercolor*{title}{bg=blue!5,fg=darkred}
\setbeamercolor{section in head/foot}{fg=white}
\setbeamertemplate{enumerate items}[default]
% \setbeamercolor*{enumerate item}{fg=darkred}
\setbeamercolor{local structure}{fg=darkred}
\definecolor{darkred}{rgb}{0.8,0,0}
% \definecolor{lightgreen}{rgb}{0.2,0.8,0.2}
% \definecolor{lightgreen}{rgb}{0.5, 1.0, 0.83}
\definecolor{lightgreen}{rgb}{0.52, 0.73, 0.4}
\definecolor{darkgreen}{rgb}{0.09, 0.45, 0.27}
\definecolor{dauphineblue}{rgb}{0.19,0.267,0.5176}
\definecolor{javerianablue}{rgb}{0,0.388,0.639}
\definecolor{darkgrey}{rgb}{0.66,0.66,0.66}
\begin{document}
\begin{frame}
\frametitle{RRSP - Objective function and parameter $F$, time duration of the failure}
\begin{enumerate}[<+->]
\item[1.] \textcolor{darkred}{(a) MWE text 1}
\item[1.] \textcolor{darkred}{(b) MWE text 2}
\item[1.] \textcolor{teal}{(c) MWE text 3}
\item[2.] \textcolor{darkgreen}{MWE text 4}
\end{enumerate}
\[
\uncover<1->{\text{Minimize } \textcolor{darkred}{\sum_{h\in V} o_hy_{hh}}}
\uncover<2->{+\textcolor{darkred}{\sum_{hh'\in E}r_{hh'}x_{hh'}}}
\uncover<3->{+\textcolor{teal}{\sum_{(c,h)\in A}s_{ch}y_{ch}}}
\uncover<4->{+\textcolor{darkgreen}{B}}
\]
\end{frame}
\end{document}