diff --git a/beamerouterthemeAwesome.sty b/beamerouterthemeAwesome.sty index 2d3da60..f029e7d 100644 --- a/beamerouterthemeAwesome.sty +++ b/beamerouterthemeAwesome.sty @@ -26,7 +26,7 @@ \hspace{.4em}% \ifnum\framespersection>1% \foreach \i in {1, ..., \framespersection}{% - \ifnum \i=\insertframenumber% + \ifnum \i=\theframesinsection% ~$\bullet$% \else% ~$\circ$% @@ -38,7 +38,7 @@ \hspace{.7em}% \ifnum\framespersubsection>1% \foreach \i in {1, ..., \framespersubsection}{% - \ifnum \i=\insertframenumber% + \ifnum \i=\theframesinsubsection% ~$\bullet$% \else% ~$\circ$% @@ -47,7 +47,7 @@ \fi% \fi% \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}% } \vskip0pt% @@ -74,7 +74,7 @@ \hfill% \mytitle% \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}% } \vskip0pt% diff --git a/use_me.tex b/use_me.tex index 6cc7732..79d9265 100644 --- a/use_me.tex +++ b/use_me.tex @@ -77,21 +77,31 @@ \usefolder{styles} \usetheme{Awesome} -\newcounter{pagenumber} +\newcounter{framesinsection} +\newcounter{framesinsubsection} +\counterwithin*{framesinsection}{section} +\counterwithin*{framesinsubsection}{subsection} + \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}{ - \immediate\write\@auxout{\global\noexpand\@namedef{s@totalsectionframes-\arabic{section}}{\arabic{framenumber}}} + \refreshcountsinaux }{}{} \pretocmd{\subsection}{ - \immediate\write\@auxout{\global\noexpand\@namedef{s@totalsubsectionframes-\arabic{section}-\arabic{subsection}}{\arabic{framenumber}}} + \refreshcountsinaux }{}{} \AtEndDocument{ - \immediate\write\@auxout{\global\noexpand\@namedef{s@totalsectionframes-\arabic{section}}{\arabic{framenumber}}} - \immediate\write\@auxout{\global\noexpand\@namedef{s@totalsubsectionframes-\arabic{section}-\arabic{subsection}}{\arabic{framenumber}}} + \refreshcountsinaux } \newcommand{\framespersection}{ \ifcsdef{s@totalsectionframes-\arabic{section}}{