I'm using the exam
class, and I want to add answers. Right now the solutions are printet after the question, but before the next question. Ideally they would be presented at the end of a serie of questions. I'd like either
- the numeric or very simple one-line answers to questions (something like a new
\begin{numans} ... \end{numans}
environment), or - the entire solution as it is now with the
solution
environment,
at the end of the document. Any ideas?
An MWE:
\documentclass[a4paper]{exam}
\usepackage[utf8]{inputenc}
\printanswers
\begin{document}
\begin{questions}
\addpoints \question This is the first question
\begin{solution}
This is the solution to question one.
\end{solution}
\addpoints \question This is the second question
\begin{solution}
This is the solution to questino two.
\end{solution}
\end{questions}
\end{document}
Edit: the solution in Erik's suggestion is possible, but I would like to be able to stick to my already exam
classed documents.
exam
class.exam
class.exam
class but incorporate a custom command similar to those in the link.solution
environment, the text gets added to this array. At the end of the document, have a section that pops items off this array and makes them look like actual solutions.