The following command of the forarray package
\ForEach{,}{\thislevelitem(\the\thislevelcount) : }}{x,y,z}
produces the output
x(1) : y(2) : z(3) :
I want to have the same output without the last ":".
The forarray package does not provide any command like \maxount to test if \thislevelcount == \maxcount. Surly I could test for the first item \thislevelcount == 0 but what to do if this cannot be done for some reason?
How can I process the last item separately if the number of items is variable/unknown?


totcountpackage. Basically the package requires two passes. On the first pass it writes the final value of the counter to the aux file and on the second pass it reads the value. – StrongBad Jun 12 '12 at 13:09