aboutsummaryrefslogtreecommitdiff
path: root/exercisesheets.sty
diff options
context:
space:
mode:
authorFrank Fuhlbrück2020-10-15 09:21:05 +0200
committerFrank Fuhlbrück2020-10-15 09:21:05 +0200
commite480192748bfcf90d6b341056638d42ccc67c265 (patch)
tree7ef46df84dd5d3356da03c008532c6864fc987f4 /exercisesheets.sty
parentf631c2775b7dbc3df0f4e5a8157f1e7874f66eff (diff)
downloadexercisesheets-e480192748bfcf90d6b341056638d42ccc67c265.tar.gz
exercisesheets-e480192748bfcf90d6b341056638d42ccc67c265.tar.bz2
exercisesheets-e480192748bfcf90d6b341056638d42ccc67c265.zip
Beamer-Version
Diffstat (limited to 'exercisesheets.sty')
-rw-r--r--exercisesheets.sty30
1 files changed, 24 insertions, 6 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty
index 7038d00..c4a4e67 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.6}
-\def\exsh@date{2019/2/11}
+\def\exsh@version{0.7}
+\def\exsh@date{2020/10/11}
\ProvidesPackage{exercisesheets}[\exsh@date\space\exsh@version\space Typesetting of exercise sheets]
\message{`Typesetting of exercise sheets' \exsh@version\space <\exsh@date>}
@@ -84,6 +84,9 @@
pointsfloatright/.default=true,
abbrev/.is if=exsh@abbrev,
abbrev/.default=true,
+ %options from exercisesheets-beamer are ignored
+ beamersolution/.default={ignore},
+ beamersolution/.initial={ignore}
}
% store title data for sheet headers
@@ -102,7 +105,11 @@
}{
\pgfkeys{/exsh/semester/.initial/.expand once=\@date}
}
-\apptocmd{\date}{\pgfkeys{/exsh/semester={#1}}}{}{}
+\let\@exsh@origdate\date
+\renewcommand{\date}[1]{\@exsh@origdate{#1}\pgfkeys{/exsh/semester={#1}}}
+% this breaks (likely because of detokenization):
+% -> missing \begin{document}
+% \apptocmd{\date}{\pgfkeys{/exsh/semester={#1}}}{}{}
\pgfkeys{/exsh/author/.code={%
\def\exsh@author{#1}%
\def\exsh@repeat{1}%
@@ -129,6 +136,7 @@
title/.initial={},
date/.initial={},
note/.initial={},
+ exauthor/.initial={\exsh@author},
%
% additional exercise info
name/.initial={},
@@ -781,11 +789,21 @@
\@afterheading
}%
+%the regular version of exercisesheets.sty skips all beamer solutions
+\newenvironment{beamersolution}[1][]{\exsh@skipsolution}{}%
+
\long\def\exsh@skipsolution#1{%
\ifstrequal{#1}{\end}{\exsh@endsolution}{\exsh@skipsolution}%
}
\def\exsh@endsolution#1{%
- \ifstrequal{#1}{solution}{\end{solution}}{\exsh@skipsolution}%
+ \ifstrequal{#1}{solution}{
+ \end{solution}
+ }{%
+ \ifstrequal{#1}{beamersolution}{
+ \end{beamersolution}
+ }{%
+ \exsh@skipsolution}%
+ }%
}
@@ -850,8 +868,8 @@
\next
}{}
-\def\exsh@startguide{\@afterindentfalse
- \linebreak
+\def\exsh@startguide{\@afterindentfalse%
+ \par
{\parindent \z@
\pgfkeysvalueof{/exsh/strings/gradingguide}: }\nobreak%
\@afterheading