From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62207 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Lua & MP Date: Thu, 30 Sep 2010 23:02:42 -0400 (EDT) Message-ID: References: <4CA440CD.7080403@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-508956115-1285902163=:27075" X-Trace: dough.gmane.org 1285901842 17570 80.91.229.12 (1 Oct 2010 02:57:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 1 Oct 2010 02:57:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 01 04:57:17 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P1VoD-00034t-92 for gctc-ntg-context-518@m.gmane.org; Fri, 01 Oct 2010 04:57:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B0C60CA692; Fri, 1 Oct 2010 04:57:16 +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 kvxLQENIozNN; Fri, 1 Oct 2010 04:57:14 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F0E85CA665; Fri, 1 Oct 2010 04:57:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 14871CA665 for ; Fri, 1 Oct 2010 04:57:12 +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 bEQpXB+fUPEI for ; Fri, 1 Oct 2010 04:57:00 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 29C83CA647 for ; Fri, 1 Oct 2010 04:57:00 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o912uvgK002228 for ; Fri, 1 Oct 2010 04:56:59 +0200 Original-Received: FROM adi-netbook (bas3-montreal02-1096681052.dsl.bell.ca [65.94.6.92]) By tombraider.mr.itd.umich.edu ID 4CA54DF8.31839.13257 ; Authuser adityam; 30 Sep 2010 22:56:56 EDT In-Reply-To: <4CA440CD.7080403@wxs.nl> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eDdeUVQx - 7cd1d3d3f816 - 20101001 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:62207 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-508956115-1285902163=:27075 Content-Type: TEXT/PLAIN; charset=windows-1252; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 30 Sep 2010, Hans Hagen wrote: > On 30-9-2010 8:19, Proch=E1zka Luk=E1=9A Ing. - Pontex s. r. o. wrote: >> Hello, >> >> is it possible that Lua gets value of a MetaPost variable? >> >> Let's have MetaPost code: >> >> z11=3D(0,0) >> z12=3D(1,1) >> z21=3D(0,1) >> z22=3D(1,0) >> >> aa[z11,z12]=3Dbb[21,z22] >> >> So now aa =3D bb =3D 0.5. >> >> And I'd need to access MetaPost values 'aa' and 'bb' from Lua (e.g. in >> Lua: "local a =3D mpost.aa, b =3D mpost.bb"). >> >> Is it possible somehow? > > no I don't know how MPlib handles metapost terminal output, but if you can=20 capture the terminal output in lua, then you can use show aa, bb; in metapost and parse the output in lua. Aditya --8323328-508956115-1285902163=:27075 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 ___________________________________________________________________________________ --8323328-508956115-1285902163=:27075--