Copy link to clipboard
Copied
Hi! I found the lovely GREP style for preventing bad breaks in compound words (applying NoBreak and entering "\b\w+?-\w+?\b"), but I find that they also resist breaking at the proper hyphen at the end of the line, causing the entire compound word to move to the following line. This often causes a loose line, and I have to track in or out or change working slightly to correct it (see "second-mover" below).
Is there another piece to the GREP statement that will allow the compound word to break at the proper hyphen? (I'm fascinated by GREP and am eager to learn all of its wonders.) 
Thanks,
Susan
Here's my approach
Setup a new Character Style - call it No Language or something that is ok for you
Make sure all fields everywhere are blank - except the Language
In your Paragraph Style - go to the Grep Style and select No Language style you created
And insert
\b\w+(?=-)
This allows the Program to use a No Language character style - but won't interfer with other character styles applied
Effectively allowing to have 2 styles applied to the same piece of text.
Copy link to clipboard
Copied
Another similar discussion last week at https://community.adobe.com/t5/indesign-discussions/grep-for-preventing-double-hyphenation/td-p/1379...
Seems the success of No Break is language dependent for no apparent reason. Using [No Language] insttead seems to solve this with some minor downsides discussed in the above-mentioned thread.
Copy link to clipboard
Copied
Thanks, Peter, I'll check it out.
Copy link to clipboard
Copied
Here's my approach
Setup a new Character Style - call it No Language or something that is ok for you
Make sure all fields everywhere are blank - except the Language
In your Paragraph Style - go to the Grep Style and select No Language style you created
And insert
\b\w+(?=-)
This allows the Program to use a No Language character style - but won't interfer with other character styles applied
Effectively allowing to have 2 styles applied to the same piece of text.
Copy link to clipboard
Copied
It worked!! Thank you thank you. This will make my workflow ever so much easier.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now