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
solutionenvironment,
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.

examclass. – erik Apr 07 '15 at 22:24examclass. – Holene Apr 08 '15 at 05:21examclass but incorporate a custom command similar to those in the link. – erik Apr 08 '15 at 06:17solutionenvironment, 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. – alexwlchan Apr 09 '15 at 21:59