[NTG-context] How to store command line arguments in ConTeXt LUA Documents?

Romain Diss romain.diss at yahoo.fr
Sun Mar 13 13:43:20 CET 2016

Hi all,

Is it possible to store context command line arguments into lua

I found http://wiki.contextgarden.net/Command/getdocumentargument but it
only prints the argument. I can not store it for further processing.

What I would like to do is something like this:

-- start of the example
something = context.getcommandlineargument("ARG1") -- doesn't exist
-- make some tests here to check if 'something' has the right syntax 
context.startdocument{title = something}
-- end of the example

Then, one has just to launch:
$ context file.cld --ARG1="My first title"

Thanks in advance.

Romain Diss

More information about the ntg-context mailing list