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