diff options
| author | Frank Fuhlbrück | 2020-11-16 14:35:17 +0100 |
|---|---|---|
| committer | Frank Fuhlbrück | 2020-11-16 14:35:17 +0100 |
| commit | bcd469dc6ef29ef0fb4b5c0fed7a39906558bba0 (patch) | |
| tree | ae227f7b38e705cb4cc591417eddc478b08d6503 | |
| parent | 3a2673fc9aac78663c05695b50b2be9c937d5a91 (diff) | |
| download | exercisesheets-bcd469dc6ef29ef0fb4b5c0fed7a39906558bba0.tar.gz exercisesheets-bcd469dc6ef29ef0fb4b5c0fed7a39906558bba0.tar.bz2 exercisesheets-bcd469dc6ef29ef0fb4b5c0fed7a39906558bba0.zip | |
exsh: verzögerte Lösungstitel
| -rw-r--r-- | exercisesheets-beamer.sty | 38 | ||||
| -rw-r--r-- | exercisesheets.sty | 8 |
2 files changed, 36 insertions, 10 deletions
diff --git a/exercisesheets-beamer.sty b/exercisesheets-beamer.sty index cbc46eb..517a4d0 100644 --- a/exercisesheets-beamer.sty +++ b/exercisesheets-beamer.sty @@ -50,6 +50,7 @@ \newif\ifexsh@samplesolutions \newif\ifexsh@forcesample %force printing sample sol. of wrong type \newif\ifexsh@beamersolution +\newif\ifexsh@defersolutiontitle \newif\ifexsh@gradingguides \newif\ifexsh@inplace \newif\ifexsh@sample @@ -72,6 +73,8 @@ forcesample/.default=true, beamersolution/.is if=exsh@beamersolution, beamersolution/.default=true, + defersolutiontitle/.is if=exsh@defersolutiontitle, + defersolutiontitle/.default=true, gradingguides/.is if=exsh@gradingguides, gradingguides/.default=true, only/.initial={-}, @@ -143,6 +146,7 @@ name/.initial={}, forcesample/.initial={false}, beamersolution/.initial={false}, + defersolutiontitle/.initial={false}, firstline/.initial={}, points/.initial={}, oral/.style={/exsh/points=oral},oral/.value forbidden, @@ -799,19 +803,35 @@ % \fi } +\def\exsh@solutiontitle#1{ + \begin{beamercolorbox}[rounded=true,wd={#1}]{block title alerted} + \pgfkeysvalueof{/exsh/solution title font}% + \pgfkeysvalueof{/exsh/strings/solution} % + (\pgfkeysvalueof{/exsh/strings/exercise} \arabic{section}% + \alph{enumi})% + \end{beamercolorbox}} +\newcommand{\solutiontitle}[1][\linewidth]{ + \ifbool{exsh@defersolutiontitle}{% + \ifhmode \linebreak\fi\exsh@solutiontitle{#1} + }{}% +} + \def\exsh@startsolution{% \ifnum\value{enumi}=0% \clearpage \fi \begingroup - \usebeamercolor{block title alerted} - \setbeamercolor{block body}{bg=bg,fg=fg} - \block{} - \pgfkeysvalueof{/exsh/solution title font}% - \pgfkeysvalueof{/exsh/strings/solution} % - (\pgfkeysvalueof{/exsh/strings/exercise} \arabic{section}% - \alph{enumi})% - \endblock +% \usebeamercolor{block title alerted} +% \setbeamercolor{block body}{bg=bg,fg=fg} +% \block{} +% \pgfkeysvalueof{/exsh/solution title font}% +% \pgfkeysvalueof{/exsh/strings/solution} % +% (\pgfkeysvalueof{/exsh/strings/exercise} \arabic{section}% +% \alph{enumi})% +% \endblock + \ifbool{exsh@defersolutiontitle}{}{% + \ifhmode \linebreak\fi\exsh@solutiontitle{\linewidth} + }% \endgroup \@afterheading }% @@ -992,7 +1012,6 @@ } - \setbeamertemplate{headline}{% \leavevmode% \begin{beamercolorbox}[wd=\paperwidth,ht=3.5em,dp=1.375ex]% @@ -1005,6 +1024,7 @@ \end{beamercolorbox}% \vspace{3mm} } +\addtobeamertemplate{frametitle}{\vspace{-3mm}}{} \setbeamertemplate{footline} {% diff --git a/exercisesheets.sty b/exercisesheets.sty index c4a4e67..410626d 100644 --- a/exercisesheets.sty +++ b/exercisesheets.sty @@ -86,7 +86,9 @@ abbrev/.default=true, %options from exercisesheets-beamer are ignored beamersolution/.default={ignore}, - beamersolution/.initial={ignore} + beamersolution/.initial={ignore}, + defersolutiontitle/.default={ignore}, + defersolutiontitle/.initial={ignore}, } % store title data for sheet headers @@ -789,6 +791,10 @@ \@afterheading }% +%this command is only usefule for exercisesheets-beamer to place +%the deferred title within a new frame +\newcommand{\solutiontitle}[1][]{} + %the regular version of exercisesheets.sty skips all beamer solutions \newenvironment{beamersolution}[1][]{\exsh@skipsolution}{}% |
