At 2018-06-26T15:09:57+0100, Ralph Corderoy wrote:
> Two lines become three, disturbing parity.
[...]
> The extra spaces are moved from the right end of the line to the left:
[...]
> This looks to me like nroff is alternating the added spaces between the
> left and right ends of the line.  Kernighan and Plauger's excellent
> _Software Tools_ does this with its simple roff IIRC, and says it's the
> normal method to avoid `rivers' of space being perceived.
> https://amzn.to/2MrnLO5

That has been on my to-read list for something like 15 years.  My
procrastination has not served me well, here!

(After reading what Kernighan had to say about Pascal[1], I elected to
queue the original rather than _Software Tools in Pascal_.)

At 2018-06-26T14:59:30+0100, Keith Marshall wrote:
> On 26/06/18 14:27, G. Branden Robinson wrote:
> > Can someone tells me why this happens?  And, more mysteriously, why it
> > only _sometimes_ happens?
> 
> I guess its the placement of padding space, when formatting fully
> justified ASCII, that's puzzling you?  AIUI, to avoid rivers of padding
> space, groff alternates, line by line, between insertion of such space
> from left and right ends of successive lines.  Insert an odd number of
> lines, and you swap the left vs. right effect on subsequent lines.

Fantastic!  Thank you, gentlemen!

Regards,
Branden

[1] https://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pascal.html

Attachment: signature.asc
Description: PGP signature

Reply via email to