From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81168 Path: news.gmane.org!not-for-mail From: Marco Patzer Newsgroups: gmane.comp.tex.context Subject: Re: TeX macro to MP variable Date: Sat, 16 Mar 2013 16:47:24 +0100 Message-ID: <20130316154724.GP9268@homerow> References: <20130316150731.GO9268@homerow> <514491A9.5060005@uni-bonn.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1372739295==" X-Trace: ger.gmane.org 1363448851 12343 80.91.229.3 (16 Mar 2013 15:47:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Mar 2013 15:47:31 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Mar 16 16:47:56 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 1UGtKt-0001LU-J0 for gctc-ntg-context-518@m.gmane.org; Sat, 16 Mar 2013 16:47:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7281E101E3; Sat, 16 Mar 2013 16:47:32 +0100 (CET) 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 chmmHprGlgWU; Sat, 16 Mar 2013 16:47:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 19C3E101EB; Sat, 16 Mar 2013 16:47:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D8276101EB for ; Sat, 16 Mar 2013 16:47:29 +0100 (CET) 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 0lTR3ZtzhtB8 for ; Sat, 16 Mar 2013 16:47:29 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 2E2A2101E3 for ; Sat, 16 Mar 2013 16:47:29 +0100 (CET) Original-Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2GFlRN1021611 for ; Sat, 16 Mar 2013 16:47:28 +0100 Original-Received: from c.earth.lavabit.com (c.earth.lavabit.com [192.168.111.12]) by karen.lavabit.com (Postfix) with ESMTP id 1D87711B89A for ; Sat, 16 Mar 2013 10:47:27 -0500 (CDT) Original-Received: from homerow (83.68.239.193) by lavabit.com with ESMTP id WIJB0PD4E34E for ; Sat, 16 Mar 2013 10:47:27 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=JvrlrLljYqWfb5XSxrLoX8bPyxFB8Njs9taPkRgakHfhuz9ZTcNKTQPMu/h8yuRBWmg+s8M93wX9pPCzMczs2IzvavW6SltoX7RVxM/e1j5mR3bBHK9MjbYgEvijqLa2O5x6WBDankV9Y+uBxedpMyOvVNznmZBO+6SRxN/JWPc=; h=Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; Mail-Followup-To: ntg-context@ntg.nl In-Reply-To: <514491A9.5060005@uni-bonn.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=72.249.41.33; country=US; region=TX; city=Dallas; postalcode=75204; latitude=32.8019; longitude=-96.7883; metrocode=623; areacode=214; http://maps.google.com/maps?q=32.8019,-96.7883&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QJcfLsdw - 5179325e7561 - 20130316 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:81168 Archived-At: --===============1372739295== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/jkxxxtAhYIHVDuh" Content-Disposition: inline --/jkxxxtAhYIHVDuh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2013=E2=80=9303=E2=80=9316 Thomas A. Schmitz wrote: > I'm not quite sure if this is what you're looking for, but here is > an example how you could do this with \MPvars: >=20 > \def\Circlediameter{15mm} >=20 > \def\setupCircle#1[#2]% > {\getparameters[Circle][diameter=3D15mm,#2]} >=20 > \setupMPvariables > [mycircle] > [diameter=3D\Circlediameter, > ] >=20 > \startuseMPgraphic{mycircle} > fill unitcircle scaled \MPvar{diameter} withcolor red ; > \stopuseMPgraphic The above works in the larger document, but a construct like this fails: \startuseMPgraphic{mycircle} mysize :=3D \MPvar{diameter}; fill unitcircle scaled mysize withcolor red ; \stopuseMPgraphic However, in the minimal example it works, too. So the problem lies be somewhere else. I will investigate why it fails. I like the MPvar solution and try to get it working. Thanks Marco --/jkxxxtAhYIHVDuh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJRRJQMAAoJEPGqVaNSn0iK79IIAK36brRGAwz/iz7dpwhScbju LCkEhXSl9msQAo7SCRjFobm5VTHsDA7BOIxkGC8NqsbZyKhQjsQmbfVeTBjuaspL kIS/9wEv0zdNZtef1B0yW0o2lJWqOR0PINdb+Tx3Fz0hyTQjxAHywcN4/p7u2oDt r6ztLsidvMYteBK4UEb5TOCdfXnYU9hSEWOftzOGGB8lUvxskh6SvokPyTD1Mep4 ynEmpmuMZ5spyqtZVXH/3PNTvOzw7fge1uvgxVYdvfUTm0DCOfllysjBNt5pNVRL poQ3IaRhodJg+UuaXn/K7lOn0M/gE81K6X6qQjqK2Z1BOplkv9t1Dnai24807Vg= =JLfR -----END PGP SIGNATURE----- --/jkxxxtAhYIHVDuh-- --===============1372739295== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1372739295==--