From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/58734 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: processaction inside MP graphic Date: Thu, 13 May 2010 09:30:30 +0200 Message-ID: <4BEBAA96.7020108@elvenkind.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273735862 7090 80.91.229.12 (13 May 2010 07:31:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 13 May 2010 07:31:02 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu May 13 09:30:59 2010 connect(): No such file or directory 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 1OCSsk-00086e-6U for gctc-ntg-context-518@m.gmane.org; Thu, 13 May 2010 09:30:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BCA94C9B10; Thu, 13 May 2010 09:30:57 +0200 (CEST) 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 3EQQfjvmboH1; Thu, 13 May 2010 09:30:46 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8502FC9B1A; Thu, 13 May 2010 09:30:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6F412C9B1A for ; Thu, 13 May 2010 09:30:42 +0200 (CEST) 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 KFyAdk4ed7Ap for ; Thu, 13 May 2010 09:30:31 +0200 (CEST) Original-Received: from smtp-vbr15.xs4all.nl (smtp-vbr15.xs4all.nl [194.109.24.35]) by balder.ntg.nl (Postfix) with ESMTP id 5C303C9B10 for ; Thu, 13 May 2010 09:30:31 +0200 (CEST) Original-Received: from [192.168.178.26] (boo.demon.nl [83.163.247.99]) (authenticated bits=0) by smtp-vbr15.xs4all.nl (8.13.8/8.13.8) with ESMTP id o4D7UU16007848 for ; Thu, 13 May 2010 09:30:31 +0200 (CEST) (envelope-from taco@elvenkind.com) User-Agent: Thunderbird 2.0.0.23 (X11/20090822) In-Reply-To: X-Virus-Scanned: by XS4ALL Virus Scanner 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:58734 Archived-At: Vianney le Cl=E9ment wrote: > Hello, > = > I'm having some trouble with a macro using \processaction inside a > metapost graphic. Here is a minimal example. > = > \def\Shape#1% > {\processaction[#1] > [square=3D>unitsquare, > circle=3D>unitcircle]} > \starttext > \startuseMPgraphic{test} > fill \Shape{square} scaled 1cm; > \stopuseMPgraphic > \useMPgraphic{test} > \stoptext > = > It stops with the error "Use of \p!compareprocessaction doesn't match > its definition." Like many of the more complex commands, \processaction does not expand totally. If you are using mkiv, you could define \Shape like this: \def\Shape#1% {\directlua{ local known =3D {square =3D 'unitsquare', circle =3D 'unitcircle' } tex.sprint(known[#1] or 'unitsquare')}} I don't know of a simple solution for mkii. Best wishes, Taco ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________