我有一些图表应该轮流显示在逐项文本下方。问题是,无论重新编译多少次,以后都无法引用这些图表。我该如何纠正?
\documentclass{beamer}
\setbeamertemplate{caption}[numbered]
\begin{document}
\begin{frame}
\frametitle{Title}
\begin{itemize}[<+->]
\item ABC
\item XYZ
\item DEF
\end{itemize}
\begin{overprint}
\onslide<1>
\begin{figure}[h]
\centering
\caption{ABC}
\label{fig:ABC}
\includegraphics[width=\textwidth]{ABC}
\end{figure}
\onslide<2>
\begin{figure}[h]
\centering
\caption{XYZ}
\label{fig:XYZ}
\includegraphics[width=\textwidth]{XYZ}
\end{figure}
\end{overprint}
\end{frame}
\end{document}
答案1
最好的实现方法是使用从链接到目标的 HyperJumps。
\documentclass{beamer}
\usepackage{mwe}
\setbeamertemplate{caption}[numbered]
\begin{document}
\hyperlink{DEF}{\beamergotobutton{Jump to DE'Future }}
\begin{frame}
\frametitle{Title}
\begin{itemize}[<+->]
\item ABC
\item XYZ
\item DEF
\end{itemize}
\begin{overprint}
\onslide<1>
\begin{figure}[h]
\centering\hypertarget{ABC}{\label{fig:ABC}}% move the target as high as possible on page
\caption{ABC}
% \label{fig:ABC} % redundant
\includegraphics[width=0.5\textwidth]{example-image-a}
\end{figure}
\onslide<2>
\begin{figure}[h]
\centering\hypertarget{XYZ}{\label{fig:XYZ}}% move the target as high as possible on page
\caption{XYZ}
% \label{fig:XYZ} % redundant
\includegraphics[width=0.5\textwidth]{example-image-b}
\end{figure}
\onslide<3>
\hypertarget{DEF}{ DEF Anything} you want % move the target as high as possible on page
\hyperlink{ABC}{\beamergotobutton{Goto ABC}}
\begin{figure}[h]
\centering{\label{fig:DEF}}
\includegraphics[width=0.5\textwidth]{example-image-c}
\end{figure}
\end{overprint}
\end{frame}
\begin{frame}
Included here in own frame but links can be duplicated or dotted about throughout other pages
\hyperlink{ABC}{\beamergotobutton{Goto ABC}}
\hyperlink{XYZ}{\beamergotobutton{Goto XYZ}}
\end{frame}
\end{document}