[TUHS] [groff] [UTROFF] references, summary, index

Doug McIlroy doug at cs.dartmouth.edu
Thu Dec 7 10:45:17 AEST 2017


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



More information about the TUHS mailing list