ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MPinstance
@ 2016-04-07  9:20 dr. Hans van der Meer
  2016-04-07 10:14 ` MPinstance Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: dr. Hans van der Meer @ 2016-04-07  9:20 UTC (permalink / raw)
  To: NTG ConTeXt

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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPinstance
  2016-04-07  9:20 MPinstance dr. Hans van der Meer
@ 2016-04-07 10:14 ` Hans Hagen
  2016-04-07 14:35   ` MPinstance Alan BRASLAU
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2016-04-07 10:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPinstance
  2016-04-07 10:14 ` MPinstance Hans Hagen
@ 2016-04-07 14:35   ` Alan BRASLAU
  2016-04-07 16:48     ` MPinstance Meer, Hans van der
  0 siblings, 1 reply; 4+ messages in thread
From: Alan BRASLAU @ 2016-04-07 14:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 7 Apr 2016 12:14:39 +0200
Hans Hagen <pragma@wxs.nl> wrote:

> 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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPinstance
  2016-04-07 14:35   ` MPinstance Alan BRASLAU
@ 2016-04-07 16:48     ` Meer, Hans van der
  0 siblings, 0 replies; 4+ messages in thread
From: Meer, Hans van der @ 2016-04-07 16:48 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 559 bytes --]


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


[-- Attachment #1.2: Type: text/html, Size: 13132 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-07 16:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-07  9:20 MPinstance dr. Hans van der Meer
2016-04-07 10:14 ` MPinstance Hans Hagen
2016-04-07 14:35   ` MPinstance Alan BRASLAU
2016-04-07 16:48     ` MPinstance Meer, Hans van der

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).