All, I'd like to design an exercise environment that will keep both the exercise and solution together. Something like: \startExercise Blah, blah, blah. \startSolution Blah, blah, blah \stopSolution \stopExercise At a higher level, something with parts, like: \startExercise Blah, blah, blah, ... \item Blah, blah, blah, ... \startSolution Blah, blah, blah, .. \stopSolution \item Blah, blah, blah, ... \startSolution Blah, blah, blah, .. \stopSolution \item Blah, blah, blah, ... \startSolution Blah, blah, blah, .. \stopSolution \stopExercise I'd like the exercises to get typeset in place, but the even solutions should go to the end of the text. Has anyone done something similar in Context?
Hello David, I think this solution is from one of the ConTeXt pdfs. Or from the mailinglist. Or.... -------------------------------------------------- \defineblock[question] \defineblock[answer] \defineenumeration[question][location=top,text=Frage] \defineenumeration[answer][location=top,text=Antwort] \hideblocks[answer] \starttext \beginquestion \question Wieviel ist $4*5$? \endquestion \beginanswer \answer $20$. \endanswer \beginquestion \question Was macht $100 / 10$?? \endquestion \beginanswer \answer $10$ \endanswer \subject{Abschnitt} \useblocks[answer] \stoptext -------------------------------------------------- Patrick -- ConTeXt wiki and more: http://contextgarden.net
Hi David, the answer must be found in \defineenumeration[question][..] and \defineenumeration[answer][...] further you can use the defineblock[...] mechanism. Please refer to the cont-enp.pdf pages 262 ff. Kind regards Willi David Arnold wrote:
All,
I'd like to design an exercise environment that will keep both the exercise and solution together. Something like:
\startExercise
Blah, blah, blah.
\startSolution Blah, blah, blah \stopSolution
\stopExercise
At a higher level, something with parts, like:
\startExercise
Blah, blah, blah, ...
\item Blah, blah, blah, ...
\startSolution Blah, blah, blah, .. \stopSolution
\item Blah, blah, blah, ...
\startSolution Blah, blah, blah, .. \stopSolution
\item Blah, blah, blah, ...
\startSolution Blah, blah, blah, .. \stopSolution
\stopExercise
I'd like the exercises to get typeset in place, but the even solutions should go to the end of the text.
Has anyone done something similar in Context? _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (3)
-
David Arnold
-
Patrick Gundlach
-
Willi Egger