From c4ea6a1d69c73656db55d45aebb396d5e0e78951 Mon Sep 17 00:00:00 2001
From: Frank Fuhlbrück
Date: Mon, 7 Nov 2022 13:39:29 +0100
Subject: v. 0.13: better handling of restatetask and subtask references

---
 exercisesheets.tex | 56 +++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 43 insertions(+), 13 deletions(-)

(limited to 'exercisesheets.tex')

diff --git a/exercisesheets.tex b/exercisesheets.tex
index 2e74f6c..d73c540 100644
--- a/exercisesheets.tex
+++ b/exercisesheets.tex
@@ -53,7 +53,7 @@
 \usepackage[english,iso]{isodate}
 \title{The \exsh Package}
 \author{Sebastian Kuhnert\and Frank Fuhlbrück}
-\date{Version 0.12, \printdateTeX{2022/09/02}}
+\date{Version 0.13, \printdateTeX{2022/11/07}}
 
 \begin{document}
 \maketitle
@@ -469,26 +469,43 @@ much mandatory structure inside exercises. Furthermore, the
 situations where we want more explicit structure, for instance to 
 have special font for the main task or the subtasks or to reuse
 some of the tasks later. This is especially handy if using the 
-beamer variant where the origial task and a part of the solution might be on different slides. In the future it might be possible to
+beamer variant where the original task and a part of the solution might be on different slides. In the future it might be possible to
 use other counters then \verb|enumi|, which is also only possible
 if sub-exercises are not simply \verb|\item|s in
-\verb|enumerate|.
+\verb|enumerate|. If you want to reuse the main or any subtasks
+you may use \verb|\restatetask| or \verb|\restatetaskbeamer|
+(this shows noting if not compiled with beamer). There is also
+a starred version (\verb|\restatetask*| / 
+\verb|\restatetaskbeamer*|) for each of them, which adds a newline.
+All four have an optional argument that allows to restate
+a subtask instead of the main task. This argument is either
+\option{main}, a number of a \textbf{previous} subtask or
+\option{cur} for the current subtask.
+
 
 
 \begin{lstlisting}
-\begin{exercise}[points=sum]%sum produces 4+6
+\begin{exercise}[points=oral]
   \begin{maintask}
-    This is the main task.
+    A and B are true.
   \end{maintask}
   \begin{subtasks}
-    \subtask{first}
-    \subtask{second}
+    \subtask{A is true}
+      \begin{solution}[framed]
+        We want to show: \restatestask %A and B are true.
+        \newframe
+        Out first step is to show: \restatetask[cur] %A is true
+      \end{solution}
+    \subtask{If A is true, B is true.}
+      \begin{solution}[framed]
+        Obvious (i.e.: homework).
+      \end{solution}
+    \subtask{B is true}
+      \begin{solution}[framed]
+        We already know: \restatestask[1] and 
+        \restatestask[2], therefore B is also true.
+      \end{solution}
   \end{subtasks}
-  \begin{solution}[framed]
-    We want to show: \restatestask %This is the main task.
-    \newframe
-    Out first step is to show: \restatetask[1] %first
-  \end{solution}
 \end{exercise}
 \end{lstlisting}
 
@@ -822,7 +839,20 @@ This also works well in combination with a make file that generates
 \label{sec:changelog}
 
 \begin{itemize}
-  \item[v. 0.12.2:]  2022-10-20
+    \item[v. 0.13:]  2022-11-07
+      \begin{itemize}
+        \item bugfix: \verb|\begingroup| and \verb|\endgroup|
+          within \verb|\subtask| now contain everything up to the
+          next \verb|\subtask|.
+        \item \verb|\restatestask| has now a starred version that 
+          adds a newline and beamer versions for both the
+          regular and the starred version. Furthermore, there
+          is an argument \option{cur} to restate the current
+          subtask (the one just given before). This is only
+          defined within the aforementioned group, i.e.,
+          throws an error after \verb|\end{subtasks}|.
+      \end{itemize}
+    \item[v. 0.12.2:]  2022-10-20
       \begin{itemize}
         \item bugfix: dofile with \verb|kpse.find_file|
         \item docs: document option \option{fragile}
-- 
cgit v1.2.3

