Improved how the little dots in the footer are produced

This commit is contained in:
Lukas Pietzschmann
2022-12-08 15:17:21 +01:00
parent 8a7923f19d
commit 6886b2eb0a
2 changed files with 21 additions and 11 deletions

View File

@@ -26,7 +26,7 @@
\hspace{.4em}% \hspace{.4em}%
\ifnum\framespersection>1% \ifnum\framespersection>1%
\foreach \i in {1, ..., \framespersection}{% \foreach \i in {1, ..., \framespersection}{%
\ifnum \i=\insertframenumber% \ifnum \i=\theframesinsection%
~$\bullet$% ~$\bullet$%
\else% \else%
~$\circ$% ~$\circ$%
@@ -38,7 +38,7 @@
\hspace{.7em}% \hspace{.7em}%
\ifnum\framespersubsection>1% \ifnum\framespersubsection>1%
\foreach \i in {1, ..., \framespersubsection}{% \foreach \i in {1, ..., \framespersubsection}{%
\ifnum \i=\insertframenumber% \ifnum \i=\theframesinsubsection%
~$\bullet$% ~$\bullet$%
\else% \else%
~$\circ$% ~$\circ$%
@@ -47,7 +47,7 @@
\fi% \fi%
\fi% \fi%
\hfill% \hfill%
\colorbox{awesomehighlight!70}{\hspace{0.3cm}Seite~\thepagenumber\hspace{0.3cm}}% \colorbox{awesomehighlight!70}{\hspace{0.3cm}Seite~\insertframenumber~/~\inserttotalframenumber\hspace{0.3cm}}%
\end{beamercolorbox}% \end{beamercolorbox}%
} }
\vskip0pt% \vskip0pt%
@@ -74,7 +74,7 @@
\hfill% \hfill%
\mytitle% \mytitle%
\hfill% \hfill%
\colorbox{awesomehighlight!70}{\hspace{0.3cm}Seite~\thepagenumber\hspace{0.3cm}}% \colorbox{awesomehighlight!70}{\hspace{0.3cm}Seite~\insertframenumber~/~\inserttotalframenumber\hspace{0.3cm}}%
\end{beamercolorbox}% \end{beamercolorbox}%
} }
\vskip0pt% \vskip0pt%

View File

@@ -77,21 +77,31 @@
\usefolder{styles} \usefolder{styles}
\usetheme{Awesome} \usetheme{Awesome}
\newcounter{pagenumber} \newcounter{framesinsection}
\newcounter{framesinsubsection}
\counterwithin*{framesinsection}{section}
\counterwithin*{framesinsubsection}{subsection}
\BeforeBeginEnvironment{frame}{ \BeforeBeginEnvironment{frame}{
\stepcounter{pagenumber} \ifbeamer@noframenumbering\else%
\stepcounter{framesinsection}
\stepcounter{framesinsubsection}
\fi%
}
\newcommand{\refreshcountsinaux}{
\immediate\write\@auxout{\global\noexpand\@namedef{s@totalsubsectionframes-\arabic{section}-\arabic{subsection}}{\theframesinsubsection}}
\immediate\write\@auxout{\global\noexpand\@namedef{s@totalsectionframes-\arabic{section}}{\theframesinsection}}
} }
\counterwithin{framenumber}{subsection}
\pretocmd{\section}{ \pretocmd{\section}{
\immediate\write\@auxout{\global\noexpand\@namedef{s@totalsectionframes-\arabic{section}}{\arabic{framenumber}}} \refreshcountsinaux
}{}{} }{}{}
\pretocmd{\subsection}{ \pretocmd{\subsection}{
\immediate\write\@auxout{\global\noexpand\@namedef{s@totalsubsectionframes-\arabic{section}-\arabic{subsection}}{\arabic{framenumber}}} \refreshcountsinaux
}{}{} }{}{}
\AtEndDocument{ \AtEndDocument{
\immediate\write\@auxout{\global\noexpand\@namedef{s@totalsectionframes-\arabic{section}}{\arabic{framenumber}}} \refreshcountsinaux
\immediate\write\@auxout{\global\noexpand\@namedef{s@totalsubsectionframes-\arabic{section}-\arabic{subsection}}{\arabic{framenumber}}}
} }
\newcommand{\framespersection}{ \newcommand{\framespersection}{
\ifcsdef{s@totalsectionframes-\arabic{section}}{ \ifcsdef{s@totalsectionframes-\arabic{section}}{