[NTG-context] new features

Meer, Hans van der H.vanderMeer at uva.nl
Sun May 22 10:07:28 CEST 2016

> On 26 Jun 2014, at 12:08, Hans Hagen <pragma at wxs.nl> wrote:
> Another addition is that
> \definemode[something][keep]
> define an undefined mode; the keep makes sure that the already set value is kept (another option is 'yes').
> Using defined modes (that is, set with: \enablemode, \disablemode or \definemode) can be tested about twice as fast as undefined modes which can make a small difference 

I do not understand this fully: 
- if the mode is undefined, how can "define an undefined mode" for a mode that has already been given a value with either \enablemode or \disablemode keep a value? Must not \enablemode, \disablemode do some sort of 'defining' in order to facilitate testing? Does "define" here implements some other mechanism than the 'defining' done by \enablemod, \disablemode?

Is this what happens:
- if \enablemode or \disablemode has been used before to set a value for the mode, than \definemode[themode][keep] stashes some special definition of that mode and does not change c.q. transfers its value;
- \definemode[themode][yes] and \definemode[themode][no] always set that value for the mode in case, regardless of what has been done by a preceding \enablemode or \disablemode.

Is that the correct interpretation? Just to make sure I understand.

Finally, when \definemode makes testing a lot faster why than not implement this always? That is, using \enablemode or \disablemode the first time implies a \definemode for that mode. Doing so avoids another macro to remember: less clutter for my brain ;-)

Hans van der Meer

More information about the ntg-context mailing list