\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}