bugGNU roff - Bugs: bug #59434, doc/groff.texi: document .if / .ie...


bug #59434: doc/groff.texi: document .if / .ie interaction more clearly

Submitter:  Dave <barx>
Submitted:  Mon 09 Nov 2020 12:00:57 PM UTC
Category:  Core Severity:  1 - Wish
Item Group:  Documentation Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Thu 25 Mar 2021 05:02:37 AM UTC, comment #2: 

See also bug #60260

Dave <barx>
Group Member
Wed 25 Nov 2020 06:57:24 PM UTC, comment #1: 

  This code is invalid (the term "legal" in this connection is
inappropriate, see "GNU standards" and the (real) translations
of the term in "*.po" files).

  The scope of ".if" is here two lines not one.

  This example is a demonstration of what happens when people transfer
(bad programming) practice from one language to another.

  So, with a "multi line" input ... [see "Troff User's Manual", CSTR #54;
chapter 16].

Bjarni Ingi Gislason <bjarniig>
Mon 09 Nov 2020 12:00:57 PM UTC, original submission:  

Consensus on the email list (thread starting at http://lists.gnu.org/archive/html/groff/2020-09/msg00000.html) is that

.if COND1 .ie COND2 xxx
.          el yyy

is not a legal construction (or rather, is only legal when COND1 is true).  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.

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.

Dave <barx>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bjarniig (Posted a comment)
  • -email is unavailable- added by barx (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code