Re: paragraph-at-once breaking algorithm (was: Re: *roff hyphenation trivia challenge)

2024-04-02 Thread Steve Izma
On Tue, Apr 02, 2024 at 03:29:28PM -0500, Dave Kemper wrote: > Subject: paragraph-at-once breaking algorithm (was: Re: *roff hyphenation > trivia challenge) > > On Tue, Apr 2, 2024 at 2:23 PM Steve Izma wrote: > > I used TeX and LaTeX [...] and the oversetting of lines caused > > by the periodic

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Dave Kemper
On Tue, Apr 2, 2024 at 1:52 PM Dave Kemper wrote: > .ll 1n > \[rq]\%antidisestablishmentarianism\[lq] > .br > \%\[rq]antidisestablishmentarianism\[lq] Ha, if I'd looked at the output of something other than -Tascii, I'd have realized I got my "lq" and "rq" backwards. But the hyphenation works th

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Tadziu Hoffmann
> Which would be better? > > 1. Change GNU troff to not write out a hyphen if the > hyphenation control escape sequence is at the end > of the word. > > 2. Change GNU troff to not reënable automatic > hyphenation after encountering a non-initial > hyphenation control escape se

paragraph-at-once breaking algorithm (was: Re: *roff hyphenation trivia challenge)

2024-04-02 Thread Dave Kemper
On Tue, Apr 2, 2024 at 2:23 PM Steve Izma wrote: > I used TeX and LaTeX [...] and the oversetting of lines caused > by the periodic failure of the paragraph-justification algorithms > drove me nuts. [...] The many lines that overset by only a > few points made proofreading really difficult. That's

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Tadziu Hoffmann
> $ printf '.ll 8n\n\\%%antidisestablishmen\\%%tarianism\\%%\n' \ > | nroff -Wbreak | cat -s > antidisestablishmen- > tarianism- > > I don't think we can tolerate that trailing hyphen. Yes, that's why we have to use "\&\%" at the end.

Re: *roff hyphenation trivia challenge

2024-04-02 Thread G. Branden Robinson
At 2024-04-02T22:09:55+0200, Tadziu Hoffmann wrote: > > Groff already *does* ignore correct hyphenation points, > > namely before the first "\%" (but allows them afterward). > > > > My concern is that if "\%" only allows specifying > > *additional* hyphenation points, then we have no method > > of

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Tadziu Hoffmann
> Groff already *does* ignore correct hyphenation points, > namely before the first "\%" (but allows them afterward). > > My concern is that if "\%" only allows specifying > *additional* hyphenation points, then we have no method > of forbidding hyphenation points that the patterns > incorrectly

Re: *roff hyphenation trivia challenge

2024-04-02 Thread G. Branden Robinson
At 2024-04-02T13:29:08-0500, G. Branden Robinson wrote: > At 2024-04-02T13:42:59-0400, Steve Izma wrote: > > Also for \% at the beginning of a word, I rarely use this. > > I use it frequently in man(7) documents, because the `hw` request is not > portable/reliable (in theory). Also there's no mec

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Tadziu Hoffmann
> I prefer groff's behaviour because I don't ever want correct > hyphenation points to be ignored. Using \% is almost always a > correction to the hyphenation logic. Groff's current behavior is weirdly inconsistent. It already *does* ignore correct hyphenation points, namely before the first "\%

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Steve Izma
On Tue, Apr 02, 2024 at 01:29:05PM -0500, G. Branden Robinson wrote: > Subject: Re: *roff hyphenation trivia challenge > > At 2024-04-02T13:42:59-0400, Steve Izma wrote: > > On Tue, Apr 02, 2024 at 06:51:51PM +0200, Tadziu Hoffmann wrote: > > > Subject: Re: *roff hyphenation trivia challenge > >

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Dave Kemper
On Tue, Apr 2, 2024 at 11:53 AM Tadziu Hoffmann wrote: > Also, "\&" is not a letter, so a leading "\&" > should not influence hyphenation at all. \[rq] is also not a letter, but it affects how \% is interpreted, giving it its hyphenation-point meaning rather than its suppress-hyphenation one. I

Re: *roff hyphenation trivia challenge

2024-04-02 Thread G. Branden Robinson
Hi Steve, At 2024-04-02T13:42:59-0400, Steve Izma wrote: > On Tue, Apr 02, 2024 at 06:51:51PM +0200, Tadziu Hoffmann wrote: > > Subject: Re: *roff hyphenation trivia challenge > > > For "antidisestablishmen\%tarianism", groff prints > > > > antidisestablishmen- > > tar- > > i- > > an- >

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Steve Izma
On Tue, Apr 02, 2024 at 06:51:51PM +0200, Tadziu Hoffmann wrote: > Subject: Re: *roff hyphenation trivia challenge > For "antidisestablishmen\%tarianism", groff prints > > antidisestablishmen- > tar- > i- > an- > ism > > (which I think is strange), while TeX and Heirloom troff print >

Re: *roff hyphenation trivia challenge

2024-04-02 Thread G. Branden Robinson
At 2024-04-02T18:51:51+0200, Tadziu Hoffmann wrote: > > > Also interesting to see that in this word, the hyphenation > > > patterns don't suggest a hyphenation opportunity after "anti". > > > The leading `\%` prevents that. > > Sorry, I meant even without "\%". With a line length of 1 en, > and

Re: *roff hyphenation trivia challenge

2024-04-02 Thread Tadziu Hoffmann
> > Also interesting to see that in this word, the hyphenation > > patterns don't suggest a hyphenation opportunity after "anti". > The leading `\%` prevents that. Sorry, I meant even without "\%". With a line length of 1 en, and without any "\%" at all, groff prints an- tidis- es- t