One thing that publishers, editors or authors could do is to insert a space on either side of a dash. Most often, they represent a dash by two consecutive hyphens, with no space between the hyphens and words. The software then interprets the word on each side, plus the hyphens themselves, as a single word, which then gets pushed to the next line.
As an example:
Code:
He set out on the long journey to the outpatients department.
He decided to take his
umbrella--recognising that it would
rain--together with a flask of hot coffee and a muffin.
Do you see what I mean? "umbrella--recognising" is treated as a single word, as is "rain--together", resulting in ragged text. A space on either side of each "--" would have fixed that.