当我在 beamer 中使用覆盖层时,如何修复 \ref 命令的问题

当我在 beamer 中使用覆盖层时,如何修复 \ref 命令的问题

当我在 beamer 中使用覆盖时,如何修复 \ref 命令的问题?

当我使用叠加层时,我遇到了这个问题。以下是一个例子

\documentclass[notes=show,12pt]{beamer}
\usepackage{beamerthemeshadow}

\beamertemplateshadingbackground{red!15}{blue!15}
\usepackage{lmodern}
\usepackage[T1]{fontenc} % fonte codificado em em T1 (8 bits)
%\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}
\usepackage[latin1]{inputenc} % letras acentuadas
\usepackage{color}

\begin{document}

\frame { \frametitle{First Theorem}
Consider the equation 
\[\cos^2(x) + \sin^2(x)=1
\]

\begin{overprint}
\onslide<2>
Let bla bla...

\onslide<3>
\begin{theorem}{\label{T1}}
If
\begin{equation} \label{E1}
x = \pi
\end{equation}
then bla bla bla
\end{theorem}
\onslide<4>
\begin{exampleblock}{Observation}
The conclusion of Theorem \ref{T1} remains valid if the condition \eqref{E1} is replaced by $x = 2\pi$ 
\end{exampleblock}

\end{overprint}

}

\end{document}

答案1

您可以使用\label<3>它将其放在与输出相同的层上。另外我认为frame它想成为一个环境。

\documentclass[notes=show,12pt]{beamer}
\usepackage{beamerthemeshadow}

\beamertemplateshadingbackground{red!15}{blue!15}
\usepackage{lmodern}
\usepackage[T1]{fontenc} % fonte codificado em em T1 (8 bits)
%\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}
\usepackage[latin1]{inputenc} % letras acentuadas
\usepackage{color}

\begin{document}

\begin{frame}
 \frametitle{First Theorem}
Consider the equation 
\[\cos^2(x) + \sin^2(x)=1
\]

\begin{overprint}
\onslide<2>
Let bla bla...

\onslide<3>
\begin{theorem}{\label<3>{T1}}
If
\begin{equation} \label<3>{E1}
x = \pi
\end{equation}
then bla bla bla
\end{theorem}
\onslide<4>
\begin{exampleblock}{Observation}
The conclusion of Theorem \ref{T1} remains valid if the condition \eqref{E1} is replaced by $x = 2\pi$ 
\end{exampleblock}

\end{overprint}

\end{frame}

\end{document}

相关内容