From f3fecd9f8ba9c426544015305b24a11a2e8d9ec5 Mon Sep 17 00:00:00 2001
From: Frank Fuhlbrück
Date: Wed, 6 Oct 2021 12:23:21 +0200
Subject: Option for enabling beamer headers

---
 exercisesheets-beamer.sty | 46 ++++++++++++++++++++++++++--------------------
 1 file changed, 26 insertions(+), 20 deletions(-)

(limited to 'exercisesheets-beamer.sty')

diff --git a/exercisesheets-beamer.sty b/exercisesheets-beamer.sty
index 4a2d64b..2508e89 100644
--- a/exercisesheets-beamer.sty
+++ b/exercisesheets-beamer.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.7-Beamer}
-\def\exsh@date{2020/10/14}
+\def\exsh@version{0.8-Beamer}
+\def\exsh@date{2021/10/06}
 
 \ProvidesPackage{exercisesheets-beamer}[\exsh@date\space\exsh@version\space Typesetting of exercise sheets]
 \message{`Typesetting of exercise sheets' \exsh@version\space <\exsh@date>}
@@ -50,6 +50,7 @@
 \newif\ifexsh@nonoralsolutions
 \newif\ifexsh@samplesolutions
 \newif\ifexsh@forcesample %force printing sample sol. of wrong type
+\newif\ifexsh@beamerwithheadline
 \newif\ifexsh@beamersolution
 \newif\ifexsh@defersolutiontitle
 \newif\ifexsh@framed
@@ -76,6 +77,8 @@
   forcesample/.default=true,
   filenameasexercisename/.is if=exsh@filenameasexercisename,
   filenameasexercisename/.default=true,
+  beamerwithheadline/.is if=exsh@beamerwithheadline,
+  beamerwithheadline/.default=true,
   beamersolution/.is if=exsh@beamersolution,
   beamersolution/.default=true,
   defersolutiontitle/.is if=exsh@defersolutiontitle,
@@ -156,6 +159,7 @@
   name/.initial={},
   forcesample/.initial={false},
   beamersolution/.initial={false},
+  beamerwithheadline/.initial={false},
   defersolutiontitle/.initial={false},
   framed/.initial={false},
   firstline/.initial={},
@@ -1095,24 +1099,26 @@
 
 \setbeamertemplate{headline}{%
 % \leavevmode%
-  \begin{beamercolorbox}[wd=\paperwidth,vmode]{frametitle}
-    \vspace{0.4em}
-    \leavevmode
-    \begingroup
-      \footnotesize%
-      \hspace*{2ex}{\pgfkeysvalueof{/exsh/subject font}%
-      \pgfkeysvalueof{/exsh/subject}} \hfill%
-      {\pgfkeysvalueof{/exsh/semester font}%
-      \pgfkeysvalueof{/exsh/semester}}\hspace{2ex}\hfil%
-      \vspace{1mm}\linebreak%
-      \hspace*{2ex}{\pgfkeysvalueof{/exsh/author font}\exsh@author}%
-      \hfill{\pgfkeysvalueof{/exsh/date font}%
-      \pgfkeysvalueof{/exsh/date}}%
-      \hspace{2ex}\hfil%\vspace{-1em}
-    \endgroup
-    \vspace{0.4em}
-  \end{beamercolorbox}%
-  \vspace{3mm}
+  \ifbool{exsh@beamerwithheadline}{%
+    \begin{beamercolorbox}[wd=\paperwidth,vmode]{frametitle}
+      \vspace{0.4em}
+      \leavevmode
+      \begingroup
+        \footnotesize%
+        \hspace*{2ex}{\pgfkeysvalueof{/exsh/subject font}%
+        \pgfkeysvalueof{/exsh/subject}} \hfill%
+        {\pgfkeysvalueof{/exsh/semester font}%
+        \pgfkeysvalueof{/exsh/semester}}\hspace{2ex}\hfil%
+        \vspace{1mm}\linebreak%
+        \hspace*{2ex}{\pgfkeysvalueof{/exsh/author font}\exsh@author}%
+        \hfill{\pgfkeysvalueof{/exsh/date font}%
+        \pgfkeysvalueof{/exsh/date}}%
+        \hspace{2ex}\hfil%\vspace{-1em}
+      \endgroup
+      \vspace{0.4em}
+    \end{beamercolorbox}%
+    \vspace{3mm}
+  }{}%
 }
 \addtobeamertemplate{frametitle}{\vspace{-3mm}}{}
 
-- 
cgit v1.2.3

