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
___________________________________________________________________________________