From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90461 Path: news.gmane.org!not-for-mail From: DesdeChaves Newsgroups: gmane.comp.tex.context Subject: Re: Update text variables inside metapost Date: Sun, 8 Mar 2015 00:28:59 +0000 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0846142548==" X-Trace: ger.gmane.org 1425774593 8699 80.91.229.3 (8 Mar 2015 00:29:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Mar 2015 00:29:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 08 01:29:38 2015 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 1YUP69-0002wE-LY for gctc-ntg-context-518@m.gmane.org; Sun, 08 Mar 2015 01:29:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E8D1010228 for ; Sun, 8 Mar 2015 01:29:36 +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 W5fr886k_CMR for ; Sun, 8 Mar 2015 01:29:35 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 695BF10234 for ; Sun, 8 Mar 2015 01:29:07 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4D3BA101FB for ; Sun, 8 Mar 2015 01:29:03 +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 Bnln2N2fIEO0 for ; Sun, 8 Mar 2015 01:29:02 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 0F493101E8 for ; Sun, 8 Mar 2015 01:29:02 +0100 (CET) Original-Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com [IPv6:2607:f8b0:4003:c06::231]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t280T0bq030936 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 8 Mar 2015 01:29:01 +0100 Original-Received: by oigh136 with SMTP id h136so23670341oig.1 for ; Sat, 07 Mar 2015 16:28:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=N4MD2DyYlMvwh4BrwPf1beTXeHSPikEL0Tyc6mTQv3c=; b=dOZrk8j090L/tpw4SYjN3EwMnBYVvUNcclHBP5anD9PwMc7EkROQcHAAehdx5ExcDg S1KJyz471FmweCbKcT78fylJyusRCCLqPtl5Gjb/oqMYILTVAVKmp65+ISVu+H295L0g N+7WhAeHThYVKNUsn/Eykj9EVpw7afnnf0UKDxbsr3Y6mNjfVz1KvvOOU/nfHwuXwpzv FvlZX4kuq24kmLLkx0XszWn76Om9cX7xOJ4CuDJgWxVgxZF3OqOtHLaa+oPyN6SIaGVs cmvtXa0Cgtcn2KOUQt1PLcDo62A/jrD9vqcyIkV8en/L0zuwvZGoQflT1QI2ST+GvhUn DLEw== X-Received: by 10.60.62.42 with SMTP id v10mr16325338oer.45.1425774539604; Sat, 07 Mar 2015 16:28:59 -0800 (PST) Original-Received: by 10.60.148.232 with HTTP; Sat, 7 Mar 2015 16:28:59 -0800 (PST) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4003:c06::231; country=US; latitude=38.0000; longitude=-97.0000; http://maps.google.com/maps?q=38.0000,-97.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01O0Mt128 - 7698e10f21f9 - 20150308 (trained as not-spam) Received-SPF: pass (filter4-ams.mf.surf.net: domain of desdechaves@gmail.com designates 2607:f8b0:4003:c06::231 as permitted sender) receiver=filter4-ams.mf.surf.net; client-ip=2607:f8b0:4003:c06::231; envelope-from=; helo=mail-oi0-x231.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) 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:90461 Archived-At: --===============0846142548== Content-Type: multipart/alternative; boundary=089e013c5ca8f686f60510bc0010 --089e013c5ca8f686f60510bc0010 Content-Type: text/plain; charset=UTF-8 Aditaya, thanks for the clarification. Now it works perfectly. Jorge 2015-03-07 23:57 GMT+00:00 Aditya Mahajan : > On Sat, 7 Mar 2015, DesdeChaves wrote: > > Why the metapost not updated the value of text variables that are >> generated >> inside luacode environment? >> >> In the code below, If I have \startitemize[columns,two] then metapost >> draw: >> >> 1. \Bolha[size=6cm]{text1}{text2}{text3}, >> 2. and four \Bolha[size=4cm]{text1}{text2}{text3}, but text1, text2 and >> text3 is not updated in every call; >> > > Use useMPgraphic instead of uniqueMPgraphic. > > uniqueMPgraphic recomputes the graphic only when the dimensions of figure > has changed; otherwise, it reuses the previously drawn graphic. This > behavior was useful for drawing page-backgrounds etc in MkII where calling > metapost was slow. > > Aditya > ____________________________________________________________ > _______________________ > 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 > ____________________________________________________________ > _______________________ -- Atentamente DesdeChaves --089e013c5ca8f686f60510bc0010 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Aditaya, thanks for the clarification. Now it works perfec= tly.

Jorge
<= br>
2015-03-07 23:57 GMT+00:00 Aditya Mahajan <a= dityam@umich.edu>:
On Sat, 7 Mar 2015, DesdeChaves wrote:

Why the metapost not updated the value of text variables that are generated=
inside luacode environment?

In the code below, If I have \startitemize[columns,two] then metapost draw:=

1. \Bolha[size=3D6cm]{text1}{text2}{text3},
2. and four=C2=A0 \Bolha[size=3D4cm]{text1}{text2}{text3}, but text1= , text2 and
text3 is not updated in every call;

Use useMPgraphic instead of uniqueMPgraphic.

uniqueMPgraphic recomputes the graphic only when the dimensions of figure h= as changed; otherwise, it reuses the previously drawn graphic. This behavio= r was useful for drawing page-backgrounds etc in MkII where calling metapos= t was slow.

Aditya
_____________________________________________________________= ______________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 :
http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/contextrev/=
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
_____________________________________________________________= ______________________



--
Atentamente

DesdeChaves
--089e013c5ca8f686f60510bc0010-- --===============0846142548== 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= --===============0846142548==--