My goal is to show different source code versions. For readability, I prefer to have those versions on different frames, but for the organization of the presentation, it should seem like one frame. Changing the page counter can be done by \addtocounter{framenumber}{-1}
.
This would be an example:
\documentclass{beamer}
\usepackage{listings}
\usepackage[english]{babel}
\usetheme{Berlin}
\setbeamertemplate{footline}[frame number]
\begin{document}
\section{Test}
\subsection{Test}
\begin{frame}[fragile]{My Code}
\begin{lstlisting}[mathescape=true]
class ClassA {
public void methodA() {
new ClassB().methodB1();
}
}
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]{My Code}
\addtocounter{framenumber}{-1}
\begin{lstlisting}[mathescape=true]
class ClassA {
public void methodA() {
new ClassB().methodC1();
}
}
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]{Final Remarks}
...
\end{frame}
\end{document}
But I could not find a solution for changing the navigation. Setting the counter with \setcounter{subsection}{1}
did not set the correct counter, since this seems to set the subsection, not the frame number in the subsection. Is there any way of finding a counter, e.g. in a list of all defined counters?
Hide some slides from the miniframes navigation in beamer is very similar to the solution, but if I use this, the current navigation circle is not highlighted. Is there a solution where the circle for the current (last) frame stays highlighted, but there is no circle added in the navigation?