ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Fieldstacks are broken
Date: Thu, 21 Jan 2016 16:16:23 +0100	[thread overview]
Message-ID: <56A0F647.5010801@wxs.nl> (raw)
In-Reply-To: <CFFBA088-AA3F-4D29-8A98-774532D8D6F6@me.com>

On 1/21/2016 3:55 PM, Jeong Dal wrote:
> Thanks Hans, Wolfgang, Luigi
>
> The new beta with Luatex 0.88 makes \fieldstacks and \startanimation work.
> The following example of Wolfgang is now working well.
>
> \def\MyGraphics#1{%
> \startMPcode
> path p,q;
> p:=fullcircle scaled 72;
> L:=length p;
> N:=20;
> q:=subpath (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=start]
>
> \starttext
> \startanimation[menu=yes]
> {\MyGraphics {5}}
> {\MyGraphics {10}}
> {\MyGraphics {15}}
> {\MyGraphics {20}}
> \stopanimation
>
> \stoptext
>
> 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  “unexpected symbol near
> ‘\'”.
>
> \dorecurse{20}
> {{\MyGraphics {\recurselevel}}
>
> \startluacode
> for i = 1, 20 do
> context(“{\\MyGraphics <smb://MyGraphics>{i}}”)
> end
> \stopluacode

\dorecurse{20} {\dontleavehmode\ruledhbox{\MyGraphics{#1}}\allowbreak}

\page

\startluacode
for i = 1, 20 do
	context.dontleavehmode()
	context.MyGraphics(i)
     context.allowbreak()
end
\stopluacode



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2016-01-21 15:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1452510001.6531.ntg-context@ntg.nl>
2016-01-21 14:55 ` Jeong Dal
2016-01-21 15:16   ` Hans Hagen [this message]
2016-01-21 22:47   ` Wolfgang Schuster
2016-01-22  4:26     ` Otared Kavian
     [not found] <mailman.1.1453719602.15037.ntg-context@ntg.nl>
2016-01-25 22:28 ` Jeong Dal
     [not found] <mailman.131.1453640134.2231.ntg-context@ntg.nl>
2016-01-24 14:02 ` Jeong Dal
2016-01-24 18:27   ` Wolfgang Schuster
2016-01-25  9:42     ` Fabrice Couvreur
     [not found] <mailman.129.1453635610.2231.ntg-context@ntg.nl>
2016-01-24 12:55 ` Jeong Dal
     [not found] <mailman.85.1453416648.2231.ntg-context@ntg.nl>
2016-01-22 14:45 ` Jeong Dal
2016-01-24 11:39   ` Fabrice Couvreur
2016-01-24 12:04     ` Wolfgang Schuster
     [not found] <mailman.1.1453460401.13701.ntg-context@ntg.nl>
2016-01-22 14:43 ` Jeong Dal
2016-01-10 16:01 Wolfgang Schuster
2016-01-11  9:53 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56A0F647.5010801@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).