Suppose I have a beamer presentation with some contiguous frames containing a "special content" that are inside a specialcontent environment. I'd like to introduce this special content with a frame that display both:
- the numbers of "special" frames,
- the frame (not page) number of the last "special frame,
as in the MCE below (<total number of frames> and <number of last frame of the special content>).
How could I achieve this?
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{navigation symbols}{}
\newenvironment{specialcontent}{%
\begin{frame}
\frametitle{Special content}
The following special content:
\begin{itemize}
\item has <total number of frames> frames,
\item ends frame \# <number of last frame of the special content>.
\end{itemize}
\end{frame}
}{%
}
\begin{document}
\begin{frame}
\frametitle{Foo bar}
Foo\pause{} bar.
\end{frame}
\begin{specialcontent}
\begin{frame}
\frametitle{Foo bar (special content)}
Foo\pause{} bar.
\end{frame}
\begin{frame}
\frametitle{Foo bar (special content)}
Foo\pause{} bar.
\end{frame}
\end{specialcontent}
\begin{frame}
\frametitle{Foo bar}
Foo\pause{} bar.
\end{frame}
\end{document}

