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
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:
Regards,
Uwe
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.
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
Copy link to clipboard
Copied
Is this what you are trying to achieve?
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
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.
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:
Regards,
Uwe
Copy link to clipboard
Copied
Ok, thanks.
by
hasvi
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
Copy link to clipboard
Copied
Sure! … 2 nested line styles mapped on all the paras styles + 3 simple Grep Find/Replace and it’s done!
Best,
Michel, for FRIdNGE