Fabrice Couvreur <mailto:fabrice1.couvr...@gmail.com>
24. Januar 2016 um 12:39
Hello everyone,
I tested the code and it does not work: I get one page with buttons for animation is not working.
thank you,
Fabrice

\def\MyGraphics#1{%
\unexpanded\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}}
You have nested definition which is wrong,the correct way is one of the following ones (2 or 3 are recommended):

\unexpanded\def\MyGraphics#1%
  {\startMPcode
     ...
   \stopMPcode}

or

\define[1]\MyGraphics
  {\startMPcode
     ...
   \stopMPcode}

or

\starttexdefinition unexpanded MyGraphics #1
    \startMPcode
        ...
    \stopMPcode
\stoptexdefinition

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
___________________________________________________________________________________

Reply via email to