[texworks] context regexp patterns

Hans Hagen pragma at wxs.nl
Sat Oct 25 10:37:11 CEST 2008


Jonathan Kew wrote:
> On 23 Oct 2008, at 5:55 PM, Hans Hagen wrote:
> 
>> Hi,
>>
>> a suggestion for the defaults in syntax-patterns.tex for context
>>
>> # start/stop
>> darkgreen    N    \\(?:start|stop)[\w]+
>>
>> # control sequences
>> blue        N    \\(?:[\w]+|.)
> 
> Does ConTeXt set up catcodes so that digits can be used in control 
> sequences? Note that \w includes digits as well as letters and underscore.

no, just ! ? @ at the system level and letters elsewhere, but in 
principle one can have arabic or chinese control sequences

here i now ue:

darkred		N	[\$\{\}]
darkblue	N	[\<\>\"\'\[\]\=\#]
darkyellow	N	[\~\`\%\^\&\-\+\|]
darkgreen	N	\\(?:[\w\@\?\!]+|.)
darkgray    N	%.*

which is more in sync with existing context color shemes

Hans

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


More information about the texworks mailing list