From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94366 Path: news.gmane.org!not-for-mail From: "Meer, Hans van der" Newsgroups: gmane.comp.tex.context Subject: Re: \startuseMPgraphic Date: Mon, 11 Apr 2016 13:30:56 +0000 Message-ID: <8B1B691F-41FB-4C42-93CE-D6FD4565B806@uva.nl> References: <87835776-211F-4B8A-9730-A49978E25D66@uva.nl> <570B9BD3.10707@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4313545773912215349==" X-Trace: ger.gmane.org 1460381490 9903 80.91.229.3 (11 Apr 2016 13:31:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2016 13:31:30 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 11 15:31:27 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1apbw6-0007Kx-R0 for gctc-ntg-context-518@m.gmane.org; Mon, 11 Apr 2016 15:31:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9719CA393; Mon, 11 Apr 2016 15:31:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1KawJbAPFLkU; Mon, 11 Apr 2016 15:31:07 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id ABF10A397; Mon, 11 Apr 2016 15:31:07 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6D85EA395 for ; Mon, 11 Apr 2016 15:31:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jy-5ZuVkUTyt for ; Mon, 11 Apr 2016 15:31:05 +0200 (CEST) Original-Received: from HUB02.uva.nl (hub02.uva.nl [146.50.108.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id F0DFBA393 for ; Mon, 11 Apr 2016 15:30:54 +0200 (CEST) Original-Received: from MBX02.uva.nl ([169.254.2.167]) by HUB02.uva.nl ([::1]) with mapi id 14.03.0266.001; Mon, 11 Apr 2016 15:30:54 +0200 Thread-Topic: [NTG-context] \startuseMPgraphic Thread-Index: AQHRk80eFcSIE9rg1USWMhLlFH/9qZ+EljmAgAANZAA= In-Reply-To: <570B9BD3.10707@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [84.106.134.200] x-endpointsecurity-0xde81-ev: v:6.2.7.719, d:out, a:y, w:t, t:16, sv:1460365832, ts:1460381454 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:94366 Archived-At: --===============4313545773912215349== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_8B1B691F41FB4C4293CED6FD4565B806uvanl_" --_000_8B1B691F41FB4C4293CED6FD4565B806uvanl_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks Wolfgang. It appears my memory did some "wishful thinking" in wanting \startuseMPgrap= hic{name}{key=3Dvalue}. Although that would have been nice. Hans van der Meer On 11 Apr 2016, at 14:42, Wolfgang Schuster > wrote: Meer, Hans van der 11. April 2016 um 10:35 I seem to remember the following variations in \startuseMPgraphic. (1) \startuseMPgraphic{name}{comma separated list of variables} (2) \startuseMPgraphic{name}{comma separated list of key=3Dvalue pairs} In the second case one is able to set a default value to that variable, pos= sibly to be overridden with \useMPgraphic{name}{key=3Dvalue}. I very much would like to specify default values on the \startuseMPgraphic = definition of the graphic. However, I cannot get option (2) working. Do I have a bad memory (possible = of course ;-), Has it to be done otherwise? \startuseMPgraphic{hans}{color} pickup pencircle scaled 1mm; draw unitsquare scaled 1cm withcolor \MPvar{color}; \stopuseMPgraphic \setupMPvariables[hans][color=3Dred] \starttext \useMPgraphic{hans} \useMPgraphic{hans}{color=3Dblue} \stoptext Wolfgang --_000_8B1B691F41FB4C4293CED6FD4565B806uvanl_ Content-Type: text/html; charset="iso-8859-1" Content-ID: <55D2B96264ADDE47A1F6D13E6F2A542D@uva.nl> Content-Transfer-Encoding: quoted-printable Thanks Wolfgang. 
It appears my memory did some "wishful thinking" = in wanting \startuseMPgraphic{name}{key=3Dvalue}. Although that would have = been nice.
Hans van der Meer

On 11 Apr 2016, at 14:42, Wolfgang Schuster <schuster.wolfgang@gmail.com<= /a>> wrote:

11. April 2016 um 10:35
I seem to remember the following variations in \startuseMPgraphic.

(1) \startuseMPgraphic{name}{comma separated list of v= ariables}
(2) \startuseMPgraphic{name}{comma separated list of k= ey=3Dvalue pairs}
In the second case one is able to set a default value to th= at variable, possibly to be overridden with \useMPgraphic{name}{key=3Dvalue= }.
I very much would like to specify default values on the \st= artuseMPgraphic definition of the graphic.

However, I cannot get option (2) working. Do I have a bad m= emory (possible of course ;-), Has it to be done otherwise?

\startuseMPgraphic{hans}{color}
  pickup pencircle scaled 1mm;
  draw unitsquare scaled 1cm withcolor \MPvar{color};
\stopuseMPgraphic

\setupMPvariables[hans][color=3Dred]

\starttext

\useMPgraphic{hans}

\useMPgraphic{hans}{color=3Dblue}

\stoptext

Wolfgang

--_000_8B1B691F41FB4C4293CED6FD4565B806uvanl_-- --===============4313545773912215349== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============4313545773912215349==--