> Fabrice Couvreur > 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