On Fri, 18 Sep 2009, Peter Münster wrote:
> I've a little feature request:
> It would be nice, to have a command line option like "--setvalue x=y" or
> similar for the "context" command to define a variable for the job.
>
> Modes are already very nice, but often I need just one value for
> conditional compiling a document instead of many binary switches.
>
> Perhaps the "context --arguments" option is what I'm looking for, but I
> didn't find how to use it.
Hello,
After reading a bit in mtx-context.lua, I've found out how to use
--arguments:
test-file:
\starttext
Value of myVar: \ctxlua{tex.print(document.arguments["arguments=myVar"])}
\stoptext
cmd-line:
context --arguments=myVar=myValue test
But this syntax is very strange!
This would be much nicer:
Value of myVar: \getvariable{environment}{myVar}
Perhaps there is just a bug in the evaluation of environment.arguments?
That means, instead of using the first equal sign (=) for generating the
key/value pair, the last one is used.
> Another option would be, to make the name of the result-file
> ("context --result=...") available, for example as "\resultname".
Is this the right way to go: \systemparameter{file} ?
Cheers, Peter
--
Contact information: http://pmrb.free.fr/contact/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________