From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64382 Path: news.gmane.org!not-for-mail From: Peter =?utf-8?Q?M=C3=BCnster?= Newsgroups: gmane.comp.tex.context Subject: Re: colors for pretty-printing Date: Fri, 10 Dec 2010 12:11:21 +0100 Message-ID: <20101210111121.GA4187@micropit.couberia.bzh> References: <4CFAF3A5.5030405@nibua-r.org> <4CFCA4BA.1010609@wxs.nl> <20101206140427.GB29676@micropit.couberia.bzh> <4CFD3FB6.6000207@nibua-r.org> <20101207112502.GA10103@micropit.couberia.bzh> <4CFE9AA9.2080908@nibua-r.org> <20101207214517.GA14547@micropit.couberia.bzh> <4CFFE6FB.5030304@nibua-r.org> <20101210104741.GA3981@micropit.couberia.bzh> <4D0206CB.5000302@nibua-r.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291979508 5715 80.91.229.12 (10 Dec 2010 11:11:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 11:11:48 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 10 12:11:44 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 1PR0t6-0006Q9-Al for gctc-ntg-context-518@m.gmane.org; Fri, 10 Dec 2010 12:11:44 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 68B7ACA8C0; Fri, 10 Dec 2010 12:11:42 +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 0j1WA0Dau32C; Fri, 10 Dec 2010 12:11:39 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 82C9BCA8B7; Fri, 10 Dec 2010 12:11:39 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6E733CA8B7 for ; Fri, 10 Dec 2010 12:11:37 +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 irtt2VfZOJKY for ; Fri, 10 Dec 2010 12:11:25 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 66CA8CA8B0 for ; Fri, 10 Dec 2010 12:11:25 +0100 (CET) Original-Received: from smtp.smtpout.orange.fr (smtp02.smtpout.orange.fr [80.12.242.124]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBABBMwR032478 for ; Fri, 10 Dec 2010 12:11:25 +0100 Original-Received: from micropit.couberia.bzh ([81.48.176.207]) by mwinf5d03 with ME id hPBN1f0094UrdLH03PBNfw; Fri, 10 Dec 2010 12:11:22 +0100 Original-Received: by micropit.couberia.bzh (Postfix, from userid 1000) id DE27016072A; Fri, 10 Dec 2010 12:11:21 +0100 (CET) Mail-Followup-To: mailing list for ConTeXt users Content-Disposition: inline In-Reply-To: <4D0206CB.5000302@nibua-r.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.12.242.124; country=FR; latitude=46.0000; longitude=2.0000; http://maps.google.com/maps?q=46.0000,2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05DFnbmaL - f89516da7229 - 20101210 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 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:64382 Archived-At: On Fri, Dec 10 2010, Renaud AUBIN wrote: > Ok but then why did you define a specific color palet? > > local function color_init() > color = 0 > local def_colors = -- \setupcolor[ema] introduces new line... The comment says it: \setupcolor[ema] introduces new line and that's annoying when you do inline typing: bla bla \typeC{int main(){}} bla bla The \definecolor[] lines (dirty workaround) were just copied from colo-ema.tex. The problem with the pretty-c.lua was, that color_init() was called at every \typeC{} or \startC. In your t-pretty-c.mkiv you can use \setupcolor[ema] without problems. Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___________________________________________________________________________________ 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 ___________________________________________________________________________________