From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25026 Path: news.gmane.org!not-for-mail From: Renaud AUBIN Newsgroups: gmane.comp.tex.context Subject: Re: followtokens & font color Date: Sun, 08 Jan 2006 21:52:19 +0100 Message-ID: <43C17B83.2050106@nibua-r.org> References: <43BEFAD2.8040100@nibua-r.org> <43BFCE18.9010002@boede.nl> 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; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1136753504 15229 80.91.229.2 (8 Jan 2006 20:51:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 8 Jan 2006 20:51:44 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 08 21:51:38 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org 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 1EvhVl-0004xq-Iu for gctc-ntg-context-518@m.gmane.org; Sun, 08 Jan 2006 21:51:34 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 01AE9127E1; Sun, 8 Jan 2006 21:51:33 +0100 (CET) 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 17022-01; Sun, 8 Jan 2006 21:51:31 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 01001127A0; Sun, 8 Jan 2006 21:51:30 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 986BF127A0 for ; Sun, 8 Jan 2006 21:51:29 +0100 (CET) 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 16726-06-2 for ; Sun, 8 Jan 2006 21:51:28 +0100 (CET) Original-Received: from 26.mail-out.ovh.net (26.mail-out.ovh.net [213.186.42.179]) by ronja.ntg.nl (Postfix) with SMTP id 9523A12783 for ; Sun, 8 Jan 2006 21:51:28 +0100 (CET) Original-Received: (qmail 9690 invoked by uid 503); 8 Jan 2006 20:51:47 -0000 Original-Received: (QMFILT: 1.0); 08 Jan 2006 20:51:47 -0000 Original-Received: from b6.ovh.net (HELO mail156.ha.ovh.net) (213.186.33.56) by 26.mail-out.ovh.net with SMTP; 8 Jan 2006 20:51:47 -0000 Original-Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 8 Jan 2006 20:51:32 -0000 Original-Received: from mail156.ha.ovh.net (10.0.50.156) by mail156.ha.ovh.net with SMTP; 8 Jan 2006 20:51:30 -0000 Original-Received: from b0.ovh.net (HELO queue-pre) (213.186.33.50) by b0.ovh.net with SMTP; 8 Jan 2006 20:51:30 -0000 Original-Received: from d83-177-225-14.cust.tele2.fr (HELO ?192.168.78.10?) (aubin@nibua-r.org@83.177.225.14) by ns0.ovh.net with SMTP; 8 Jan 2006 20:51:30 -0000 User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: fr, en Original-To: mailing list for ConTeXt users In-Reply-To: <43BFCE18.9010002@boede.nl> X-Ovh-Remote: 83.177.225.14 (d83-177-225-14.cust.tele2.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: fait|type 1&3|0.0|H 0.500003 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:25026 Archived-At: Hi Willi, all, Thank you for your answer but it doesn't work... I need it quickly, so=20 I've a solution but it's not, hum, very clean since I don't know=20 metapost very well: \def\followtokens#1% {\vbox\bgroup \forgetall \dontcomplain \startMPenvironment \doifundefined{RotFont}{\definefont[RotFont][RegularBold]} \stopMPenvironment \MPtoks\emptytoks \resetMPdrawing \startMPdrawing \includeMPgraphic{followtokens} picture pic[] ; numeric len[], n ; n :=3D 0 ; \stopMPdrawing \handletokens#1\with\processfollowingtoken \startMPdrawing if unknown RotPath : path RotPath ; RotPath :=3D origin ; fi ; if unknown RotColor : color RotColor ; RotColor :=3D (0,.625,0) ;= =20 fi ; % mygreen if unknown TraceRot : boolean TraceRot ; TraceRot :=3D false ; fi ; ... Renaud Willi Egger a =E9crit : > Hi Renaud, > > you can define a color with > \definecolor[brown] [r=3D.9,g=3D.8,b=3D0.6] > > in your MEATPOST code you can say things like > drawoptions(withcolor \MPcolor{brown}) i.e. that all will be=20 > drawn in borwn > draw ... withcolor \MPcolor{brown} i.e. append the color to the=20 > drawing statement. > > Willi