> Have you experimented with other hyphenation control parameters? > > I wonder if GNU troff's `hym` or `hys` might get you what you need, at > least in the particular case(s) that motivated you to write.
I'll need to play around with these! I'll write again if/when I can get them to solve my case. > we already have those "two lines" in memory because we have: > > * the pending output line > > and > > * a configured line length I figured it would work this way, but your comment about *roff ``forgetting a line when it was done with it'' in your first reply made me think otherwise. > Put differently yet another way, we know whether the word that must be > broken at the line length ends the paragraph or not. Definitely seems like all the info we need to solve the case I brought up! > So what I think we could change GNU troff to do is, if hyphenation is > enabled and the line length bisects a word, check to see if that word is > a "runt"--the last one in a paragraph. If it's not a runt, do what we > already do. If it _is_ a runt, suppress its hyphenation. > > This could be made more complicated, for instance by considering runt > words with multiple hyphenation break points in them and progressively > "backing up over them" until some satisfactory threshold is reached. > But for a first attempt, I'd want to try the simplest approach and see > how many people's problems are solved by it. The simplest approach sounds very effective to me. > I should also add that this alteration to the algorithm might just trade > one kind of ugliness for another. > Here we see significantly more spreading on the third line than before. > I admit that this precise case isn't shockingly bad, but there > inevitably will be cases that are. It's more likely when the line > length is a smaller multiple of the average word length, as when laying > out the page with multiple columns. In my case, the runt word was only 2 syllables, which lead to the hyphenated for being _much_ uglier than just having the runt. Because of this, I failed to consider cases where the runt is much longer; and, in those cases, you're right that the spacing on the penultimate line would be very bad, and having a half runt with good spacing would be preferrable to a full runt with poor spacing. This also makes me think that the hyphenation requests -- .hy, .hym, .hys -- might solve my case. > I'm not enamored of it as a final name, but for the time being we might > call this the "hyrunt gambit". (Why "gambit"? Because I don't know > that it would remove more typographical ugliness than it creates.) I think that's a very charming little name xD -- S.
