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

Nested or GREP style for forcing a line break

Community Beginner ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Hi all,

I've been away from using nested or GREP styles for a long time and a solution is eluding me. I'm working on a very long mobile document with lists of references that link to the related content.

The lists are separated by a semicolon initially as below:

w14 12/15 7-10; w14 8/15 29-30; w14 7/15 8 pars. 4-6; w14 2/15 26-27; w13 7/15 5 par. 8; 13-14 pars. 16-17, endnotes; 20-25; w11 7/15 24, 28; w10 7/15 20-23; w09 4/15 12-13; w08 2/15 23-24; w95 5/15 21-22, 24-26; w94 2/15 19-20 pars. 14-18; kr 11-12 pars. 16-20; 90-91; ia 142 box

I need to format them with a forced line break after each semicolon as below:

w14 12/15 7-10;

w14 8/15 29-30;

w14 7/15 8 pars. 4-6;

w14 2/15 26-27;

w13 7/15 5 par. 8; 13-14 pars. 16-17, endnotes;

20-25; w11 7/15 24, 28;

w10 7/15 20-23; w09 4/15 12-13;

w08 2/15 23-24; w95 5/15 21-22, 24-26;

w94 2/15 19-20 pars. 14-18;

kr 11-12 pars. 16-20; 90-91;

ia 142 box

Any input on how to create this style is greatly appreciated.

Views

1.5K

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

Mentor , Aug 01, 2017 Aug 01, 2017

You can’t add nor remove any character (including forced line break) using style, be it para, char, grep or nested style, only format.

In your case, plain Find/Change might work. In Text tab:

Find: ;

Change to: ;^n

Votes

Translate

Translate
Mentor ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

You can’t add nor remove any character (including forced line break) using style, be it para, char, grep or nested style, only format.

In your case, plain Find/Change might work. In Text tab:

Find: ;

Change to: ;^n

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
LEGEND ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Just for comment! … and with Grep Styles!

Capture d’écran 2017-08-01 à 22.06.55.png

(^/) 

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
Community Expert ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Yeah, applying No-Break works ... right until one of the lines is too long. The find&change doesn't have that problem.

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
LEGEND ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

I don't use "no-break"! 

Capture d’écran 2017-08-01 à 22.57.20.png

(^/)

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
Community Beginner ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Ok. That explains why I couldn't figure it out.

Thanks for the help.

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
Community Beginner ,
Nov 02, 2021 Nov 02, 2021

Copy link to clipboard

Copied

LATEST

I can't figure it out. What is the character style? What really brought me here is a search to find a way to keep short Russian prepositions with the next word. The proofreader commented for each to move to the next line:

stevef46475248_4-1635863629162.png

 

 

currently if I apply a nobreak character style to "в[space]" of course it includes any Ð² also at the end of a word, and will force both words to the next line. As in this example, "миллионов"

stevef46475248_5-1635864321533.png

 

 

if I try to avoid that with the Find is: [space]в[space] there is a different problem: the nobreak understakeeps the previous word together

 

stevef46475248_8-1635864722407.png

The search goes on, but if you had a suggestion...? 

 

 

 

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