Difference between revisions of "Command/setvariables"

From ConTeXt wiki
Jump to navigationJump to search
(new category; autosyntax)
m (Hraban moved page setvariables to Command/setvariables: is a syntax description)

Revision as of 15:25, 20 December 2019

\setvariables

Syntax

\setvariables[...][...=...,...]
[...]name
setcommand
resetcommand
keyvalue


Description

Assign values to variables in a namespace. For exmaple, if you use:

\setvariables
    [var]
    [
      a=1,
      b=2,
      c=3,
    ]

then, \getvariable{var}{a} returns 1, etc.


Also see Setups.

Example

% \setups[namespace:set] is automatically called right after 'set' is assigned
\setvariables[namespace]
  [set={\setups[namespace:set]},
   key={Apples are \applecolor!},
   reset={\setups[namespace:reset]},
  ]
  

See also


Help from ConTeXt-Mailinglist/Forum

All issues with: