bugGNU roff - Bugs: bug #49272, [PATCH] mdoc(7): Simplify...

 
 

bug #49272: [PATCH] mdoc(7): Simplify behaviour of .Bl -tag without -width

Submitter:  Ingo Schwarze <schwarze>
Submitted:  Wed 05 Oct 2016 03:31:47 PM UTC
   
 
Category:  Macro mdoc Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  carstenkunze
Open/Closed:  Closed Planned Release:  1.22.4
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Jun 2022 02:50:50 PM UTC, comment #1: 

Fixed by Ingo, but closed by Carsten.

G. Branden Robinson <gbranden>
Group administrator
Wed 05 Oct 2016 03:31:47 PM UTC, original submission:  

If an mdoc(7) .Bl -tag macro lacks the -width argument, the body indentation is calculated separately for each child .It macro.  Neither the Heirloom nor the mandoc(1) implementation of the mdoc(7) language show such behaviour; both use a constant default width for the whole list in that case.

Apart from doubts whether lists with variable indentation are typographically sound in the first place, support for variable widths in groff is so restricted that it's practically useless.  For each .It, the width will be the default width of whatever happens to be the leading macro after the .It, or of .No if .It is not followed by a macro.  Besides, Carsten Kunze looked for real-world manuals actually using the feature and doesn't remember to find any.

I suggest removing this obscure quirk from groff rather than adding it to Heirloom and mandoc, avoiding complication of Heirloom and mandoc code and simplifying both the groff code and the groff_mdoc(7) user manual.

The attached patch was tested by doing ./bootstrap, ./configure, make, make dist, building an OpenBSD port, doing a complete formatting run over the whole corpus of all OpenBSD manuals, verifying that the output changes for none of them, as well as regenerating all target files of the mandoc test suite, which uses groff as the reference mdoc(7) implementation, verifying that none of the target files changes, plus some manual testing.

Ingo Schwarze <schwarze>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #38666:  tag-no-width.patch added by schwarze (6KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by carstenkunze (Updated the item)
  • -email is unavailable- added by schwarze (Submitted the item)
  • -email is unavailable- added by schwarze
  •  

    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.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-15 gbranden CategoryNone Macro mdoc
        Assigned toNone carstenkunze
    2017-02-16 carstenkunze Item GroupFeature change Incorrect behaviour
        StatusNone Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.22.4
    2016-10-05 schwarze Attached File- Added tag-no-width.patch, #38666
        Carbon-Copy- Added carstenkunze

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code