ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: MPinstance
Date: Thu, 7 Apr 2016 08:35:34 -0600	[thread overview]
Message-ID: <20160407083534.1a35013e@cea.fr> (raw)
In-Reply-To: <5706330F.3090601@wxs.nl>

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
___________________________________________________________________________________

  reply	other threads:[~2016-04-07 14:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  9:20 MPinstance dr. Hans van der Meer
2016-04-07 10:14 ` MPinstance Hans Hagen
2016-04-07 14:35   ` Alan BRASLAU [this message]
2016-04-07 16:48     ` MPinstance Meer, Hans van der

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160407083534.1a35013e@cea.fr \
    --to=alan.braslau@cea.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).