37.6.6 Using list variables
in expressions
You might want to generate lists, such as lists by
level of elements above the current element (its “ancestors”);
see §37.4
Using multiple-value list variables.
In an expression, the following construct:
($$_paratag in $$mylist)
returns the value of the index for the current paragraph
format in <$$mylist>, or 0 (zero) if missing; and:
($$mylist[$$level] is $$_paratag)
You can set the list item with a normal assignment:
<$$mylist[$$level] = $$_paratag>
Previous Topic: 37.6.5 Specifying
substrings in expressions
Next Topic: 37.6.7 Using
indirection in expressions
Parent Topic: 37.6 Using
expressions in macros
Sibling Topics:
37.6.1 Understanding
macro expressions
37.6.2 Understanding
operands and operators
37.6.3 Displaying
expression results in output
37.6.4 Using
control structures in expressions
37.6.5 Specifying
substrings in expressions
37.6.7 Using
indirection in expressions
37.6.8 Removing
spaces from strings: an example