I am re-typesetting a book to be published in its second edition. I have inherited the InDesign files from the designer who set the original book, and there are certain things that lead me to believe that… well, that the guy knew nothing about how to use InDesign.
One of these things is that every time there’s a header, the paragraph following the header (which is supposed to be in some sort of [Basic Paragraph] with no first-line indent style) has the same header style as the preceding header, only manually overridden to look like [Basic Paragraph] with no first-line indent.
Given that there are perhaps 250 or 300 headers in this book (and that the InDesign files have plenty of other problems apart from this), I would really, really like to be able to automatically change this. I am assuming a GREP find-and-replace is probably my best bet, but I cannot figure out any way to actually do it. Sadly, as far as I know, you cannot specify styles in GREP lookbehinds, and my InDesign scripting skills unfortunately leave an awful lot to desire.
Searching around, I find that this can be done with in-tools.com’s Style Utilities, but that’s $39 that I’d really rather not spend just for this. I will if I have to, but if there’s a free way, I would much prefer that.
Is there a (free) way—using GREP or otherwise—to search for multiple paragraphs in a row that have the same paragraph style applied, and then apply a different style to all but the first of these paragraphs?