10 Sep
2012
10 Sep
'12
11:12 a.m.
On 2012-09-10 Ian Lawrence
I'd like to pass variables into context on invocation, just as you can do with setting modes
So
context --arguments="number=8", "time=full-time" --mode=trial test.tex
context --number=8 --time=full-time test.tex
\starttext
Hello world
% This is \getvariables{arguments}{number} it. % this does not work - what do I need here to write out the next line?
This is 8.
% This is \getvariables{arguments}{time} it. % Nor does this - what do I need here to write out the next line?
This is full-time.
\stoptext
\starttext This is \doifdocumentargument{number}{\getdocumentargument{number}} it. This is \doifdocumentargument{time}{\getdocumentargument{time}} it. \stoptext Marco