| 1 |
\documentclass{article} |
| 2 |
\usepackage{xsim,lipsum} |
| 3 |
|
| 4 |
\DeclareExerciseEnvironmentTemplate{item} |
| 5 |
{\item[\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}]} |
| 6 |
{} |
| 7 |
\xsimsetup{ |
| 8 |
exercise/template=item, |
| 9 |
solution/template=item, |
| 10 |
print-solutions/headings-template=none |
| 11 |
} |
| 12 |
|
| 13 |
\newenvironment{exercises} |
| 14 |
{\section{Exercises}\description} |
| 15 |
{\enddescription} |
| 16 |
|
| 17 |
\newenvironment{solutions} |
| 18 |
{\section{Solutions}\description} |
| 19 |
{\enddescription} |
| 20 |
|
| 21 |
\begin{document} |
| 22 |
|
| 23 |
\begin{exercises} |
| 24 |
\begin{exercise} |
| 25 |
\lipsum[4] |
| 26 |
\end{exercise} |
| 27 |
\begin{solution} |
| 28 |
\lipsum[3] |
| 29 |
\end{solution} |
| 30 |
\begin{exercise} |
| 31 |
\lipsum[12] |
| 32 |
\end{exercise} |
| 33 |
\begin{solution} |
| 34 |
\lipsum[23] |
| 35 |
\end{solution} |
| 36 |
\end{exercises} |
| 37 |
|
| 38 |
\begin{solutions} |
| 39 |
\printsolutions |
| 40 |
\end{solutions} |
| 41 |
|
| 42 |
\end{document} |