Am 28.11.21 um 19:39 schrieb Fabrice L via ntg-context:
I have an error when I try to insert a block inside a conditional mode
(but there is two nested conditional mode.. is this the problem ?).
You can’t nest modes in \startmode ... \stopmode.
I don’t know what are the limitations of \doifmode.
Maybe it helps to use additional grouping with {}, \bgroup .. \egroup or
\start .. \stop.
In my courses notes, I insert some blocks (named « Complement » in the
minimal exemple below) when in « Professor » mode. This works fine, as
shown in the first « \beginComplement … \endComplement » of my example
below.
Maybe you can work with buffers or (ConTeXt) blocks (the latter were
recently discussed here, it’s a quite unknown mechanism).
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________