From ac0109ddb2113aeb5d632117183cf3ae945d5402 Mon Sep 17 00:00:00 2001
From: Frank Fuhlbrück
Date: Fri, 2 Sep 2022 15:49:59 +0200
Subject: beamer: footer off by default, new option to switch it on

---
 exercisesheets.sty | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

(limited to 'exercisesheets.sty')

diff --git a/exercisesheets.sty b/exercisesheets.sty
index 9c8c502..1bd926c 100644
--- a/exercisesheets.sty
+++ b/exercisesheets.sty
@@ -18,8 +18,8 @@
 %\NeedsTeXFormat{LaTeX2e}[1994/12/01]
 
 % don't forget to update the version and date in exercisesheets.tex
-\def\exsh@version{0.11}
-\def\exsh@date{2022/02/11}
+\def\exsh@version{0.12}
+\def\exsh@date{2022/09/02}
 
 \ProvidesPackage{exercisesheets}[\exsh@date\space\exsh@version\space Typesetting of exercise sheets]
 \message{`Typesetting of exercise sheets' \exsh@version\space <\exsh@date>}
@@ -64,6 +64,7 @@
 
 \ifexsh@beamer 
 \newif\ifexsh@beamerwithheadline
+\newif\ifexsh@beamerwithfootline
 \newif\ifexsh@beameruseblocks
 \newif\ifexsh@defersolutiontitle
 \newif\ifexsh@framed
@@ -170,6 +171,8 @@
 \pgfkeys{exsh,
   beamerwithheadline/.is if=exsh@beamerwithheadline,
   beamerwithheadline/.default=true,
+  beamerwithfootline/.is if=exsh@beamerwithfootline,
+  beamerwithfootline/.default=true,
   beameruseblocks/.is if=exsh@beameruseblocks,
   beameruseblocks/.default=true,
   beamersolution/.is if=exsh@beamersolution,
@@ -182,6 +185,7 @@
   fragile/.default=true,
   beamersolution/.initial={false},
   beamerwithheadline/.initial={false},
+  beamerwithfootline/.initial={false},
   beameruseblocks/.initial={false},
   defersolutiontitle/.initial={false},
   framed/.initial={false},
@@ -190,6 +194,8 @@
 \pgfkeys{exsh,
   beamerwithheadline/.default={ignore},
   beamerwithheadline/.initial={ignore},
+  beamerwithfootline/.default={ignore},
+  beamerwithfootline/.initial={ignore},
   beamersolution/.default={ignore},
   beamersolution/.initial={ignore},
   defersolutiontitle/.default={ignore},
@@ -1639,16 +1645,18 @@
 
 \setbeamertemplate{footline}
 {%
-  \leavevmode%
-  \hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{frametitle}%
-  {\pgfkeysvalueof{/exsh/author font}\pgfkeysvalueof{/exsh/exauthor}}
-  \end{beamercolorbox}%
-  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
-    \usebeamerfont{author in head/foot}
-    \inserttitle
-    \hfill\insertpagenumber
-  \end{beamercolorbox}}%
-  \vskip0pt%
+  \ifbool{exsh@beamerwithfootline}{%
+    \leavevmode%
+    \hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{frametitle}%
+    {\pgfkeysvalueof{/exsh/author font}\pgfkeysvalueof{/exsh/exauthor}}
+    \end{beamercolorbox}%
+    \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
+      \usebeamerfont{author in head/foot}
+      \inserttitle
+      \hfill\insertpagenumber
+    \end{beamercolorbox}}%
+    \vskip0pt%
+  }{}%
 }
 \fi
 %%%%%%%%%%%%%%% END BEAMER-ONLY %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-- 
cgit v1.2.3

