ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: new features
Date: Sun, 22 May 2016 15:11:23 +0200	[thread overview]
Message-ID: <38152b3e-6feb-42c0-9bf9-ef9ab8b9d0c1@wxs.nl> (raw)
In-Reply-To: <F28CF203-6975-424A-9598-D5946D6BD67F@uva.nl>

On 5/22/2016 10:07 AM, Meer, Hans van der wrote:
>
>> 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?

it's more an internal issue. less checking at the tex end and so .. it's 
only relevant when you check modes tens of thousands of times in a run

> 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 ;-)

because one property of modes is that one doesn't have to define them, 
you'd be quite unhappy if you would have to define all possible modes 
that could be introduced in styles

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2016-05-22 13:11 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
2016-05-22 13:11   ` Hans Hagen [this message]
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=38152b3e-6feb-42c0-9bf9-ef9ab8b9d0c1@wxs.nl \
    --to=pragma@wxs.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).