Hello, I'd need to pass a variable to Ctx and to retrieve it inside a compiled document - via Ctx itself and also by Lua. Something like modes; but modes allow just to check whether they are on or off. I'd need something like this:
Calling context.exe: --- call context.exe test.mkiv --mode:MyMode --variable MyVariable=AAA --- And test.mkiv: --- \starttext Hello \doifmode{MyMode}{Being in MyMode} \ifvariableequal{MyVariable}{AAA}{MyVariable is \MyVariable} % Something like this \startluacode if context.variables.MyVariable == "AAA" then context("MyVariable is defined.") -- Something like this end \stopluacode \stoptext --- Simply said, I'd need to provide a conditional (or: dependent) compilation of the input file. How to handle this? Best regards, Lukas ___________________________________________________________________________________ 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 ___________________________________________________________________________________