Re: [dev-context] Mac installation package
Am 25.08.2009 um 00:20 schrieb Hans Hagen: \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]% hey, you wrote \setupmodule and not me but maybe a \hetparameterscommand makes more sense -) \hetparameterscommand? \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 it was just a example how things can be done Wolfgang ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
*You* want to write a test suite for ConTeXt? The test suite is there. There is even a script in the test suit that compares the outputs of two versions at pixel level. All we need is people to submit tests and then someone to monitor the test suite. See http://wiki.contextgarden.net/Test Yep, I almost forgot about that ... so we have a foundation to build on! Someone then also needs to decide on which test code conforms to (current) valid syntax (which is probably *not* just everything that compiles ... think of deprecated code, hacks, workarounds etc. that aren't considered best practices). The problem with such systems is they lead always to incompatibilities with ConTeXt installations (think about TeXLive) and we had one at the end of last year when Hans changed the multilingual interface to allow a persian interface. Loading of lua files has this feature. For modules, asking for a minimum kernel version is no guarantee that the module will work with future versions of ConTeXT :-) Yes, but it's a start ... Oliver ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
MkIV is ConTeXt’s feature without an doubt but it's not so easy as you think. I have myself two modules which work only with MkIV (simplefonts and games) but bigger ones like simpleslides or letter are just complexer styles and you can't expect from a user to upgrade to MkIV just to make a presentation or to write a short letter. 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. Perhaps this is too simple ... what about some passive check on behalf of the module? That is, would the MkII kernel evaluate another field in the module's header upon loading or ignore it because it doesn't recognize the additional info? In the latter case the MkIV kernel could evaluate the additional header and refuse to load the module if necessary. Of course, this wouldn't prevent an MkIV only module from being loaded in MkII but it would implement the compatibility check at least for MkIV. But that's probably fine given that some modules are MkIV exclusive already :-) And even for existing modules one will probably have to split into (frozen?) MkII and current MkIV versions at some point anyway ... Well, just a thought. Oliver ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
On Mon, 24 Aug 2009, Wolfgang Schuster wrote: Am 24.08.2009 um 00:17 schrieb Aditya Mahajan: 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 Is this passing parameters to the module, I don't think so! \def\dosetupTitle[#1]% {\setupmodule[simpleslides:title][#1]} Oh those. I had forgotten about them :) I will change these to \getvariables. As, \setupmodule is just \getparameters with a few defaults in place, I can also use \getparamters with \currentmoduleparamters. You use \currentmoduleparameter only in t-simpleslides to load a style file but \moduleparameter is used many other files to setvariables etc. and the last one is more like \getvariables (which use rawparameters) I agree. 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. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
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]}% \processassignmentlist[#2]{\doabortmodule{#1}}% \else \getparameters[\??md:\currentmodule:][#1]% \expanded{\getparameters[\??md:\currentmodule:][\the \scratchtoks]}% \processassignmentlist[#1]{\doabortmodule\currentmodule}% \fi \let\currentmoduleparameters\empty} Wolfgang ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
On Mon, 24 Aug 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. Thanks for clarifying. I also think that it is better to do this selectively for each module rather than in the core. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
Am 22.08.2009 um 13:47 schrieb Oliver Buerschaper: What's more important, the exit status of the context command is 0 (via echo $?) indicating that there was no problem at all! This might turn out problematic as soon as documents are processed in a batch run ... (like e.g. a regression test suite ;-) *You* want to write a test suite for ConTeXt? Perhaps one could even integrate this requirement check into the module loading code of the kernel. For example, one might enforce that each valid module has to declare a field like minkernelversion in its header ... just thinking out loud. The problem with such systems is they lead always to incompatibilities with older ConTeXt installations (think about TeXLive) and we had one at the end of last year when Hans changed the multilingual interface to allow a persian interface. Wolfgang ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
On Sun, 23 Aug 2009, Wolfgang Schuster wrote: Am 22.08.2009 um 13:47 schrieb Oliver Buerschaper: What's more important, the exit status of the context command is 0 (via echo $?) indicating that there was no problem at all! This might turn out problematic as soon as documents are processed in a batch run ... (like e.g. a regression test suite ;-) *You* want to write a test suite for ConTeXt? The test suite is there. There is even a script in the test suit that compares the outputs of two versions at pixel level. All we need is people to submit tests and then someone to monitor the test suite. See http://wiki.contextgarden.net/Test Perhaps one could even integrate this requirement check into the module loading code of the kernel. For example, one might enforce that each valid module has to declare a field like minkernelversion in its header ... just thinking out loud. The problem with such systems is they lead always to incompatibilities with ConTeXt installations (think about TeXLive) and we had one at the end of last year when Hans changed the multilingual interface to allow a persian interface. Loading of lua files has this feature. For modules, asking for a minimum kernel version is no guarantee that the module will work with future versions of ConTeXT :-) Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
What's more important, the exit status of the context command is 0 (via echo $?) indicating that there was no problem at all! This might turn out problematic as soon as documents are processed in a batch run ... (like e.g. a regression test suite ;-) *You* want to write a test suite for ConTeXt? Well, not exactly ... this might be too ambitious an endeavour for one person alone ;-) I'm trying though to store a bunch of test cases locally which I sporadically collect from the main mailing test whenever a bug report shows up. If only to have something I can test my installation package against ... For the moment I'm mainly interested in whether these test cases compile at all hence my remark about the exit status ... (After all, if that can't be automated any further verification steps will be pretty much useless I guess.) Perhaps one could even integrate this requirement check into the module loading code of the kernel. For example, one might enforce that each valid module has to declare a field like minkernelversion in its header ... just thinking out loud. The problem with such systems is they lead always to incompatibilities with older ConTeXt installations (think about TeXLive) and we had one at the end of last year when Hans changed the multilingual interface to allow a persian interface. I agree that my suggestion would sacrifice backwards compatibility. At the same time I'm not sure how much change to the MkIV kernel is desirable given that MkII is considered frozen. I'm really in no position to have an educated opinion on whether there should be as few changes as possible or rather the occasional clear cut. It's just that if you guys think that some clear cuts are due for MkIV anyway then there will probably be never a better time than now to make module loading more bullet-proof. As I was saying, I'm just thinking out loud ;-) Oliver ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
Am 23.08.2009 um 17:22 schrieb Aditya Mahajan: *You* want to write a test suite for ConTeXt? The test suite is there. There is even a script in the test suit that compares the outputs of two versions at pixel level. All we need is people to submit tests and then someone to monitor the test suite. See http://wiki.contextgarden.net/Test Is this still alive and used? Wolfgang ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
Am 23.08.2009 um 17:52 schrieb Oliver Buerschaper: I agree that my suggestion would sacrifice backwards compatibility. At the same time I'm not sure how much change to the MkIV kernel is desirable given that MkII is considered frozen. I'm really in no position to have an educated opinion on whether there should be as few changes as possible or rather the occasional clear cut. It's just that if you guys think that some clear cuts are due for MkIV anyway then there will probably be never a better time than now to make module loading more bullet-proof. As I was saying, I'm just thinking out loud ;-) MkIV is ConTeXt’s feature without an doubt but it's not so easy as you think. I have myself two modules which work only with MkIV (simplefonts and games) but bigger ones like simpleslides or letter are just complexer styles and you can't expect from a user to upgrade to MkIV just to make a presentation or to write a short letter. 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. Wolfgang ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
On Sun, 23 Aug 2009, Wolfgang Schuster wrote: Am 23.08.2009 um 17:52 schrieb Oliver Buerschaper: I agree that my suggestion would sacrifice backwards compatibility. At the same time I'm not sure how much change to the MkIV kernel is desirable given that MkII is considered frozen. I'm really in no position to have an educated opinion on whether there should be as few changes as possible or rather the occasional clear cut. It's just that if you guys think that some clear cuts are due for MkIV anyway then there will probably be never a better time than now to make module loading more bullet-proof. As I was saying, I'm just thinking out loud ;-) MkIV is ConTeXt’s feature without an doubt but it's not so easy as you think. I have myself two modules which work only with MkIV (simplefonts and games) but bigger ones like simpleslides or letter are just complexer styles and you can't expect from a user to upgrade to MkIV just to make a presentation or to write a short letter. 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. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
Am 21.08.2009 um 22:45 schrieb Jörg Hecke: Ahh many thanks for the links. I have not looked at the modules site. I'll download it right away and will try to get it work in the standard TeXlive Context (MKII) distribution. The typescripts in the package work only with LuaTeX or XeTeX, to use them with TeXLive 2008 process your files with 'texexec --xetex filename'. There will be *no* support for pdfTeX from me. Wolfgang ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
Would it then be possible to have ConTeXt grind to a complete halt once it encounters a module whose minimum requirements aren't met? \doifolderversionelse\contextversion{2100.01.01}\normalend\donothing %\doifolderversionelse\contextversion{2009.07.01}\normalend\donothing \starttext Hello \stoptext That's great! It's almost what I was looking for ... yet I think \normalend might not be drastic enough ;-) Namely, running this example with context test.tex gives me the following terminal output: --- MTXrun | run 1: luatex --fmt=/Users/oliver/.context/2009-06-13-beta/ luatex-cache/context/18b584d8d585db5fc4cbfa8499d343d8/formats/cont-en --lua=/Users/oliver/.context/2009-06-13-beta/luatex-cache/context/ 18b584d8d585db5fc4cbfa8499d343d8/formats/cont-en.lui --backend=pdf ./ general-0002.tex This is LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009) \write18 enabled. (general-0002.tex color : system all is global activated color : system gray is global activated color : mpcmyk color space is supported color : mpspot color space is supported color : system rgb is global activated color : system all is global activated ConTeXt ver: 2009.06.13 13:37 MKIV fmt: 2009.8.15 int: english/ english system : cont-new loaded (/usr/local/context/2009-06-13-beta/texmf-context/tex/context/base/ cont-new.tex systems : beware: some patches loaded from cont-new.tex (/usr/local/context/2009-06-13-beta/texmf-context/tex/context/base/ cont-new.mkiv) (/usr/local/context/2009-06-13-beta/texmf-context/tex/ context/base/cont-mtx.tex)) system : cont-fil loaded (/usr/local/context/2009-06-13-beta/texmf-context/tex/context/base/ cont-fil.tex loading : ConTeXt File Synonyms ) system : cont-sys.rme loaded (/usr/local/context/2009-06-13-beta/texmf-context/tex/context/user/ cont-sys.rme (/usr/local/context/2009-06-13-beta/texmf-context/tex/ context/base/type-tmf.tex) (/usr/local/context/2009-06-13-beta/texmf- context/tex/context/base/type-siz.tex (/usr/local/context/2009-06-13- beta/texmf-context/tex/context/base/type-siz.mkiv)) (/usr/local/ context/2009-06-13-beta/texmf-context/tex/context/base/type-otf.tex (/ usr/local/context/2009-06-13-beta/texmf-context/tex/context/base/type- otf.mkiv))) system : general-0002.top loaded (general-0002.top) fonts : preloading latin modern fonts bodyfont: 12pt rm is loaded language: language en is active ) mkiv lua stats : used config path - /usr/local/context/ 2009-06-13-beta/texmf/web2c/texmf.cnf mkiv lua stats : used cache path - /Users/oliver/.context/ 2009-06-13-beta mkiv lua stats : input load time - 0.022 seconds mkiv lua stats : stored bytecode data - 170 modules, 45 tables, 215 chunks mkiv lua stats : cleaned up reserved nodes - 18 nodes, 8 lists of 1411 mkiv lua stats : node memory usage - 18 glue_spec, 2 dir mkiv lua stats : loaded patterns - en:us:pat:exc:2 mkiv lua stats : startup time - 0.706 seconds (including runtime option file processing) mkiv lua stats : callbacks - direct: 56, indirect: 4741, total: 4797 mkiv lua stats : loaded fonts - 31 files: lmmono12- regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9- bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf eufb10.tfm eufb7.tfm eufb9.tfm eufm10.tfm eufm7.tfm eufm9.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm mkiv lua stats : fonts load time - 0.369 seconds mkiv lua stats : result saved in file - general-0002.pdf mkiv lua stats : luatex banner - this is luatex, version beta-0.40.5 mkiv lua stats : control sequences - 29596 of 165536 mkiv lua stats : current memory usage - 29 MB (ctx: 29 MB) mkiv lua stats : runtime - 1.242 seconds MTXrun | total runtime: 1.270 --- This states erronously that the result was saved in a PDF file (sixth line from the bottom) although it wasn't (which is correct, of course). What's more important, the exit status of the context command is 0 (via echo $?) indicating that there was no problem at all! This might turn out problematic as soon as documents are processed in a batch run ... (like e.g. a regression test suite ;-) Since TeX would have to give up on the document anyway perhaps an early bail out could be the more graceful option ... what do you think? I can add this test to my module together with a message at the terminal. This would be wonderful! Perhaps one could even integrate this requirement check into the module loading code of the kernel. For example, one might enforce that each valid module
Re: [dev-context] Mac installation package
Oliver Buerschaper wrote: Would it then be possible to have ConTeXt grind to a complete halt once it encounters a module whose minimum requirements aren't met? \doifolderversionelse\contextversion{2100.01.01}\normalend\donothing %\doifolderversionelse\contextversion{2009.07.01}\normalend\donothing \starttext Hello \stoptext That's great! It's almost what I was looking for ... yet I think \normalend might not be drastic enough ;-) Namely, running this example with I'll add: \unprotect \def\forcequitjob#1% {\writestatus\m!systems{forcing quit: #1}% \batchmode \dorecurse\textlevel\stoptext \normalend} \protect \starttext test \forcequitjob{whatever} \stoptext - 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 - ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
Am 20.08.2009 um 22:26 schrieb Jörg Hecke: There is a package with typescripts (including Myriad Pro) on the garden you can use. Thanks for that tip. You mean here: http://wiki.contextgarden.net/TypeScripts ? Can't find that package there. Seems to be a little bit tricky to find. I'll keep on searching. The zip is here http://modules.contextgarden.net/typescripts and the dev version can be found at http://bitbucket.org/wolfs/typescripts/ but as i don't need them myself other users are needed to add more typescripts. Wolfgang ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
t-simplefonts-2009.07.14.zip Wow. I have used the attached version and it worked right out of the box with the Context Minimals version installed by the installer of Oliver and his instructions. You can try the following version http://bitbucket.org/wolfs/simplefonts/src/0a2adbda3117/files/t-simplefonts.tex (or use the attached version, was on the garden afair) but i won't provide support in the case there is a problem with them. Yes, I understand that. Many thanks for your help! The simple test file runs just fine right now. There is a package with typescripts (including Myriad Pro) on the garden you can use. Thanks for that tip. You mean here: http://wiki.contextgarden.net/TypeScripts ? Can't find that package there. Seems to be a little bit tricky to find. I'll keep on searching. Many thanks for your help so far! Regards Jörg ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Mac installation package
Dear all, I've finally got around to actually make the Mac installation package happen :-) So please find a test version of the package (for Intel Macs running Tiger or higher) at http://svn.contextgarden.net/minimals/installer/osx/ This package is identical to the Minimals distribution as of 2009.06.11 13:24 except for the following: 1. It only contains MkIV 2. Configuration files are adapted to Mac OS X 3. It doesn't contain scripts etc. needed for other platforms The installation experience should be rather pleasant, since you'll just have to double-click the installation package. After the installation is complete head over to System Preferences TeX Distribution and you should find a new item called ConTeXt 2009-06-11-beta alongside MacTeX 2008 etc. This means that by now you should be able to typeset your documents with a simple context myfile.tex in the Terminal. (TeXShop support is easy and will be included in the next revision.) For the more curious: the package installs its TDS to /usr/local/ context/2009-06-11-beta and sets up a per user cache at ~/.context/ 2009-06-11-beta. The directory for user additions is ~/Library/texmf and is shared with TeXLive. Fonts installed at the usual locations in Mac OS X should be recognized by ConTeXt as well. For the even more curious, there's also a readme file in the disk image ;-) I'd be glad if as many people as possible on this list would give it a try and report back their experience. Once the package turns out to work as intended I'll make it available to the wider public. Many thanks in advance to all testers! Happy TeXing, Oliver PGP.sig Description: Signierter Teil der Nachricht ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
Oliver Buerschaper wrote: in the Terminal. (TeXShop support is easy and will be included in the next revision.) then also consider texworks thanks Hans - 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 - ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context