Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-25 Thread Jeong Dal
Dear Aditya and Hans, Thank you for your suggestion. I add > \startMPcalculation > > \stopMPcalculation and it works. \setupinteraction[state=start] \usemodule[animation] \starttext %\startanimation[menu=yes] %{ \startMPcalculation path p; \stopMPcalculation \dorecurse{\udCount} {\useM

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Jeong Dal
Dear Hans, Your code works fine. > \starttext > > \startMPcode >numeric maxCount; >maxCount := 10; >setglobalmacro("MyMacro",decial maxCount); >setglobalcount("MyCount",maxCount); > \stopMPcode > > > \dorecurse{\MyMacro}{It is \recurselevel. }\par > \dorecurse{\MyCount}{It is \

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Hans Hagen
On 6/24/2021 5:39 AM, Aditya Mahajan wrote: You need to call the setglobalmacro(...) macro. The code inside \startMPinitializations is only executed when you call any MP environment. But you are using \udCount before \useMPgraphic. A simple solution is to run dummy MP code so that MP initiali

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Aditya Mahajan
On Thu, 24 Jun 2021, Jeong Dal wrote: > Dear Hans, > > Your code works fine. > > > \starttext > > > > \startMPcode > >numeric maxCount; > >maxCount := 10; > >setglobalmacro("MyMacro",decial maxCount); > >setglobalcount("MyCount",maxCount); > > \stopMPcode > > > > > > \dorecurs

[NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Jeong Dal
Hi, Is there a way to deliver the value of a variable in MetaFun to ConTeXt. For example, I want to do the following: \starttext \startMPcode numeric maxCount; % … some code maxCount := 10; \stopMPcode dorecurse{maxCount} {It is \recurselevel.\par} \stoptext Thank you for reading. Best regar

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Hans Hagen
On 6/23/2021 10:00 PM, Jeong Dal wrote: Hi, Is there a way to deliver the value of a variable in MetaFun to ConTeXt. For example, I want to do the following: \starttext \startMPcode numeric maxCount; % … some code maxCount := 10; \stopMPcode dorecurse{maxCount} {It is \recurselevel.\par} \st