2012-11-26 Sietse Brouwer: > Since I don't use MetaPost, I don't think I'm the best person to > document this. But I took this as an opportunity to create the command > reference pages for a bunch of the \...MP... commands; perhaps one of > you could add this info to the proper page(s)?
Thanks. I added some info about the change mentioned in this thread. > Also: a question about > \startuseMPgraphic and > \startuniqueMPgraphic. > Both are supposed to be recompiled at every usage, so how are they > different? Actually trying it out suggests that useMPgraphic is the > only one of the two that re-evaluates its code every time; compare the > examples at AFAIK useMPgraphic is always recalculated, reusableMPgraphic never is. uniqueMPgraphic takes the size into account and recalculates if the graphic dimensions change. If I recall correctly this is mentioned somewhere in the MetaFun manual. But I agree, all these commands for including MP graphics are confusing, given the fact that one can survive pretty well with only useMPgraphic. I attached a small example to show the difference. Marco
\startuseMPgraphic{alpha} fill unitsquare xyscaled (\overlaywidth, \overlayheight) withcolor (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1); \stopuseMPgraphic \defineoverlay [alpha] [\useMPgraphic{alpha}] \startreusableMPgraphic{beta} fill unitsquare xyscaled (\overlaywidth, \overlayheight) withcolor (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1); \stopreusableMPgraphic \defineoverlay [beta] [\reuseMPgraphic{beta}] \startuniqueMPgraphic{gamma} fill unitsquare xyscaled (\overlaywidth, \overlayheight) withcolor (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1); \stopuniqueMPgraphic \defineoverlay [gamma] [\uniqueMPgraphic{gamma}] \starttext \dontleavehmode \framed[background=alpha]{foo} \framed[background=alpha]{foo} \framed[background=alpha]{foobar} \dontleavehmode \framed[background=beta]{foo} \framed[background=beta]{foo} \framed[background=beta]{foobar} \dontleavehmode \framed[background=gamma]{foo} \framed[background=gamma]{foo} \framed[background=gamma]{foobar} \stoptext
___________________________________________________________________________________ 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 ___________________________________________________________________________________