On 4/3/2016 4:07 PM, Meer, Hans van der wrote:
Previously I could do the following

\starttext
\startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment
\startMPpage
% metafont code
\stopMPpage
\stoptext
\endinput

This is called by context --run --once etc. producing the figure and in this 
case modifying the font to a smaller size. Note, the context call occurs on the 
fly inside a \directlua{{os.execute(..)}. You may find this complicated, but it 
works for me and I would rather like not having to change may things all over 
the place.

Now I learn from the ConTeXtgarden that startMPenvironment is deprecated and 
that I should use defineMPinstance and setupMPinstance instead.
Thus I tried

\defineMPinstance[mp:local][metafun][setups=mp:smallfont,textcolor=red]
\startsetups mp:smallfont
        \switchtobodyfont[small]
\stopsetups
\startMPpage  and also \startMPpage[mp:local]
% metafont code
\stopMPpage
\stoptext
\endinput

But nothing happens. How do I get the effect earlier obtained with 
startMPenvironment without having to rely an a deprecated macro?

the bodyfont environment was needed because we had to communicate to the external mp run what the intended settings were

in mkiv the run is internal so the mp text generator adapts to the current settings and there is no need to pass anything

Hans

-----------------------------------------------------------------
                                          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 via email to