Friday, 23 August 2013

Extract problem and solution from files and create problem collection

Extract problem and solution from files and create problem collection

I have a set of problems and solutions, which I wish to include in several
different documents. I would like to be able to choose if the solutions
should be presented last, or immediate after the problem formulation.
A possibility is to put each problem and solution in a separate file, and
then have some command
\includepart{filename.tex}{problem}
and
\includepart{filename.tex}{solution}
where \includepart{file}{env} includes say everything between
\begin{env}and \end{env}.
Is there a simple way to do this? Are there better solutions to this? This
seems to be a common problem, but I have not found something that does
exactly this.

No comments:

Post a Comment