[NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)
sanjoy at olin.edu
Fri Feb 1 04:10:40 CET 2019
Thank you, Matthias and Wolfgang, for the examples/solutions.
If I understand them right, there must be one solution for each exercise
(otherwise the solution numbering gets out of sync). Or do the
coupling= options in Matthias's example remove that restriction? In my
experiments with the examples, deleting the first solution
unsynchronized the exercise--solution numbering, no matter how I fiddled
with the coupling keys.
In the ideal pedagogical world, I'd write a solution for each exercise.
But reality might intervene, so I still wonder if the solutions can
automatically know and include the exercise number (perhaps by placing
\startanswer..\stopanswer inside \startexercise..\stopexercise and using
\getnumber[exercise]). If there is a clever way, that's great. But,
the nature of TeX as a macro language may preclude the \getnumber code
being evaluated just when one wants.
More information about the ntg-context