bugGNU roff - Bugs: bug #67057, [troff] allow square-bracket...

 
 

bug #67057: [troff] allow square-bracket delimiters for all escape sequences

Submitter:  Dave <barx>
Submitted:  Sun 27 Apr 2025 04:07:39 AM UTC
   
 
Category:  Core Severity:  1 - Wish
Item Group:  Feature change Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Sun 27 Apr 2025 04:07:39 AM UTC, original submission:  

In 2002 (http://lists.gnu. ... -11/msg00136.html) Werner wrote, "It is on my TODO list to implement \X[...] for all X (similar to sqtroff)."  This ticket puts it on groff's global to-do list.

The below demo shows that in almost-latest groff, at least \h continues to reject (or, rather, accept but warn about) square brackets as delimiters.

$ groff-latest --version | head -1
GNU groff version 1.23.0.3096-5fe64-dirty
$ echo "a\h[12n]b" | groff-latest -Tascii -ww | cat -s
troff:<standard input>:1: warning: closing delimiter does not match; expected character '[', got character ']'
a            b

(In followup posts, Egil Kvaleberg says he coded this, as part of a larger image-related patch.  Werner asked him to separate the two patches.  The final form of the image patch was posted at http://lists.gnu. ... -02/msg00017.html and committed in commit c96ad7986, but if Egil ever posted the delimiter patch, I can't find it.)

This enhancement offers no new functionality, but gives authors a tool to improve code readability, and, per Werner, increases cross-roff compatibility.

Dave <barx>
Group Member

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by barx (Submitted the item)
  •  

    Votes

    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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-08-07 gbranden Summaryallow pairwise delimiters for all escape sequences [troff] allow square-bracket delimiters for all escape sequences

    Back to the top

    Powered by Savane 3.16-a7ba.
    Corresponding source code