
Я пытаюсь создать примеры на заголовке кадра 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}