I want to reset the section numbers when a part in beamer starts.
So I tried:
\setcounter{section}{0}
That does not work.
So after searching I found this:
\makeatletter
\numberwithin{section}{part}
\AtBeginPart{\beamer@tocsectionnumber=0\relax}
\makeatother
at
Easier support for numbering sections within parts
It worked once or twice then I started cleaning up and now it can't get to work anymore. I tried to move it into the document and to the preamble. I also change the numbering and title of the part, but I don't know if that would influence it.
An MWE:
\documentclass{beamer}
\setbeamerfont{block title}{size={}}
\setbeamercolor{titlelike}{parent=structure,bg=white}
\usetheme[]{Frankfurt}
\setbeamertemplate{navigation symbols}{}
\AtBeginSection[]{\begin{frame}\frametitle{Agenda}\tableofcontents[currentsection,hideallsubsections]\end{frame}}
\AtBeginDocument{\renewcommand*{\partname}{Theme}}
\begin{document}
\makeatletter
\numberwithin{section}{part}
\AtBeginPart{\beamer@tocsectionnumber=0\relax}
\makeatother
\AtBeginPart{\frame{\partpage}}
\setcounter{part}{2}
\setcounter{section}{0}
\part{1st}
\section{First}
\begin{frame}
First
\end{frame}
\setcounter{part}{3}
\setcounter{section}{0}
\part{2nd}
\section{First}
\begin{frame}
First
\end{frame}
\end{document}