[NTG-context] passing variables/data between context and lua
wolfgang.schuster.lists at gmail.com
Sun Oct 6 22:44:12 CEST 2019
Rudolf Bahr schrieb am 06.10.2019 um 07:11:
> Hello Wolfgang,
> what exactly does the command
Let's start with a simple example where I set a values with the
The main point of the command is that you can choose whatever name you
want for the keys to store the values.
Instead a using a list of values to store in a key-value-method you can
also pass values to single keys with the \setvariable command, e.g.
While it is true that you're free to choose the name for the keys there
are two keys with a special meaning, these two keys are "reset" and
"set". The value of the "reset" key is used before the values in
\setvariables are stored while "set" is used after the values are stored.
> I don't understand it. Has it something to do with "Command/datasetvariable"?
No, this is a different mechanism to save values between different
ConTeXt runs which allows one to access values before they are set.
> Especially what does "\directsetup"?
When you access the content of a setups-environment you can use the
\setups command (with a trailing s) to pass a list of setups or the
\setup command, both commands allow you to use braces or brackets as
delimiters for the argument. The \directsetup skips the check for the
argument form and allows only braces as delimiter.
More information about the ntg-context