Folks,
The following macro “list-items” runs on the prerelease ONLY and it lists items using the new counter variable. Try an alternate filter.
\define list-items(filter:"[tag[TableOfContents]]")
<$set name=items filter="$filter$ +[count[]]">
<$list filter="$filter$" counter=item>
<<space-items>>. <$link/><br>
</$list>
</$set>
\end
\define space-items(max)
\whitespace trim
<$set name=max value="$max$" emptyValue=<<items>> >
<$set name=places filter="[<max>length[]]">
<$set name=magnitude filter="[[10]power<places>]">
<$text text={{{ [[$(item)$]divide<magnitude>fixed<places>removeprefix[0.]] }}}/>
</$set></$set></$set>
\end
<<list-items>>
The second macro space-items makes use of the variables <<item>> and <<items>>
and provides leading zeros “000” so all the numbers align. This may useful in itself however I would like the leading zeros to be replaced with spaces and not disappear from the result, so the numbers all remain aligned.
I am posting to see if anyone can solve this problem with the “space-items” macro or has a better way to do it altogether.
Once solved I will move to How to with an ! not a ? in the title.