GREP styles cannot add text; you need a GREP Find-and-replace for this, and thus, you cannot do it inside a paragraph style, you need to do it every time you re-generate your TOC.
Fortunately, it's a doozy, as far as that's an appropriate term for anything GREP. Search for this:
and replace with this:
It will add the text before every paragraph that starts with a digit, so if you only need it to apply to some level (with, obviously, a unique paragraph style of its own), set this paragraph style in the Find Formatting section of the Find GREP dialog.
.. Come to think of it, perhaps there *is* a way to set in in your paragrpah style. Perhaps a custom bullet can do it! Not behind my computer, though, so I cannot try that out. If it works, the obvious advantage is that it's in your style definition, and so it *will* appear automagically if you generate your TOC.
1 person found this helpful
You can create an autonumbered list format that includes text like "Chapter " along with numbers, for the TOC paragraph style, so no scripting needed. Search Google for terms like "InDesign numbered list format text," without quotes for details.
I have set up my TOC for my book just fine. In my Contents, the headings from each chapter are pulled in and used as the entries for the TOC, then followed by its page number.
I would like to add a word (the word "Chapter") before each numbered contents entry. Would I use GREP styles for this?
I'm using CS5.
Perfect. This is what I was looking for, thank you both! And no need for GREP, have to learn that in the next project.