Might be worth mentioning that Tim O'Reilly himself co-wrote a book about typesetting with troff. Unix Text Processing by Dale Dougherty and Tim O'Reilly, Hayden Books, 1987. This text was subsequently provided free under the Open Books Project.
Larry Kollar has provided a recreated source code repository at
https://github.com/larrykollar/Unix-Text-Processing
I recollect compiling the source from the github account having only to sort out one font path issue.