![当我在 beamer 中使用覆盖层时,如何修复 \ref 命令的问题](https://linux22.com/image/262302/%E5%BD%93%E6%88%91%E5%9C%A8%20beamer%20%E4%B8%AD%E4%BD%BF%E7%94%A8%E8%A6%86%E7%9B%96%E5%B1%82%E6%97%B6%EF%BC%8C%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%20%5Cref%20%E5%91%BD%E4%BB%A4%E7%9A%84%E9%97%AE%E9%A2%98.png)
当我在 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}