Quote:
Originally Posted by Tex2002ans
I'm assuming it then wraps a character style around the final two words of the paragraph?
|
Not exactly... it wraps a style with the no-break feature on the space between those words. Similar to this:
HTML:
Code:
<p>Example…: final<span class="nobreak"> </span>words.</p>
CSS:
Code:
.nobreak {white-space: nowrap;}
But that's an InDesign feature using GREP. There are some queries around, but they're missing I-dont-remember-what because I edited years ago and I use it over and over. So I'm sharing it for the first time.
Quote:
Originally Posted by Tex2002ans
Biggest reason why these "last-line hacks" work reasonably better in InDesign is because it has access to better hyphenation and justification (H&J) algorithms. If that final line is going to be ugly, InDesign readjusts spacing throughout the entire paragraph.
|
Oh, yes, the adobe paragraph composer algorithm is quite good.
Quote:
Originally Posted by Tex2002ans
|
Thanks for the info.
Well... InDesign uses GREP, but I think its too limited. Sometimes I have to copy the text and place it into Sigil to use its RegEx engine in order to find some things. I don't know if there's a better software for this, never looked into it, but Sigil works for this.