I thought I’d seen something similar to this but I can’t find it.
Some of the publishers I work for require that parentheses be italicized if the text immediately inside BOTH of them is italic (even if not all text inside is). The writers and editors don’t seem to get it, so I end up with a lot of pairs that are not italic at all when they should be, other pairs with one of each, etc. I Would like to be able to do a search for any PAIR of ( and ) where the ( is followed by an italic character AND the ) is preceded by an italic character.
Other publishers I work for require that no parentheses be italicized unless they’re in a string of text that is italic inside AND outside of them, so I guess that would be a similar operation, though spaces or punctuation immediately before or after the parentheses could mess it up if they’re not italic.
It would be nice to be able to do the same thing to look for italic (or bold etc.) characters followed immediately by , ? ! etc. that need to be italicized. I asked about this at PepCon in Chicago years ago and was told there’s no way to do it because it involves searching for multiple styles at once. In other words, you can search for a string in italics that’s followed by a comma, but won’t find any where the comma isn’t also italic. I feel like I’ve seen something to the contrary since, but my hunts are coming up empty.
In the past I’ve done it with character styles by making an italic style that’s a bright color (or highlighted using a fat offset colored underline) and another style in a contrasting color that gets applied to all the parentheses (or commas or whatever). Then I have to look through the whole thing for places where they butt up against each other. A search would be better for many reasons.