From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/22340 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: Re: some highlighted \type-ing Date: Wed, 7 Sep 2005 16:53:31 +0200 Message-ID: <6faad9f0050907075370287cab@mail.gmail.com> References: <6faad9f005090608265d273dda@mail.gmail.com> <431DB87E.5020001@elvenkind.com> <6faad9f00509060901d97f6d2@mail.gmail.com> <431EB45A.7010207@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1126105022 28844 80.91.229.2 (7 Sep 2005 14:57:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2005 14:57:02 +0000 (UTC) Cc: Nikolai Weibull Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 07 16:56:53 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1ED1Km-0004ZC-PJ for gctc-ntg-context-518@m.gmane.org; Wed, 07 Sep 2005 16:55:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6ECB7127A7; Wed, 7 Sep 2005 16:55:32 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06042-04; Wed, 7 Sep 2005 16:55:32 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 17B9E127CB; Wed, 7 Sep 2005 16:53:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E154D127CB for ; Wed, 7 Sep 2005 16:53:33 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06042-03 for ; Wed, 7 Sep 2005 16:53:32 +0200 (CEST) Original-Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.206]) by ronja.ntg.nl (Postfix) with ESMTP id A471A127C6 for ; Wed, 7 Sep 2005 16:53:32 +0200 (CEST) Original-Received: by nproxy.gmail.com with SMTP id n15so518959nfc for ; Wed, 07 Sep 2005 07:53:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OmyDmVYB/jB7eTmLf9lZz8Xf+aaQnv0GDIkwNyGyOZ3RbK4WEdNPEKXJmFhEPYMY5YvHSxYYk8XUXFE907l8IpMF0ACiIbwVsCbfmeq7QFxph++eYX9FXC67fD6j/0SgjVDmc8pMykYES8X0udm13IEg9S29tB+XQmwVvp9jVJ8= Original-Received: by 10.48.108.4 with SMTP id g4mr378190nfc; Wed, 07 Sep 2005 07:53:31 -0700 (PDT) Original-Received: by 10.48.247.14 with HTTP; Wed, 7 Sep 2005 07:53:31 -0700 (PDT) Original-To: mailing list for ConTeXt users In-Reply-To: <431EB45A.7010207@elvenkind.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:22340 Archived-At: Taco Hoekwater wrote: > Mojca Miklavec wrote: >=20 > It needs a bit longer definition of \typeTEX. The next def seems > to do it. >=20 > \def\typeTEX > {\bgroup > \def\processinlineverbatim##1% > {\processingverbatimtrue > \localcatcodestrue > \def\endofverbatimcommand{\TEXendofcommand##1}% > \bgroup > \aftergroup\endofverbatimcommand > \futurelet\next\doprocessinlineverbatim}% > \initializetyping{TEX}% > \startverbatimcolor > \processinlineverbatim\egroup } Thank you, this works better (not that I understand what it does ;) But, I finally understand why I was confused yesterday. \setupcolors[state=3Dstart] \setuptype[option=3DTEX] \type{\a} does nothing (and this was what I first tried and thought that this is not supported yet; non-existing options never raise an error anyway). But today I tried: \setuptype[option=3DTEX] \type{\ab[cd]} % [ and ] are highlighted \type{\a\b\c} % only \b and \c highlighted \type+\ab[cd]{ef} %+ % everything highlighted OK So, if the first (bug/feature?) gets fixed and the bugfix that stops green highlighting after \type is applied, it would be much cleaner to define: \definetype[RAW] [\c!option=3DRAW] \definetype[MP] [\c!option=3DMP] ... \definetype[XML] [\c!option=3DXML] (as counterparts to \definetyping) than keeping those lenghty definitions for each file type separately. Btw: in the meantime (I last tried it in April) a bug that prevented typing |, _ or \ (I don't remember which one exactly) after the first position got fixed. Whenever that happened and whoever did it: thank you very much! Taco, you sent some patch for XML syntax highlighting some time ago. I don't know if you fixed this one as well: The both minus signs in "-->" are highlighted wrong as well. The code inside is gray, but it would be great to have both delimiters highligted as "comment" as well. I'm thinking about piping the code to vim, letting the vim process it and return something like \highlight[Conditional]{if}\highlight[Delimiter]{(}\highlight[Identifie= r]{i} ... One should modify the 2html.vim file (vim can already nicely transform the highlighted code into HTML, so ConTeXt shouldn't be so difficult). Vim already has over 400 sytax file definitions (probably equivalent to some hundred thousans lines of syntax definitions in ConTeXt). Well, I don't know (yet) how to do it, but if someone on the list has more experience with vim, please feel free to contribute. Mojca