From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82400 Path: news.gmane.org!not-for-mail From: Roland Thiers Newsgroups: gmane.comp.tex.context Subject: Re: command for a MP graphic Date: Wed, 8 May 2013 08:22:47 +0200 Message-ID: <2CF5C9E2-60F4-4352-BE5C-59DE4173D592@gmail.com> References: <20130507075149.GM663@homerow> <1BA42BD3-CE25-4D32-89F5-E6934B314D63@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1367994187 14379 80.91.229.3 (8 May 2013 06:23:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 May 2013 06:23:07 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 08 08:23:07 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 1UZxmN-0007MS-GC for gctc-ntg-context-518@m.gmane.org; Wed, 08 May 2013 08:23:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8BFFA101E0; Wed, 8 May 2013 08:23:06 +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 JslbBjIatc7e; Wed, 8 May 2013 08:23:04 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id CF58B101EA; Wed, 8 May 2013 08:23:04 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 62C4E101EA for ; Wed, 8 May 2013 08:23:03 +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 MoTUb2R6cNBw for ; Wed, 8 May 2013 08:23:02 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id EC511101E0 for ; Wed, 8 May 2013 08:22:51 +0200 (CEST) Original-Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r486Momt019561 for ; Wed, 8 May 2013 08:22:51 +0200 Original-Received: by mail-wi0-f170.google.com with SMTP id hq12so4862904wib.1 for ; Tue, 07 May 2013 23:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; bh=S0ZLdVb6NVYr1apWcL8JOrsCqO1BQAh8AzqRWMUr5WA=; b=KXZJH3ykJCvOfKVERIjQ3+olHz6zki4p9ZQOguyTmwOPl17XlO2CYMNyBvzhI3cx/4 KEnRUycxJvCInstfVKemIz6mwcE9xCPKPta8TdLzWa/ap5vpo0dtTbG6Qwpb1T4+pqZ9 UfMTnoLbKTacTyG4HfLh+dnIA95fBCONM7YbIr2DEa9r5taNcNwSln71nub2+rEkq1hW 50oRq3p3RmDA1sCH28Ms7z6yabNfJPkEPA90R8QvI7xW4LkrvofnLqava2ubvi5ogV1J fk2Tat1/nDNWgh9qPkmWf6l7s0EYV1j3SFIt0HwIicD+B/crGuo/+gUoO5wGteOJcJFC bxEQ== X-Received: by 10.180.187.234 with SMTP id fv10mr7803471wic.29.1367994170773; Tue, 07 May 2013 23:22:50 -0700 (PDT) Original-Received: from ?IPv6:2a01:e34:ef6d:4c40:223:12ff:fe08:c8eb? ([2a01:e34:ef6d:4c40:223:12ff:fe08:c8eb]) by mx.google.com with ESMTPSA id i4sm6981914wix.10.2013.05.07.23.22.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 07 May 2013 23:22:49 -0700 (PDT) In-Reply-To: <1BA42BD3-CE25-4D32-89F5-E6934B314D63@gmail.com> X-Mailer: Apple Mail (2.936) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::22a; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WJximPBo - 35b28c7d7d32 - 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:82400 Archived-At: Le 8 mai 13 =E0 06:56, Wolfgang Schuster a =E9crit : > > Am 07.05.2013 um 22:28 schrieb Roland Thiers = > : > >> Thank you very much for this precision, Wolfgang. I tried with two = >> variables 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 Thank you Wolfgang for the correction of the syntax. I bought the = Metafun manual and began to work with it. Great ! Roland > _________________________________________________________________________= __________ > 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-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________