Mobile app version of vmapp.org
Login or Join
Alves566

: GREP - Apply Character Style until carriage return Is there a way to tell InDesign via GREP to apply a Character Style to the first paragraph of a text box before a carriage return? Not a

@Alves566

Posted in: #AdobeIndesign #CharacterStyles #Grep

Is there a way to tell InDesign via GREP to apply a Character Style to the first paragraph of a text box before a carriage return? Not a forced line break. A carriage return.

Thank you

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves566

3 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley591

There's a much easier way to achieve the effect you're after: that is, applying style-A to the first paragraph and style-B to the remainder. InDesign has a feature for it.

Set up two Paragraph Styles as you'd like them. Then, edit style-A by setting it's "Next style" to style-B. (Next Style is found on the general tab of Paragraph Style Options.)

Then, with your text box selected, right click on style-A in your Paragraph Style and choose "Apply style-A then Next Style". (This is a context sensitive option and won't appear unless you have made a valid selection like a text box or a text selection of more than one paragraph.)

One advantage of this approach is more than two styles can be chained together. For example if you had a heading, subheading, first paragraph and normal paragraph you can apply them all in one hit. And its more obvious than GREPping.

10% popularity Vote Up Vote Down


 

@Margaret771

This regular expression does it:

A[^r]+

10% popularity Vote Up Vote Down


 

@Tiffany317

I don't think it's possible because in Indesign there is no carriage return character to define the end of a line the way you are thinking.
There is a hard return that defines the end of a paragraph, and there is a soft return that defines a forced line break.

The only way I know to style the first line is with a Nested Line Style. (bottom of the example pic)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme