# [dev-context] Mac installation package

Hans Hagen pragma at wxs.nl
Tue Aug 25 00:20:13 CEST 2009

Wolfgang Schuster wrote:
>
> Am 24.08.2009 um 16:27 schrieb Aditya Mahajan:
>
>>>>> To stop the TeX run we can have
>>>>> \setupmodule[contextversion=2009.08.22]
>>>>> at the begin of a module and ConTeXt will abort the run if the key
>>>>> 'contextversion' has a value and context is older than the user has
>>>>> requested.
>>>> Do you want this to check to be part of the definition of
>>>> \setupmodule? One difficultly that I see is that typically this will
>>>> mean that we need to set this separately for each engine.
>>>
>>> I don't need such a check, it was Olivers idea and I thought about a
>>> idea how this
>>> can be integrated without introducing a new command which breaks
>>> backward compatibility.
>>
>> I meant that when you said
>> \setupmodule[contextversion=...]", what is the implementation you had
>> in mind. \setupmodule macro doing the checking, or the module writer
>> doing the checking.
>
> I think it's up to the developer to write something in the module,
> e.g.
> http://bitbucket.org/wolfs/simplefonts/src/46a1f454bccc/files/t-simplefonts.tex
>
> but it's not so hard to integrate it into the \setupmodule command.
>
> % untested, it should only show how \setupmodule can be extended to stop
> a tex run
> % when a module is used with a too old context version
>
> \def\c!contextversion{contextversion}
>
> \def\doabortmodule#1#2#3%
>
> {\doif{#2}\c!contextversion{\doifolderversionelse\contextversion{#3}{\forcequitjob{#1}}\donothing}}
>
>
> \def\dosetupmodule[#1][#2]%
>   {\scratchtoks\expandafter{\currentmoduleparameters}%
>    \ifsecondargument
>      \getparameters[\??md:#1:][#2]%
>      \expanded{\getparameters[\??md:#1:][\the\scratchtoks]}%

no need for toks

\expanded{\getparameters[\??md:#1:]\expandafter}\expandafter[\currentmoduleparameters]%

but maybe a \hetparameterscommand makes more sense -)

>      \processassignmentlist[#2]{\doabortmodule{#1}}%
>    \else
>      \getparameters[\??md:\currentmodule:][#1]%
>      \expanded{\getparameters[\??md:\currentmodule:][\the\scratchtoks]}%
>      \processassignmentlist[#1]{\doabortmodule\currentmodule}%
>    \fi
>    \let\currentmoduleparameters\empty}

but anyway, i wonder if we should go that route; normally context is
downward compatible and eventually mkiv will become more stable

-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-context mailing list