aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorFrank Fuhlbrück2022-01-19 16:29:14 +0100
committerFrank Fuhlbrück2022-01-19 16:29:14 +0100
commit392ef991c763e22a148b0b8bd344c18c42b94069 (patch)
treed62c4c83bd36573db92b7b734f9634a0a288bd7c /examples
parent338d4d9cc7b9a6a42a08375087f79954f19c5f59 (diff)
downloadexercisesheets-392ef991c763e22a148b0b8bd344c18c42b94069.tar.gz
exercisesheets-392ef991c763e22a148b0b8bd344c18c42b94069.tar.bz2
exercisesheets-392ef991c763e22a148b0b8bd344c18c42b94069.zip
task evironments (NOT finished)
Diffstat (limited to 'examples')
-rw-r--r--examples/exshexample.tex80
1 files changed, 79 insertions, 1 deletions
diff --git a/examples/exshexample.tex b/examples/exshexample.tex
index 762b386..6a0d4f2 100644
--- a/examples/exshexample.tex
+++ b/examples/exshexample.tex
@@ -1,11 +1,19 @@
\long\def\ifbeamer#1#2{#2}
\ifbeamer{\documentclass{beamer}}{\documentclass{article}}
+%navigation symbols and the title collide if
+%beamerwithheadline is set
+\ifbeamer{
+ \setbeamertemplate{navigation symbols}{}
+}{}
+
%patchenumerate is the deafault
-\usepackage[patchenumerate=true]%
+\usepackage[patchenumerate=true,beamerwithheadline,
+ beamercompatibility]%
{exercisesheets\ifbeamer{-beamer}{}}
\usepackage{varioref}
\usepackage{hyperref}
+\usepackage{xcolor}
\begin{document}
@@ -25,6 +33,10 @@
}
}
+
+\exshset{solutions=true,
+task restate font={\color{black!60}}}
+
\begin{sheet}[note={Learn how to create nice exercise sheets.},
date={Novanuar 42, -2022},title={First Sheet}]
@@ -60,6 +72,9 @@
number within sheet]
\begin{exercise}[points={many, many},
firstline={Read the manual.}]
+ \begin{solution}
+ OK, done.
+ \end{solution}
\end{exercise}
\end{sheet}
@@ -67,10 +82,73 @@
\begin{exercise}[points={many, many},
firstline={Read the manual.}]
Observe how a sheet with title restarts the exercise numbering.
+ \begin{solution}[framed]
+ OK, done (again).
+ \newframe
+ Otherwise, I would'nt now now \textbackslash newframe which
+ does not exist in beamer.
+ \end{solution}
\end{exercise}
Loading varioref enables you to refer to sub-exercises, like
this: Did you do \ref{subex:man2}?
+
+ \begin{exercise}[points={many, many},
+ firstline={Play around with the options.}]
+ Observe how a sheet with title restarts the exercise numbering.
+ \begin{solution}[defersolutiontitle]
+ \begin{frame}
+ This is a dual-use solution with explicit
+ beamer frames (and no framed).
+ \solutiontitle
+ Note, that we can freely place the title, because of
+ defersolutiontitle.
+ \end{frame}
+ \end{solution}
+ \end{exercise}
+
+ \begin{exercise}[points={many, many},beamersolution,
+ firstline={Play around with the options.}]
+ Observe how a sheet with title restarts the exercise numbering.
+ \begin{solution}
+ This solution is only shown if using the non-beamer version, because the option beamersolution was used. Otherwise both
+ solutions would be shown. You can set
+ the option beamersolution for individual (normal) solutions
+ to ignore some but not all solutions of an exercise.
+ \end{solution}
+ \begin{beamersolution}[defersolutiontitle]
+ \begin{frame}[t]
+ \solutiontitle
+ This beamersolution is only shown if using the beamer
+ version.
+ \end{frame}
+ \end{beamersolution}
+ \end{exercise}
+
+ \begin{frame}
+ \begin{exercise}[points={many, many}]
+ \visible<1>{Be careful using only etc.}
+ \visible<2>{The overlay specification is simply
+ ignored.}
+ \visible<3>{So all content is visible simultaneously and
+ should not contradict or break itself.}
+ \end{exercise}
+ \end{frame}
+
+ \begin{exercise}[points={many, many}]
+ \begin{maintask}[savetasks]
+ The exercise task can be saved and restated.
+ \end{maintask}
+ \begin{subtasks}[savetasks]
+ \item first
+ \begin{solution}
+ None (yet).
+ \end{solution}
+ \item second
+ \end{subtasks}
+ I forgot all the tasks!
+ \restatetask
+ \end{exercise}
\end{sheet}