Subscript trough text search
Copy link to clipboard
Copied
I have a BIG indesign file in which CO2 is mentioned a bunch of times. The problem is that the 2 needs to be in subscript. When I use the text search function i can opt to selecte every word that is written as CO2, the only problem is that I can't change the 2 to a subscript 2, because the typing window doesn't seem to support it. Any advice on how to go about this problem?
Copy link to clipboard
Copied
You can either use GREP in Find&Change - or use GREP as part of ParaStyle options - but you need to wait for someone else to give you the phrase 😞
Copy link to clipboard
Copied
I’d go for the GREP style.
You need a character style called (for example) Sub, which makes the character subscript. Then use the GREP style panel in the Paragraph Style to apply it to all occurences of (?<=O)2.
Note that it will apply subscript to all instance of capital O followed by 2, such as H2O and O2. But I guess you would want that anyway.
Copy link to clipboard
Copied
Sorry for the typos. Occurrences and instances I meant, of course.
Copy link to clipboard
Copied
Thousand of thank you by me! You save my life!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
> all instances of capital O followed by 2, such as H2O and O2
Well, H2O isn't an instance of O followed by 2 🙂
And I would use a one-off replacement rather than a grep style: the style is executed every time a story recomposes (which happens a lot),so you can get lags.
So, in the GREP tab of the Find/Change window:
Find what: \bCO\K2
Change to: <leave empty>
Change format: subscript (or a subscript character style)
P.
Copy link to clipboard
Copied
do you only have CO2 in your document? Then I would also prefer the Grep shown by @Peter Kahrel
Or more chemical terms like that? Info: Do not use such Grep styles in large documents -> performance goes down the drain!

