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

How to put forced line break at the end of line by InDeisng Grep?

Participant ,
Mar 05, 2019 Mar 05, 2019

Copy link to clipboard

Copied

Hi,

How to put forced line break at the end of line by InDeisng Grep?

thanks in advance,

by

hasvi

Views

2.2K

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

Community Expert , Mar 06, 2019 Mar 06, 2019

Hi hasvi ,

TEXT or GREP Find/Change cannot find the end of a line of text inside a paragraph.

One can try this by scripting. However, depending on the applied paragraph composer and the justification settings of the paragraph even a scripter could get into trouble as well trying to add a forced line break.

You could search the InDesign Scripting forum for a solution:

InDesign Scripting

Regards,
Uwe

Votes

Translate

Translate
Community Expert ,
Mar 05, 2019 Mar 05, 2019

Copy link to clipboard

Copied

Can I ask why you are trying to do this?

If you are attempting to do something on per line basis it might be appropriate to use something like Nested Line Styles within Paragraph Styles.

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
Participant ,
Mar 05, 2019 Mar 05, 2019

Copy link to clipboard

Copied

Hi,

Actually as per the paragraph style my text is left alignment, but it shows some white space as marked below. Due to this we do some manual rework.

Before:

After our manual rework:

How can we arrest this by nested style or Grep, can you advice please?

by

hasvi

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 ,
Mar 05, 2019 Mar 05, 2019

Copy link to clipboard

Copied

Is this what you are trying to achieve?

justification.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
Participant ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

Hi Michael,

you are right and you catch my point. Look at your example the white space appeared after the last word of the line (.. fugias ). Here, I want to avoid this white space at the same time it should be in left alignment. For this, I want to find the last word of each line and replace with forced line break. (my idea)

What should I do for this case?

Is there any way let me know.

thanks

by

hasvi

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 ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

If this is about the hyphenation, you can turn that off in your paragraph style settings. Whatever you are trying to achieve, a forced line break on every line cannot be the best way to achieve it.

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 ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

Hi hasvi ,

TEXT or GREP Find/Change cannot find the end of a line of text inside a paragraph.

One can try this by scripting. However, depending on the applied paragraph composer and the justification settings of the paragraph even a scripter could get into trouble as well trying to add a forced line break.

You could search the InDesign Scripting forum for a solution:

InDesign Scripting

Regards,
Uwe

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
Participant ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

Ok, thanks.

by

hasvi

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 ,
Mar 06, 2019 Mar 06, 2019

Copy link to clipboard

Copied

Hi Hasvi,

I'm repeating here what I wrote in an earlier post...

Can I ask why you are trying to do this?

If you are attempting to do something on a per line basis it might be appropriate to use something like Nested Line Styles within Paragraph Styles.

Michael

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
Guide ,
Mar 09, 2019 Mar 09, 2019

Copy link to clipboard

Copied

LATEST

Sure! … 2 nested line styles mapped on all the paras styles + 3 simple Grep Find/Replace and it’s done!

Best,

Michel, for FRIdNGE

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