Skip to main content
Bedazzled532
Inspiring
May 8, 2023
Answered

Nested style or Grep to affect start and end of a sentence

  • May 8, 2023
  • 2 replies
  • 790 views

Hello

I have translation lines in 3 different scenarios.

 

Scenario 1:

Translation: This is my translation (Book : 2:35)

Translation: This is my translation and the translation is too long to fit in single line. I have to press enter or soft enter as per requirement (Book : 2:35)

 

In these scenarios I want "Transltion:" to be bold (though a char style) and "(Book: 2:35)" to be bold and samller in size (through another character style)

 

Scenario 2:

Translation: This is my translation (Book : 2:35)  

 

Translation: This is my translation and the translation is too long to fit in single line. (new line char given here)

I have to press enter or soft enter as per requirement (Book : 2:35)

 

Scenario 3:

Translation: This is my translation (Book : 2:35)

Translation: This is my translation and the translation is too long to fit in single line. (soft enter here)

I have to press enter or soft enter as per requirement (Book : 2:35)

 

How do I do this using Nested style or GREP style. GREP style would be helpful. I can find text within parenthesis easily using GREP but I only want to capture when its at the end of line as in above example.

 

GREP I used was : \(.+?\)   (Not in the screenshot)

 

This topic has been closed for replies.
Correct answer Peter Spier

First off, if you must force a line break you cannot use a parargraph break (enter) to do that and use nested styles since you have, by defintion, created a new paragraph.

That aside, it looks to me like you could use three nested styles like this:

Character Style 1 (which bolds the first word) through 1 :

None up to 1 (

Character Style 2 (for the number) through 1 )

A force line break would not break this, but a papagreaph return to force a new line would.

2 replies

Peter Spier
Community Expert
Peter SpierCommunity ExpertCorrect answer
Community Expert
May 8, 2023

First off, if you must force a line break you cannot use a parargraph break (enter) to do that and use nested styles since you have, by defintion, created a new paragraph.

That aside, it looks to me like you could use three nested styles like this:

Character Style 1 (which bolds the first word) through 1 :

None up to 1 (

Character Style 2 (for the number) through 1 )

A force line break would not break this, but a papagreaph return to force a new line would.

Bedazzled532
Inspiring
May 8, 2023

@Peter Spier Thanks. I will try the steps provided by you and update.

Bedazzled532
Inspiring
May 8, 2023

Ok I found a way to do it in GREP style. 

How can it be achieved in Nested style. Thanks