I think of myself as pretty proficient with troff, but I never get diversions right.
One fairly useless task I set for myself was to write a smart quote macro. By that I mean that I want the macro to put the quoted text into a diversion, check how many lines the quote would be when formatted as a block quote, and then output a block quote if the number of lines is >= block-quote-threshhold or output an inline quote if it's not. Actually this is not so useless if you are writing something that may or may not be published in a variety of places that have different page layout conventions for block quotes, and you're a lazy person who doesn't want to make adjustments to even the rare borderline case by hand. Do you see what I have in mind? Any ides on how to achieve it? Thanks. Greg