We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
I am making a brochure in InDesign, but I could not seem to be able to use nested styles to make the first letter of each word a different color. Is there a way to do this or it is not possible?
I am using InDesign 2017 in a Mac.
No, I don't believe you can use nested styles to do this. With nested styles, each unique glyph you add to the nested style can trigger on particular character style. And one particular character style can only set on particular swatch color.
I imagine it could be scripted, however (but I'm not a scripter).
Thanks for the reply. I found an alternative:
First setting the paragraph to have the first letter of the word a different color. Then adding a second nested style to make the rest of the word another color. I would then repeat these steps over and over again for each word. This means that each word on the line would have 2 nested styles. Then I would just press enter to start a new line which runs the nested style from the top again.
You could do it with a GREP style automatically.
Right. I thought as well of that but I was convinced a nested style would work. (Quite a surprise it doesn't.)
Depending on how narrow or wide the definition of a "word" is, this may already do it:
One possible drawback is that the default "word" characters include digits as well. If those should not be included, you'd have somthing like
where the \u is for uppercase and the \l ("ell", not "Eye") is for lowercase.
Both these GREP expressions depend on the correct interpretation of "\b" for a "word break" boundary. If you find it highlight characters where it should not, let us know and we'll look for an alternative.
I would do this with nested styles, but it depends how long your text is as you would need to manually add each nested style - fortunately you can repeat them. You essentially need a colour running through each letter, followed by a regular nested style (ie black in this case) running through the word, then the next colour, etc.