Is this construct legal *roff code? .if COND1 .ie COND2 xxx . el yyy
Groff is OK with it if COND1 is true, but emits an "unbalanced .el request" warning if COND1 is false. This seems logically inconsistent: whether .ie/.el requests are balanced is a structural aspect of the document, whereas the value of COND1 is a run-time aspect. A document's structural correctness ought to be based on its syntax, not run-time values of registers. I realize that *roff language features like the ability to redefine its control and escape characters on the fly blur the distinction between language syntax and run-time behavior, so this question may not have a clear-cut answer. If this is considered working as designed, however, the documentation ought to mention the restriction. It currently implies the opposite, by saying the part after the condition in an .if request "is interpreted as though it was on a line by itself." Were the .ie in fact on a line by itself, groff wouldn't grumble about the .el. Heirloom troff accepts the above without complaint. But Heirloom also emits no diagnostics for the clearly unbalanced .ie COND xxx .el yyy .el zzz So this seems more a matter of Heirloom simply not reporting the problem under any circumstances than specifically condoning the construction I'm asking about.