From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93456 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: Fieldstacks are broken Date: Fri, 22 Jan 2016 05:26:27 +0100 Message-ID: References: <56A1601B.8010504@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3117\)) Content-Type: multipart/mixed; boundary="===============4719849374824340510==" X-Trace: ger.gmane.org 1453436839 15772 80.91.229.3 (22 Jan 2016 04:27:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jan 2016 04:27:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 22 05:27:07 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 1aMTJQ-0004VD-UH for gctc-ntg-context-518@m.gmane.org; Fri, 22 Jan 2016 05:27:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7A300632E; Fri, 22 Jan 2016 05:26:44 +0100 (CET) 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 QKXu5cT8zhOZ; Fri, 22 Jan 2016 05:26:42 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id D634F6332; Fri, 22 Jan 2016 05:26:42 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7598D632D for ; Fri, 22 Jan 2016 05:26:41 +0100 (CET) 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 KQIocgtaTxpT for ; Fri, 22 Jan 2016 05:26:40 +0100 (CET) Original-Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id A19EE632C for ; Fri, 22 Jan 2016 05:26:30 +0100 (CET) Original-Received: by mail-wm0-f44.google.com with SMTP id 123so162389wmz.0 for ; Thu, 21 Jan 2016 20:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=Q1PXNMuV6tjevnFIQT7jJpmiOL3ICqY2G/M0X9ikO88=; b=mrt6VoGMuKERy1esf9CgSzoj+ud4J6JpxvKubClwxUUCEeJnalLjdTN5taBKMZR6vR JHPpx3L28oRfHGPuGvkAm1Bd0Itw1YNnG1suyOAXPbukg3EMyiTxjkvxtXieFyX+R7rT 2HZZU8vWht5BeihQN3kj0Eg2eNsHicZs3BQa8Qhh2xQVJjt+hNjUVDcdAROwGChU7I92 7WUtQeizlXakDguu1selmN1eicgO1qp9Yr62aH7F/fODqZBs6GKykfz8lZP3v2nzhs0M zH2Dp7lTEYK8zX0k7BwXf3XpIgNXymm/jixe3ObkuuWZIPdXDGnSNcOqdbrEIMDpr057 6F5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:message-id:mime-version :subject:date:references:to:in-reply-to; bh=Q1PXNMuV6tjevnFIQT7jJpmiOL3ICqY2G/M0X9ikO88=; b=X/VX88AnSbe/67r3hQVsv+U7E0ziuCBAbXKWT+dPuZzLVsqgCbYGNMaVPC4hAPTiQT Ps1C0Qx2SZuhHgAPt9LnkZg9wc/b0xKXVs1Pv2XJWB6qFX/X33z6udmMT/dBKgIhA7q3 yQDWzXysJQJVWIIlhEv0myT3dUnpl2jmPtOSgaTvHsbeO8nrtBs3qesQBXCFLbuppWZL JDXJw4z29Nd8+wKKIcLCgvJBOsDPEKYYaPNtGlgZ6p9G2z+A7o4tRde6k+QBHjOLuQPB wPkQOJRhY6EGfBw9F8WD/40+I7k7xuyS174trnwYYFOPJFvy8b7EoLv4CfgtrK0W+uI1 doRQ== X-Gm-Message-State: AG10YORyZfCi4+VhA95EvJLO79t1ZBqjjmIdKwdtAtUJG6n4lPuW7r94IlZQ6eb7VJN5dA== X-Received: by 10.194.83.105 with SMTP id p9mr801112wjy.179.1453436790321; Thu, 21 Jan 2016 20:26:30 -0800 (PST) Original-Received: from [192.168.0.104] (lns-bzn-37-82-253-57-232.adsl.proxad.net. [82.253.57.232]) by smtp.gmail.com with ESMTPSA id u191sm1109977wmd.4.2016.01.21.20.26.28 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jan 2016 20:26:29 -0800 (PST) In-Reply-To: <56A1601B.8010504@gmail.com> X-Mailer: Apple Mail (2.3117) 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:93456 Archived-At: --===============4719849374824340510== Content-Type: multipart/alternative; boundary="Apple-Mail=_75FD4AAD-EAF4-4C38-BFC0-0E2112C18B65" --Apple-Mail=_75FD4AAD-EAF4-4C38-BFC0-0E2112C18B65 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Jeong, I played with your code and indeed it is very nice to use this animation = feature (I never succeeded to imbed a movie in a TeX file typeset with = Context=E2=80=A6). Thanks to Hans and Wolfgang, and you, I can now use such things in my = presentations. Just to say something which may be useful, one can also use = \dostepwiserecurse as in \startanimation[menu=3Dyes] \dostepwiserecurse{0}{20}{2}{\expanded{\startframe = \MyGraphics{\recurselevel} \stopframe}} \stopanimation Best regards: OK > On 21 Jan 2016, at 23:47, Wolfgang Schuster = wrote: >=20 >> Jeong Dal 21. Januar 2016 um 15:55 >> Thanks Hans, Wolfgang, Luigi >>=20 >> The new beta with Luatex 0.88 makes \fieldstacks and \startanimation = work. >> The following example of Wolfgang is now working well. >>=20 >> \def\MyGraphics#1{% > \unexpanded\def\MyGraphics#1{% >> \startMPcode >> path p,q; >> p:=3Dfullcircle scaled 72; >> L:=3Dlength p; >> N:=3D20; >> q:=3Dsubpath (0,#1/N*L) of p; >> draw q withcolor red; >> fill fullcircle scaled 3 shifted point length q of q withcolor blue; >> setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75; >> \stopMPcode} >> \usemodule[animation] >> \setupinteraction[state=3Dstart] >>=20 >> \starttext >> \startanimation[menu=3Dyes] >> {\MyGraphics {5}} >> {\MyGraphics {10}} >> {\MyGraphics {15}} >> {\MyGraphics {20}} >> \stopanimation >>=20 >> \stoptext >>=20 >> One more question. Is there any convenient way to list = \MyGraphics{#1}? I tried \dorecurse, but it just display figures one by = one. I also tried lua, but it stops with the error message = =E2=80=9Cunexpected symbol near =E2=80=98\'=E2=80=9D. > \startanimation[menu=3Dyes] > \dorecurse{20}{\expanded{\startframe \MyGraphics{\recurselevel} = \stopframe}} > \stopanimation >=20 > Wolfgang > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ --Apple-Mail=_75FD4AAD-EAF4-4C38-BFC0-0E2112C18B65 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi Jeong,

I= played with your code and indeed it is very nice to use this animation = feature (I never succeeded to imbed a movie in a TeX file typeset with = Context=E2=80=A6).
Thanks to Hans and Wolfgang, and = you, I can now use such things in my presentations.

Just to say something = which may be useful, one can also use \dostepwiserecurse as in

\startanimation[menu=3Dyes]
\dostepwiserecurse{0}{20}{2}{\expanded{\startframe = \MyGraphics{\recurselevel} \stopframe}}
\stopanimation

Best regards: OK
On = 21 Jan 2016, at 23:47, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

21.=20 Januar 2016 um 15:55
Thanks Hans, Wolfgang, Luigi

The new beta=20 with Luatex 0.88 makes \fieldstacks and \startanimation work.
The following example of Wolfgang is now working well.

\def\MyGraphics#1{%
\unexpanded\def\MyGraphics#1{%
\startMPcode
path= p,q;
p:=3Dfullcircle=20 scaled 72;
L:=3Dlength p;
N:=3D20;
q:=3Dsubpath=20 (0,#1/N*L) of p;
draw q withcolor red;
fill=20 fullcircle scaled 3 shifted point length q of q withcolor = blue;
setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75;
\stopMPcode}
\usemodule[animation]
\setupinteraction[state=3Dstart]

\starttext
\startanimation[menu=3Dyes]
{\MyGraphics {5}}
{\MyGraphics {10}}
{\MyGraphics {15}}
{\MyGraphics {20}}
\stopanimation

\stoptext

One more question. Is there any convenient way to list=20= \MyGraphics{#1}? I tried \dorecurse, but it just display figures one by=20= one.  I also tried lua, but it stops with the error message =  =E2=80=9Cunexpected symbol near =E2=80=98\'=E2=80=9D.
\startanimation[menu=3Dyes]
\dorecurse{20}{\expanded{\startframe \MyGraphics{\recurselevel}=20 \stopframe}}
\stopanimation

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
_______________________________________________________________= ____________________

= --Apple-Mail=_75FD4AAD-EAF4-4C38-BFC0-0E2112C18B65-- --===============4719849374824340510== 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= --===============4719849374824340510==--