Is there a simple way to calculate number of symbols in headings?
I'm planning to change color and size of every even to red 16pt and every odd to blue 10pt.
Like this one made in word:
Or maybe there is another way to do it?
As I see now, I need to use some kind of for loop to work my problem out, but how it should be done using "word" as array of symbols I do not know. For a loop I would need some condition to test whether the loop should terminate. In object oriented programming this would be something like
for (i <= word.length) do alternate color and size
But I have no idea if there is a way in TeX to get something like