I am glad to see that I am not alone being confused...

We have:

\defineMPinstance
  [name]
  [\s!format=metafun,
   \s!extensions=\v!yes,
   \s!initializations=\v!yes,
   \c!method=\s!default,
   \c!textstyle=,
   \c!textcolor=]

also, \setupMPinstance

So that extensions=yes|no and initializations=yes|no controls the use
of MPextensions and MPinitializations. It seems that extensions is
intended for all instances ("when enabled").

From what I can see, extensions are read "once", initializations "each",
and inclusions are intended for the "user". It appears that
initializations is used to pass dynamic things from ConTeXt to MP.

I still have not figured out how to specify MPinclusions for a
particular instance.

It would be nice for someone who understands this all to explain it.

Alan 

 

On Thu, 14 Feb 2013 14:01:44 +0100
Marco Patzer <home...@lavabit.com> wrote:

> On 2013–02–14 Marco Patzer wrote:
> 
> > Now I can use “n” in all MP instances (unless switched off for the
> > particular instance). I'd like to define some variables only visible
> > in instance “foo”. Something like
> > 
> >   \startMPinitializations [foo]
> >     numeric n; n=4cm;
> >   \stopMPinitializations
> 
> What I was looking for was (it's even mentioned in the manual):
> 
>   \startMPdefinitions{foo}
>     …
>   \stopMPdefinitions
> 
> That means we have:
> 
> - MPdefinitions     (for instance-local definitions)
> - MPinclusions      (global definitions)
> - MPinitializations (global definitions, can be disabled for an MP
> instance)
> - MPextensions      (???, seems to be the same as MPinitializations)
> 
> And all four include code for use within MP graphics. That really is
> confusing!
> 
> > Maybe I'm missing the obvious here.
> 
> Yes, I did :)

___________________________________________________________________________________
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