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 initializations are run:

     \starttext
     \setbox\scratchbox\hbox{\startMPcode draw unitcircle; \stopMPcode}
     \dorecurse{\udCount}
      {\useMPgraphic{foldUD}{num=\recurselevel}}
      {\useMPgraphic{dotLines}{num=\recurselevel}}
     \stoptext
A run with no sideeffects in the content stream is:

\startMPcalculation
 ....
\stopMPcalculation

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to