![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
28 Nov
2021
28 Nov
'21
1:42 p.m.
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