我正在尝试在 LaTeX Beamer 框架标题上创建示例,对它们进行计数并在另一个框架标题中引用它们。通过谷歌搜索,我能够计算示例数量,但无法在标题的下一张幻灯片中引用它们。
所以,我想知道是否有任何想法可以实现这个目标。
这是最小工作示例以及相应的生成的 pdf 文件。
\documentclass[xcolor=dvipsnames]{beamer}
\usepackage[T1]{fontenc}
\usetheme{AnnArbor}
\usecolortheme{whale}
\setbeamercolor{title}{bg=RoyalPurple}
\setbeamercolor{frametitle}{fg=white,bg=RoyalPurple}
\usepackage{amsmath}
\newcounter{exm}
\newcommand\ExmT{%
\frametitle{\refstepcounter{exm}{Example}~\theexm}}
\resetcounteronoverlays{exm}
\begin{document}
\frame{
\ExmT
David Hilbert is a great Mathematician!
}
\frame{
\ExmT
Bernhard Riemann is another greatest mathematician in the history!
}
\frame{{How do you define Mathematics?}
Mathematics is a language of sciences. Moreover, $\cdots$
}
\frame{{Rmarks on Example 1}
{\color{red}\textbf{I am writing Remarks on Example 1 (on the title of this
frame) manually but is there a way to reference Example 1 automatically?}}
Not the frame number.
}
\end{document}