On Sun, 23 Aug 2009, Wolfgang Schuster wrote:
Am 23.08.2009 um 22:06 schrieb Aditya Mahajan:
On Sun, 23 Aug 2009, Wolfgang Schuster wrote:
I thought about integrating the version check into \setupmodule because the command is only used in modules and available in MkII and MkIV but Thomas and Aditya use it in the simpleslides module to pass parameters to the module and this a few times at different places and not only at the start of the file.
If you have a suggestion that will make things cleaner, we (Thomas and I) can easily change the internals of simple slides to accomodate that.
In your module you can either use \getparameters or – what I think you want in your module – \setvariables because it's not very different to \setupmodule.
I thought that \setupmodule was meant for passing parameters to modules, mainly because of the following comment in core-fil % \usemodule[newmml] % \usemodule[newmml][a=b] % \usemodule[x][newmml] % \usemodule[x][newmml][a=b] % % \startmodule [mathml] % \setupmodule[a=c] \relax [\currentmoduleparameter{a}] % user vars will be set afterwards % \setupmodule[a=c] \relax [\currentmoduleparameter{a}] % user vars are now forgotten % \stopmodule As, \setupmodule is just \getparameters with a few defaults in place, I can also use \getparamters with \currentmoduleparamters.
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. Aditya