ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: MPinclusions, MPextensions, MPinitializations and MPinstances
Date: Fri, 15 Feb 2013 01:21:53 +0100	[thread overview]
Message-ID: <511D7FA1.70407@wxs.nl> (raw)
In-Reply-To: <20130214181446.GE3733@homerow>

On 2/14/2013 7:14 PM, Marco Patzer wrote:
> On 2013–02–14 Alan BRASLAU wrote:
>
>> So that extensions=yes|no and initializations=yes|no controls the use
>> of MPextensions and MPinitializations. It seems that extensions is
>> intended for all instances ("when enabled").
>>
>>  From what I can see, extensions are read "once", initializations "each",
>> and inclusions are intended for the "user". It appears that
>> initializations is used to pass dynamic things from ConTeXt to MP.
>
> This means we have two cases:
>
>    - read one single time (once)
>    - read one time per graphic (each)
>
> And another two cases:
>
>    - global to all instances (global)
>    - local to a particular instance (local)
>
> And we have four inclusion environments. I don't know how to map
> them to the cases listed above.
>
> - MPdefinitions     (local, ???)
> - MPinclusions      (global, ???)
> - MPinitializations (global, each)
> - MPextensions      (global, once)
>
> I don't understand the need of so many different environments. E.g.
> MPinclusions could be global unless an argument specifying the
> instance is provided.
>
>> It would be nice for someone who understands this all to explain it.
>
> +1
>
>> I still have not figured out how to specify MPinclusions for a
>> particular instance.

% initializations
%     to be used by context / modules
%     cummulative
%     things like page states, use by context itself
%     each instance (unless disabled, as not all instances need them)
%     each graphic

% definitions
%     can be used to add helpers and such
%     cummulative
%     per instance
%     just after a format is loaded

% extensions
%     cummulative
%     used for all instances
%     blocked per instance after first graphic % was: reset after first use

% fix for 'all' instances instead of first used instance:
%
% \def\meta_reset_current_preamble
%   {\ifconditional\c_meta_include_extensions
%      \global\letMPinstanceparameter\s!extensions\v!no
%      %global\t_meta_extensions\emptytoks
%    \fi}

% inclusions
%     user stuff
%     cummulative
%     used next instance/graphic
%     reset afterwards (always)
%     can be blocked per instance

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | 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
___________________________________________________________________________________


  parent reply	other threads:[~2013-02-15  0:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 17:59 Marco Patzer
2013-02-13 23:25 ` Hans Hagen
2013-02-13 23:51   ` Marco Patzer
2013-02-14 13:01     ` Marco Patzer
2013-02-14 17:59       ` Alan BRASLAU
2013-02-14 18:14         ` Marco Patzer
2013-02-14 18:28           ` Alan BRASLAU
2013-02-15  0:21           ` Hans Hagen [this message]
2013-02-14 22:15         ` Wolfgang Schuster

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=511D7FA1.70407@wxs.nl \
    --to=pragma@wxs.nl \
    --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).