From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64327 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: colors for pretty-printing (was: Re: pret-c.lua -> v-c.lua) Date: Tue, 7 Dec 2010 08:29:47 -0500 (EST) Message-ID: References: <20101203081711.GA5447@micropit.couberia.bzh> <27ce4c9b-5e21-4df4-91b5-af4bbbb550c6@email.android.com> <20101203213121.GA6937@micropit.couberia.bzh> <4CF9634B.1030605@wxs.nl> <4CF9A816.1080800@nibua-r.org> <4CFAF3A5.5030405@nibua-r.org> <4CFCA4BA.1010609@wxs.nl> <20101206140427.GB29676@micropit.couberia.bzh> <4CFD3FB6.6000207@nibua-r.org> <20101207112502.GA10103@micropit.couberia.bzh> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-593549187-1291728603=:20575" X-Trace: dough.gmane.org 1291728813 23568 80.91.229.12 (7 Dec 2010 13:33:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Dec 2010 13:33:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 07 14:33:29 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PPxfd-0001ti-0W for gctc-ntg-context-518@m.gmane.org; Tue, 07 Dec 2010 14:33:29 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4E973CA91A; Tue, 7 Dec 2010 14:33:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6W7UPZ5KvE5a; Tue, 7 Dec 2010 14:33:17 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 45D49CA915; Tue, 7 Dec 2010 14:33:17 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2D2BACA915 for ; Tue, 7 Dec 2010 14:33:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JOMk8HFd7fAi for ; Tue, 7 Dec 2010 14:33:09 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 3C80ACA90C for ; Tue, 7 Dec 2010 14:33:09 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oB7DX6Zc017816 for ; Tue, 7 Dec 2010 14:33:08 +0100 Original-Received: FROM [10.0.2.15] (Mismatch [122.173.75.152]) By hackers.mr.itd.umich.edu ID 4CFE378F.C6106.3541 ; Authuser adityam; 7 Dec 2010 08:33:04 EST In-Reply-To: <20101207112502.GA10103@micropit.couberia.bzh> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08DEdx7sW - 7cade2d9dd24 - 20101207 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:64327 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-593549187-1291728603=:20575 Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 7 Dec 2010, Peter M=FCnster wrote: > On Mon, Dec 06 2010, Renaud AUBIN wrote: >> >> Concerning the color abstraction patch, one needs just to overload >> Ccomment, Cpreproc, Cstring, Ctype, Ckeyword, Cname and Cfuncnbound to >> use custom color scheme. > > You don't need that. There is already a standard interface for color and = style > configuration. Example: > > \setupstartstop[CSnippetComment][color=3Dblue] > > So you can simplify t-pretty-c.mkiv: > > \unprotect > > \setupcolor[ema] > > \definestartstop > [CSnippetName] > [\c!color=3Ddarkgoldenrod, > \c!style=3D] I have not looked into the new verbatim code yet, but I have been thinking= =20 about a similar interface for a new module that uses external programs for= =20 syntax highlighting (sort of a superset of t-vim that will allow one to=20 use other programs like pgyments, etc.). Why are you using a C prefix for all environments? Isn't it better to use= =20 a syntax like this: \startsetups[verbatim:C] \definestartstop[SnippetName][color=3D...,style=3D...] \definestartstop[string][color=3D...,style=3D...] =2E... \stopsetups and then pass setups=3Dverbatim:C to an appropriate \setup... command. That= =20 will make it easy to share the same syntax highlighting between different= =20 languages. Aditya --8323328-593549187-1291728603=:20575 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --8323328-593549187-1291728603=:20575--