aboutsummaryrefslogtreecommitdiff
path: root/examples/exshexample.tex
blob: 762b38662f0994a774dfe8998b66ecc3260fa04f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
\long\def\ifbeamer#1#2{#2}
\ifbeamer{\documentclass{beamer}}{\documentclass{article}}

%patchenumerate is the deafault
\usepackage[patchenumerate=true]%
  {exercisesheets\ifbeamer{-beamer}{}}
\usepackage{varioref}
\usepackage{hyperref}

\begin{document}

%Usually the person responsible for the entire course:
\author{Exampleauthor}
\date{Example term/semester}
\title{Introduction to Exercise Sheets Creation}
\subject{Introduction to Exercise Sheets Creation}
%Only used for beamer at the moment:
\exshset{exauthor={Author of exercises}}

\ifbeamer{}{
  \exshset{
    %default is \clearpage
    sheet start page action={\pagebreak[3]\hrule},
    sheet end page action={\vspace{4mm}\hrule\vspace{2cm}},
  }
}

\begin{sheet}[note={Learn how to create nice exercise sheets.},
  date={Novanuar 42, -2022},title={First Sheet}]
  
  \begin{exercise}[points={many, many},firstline={Read the manual.}]
  \end{exercise}
  
  \begin{exercise}[points={sum},firstline={After you read the manual:}]
    Play around with this example. You might want to read further manuals like:
    \begin{enumerate}
      %pointsfloatright should be usually set globally
      \item\points[pointsfloatright]{2}pgf (for pgfkeys)
      \item enumitem and similar \points[abbrev,bonus]{1}
      \begin{enumerate}
        \item paralist
        \item
          \begin{enumerate}
            \item varioref
          \end{enumerate}
      \end{enumerate}
      \item all the others \points[inplace]{3} (why not?)
      \label{subex:man2}
    \end{enumerate}
  \end{exercise}
\end{sheet}

\begin{sheet}[date={Novanuar 35, -2022}]
  \begin{exercise}[points={many, many},
    firstline={Read the manual.}]
  \end{exercise}
\end{sheet}

\begin{sheet}[date={Novanuar 28, -2022},title={Third Sheet},
  number within sheet]
  \begin{exercise}[points={many, many},
    firstline={Read the manual.}]
  \end{exercise}
\end{sheet}

\begin{sheet}[date={Novanuar 21, -2022}]
  \begin{exercise}[points={many, many},
    firstline={Read the manual.}]
    Observe how a sheet with title restarts the exercise numbering.
  \end{exercise}
  
  Loading varioref enables you to refer to sub-exercises, like 
  this: Did you do \ref{subex:man2}?
\end{sheet}


\end{document}