Branden,
The relevant function fits on one screen, if your
terminal window is at
least 36 lines high. :) (Much of it is given over to comments.)
Actually there's still another function, spread_space that contains
the inner R-L and L-R loops. The whole thing has become astonishingly
complicated compared to what I remember as a few (carefully crafted)
lines of code in the early roff. I admire your intrepid forays into
the groff woods, of which this part must be among the less murky.
Doug