From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/58179 Path: news.gmane.org!not-for-mail From: =?ISO-8859-2?Q?Bo=B9tjan_Vesnicer?= Newsgroups: gmane.comp.tex.context Subject: Re: MetaPost Animation Date: Fri, 16 Apr 2010 16:19:11 +0200 Message-ID: References: <4BC817C7.8070207@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0485571525==" X-Trace: dough.gmane.org 1271427584 1839 80.91.229.12 (16 Apr 2010 14:19:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Apr 2010 14:19:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 16 16:19:40 2010 connect(): No such file or directory 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 1O2mOP-0000rp-Uv for gctc-ntg-context-518@m.gmane.org; Fri, 16 Apr 2010 16:19:38 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 941C0C9CA3; Fri, 16 Apr 2010 16:19:37 +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 5CX+GwNV+Z6Y; Fri, 16 Apr 2010 16:19:37 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A4ACC9C7C; Fri, 16 Apr 2010 16:19:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 91C90C9C85 for ; Fri, 16 Apr 2010 16:19:23 +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 TlIGomDFjrqv for ; Fri, 16 Apr 2010 16:19:12 +0200 (CEST) Original-Received: from mail-bw0-f228.google.com (mail-bw0-f228.google.com [209.85.218.228]) by balder.ntg.nl (Postfix) with ESMTP id 9A010C9C40 for ; Fri, 16 Apr 2010 16:19:12 +0200 (CEST) Original-Received: by bwz28 with SMTP id 28so2880491bwz.14 for ; Fri, 16 Apr 2010 07:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=73eKN5wI5v7262TW/Nw0m00eXm2Pz9U1Yk5tTKk/UhQ=; b=ruJRjfXCwrl+jf1wrnkd5MgAh6xxqfT+OdTbLjRuzQq+Y5Qzqm5WCMh8o3vB5hz7rl Bbe/efQJ5/+86qDs6gqgulOIk01t5gGgsQqr7UHZLhbmzOMdbQXS73oAQ5J/ovMolhDb qyW/PRdNcAm5IzcVzIpysATCHSKH+qPp7J42M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=LLwi7KqAfEaSdmHmyyMM5WBNRyHEvaFpagclrZ6L+s1b4lkpiZObO1EKDtQI+wiSzu tXLRSnqt7mgbd0vKwNaz4BheJHGeMK+/R9cdunRtBO0ERTuMd5qppdFFq0LCcqa5DEMh w0EjhdL5tbIhe1EL3yTUbCWZDQJNTKcOwD9fg= Original-Received: by 10.239.150.67 with HTTP; Fri, 16 Apr 2010 07:19:11 -0700 (PDT) In-Reply-To: Original-Received: by 10.239.160.19 with SMTP id a19mr109990hbd.165.1271427552110; Fri, 16 Apr 2010 07:19:12 -0700 (PDT) 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:58179 Archived-At: --===============0485571525== Content-Type: multipart/alternative; boundary=001485f5ce3899ea4904845b4b13 --001485f5ce3899ea4904845b4b13 Content-Type: text/plain; charset=ISO-8859-1 > > If I have two different \startMPcode ... \stopMPcode sections, is > there a way (perhaps it does this by default) to have the variables > stored in the first block available in the second block? In pure > MetaPost, I can do > > numeric a:=4; > beginfig(1); > label(decimal(a),origin); > endfig; > beginfig(2); > label(decimal(a),origin); > endfig; > end > > and both figures have the value of 'a' available to them because 'a' > was defined before each figure. What is the ConTeXt way of doing > this? > > Do you mean something like this? \starttext \startMPpage a := 4; label(decimal a, origin); \stopMPpage \startMPpage a := a+1; label(decimal a, origin); \stopMPpage \stoptext Regards, Bostjan --001485f5ce3899ea4904845b4b13 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
If I have two di= fferent \startMPcode ... \stopMPcode sections, is
there a way (perhaps it does this by default) to have the variables
stored in the first block available in the second block? =A0In pure
MetaPost, I can do

numeric a:=3D4;
beginfig(1);
=A0 =A0label(decimal(a),origin);
endfig;
beginfig(2);
=A0 =A0label(decimal(a),origin);
endfig;
end

and both figures have the value of 'a' available to them because &#= 39;a'
was defined before each figure. =A0What is the ConTeXt way of doing
this?


Do you mean something like this?
=

\starttext
\startMPpage
a :=3D 4;
<= div> label(deci= mal a, origin);
\stopMPpage
\startMPpage
a :=3D a+1;
label= (decimal a, origin);
\stopMPpage
\stoptext
<= div>
Regards, Bostjan
--001485f5ce3899ea4904845b4b13-- --===============0485571525== 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 ___________________________________________________________________________________ --===============0485571525==--