• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Replace "CO2" by a "2" in subscript

New Here ,
May 11, 2023 May 11, 2023

Copy link to clipboard

Copied

Hi everyone !
I have an InDesign document with more than 400 times "CO2". 
I absolutely need to replace all "CO2" by CO2 : the "2" has to be in subscript.
Is there a way to use the tool "Replace" with subscript ? 
Thanks

TOPICS
How to

Views

822

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 11, 2023 May 11, 2023

Use GREP!

Create a subscript character style, then create a Paragraph style that had that character style to be used with this GREP:

(?<=CO)2

 

Do you have NO2 and H2O as well? You can catch them all in one GREP:

([CN]O)\K2|(H)\K2(?=O)

Votes

Translate

Translate
Community Expert ,
May 11, 2023 May 11, 2023

Copy link to clipboard

Copied

Use GREP!

Create a subscript character style, then create a Paragraph style that had that character style to be used with this GREP:

(?<=CO)2

 

Do you have NO2 and H2O as well? You can catch them all in one GREP:

([CN]O)\K2|(H)\K2(?=O)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 08, 2024 Feb 08, 2024

Copy link to clipboard

Copied

LATEST

How can this be solved so that the "2" is not shown as a subscript but as small capital?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines