ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: modes questions
Date: Thu, 11 Sep 2008 13:37:16 +0200	[thread overview]
Message-ID: <48C902EC.1040603@wxs.nl> (raw)
In-Reply-To: <48C8F869.10106@elvenkind.com>

Taco Hoekwater wrote:
> Hans Hagen wrote:
>>> (1.2) Is there a way to call the modelist and submit it to conditional
>>> testing within ConTeXt ? For example, to lookup (true/false) the
>>> presence of modes containing/starting with (an) alphannumeric

\doifinstring

>>> string(s) ?
>> \doifmodeelse{somemode} { } { } etc etc etc
> 
> This presumes that you actually know the list of enabled modes, so
> I think a commalist of "set modes" would be useful as well. Modules
> could use that to set up keyword-based behaviours.

there is already such a mechanism (thomas uses it in his module)

maybe at some point in mkiv we can provide the list because then i can 
use lua for keeping track of things; maintaining a comma separated list 
is tex is not that fast (and i use modes a lot to control styles that 
need a high performance); think of

\enablemode[a,b,c]

and a large list of enabled modes that we need to check for already set 
nodes (in lua it's just a hash and a the fill list a list-of-keys)

btw, this would make mkiv incompatible with mkii

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2008-09-11 11:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-11  9:47 Alan Stone
2008-09-11 10:46 ` Hans Hagen
2008-09-11 10:52   ` Taco Hoekwater
2008-09-11 11:37     ` Hans Hagen [this message]
2008-09-11 12:45       ` Alan Stone
2008-09-11 12:41     ` Alan Stone
2008-09-17 19:11   ` Alan Stone
2008-09-17 20:59     ` Hans Hagen
2008-09-20 15:17       ` Alan Stone
2008-09-20 16:07         ` Hans Hagen
2008-09-20 16:19           ` Alan Stone
2008-09-21 16:06             ` Hans Hagen
2008-09-29 15:00   ` Alan Stone
2008-09-29 20:37     ` Hans Hagen
2008-09-30  7:18       ` Alan Stone
2008-09-30  7:23         ` 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=48C902EC.1040603@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).