Difference between revisions of "Command/setvariables"
< Command
Jump to navigation
Jump to search
(created page) |
m |
||
Line 6: | Line 6: | ||
== Description == | == Description == | ||
− | Assign values to variables in a namespace. | + | Assign values to variables in a namespace. For exmaple, if you use: |
+ | <texcode> | ||
+ | \setvariables | ||
+ | [var] | ||
+ | [ | ||
+ | a=1, | ||
+ | b=2, | ||
+ | c=3, | ||
+ | ] | ||
+ | </texcode> | ||
+ | |||
+ | then, <code>\getvariable{var}{a}</code> returns <code>1</code>, etc. | ||
+ | |||
+ | |||
+ | Also see [[Setups]]. | ||
== Example == | == Example == |
Revision as of 14:34, 20 March 2016
\setupvariables
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: