% SPDX-FileCopyrightText: 2025 Xavier Bordoy <somenxavier@posteo.net>
%
% SPDX-License-Identifier: GPL-2.0-or-later

\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}
{% if title %}
\title{ {{title}} }
{% else %}
\title{Worksheet}
{% endif %}
{% if author %}
\author{ {{author}} }}
{% else %}
\author{Anonymous}
{% endif %}

\begin{document}
\maketitle

\section{Exercises}

\begin{enumerate}
{% for e in exercises %}
  \item\label{ {{e.id}} } {{e.text}}
{% endfor %}
\end{enumerate}

\newpage
\section{Solutions}

\begin{enumerate}
{% for e in exercises %}
\item[\ref{ {{e.id}} }.] {{e.solution}}
{%- endfor %}
\end{enumerate}

\end{document}

