Follow-up Comment #3, bug #59434 (group groff): [comment #0 original submission:] > Consensus on the email list (thread starting at http://lists.gnu.org/archive/html/groff/2020-09/msg00000.html)
I'm afraid I have to depart from this consensus, given recent study in this area; see bug #45502 and bug #65474. > is that > > .if COND1 .ie COND2 xxx > . el yyy > > is not a legal construction (or rather, is only legal when COND1 is true). I claim that it's valid regardless of the truth value of COND1, and all *roff formatters we've studied reliably produce the same results given it (for my part, that's Unix V7, Solaris 10, DWB 3.3, and _groff_ from 1.22.3 to the present day). > But the documentation does not make this clear, saying the part after the condition in an .if request "is interpreted as though it were on a line by itself." Were the .ie in fact on a line by itself, groff wouldn't emit an "unbalanced .el request" warning when COND1 is false. That's a problem with the warning diagnostic being an insufficiently powerful interpreter of _roff_ input when skipping over a branch not taken. It doesn't "see" that `ie`, even in the absence of an immediately following `\{`, creates a new "level" of conditional with which coupling of a subsequent `el` request is expected. > Further down the email thread, Branden writes a lengthy analysis why .if "hides" an .ie but processes \{ and \}. While informative, hopefully there is a more succinct way to explain this in the groff documentation. And indeed I've tried to explain it several more times in the ticket traffic of the last few days. If I hit upon a presentation that you find persuasive, I'll likely weight that heavily when considering what language to add to our Texinfo manual to deobfuscate this matter. Though I hope that just shutting up the spurious "unbalanced 'el'" warnings will do considerable work toward that goal. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?59434> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/