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


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

Submitted by:  Ingo Schwarze <schwarze>
Submitted on:  Wed 05 Oct 2016 03:31:47 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  1.22.4

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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>
Project Member


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

Attach Files:

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 carstenkunze (Updated the item)
  • -email is unavailable- added by schwarze (Submitted the item)
  • -email is unavailable- added by schwarze

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-16 carstenkunze Item GroupNew feature => 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.5