From mboxrd@z Thu Jan 1 00:00:00 1970 From: doug@cs.dartmouth.edu (Doug McIlroy) Date: Wed, 06 Dec 2017 19:45:17 -0500 Subject: [TUHS] [groff] [UTROFF] references, summary, index Message-ID: <201712070045.vB70jHKP004480@coolidge.cs.Dartmouth.EDU> Ralph, > > On unjustified text, fmt (which uses an algorithm purported to be like > > Knuth-Plass) > > I wonder if that accounts for modern, coreutils 8.28-1, fmt's weirdness > that I've seen for a while but never got around to investigating? > > $ yes x | fmt | awk '{print length, $0}' | uniq -c | sed 5q You threw it something of a curve ball--an infinite paragraph. At some point I suppose it chokes, and tries its best to make a semiparagraph of equal-length lines. (Since the real paragraph is not yet complete, it would be wrong to make the last line of the semiparagraph short.) Equilibrating apparently led to the split between 69- and 71-letter lines. Whether the alternation of 11 of one and 16 of the other is an infinite pattern or a subpattern is not clear. It could be part of a continued-fraction approximation, related to the staircse appearance of a bitmap "straight line". Doug