![](https://secure.gravatar.com/avatar/be49110e195f5eac47c04570251121c1.jpg?s=120&d=mm&r=g)
I do not understand the info in the ConTeXt wiki on setupMPinstance. The syntax is specified as \setupMPinstance[...][...,...=...,...0 [...] name format metafun mpost etc. I read this as: in the first argument one can specify a name presumably a name specified on \defineMPinstance. in the second argument [format=metafun] specifies the format. But then the example under Usage gives: \setupMPinstance[metafun][...] Why metafun in the first instead of the second argument as implied in the syntax description? I get confused here. Also in the description \startMPextensions and \startMPinitializations are mentioned, but their descriptions are missing from the list given in the page MetaPost in ConTeXt. How are these described and what is the specific purpose of \startMPextensions compared to \startMPinitializations? What is the recommended use for them? Hans van der Meer
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 4/7/2016 11:20 AM, dr. Hans van der Meer wrote:
I do not understand the info in the ConTeXt wiki on setupMPinstance.
The syntax is specified as \setupMPinstance[...][...,...=...,...0 [...] name format metafun mpost etc.
I read this as: in the first argument one can specify a name presumably a name specified on \defineMPinstance. in the second argument [format=metafun] specifies the format. But then the example under Usage gives: \setupMPinstance[metafun][...] Why metafun in the first instead of the second argument as implied in the syntax description? I get confused here.
Also in the description \startMPextensions and \startMPinitializations are mentioned, but their descriptions are missing from the list given in the page MetaPost in ConTeXt. How are these described and what is the specific purpose of \startMPextensions compared to \startMPinitializations? What is the recommended use for them?
you can look in m-graph.mkiv for an example of using instances ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/ac3fbaf0a287c4cffbc9f18fa931586c.jpg?s=120&d=mm&r=g)
On Thu, 7 Apr 2016 12:14:39 +0200
Hans Hagen
On 4/7/2016 11:20 AM, dr. Hans van der Meer wrote:
I do not understand the info in the ConTeXt wiki on setupMPinstance.
The syntax is specified as \setupMPinstance[...][...,...=...,...0 [...] name format metafun mpost etc.
I read this as: in the first argument one can specify a name presumably a name specified on \defineMPinstance. in the second argument [format=metafun] specifies the format. But then the example under Usage gives: \setupMPinstance[metafun][...] Why metafun in the first instead of the second argument as implied in the syntax description? I get confused here.
Also in the description \startMPextensions and \startMPinitializations are mentioned, but their descriptions are missing from the list given in the page MetaPost in ConTeXt. How are these described and what is the specific purpose of \startMPextensions compared to \startMPinitializations? What is the recommended use for them?
you can look in m-graph.mkiv for an example of using instances
For example, I work with a "3D" instance of MP: \defineMPinstance [three] [format=metafun, extensions=yes, initializations=yes, method=double] \startMPdefinitions{three} input three ; \stopMPdefinitions Where three.mp contains my 3D projection macros. Use is then \startMPcode{three} ... \stopMPcode Alan
![](https://secure.gravatar.com/avatar/29c7bbff49b1599eddb2ec73fd9ffa6e.jpg?s=120&d=mm&r=g)
Alan Braslau wrote: For example, I work with a "3D" instance of MP: \defineMPinstance [three] [format=metafun, extensions=yes, initializations=yes, method=double] \startMPdefinitions{three} input three ; \stopMPdefinitions Where three.mp contains my 3D projection macros. Use is then \startMPcode{three} ... \stopMPcode Does this mean that \startMPdefinitions is identical (in effect) with \startMPextensions? Its use here seems to suggest. Or if otherwise, what is the difference in usage? Hans van der Meer
participants (4)
-
Alan BRASLAU
-
dr. Hans van der Meer
-
Hans Hagen
-
Meer, Hans van der