From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/58180 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: MetaPost Animation Date: Fri, 16 Apr 2010 16:43:45 +0200 Message-ID: <4BC877A1.9060506@googlemail.com> References: <4BC817C7.8070207@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1271429067 8265 80.91.229.12 (16 Apr 2010 14:44:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Apr 2010 14:44:27 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 16 16:44:21 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 1O2mmJ-0001Jw-NF for gctc-ntg-context-518@m.gmane.org; Fri, 16 Apr 2010 16:44:19 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 19146C9C69; Fri, 16 Apr 2010 16:44:19 +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 7-oP4tS+K2Py; Fri, 16 Apr 2010 16:44:18 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D05EDC9C6D; Fri, 16 Apr 2010 16:44:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 35A00C9C69 for ; Fri, 16 Apr 2010 16:44:06 +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 ZaWJWGDOW4Sc for ; Fri, 16 Apr 2010 16:43:50 +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 2330FC9C6D for ; Fri, 16 Apr 2010 16:43:49 +0200 (CEST) Original-Received: by bwz28 with SMTP id 28so2913843bwz.14 for ; Fri, 16 Apr 2010 07:43:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=aYrbxgpaqZX/tNhrBfk7Jql5BdtoEgCF/0ASRoJMvQA=; b=sPI9lUYhMDdVvi3N3tPBB7b0lWlkK87AB7gdQD+Cb/ZHaMGMVpK3q4HQBxpvQerYPM fp1YDJweCVdH18mMbH1L2MhExlnnUyF4b7K479StCQVWG65ITZ55xUrTDUKD9KCUMSl6 Y+QkNnQyE5HWaqMZfEHXfEOCZ54sBfwPN5mqs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=VcsalTUSE5Jq7FKRawc9RAX2z9ExdVFboDXlqhZKUY2hBcpMdAFwqCOsjqRtv+lns6 AeGiWxakutFZMcpdbhahIcc+7Hbs9o6hvaaJPO+Ovp8b1raF7Fz2WAQYz1/N/6ldjdGm WTfPA+sHvut2KpWdd7gzKJHUBxY0yLya9h3V4= Original-Received: by 10.204.35.139 with SMTP id p11mr1742349bkd.178.1271429028100; Fri, 16 Apr 2010 07:43:48 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B294A4B.dip.t-dialin.net [91.41.74.75]) by mx.google.com with ESMTPS id 15sm1897529bwz.4.2010.04.16.07.43.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Apr 2010 07:43:47 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 In-Reply-To: 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:58180 Archived-At: Am 16.04.10 14:51, schrieb Troy Henderson: > 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? > \starttext \startluacode local a = 0 for i=1,10 do a = a + 1 context.startMPpage() -- context('label("%d",origin);',a) context('label(textext("%d"),origin);',a) context.stopMPpage() end \stopluacode \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________