From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/22346 Path: news.gmane.org!not-for-mail From: Nikolai Weibull Newsgroups: gmane.comp.tex.context Subject: Re: some highlighted \type-ing Date: Wed, 7 Sep 2005 18:13:06 +0200 Message-ID: <20050907161306.GB8829@puritan.pnetwork> References: <6faad9f005090608265d273dda@mail.gmail.com> <431DB87E.5020001@elvenkind.com> <6faad9f00509060901d97f6d2@mail.gmail.com> <431EB45A.7010207@elvenkind.com> <6faad9f0050907075370287cab@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1126109622 16587 80.91.229.2 (7 Sep 2005 16:13:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2005 16:13:42 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 07 18:13:33 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 1ED2Xy-00009b-69 for gctc-ntg-context-518@m.gmane.org; Wed, 07 Sep 2005 18:13:14 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9FD0C127F9; Wed, 7 Sep 2005 18:13:13 +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 07142-01; Wed, 7 Sep 2005 18:13:10 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AF11712813; Wed, 7 Sep 2005 18:13:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E7E2212813 for ; Wed, 7 Sep 2005 18:13:07 +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 07141-01-2 for ; Wed, 7 Sep 2005 18:13:06 +0200 (CEST) Original-Received: from mxfep01.bredband.com (mxfep01.bredband.com [195.54.107.70]) by ronja.ntg.nl (Postfix) with ESMTP id 83CB4127F9 for ; Wed, 7 Sep 2005 18:13:06 +0200 (CEST) Original-Received: from puritan.petwork ([213.112.43.228] [213.112.43.228]) by mxfep01.bredband.com with ESMTP id <20050907161305.USSL27082.mxfep01.bredband.com@puritan.petwork> for ; Wed, 7 Sep 2005 18:13:05 +0200 Original-Received: by puritan.petwork (Postfix, from userid 1000) id 8A3F6ADFEA; Wed, 7 Sep 2005 18:13:06 +0200 (CEST) Original-To: ntg-context@ntg.nl Mail-Followup-To: ntg-context@ntg.nl Content-Disposition: inline In-Reply-To: <6faad9f0050907075370287cab@mail.gmail.com> User-Agent: Mutt/1.5.8i 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:22346 Archived-At: Mojca Miklavec wrote: > But, I finally understand why I was confused yesterday. > > \setupcolors[state=start] > \setuptype[option=TEX] > \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). I reported this bug back in April but no one replied. The problem is that the first character is read and then not given back the right catcode so that the typing stuff can process it correctly. This mainly affected me when I was trying to write inline C code, such as \type{int a}, because the int wouldn't be highlighted as a keyword. > I'm thinking about piping the code to vim, letting the vim process it > and return something like > \highlight[Conditional]{if}\highlight[Delimiter]{(}\highlight[Identifier]{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. Yes, this would definitely be a good alternative way of getting highlighting (for free). Writing a converter shouldn't be that hard, and writing ConTeXt code shouldn't be impossible either. Alas, I don't have time at the moment. I need to find myself a job first; which sadly probably won't be found in Sweden...Sweden is such a boring place when it comes to IT, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}