Bernard wrote, "My work on the knuth-plass branch is also interesting,"
I'd love to hear how you approach that. All I could think of is really heavy-duty dynamic programming that replicates almost the full internal state of groff in every path. As one example, the K-P paper sets type inside a circle given as a prcomputed list of line lengths. The way one would specify a circle in groff would be as a self-perpetuating lined trap that runs an incremental circle generator, How do you deal with this inextricable admixture of format-specification and line-breaking? Circle-filling is rare, but it is just an extreme case of wrapping around a figure inserted at a trap location, which is not unusual. A second concern is about K-P and unjustfied text, which I have come to prefer. K-P typesetting then gives every paragraph a different apparent width. In my experience this is typically more objectionable than results from plain old greedy line filling. (Of course I expect the latter to still be available.) Doug