From: "Meer, Hans van der" <H.vanderMeer@uva.nl>
To: NTG ConTeXt <ntg-context@ntg.nl>
Subject: Re: new features
Date: Sun, 22 May 2016 08:07:28 +0000 [thread overview]
Message-ID: <F28CF203-6975-424A-9598-D5946D6BD67F@uva.nl> (raw)
In-Reply-To: <53ABF122.3040007@wxs.nl>
> On 26 Jun 2014, at 12:08, Hans Hagen <pragma@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
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2016-05-22 8:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 10:08 Hans Hagen
2016-05-22 8:07 ` Meer, Hans van der [this message]
2016-05-22 13:11 ` Hans Hagen
2016-05-22 13:33 ` Meer, Hans van der
2016-05-22 13:59 ` Hans Hagen
-- strict thread matches above, loose matches on Subject: below --
1999-08-13 8:13 Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F28CF203-6975-424A-9598-D5946D6BD67F@uva.nl \
--to=h.vandermeer@uva.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).