From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87068 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: passing arguments to \processMPbuffer Date: Mon, 21 Apr 2014 16:16:05 +0200 Message-ID: <49491BE7-F486-4B5A-A191-B5E2225F50B0@gmail.com> References: <5FE03882-D8DD-4991-AB01-0CCB2AEB4762@me.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1398089789 3849 80.91.229.3 (21 Apr 2014 14:16:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2014 14:16:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 21 16:16:24 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WcF1D-0006X8-1m for gctc-ntg-context-518@m.gmane.org; Mon, 21 Apr 2014 16:16:23 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 858AE10218 for ; Mon, 21 Apr 2014 16:16:22 +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 j+Glf+sm32Ac for ; Mon, 21 Apr 2014 16:16:22 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9BE6B10237 for ; Mon, 21 Apr 2014 16:16:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1A2F5101E7 for ; Mon, 21 Apr 2014 16:16:15 +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 Pi3xansb5-UE for ; Mon, 21 Apr 2014 16:16:13 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 8D64F101E1 for ; Mon, 21 Apr 2014 16:16:13 +0200 (CEST) Original-Received: from mail-ee0-x234.google.com (mail-ee0-x234.google.com [IPv6:2a00:1450:4013:c00::234]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s3LEG4PY009517 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 21 Apr 2014 16:16:12 +0200 Original-Received: by mail-ee0-f52.google.com with SMTP id e49so3657371eek.39 for ; Mon, 21 Apr 2014 07:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=ccUFI0nYYz52spv5AAsFRSnd85KJjn3dGilgm5dQ3YM=; b=b01Pok2aMdH1+4PcyjMpbaqI3+22IXCVKg2+fJZzWIBkRA8eP7wHzbbd/vFEP6HLni CF7Q0s+hkYD3LgvQ1RnX0mhF0nFoS90kPmRjv9lRuIiBZfU2mFx5PFBcGjkJ3huqjr+6 e3m59I6KnKsGWebGqwPRXuvKR3oiByPlfXjrHBOaxSPvBT/WEOksu0Ou9+72pOvUV9VY Ab9bk7msF8o27VshORWyy5wDNjXvAjlzPKgRqfmnJreTiUK37kqX0kJNIhtIpKjtuDBl 2GTqvPEguaaWTGG3Bp1ewQ2O2ESkQHmcbOnE4OdeqTpm0MVuU5W+uErxsWC1LmC6T6r1 li5Q== X-Received: by 10.14.47.133 with SMTP id t5mr4980360eeb.67.1398089764569; Mon, 21 Apr 2014 07:16:04 -0700 (PDT) Original-Received: from keima.localdomain (x2f25f9e.dyn.telefonica.de. [2.242.95.158]) by mx.google.com with ESMTPSA id m8sm103967121eeg.11.2014.04.21.07.16.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 07:16:03 -0700 (PDT) In-Reply-To: <5FE03882-D8DD-4991-AB01-0CCB2AEB4762@me.com> X-Mailer: Apple Mail (2.1874) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c00::234; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07LQCg4Sa - 86662cfd6de3 - 20140421 (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:87068 Archived-At: Am 21.04.2014 um 15:46 schrieb Jeong Dal : > Dear all, > = > For \startuseMPgraphic, there is a way to do that (found in metafun book)= as following: > = > \startuseMPgraphic{Labels}{s, t} > numeric u; u:=3D 1cm; > = > for i=3D0 upto 7: > label (textext("$v_{" & decimal (i) & "}$" ), \MPvar{s}[origin,3u*dir(30*= i)]) ; > label (textext("$v_{" & decimal (i) & "}$" ), \MPvar{t}[origin,3u*dir(30*= i)]) ; > endfor; > \stopuseMPgraphic > = > \starttext > \placefigure[][]{} > {\useMPgraphic{ColoringFace::Labeling}{s=3D0.8, t=3D1.3}} > \stoptext > = > Is there a way to the same job for \processMPbuffer instead of .5 and .7 = in buffer? > = > \startbuffer[Labels]%{s, t} > numeric u; u:=3D 1cm; > for i=3D0 upto 7: > label (textext("$v_{" & decimal (i) & "}$" ), .5[origin,3u*dir(30*i)]) ; > label (textext("$v_{" & decimal (i) & "}$" ), .7[origin,3u*dir(30*i)]) ; > endfor; > \stopbuffer > = > \starttext > \processMPbuffer[Labels]%% ?{s, t}? > \stoptext You can=92t pass variables with the buffer command but a direct setup and a= ccess of them is possible: \startbuffer[Labels] numeric u; u:=3D 1cm; for i=3D0 upto 7: label (textext("$v_{" & decimal (i) & "}$" ), \MPrawvar{Labels}{s}[orig= in,3u*dir(30*i)]) ; label (textext("$v_{" & decimal (i) & "}$" ), \MPrawvar{Labels}{t}[orig= in,3u*dir(30*i)]) ; endfor; \stopbuffer \starttext \setupMPvariables[Labels][s=3D0.8, t=3D1.3] \processMPbuffer [Labels] \stoptext 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 ___________________________________________________________________________= ________