帶有範例的自訂框架標題以及如何引用這些範例?

帶有範例的自訂框架標題以及如何引用這些範例?

我正在嘗試在 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}

在此輸入影像描述

在此輸入影像描述

在此輸入影像描述

在此輸入影像描述

相關內容