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

GREP style to exclude superscripts

New Here ,
May 07, 2025 May 07, 2025

Hi!  I'm very new to GREP styles but created one so that all numbers in this paragraph style are bolded. 

Screenshot 2025-05-07 at 3.41.20 PM.png

 

In many cases, some numbers are superscripted. I do NOT want superscripted numbers to be bold. How can I fix this? Thanks in advance 🙂

Screenshot 2025-05-07 at 3.41.30 PM.png

  

TOPICS
How to , Type
413
Translate
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 07, 2025 May 07, 2025

You could add a negative lookbehind to exclude digits if they are preceded by a lowercase letter:

Capture d’écran 2025-05-07 à 23.11.28.pngCapture d’écran 2025-05-07 à 23.15.38.png

 

Translate
Community Expert ,
May 07, 2025 May 07, 2025

Hi @emaste49523827076jaw3:

 

Is the 5 a footnote number or did you type it yourself?

 

In my example below, \d+ formats the typed digits but not the note numbers (footnote or endnote).

 

~Barb

 

2025-05-07_12-56-15 (1).gif

Translate
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
Community Expert ,
May 07, 2025 May 07, 2025

And thinking about the alternative, if you are manually adding supercript numbers for some reason beyond footnotes/endnotes, the character style you use to assign the superscript could also change the style to regular without impacting the other digits.

 

~Barb

 

2025-05-07_13-02-34 (1).gif

Translate
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
Community Expert ,
May 07, 2025 May 07, 2025

You could add a negative lookbehind to exclude digits if they are preceded by a lowercase letter:

Capture d’écran 2025-05-07 à 23.11.28.pngCapture d’écran 2025-05-07 à 23.15.38.png

 

Translate
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 ,
May 08, 2025 May 08, 2025

this did it! i knew there was a simple answer I wasn't finding on the internet. thank you so much for the quick response. 

Translate
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
Community Expert ,
May 08, 2025 May 08, 2025
LATEST

Glad it works for you, but as @Barb Binder wrote, why don't you use footnotes for the superscrpited numbers?

Translate
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