restructure to assign value to variables in code blocks then emit after end of block
do nested capture blocks work?
yes, though some care is needed
JB/pages_list is done with very good results.
provide optional indent level information to called / included procedures, to help beautify the generated html.
JB/pages_list currently has a hard-coded indent prefix. Some added logic could change that to use what was provided by the caller, using the same general logic as the group variable. Use it when it exists; use a default value when it does not.