我在使用旁注时遇到了 beamer 的叠加系统问题。我有一张带有叠加规范的幻灯片,并且我为这张幻灯片的每个阶段都做了一些注释。例如,来自 beamer 文档:
\documentclass[compress,mathserif]{beamer}
\usepackage{pgfpages}
\usetheme{Frankfurt}
\setbeameroption{show notes}
\setbeameroption{show notes on second screen=right}
\begin{document}
\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number.
\end{theorem}
\begin{proof}
\begin{enumerate}
\item<1-| alert@1> Suppose $p$ were the largest prime number.
\item<2-> Let $q$ be the product of the first $p$ numbers.
\item<3-> Then $q+1$ is not divisible by any of them.
\item<1-> Thus $q+1$ is also prime and greater than $p$.\qedhere
\end{enumerate}
\end{proof}
\note<1->{ note one\\ }
\note<2->{ note 2\\ }
\note<3->{ note 3\\ }
\note<4->{ note 4\\ }
\end{frame}
\end{document}\endinput
在这个例子中,注释随着覆盖的推进而出现。我希望笔记始终可见,但在相应的幻灯片中以某种方式突出显示(例如以红色)。
我尝试过\note<1-| alert@1>
,但是没有效果,所以看来我对覆盖有一些误解。
答案1
您可以使用\alt{}{}
为笔记着色:
\documentclass[compress,mathserif]{beamer}
\usepackage{pgfpages}
\usetheme{Frankfurt}
\setbeameroption{show notes}
\setbeameroption{show notes on second screen=right}
\newcommand<>{\mynote}[1]{%
\alt#2{%
\note{\textcolor{red}{#1}}
}
{%
\note{#1}
}
}
\begin{document}
\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number.
\end{theorem}
\begin{proof}
\begin{enumerate}
\item<1-| alert@1> Suppose $p$ were the largest prime number.
\item<2-> Let $q$ be the product of the first $p$ numbers.
\item<3-> Then $q+1$ is not divisible by any of them.
\item<1-> Thus $q+1$ is also prime and greater than $p$.\qedhere
\end{enumerate}
\end{proof}
\mynote<1>{note one\\}
\mynote<2>{ note 2\\ }
\mynote<3>{ note 3\\ }
\mynote<1>{ note 4\\ }
\end{frame}
\end{document}