We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Is is possible to insert tabs using a GREP style?
I have a ToC text style that has a nested style (italics) through two tabs, then the normal style.
I want it to look like this when I update the ToC:
The head style it is using to make the ToC has a space and a soft return betwen it and rest of the headline. That's fine, as the soft return gets removed and the third tab with leader dots gets inserted when the TOC generates. What I am wondering is there a GREP STyle I can write to have it insert the first and second tabs automatically?
GREP Styles can't add text, they can only style it. You would have to run a Find/Change to insert the tabs.
Why not let the ToC generator do it? It is something you switch on in the dialog box
I don't think that's possible. You're asking the TOC command to either insert a tab within the chapter name (e.g. between "One" and "Discovering Your Inner Child") or to number the chapters as a string.
Okay, I couldn't do it as a GREP style but I could run a find change afterward. Does anyone know what the strings would be?
I know that beginning of paragraph is ^ So for the first tab it could be:
Change: \t$0 (tab found text)
but I don't know how I'd do the second tab.
I DID IT!! Yay me.
Find: ^\w+(\s) Beginning of ¶, a word, a space
Change: \t$0\t A tab, found word, a tab
So glad I found this, it was a lifesaver!