From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82397 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: command for a MP graphic Date: Wed, 8 May 2013 06:56:42 +0200 Message-ID: <1BA42BD3-CE25-4D32-89F5-E6934B314D63@gmail.com> References: <20130507075149.GM663@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1367989022 3229 80.91.229.3 (8 May 2013 04:57:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 May 2013 04:57:02 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 08 06:57:03 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UZwR0-0004es-NG for gctc-ntg-context-518@m.gmane.org; Wed, 08 May 2013 06:56:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 97AFC101F3; Wed, 8 May 2013 06:56: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 4WxjHA+7Qnkf; Wed, 8 May 2013 06:56:56 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 20819101EA; Wed, 8 May 2013 06:56:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4F984101EA for ; Wed, 8 May 2013 06:56:55 +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 bj4o9LF38-Ra for ; Wed, 8 May 2013 06:56:54 +0200 (CEST) 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 2E264101E0 for ; Wed, 8 May 2013 06:56:44 +0200 (CEST) Original-Received: from mail-ea0-x232.google.com (mail-ea0-x232.google.com [IPv6:2a00:1450:4013:c01::232]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r484uh48000788 for ; Wed, 8 May 2013 06:56:43 +0200 Original-Received: by mail-ea0-f178.google.com with SMTP id m14so699526eaj.23 for ; Tue, 07 May 2013 21:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=gwqNQO2FjBAc6uHDAD1rO8TkukngTzY9PPp2ZDzTdF8=; b=Y8c53ktrPumhrmEyVmNqDUzZD5K5+Xeh9xGECargSrRak/Yikij0bxAAhfLirYiZbr 2MOGlBGH+alU5FvO9wFMxO7l1+ur266IBj/i+nrYUXLWLKk2VqrmTFJXmX4RpqCWI7+l 0gPgKz50bqyUwP1EmcVYzVjsl0fuVwuC4P5KH6GjaaIwuVtrVZhMeUbYBXY4+VZD4Qym JH7xjm4KRlmtz0OIhju/scBn3+uR8SzpodOHgCsgYVgUgA6y9kOGIBF28UV5a1h82fuR qoVfYWG21/avzJaA5ppkRPzj64Gqjr2fsXtM88tyKJvbne8tZNX0bsFXnHHpsAvNILY9 OCgA== X-Received: by 10.15.93.193 with SMTP id w41mr1834087eez.22.1367989003224; Tue, 07 May 2013 21:56:43 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4d07314f.pool.mediaWays.net. [77.7.49.79]) by mx.google.com with ESMTPSA id t9sm30334739eeo.11.2013.05.07.21.56.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 May 2013 21:56:42 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c01::232; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VJxgUHSj - 0efbad5ebed4 - 20130508 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82397 Archived-At: Am 07.05.2013 um 22:28 schrieb Roland Thiers : > Thank you very much for this precision, Wolfgang. I tried with two variab= les and it works with this > syntax : > = > \startuniqueMPgraphic{polygoneregulier} > numeric u ; u:=3D\MPvar{unite}*cm ; > numeric n ; n:=3D\MPvar{sides}; > rest of the code > \stopuniqueMPgraphic > = > \define[2]\polyreg > {\setupMPvariables[polygoneregulier][unite,sides] > \uniqueMPgraphic{polygoneregulier}{sides=3D#1,unite=3D#2}} You can define the command as \define[2]\polyreg {\setupMPvariables[polygoneregular][sides=3D#1,unite=3D#2]% \uniqueMPgraphic{polygoneregular}} where the variables are set with the \settupMPvariables command or as \define[2]\polyreg {\uniqueMPgraphic{polygoneregular}{sides=3D#1,unite=3D#2}} where the variables are set in the optional argument for \uniqueMPgraphic. > \starttext > %\uniqueMPgraphic{polygoneregulier}{unite=3D2,sides=3D4} > \polyreg{6}{0.5} > \stoptext > = > I did not find any d=E9tails on \MPvar et \setupMPvariables on the wiki, = however Both commands are mentioned in the metafun [1] manual. [1] http://www.pragma-ade.nl/show-man-7.htm Wolfgang ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________