Skip to main content
SuzzyFlamingo
Inspiring
April 30, 2025
Question

Char style to first word of paragraph

  • April 30, 2025
  • 3 replies
  • 1510 views

Hi, Dear Friends!

I think this question has been addressed before, but I don't recall the final verdict.

Is there a way to have a certain PAR style cause the first word of that paragraph to have a certain character style? Or as a workaround to cause ID to format the first word of all, or some, paragraphs with a certain character style.

Thank you, and have a good day!
Susan Flamingo

3 replies

JR Boulay
Community Expert
Community Expert
May 1, 2025

You're quibbling, whatever the implementation method, it's always regular expressions under the hood.

Acrobate du PDF, InDesigner et Photoshopographe
Community Expert
May 1, 2025

Interesting take on it - can you share where you found this information? 

I am pretty sure that it's not using the same engine as GREP - but would love to know more about it and if you have any information or resources to share it'd be great to read up on. 

 

I thought I explained it wasn't quite well, but you have piqued my interest to learn more.

JR Boulay
Community Expert
Community Expert
May 2, 2025

Please, be lenient since English is not my native language.

I didn't mean to imply that they were the same engine, I just meant that no matter how you implement them, it's always regular expressions that are under the hood.

Acrobate du PDF, InDesigner et Photoshopographe
JR Boulay
Community Expert
Community Expert
April 30, 2025

I've got a question for those who believe that nested styles do better and perform better than GREP styles:

what engine do you think is under the hood of nested styles?

GREP or magic?

 

Acrobate du PDF, InDesigner et Photoshopographe
Robert at ID-Tasker
Legend
April 30, 2025

@JR Boulay

 

😄 Nested are much simpler in implementation and were first - so most likely two different "technologies".

 

You don't have dynamic comparison - just character/glyph or word.

 

SuzzyFlamingo
Inspiring
April 30, 2025

I needed this really fast for a job toady, so I "cheated" and asked ChatGPT and here is the answer it gave:

To use a grep style within the paragraph style and use the syntax: ^\w+ and apply the character style.

Actually worked.

I wonder if this community will someday be connected to an AI LLM system for instant answers to posted questions. It could be done in a day of programming, I think. But thanks to all anyway!

Thank you, and have a good day!
Susan Flamingo

 

Community Expert
April 30, 2025

Yeh that's the way to do it.

 

You can also use Nested Styles and apply it the first word. 

 

Using ChatGPT is not cheating, it's working smart. 

 

I'd hate the forums to be automated messaging, it's a user to user forum. 

 

TᴀW
Legend
April 30, 2025

And in fact I think that nested styles is the better option. Paragraph GREP styles that are heavily used in a document can cause slowdown...

 

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators