因此,我有这张您在此处看到的投影仪幻灯片,并且使用暂停功能一次显示一行。但是,我不想重复所有行 $$3<5$$、$$3\leq 5$$ 等。相反,我希望在暂停时用 < 和 \leq 等替换(即覆盖)第二行中的 \square。
这可能吗?
提前致谢!
\documentclass{beamer}
\usepackage[makeroom]{cancel}
\renewcommand{\CancelColor}{\color{red}}
\begin{document}
\begin{frame}{}
{\bf Example.} Which of the symbols $>$, $<$, $\geq$, $\leq$, and $=$, may fill in the blank between the following?
$$3\;\square\;5$$
\pause Since 3 is less than 5, we can put ``$<$'' in the blank.
\pause $$3<5$$
\pause For the same reason, we could also put ``$\leq$'' in the blank.
\pause $$3\leq 5$$
\pause However, we could not put ``$=$'' in the blank.
\pause $$3\;\xcancel{=}\;5$$
\end{frame}
\end{document}
答案1
您可以使用 来实现这一点\only
。
\documentclass{beamer}
\usepackage[makeroom]{cancel}
\renewcommand{\CancelColor}{\color{red}}
\begin{document}
\begin{frame}{}
{\bf Example.} Which of the symbols $>$, $<$, $\geq$, $\leq$, and $=$, may fill in the blank between the following?
$$3\;\only<1>{\square}
\only<2-3>{<}\only<4->{\leq}\;5$$
\pause Since 3 is less than 5, we can put ``$<$'' in the blank.
\pause $$3<5$$
\pause For the same reason, we could also put ``$\leq$'' in the blank.
\pause $$3\leq 5$$
\pause However, we could not put ``$=$'' in the blank.
\pause $$3\;\xcancel{=}\;5$$
\end{frame}
\end{document}