
On Wed, 28 May 2025, Matthias Weber wrote:
Hello all,
I would like to typeset a certain enumeration when a corresponding mode is enabled, like so:
\defineenumeration [Solution] [text={Solution:}, headstyle=bold, before={\startmode[solution]}, after={\stopmode}, style=normal, title=no ]
\starttext
\enablemode[solution]
\startSolution Enabled \stopSolution
\stoptext
This works, but when I disable the mode, I get the error message
Is there a suitable incantation to make this work?
what I do is the following: \definebuffer[Solution][local=yes,nested=yes] \startmode[solution] \defineenumeration[Solution] [... % do not include \startmode, \stopmode in before % of after keys ] \stopmode This way, by default, \startSolution is a buffer, but it gets redefined as an enumeration is solution mode. Aditya