On 2013–02–14 Hans Hagen wrote:

> >I know that MPinclusions are included only once and
> >MPinitializations are included once for each graphic. But how do
> >MPextensions fit in?
> >
> >How can I define variables or definitions that are local to a
> >particular MP instance?
> 
> by defining a new instance

I guess I didn't make myself clear.

  \startMPinitializations
    numeric n; n=4cm;
  \stopMPinitializations

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

I tried

  \startMPcode{foo}
    numeric n; n=4cm;
  \stopMPcode

but this adds some vertical space and doesn't seem to be the right
solution given the face that there are already three other
environments to include MetaPost code. Maybe I'm missing the obvious
here.

Marco

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________________
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