[NTG-context] Passing and retrieveing a variable

Peter Münster pmlists at free.fr
Wed Jan 5 21:11:51 CET 2011


Procházka Lukáš <lpr at pontex.cz> writes:

> I'd need to pass a variable to Ctx and to retrieve it inside a
> compiled document - via Ctx itself and also by Lua.

Hello,

% cmd-line: context --arguments=testvar=my-value test
\starttext
value of testvar: \env{testvar}

with lua: \ctxlua{tex.print(document.arguments.arguments)}
\stoptext

There is perhaps a nicer solution in lua.

Peter

-- 
Contact information: http://pmrb.free.fr/contact/


More information about the ntg-context mailing list