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: NoneSeverity: 3 - Normal
Item Group: Incorrect behaviourStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned 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>

 

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

Attach File(s):
   
   
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
  • -unavailable- added by carstenkunze (Updated the item)
  • -unavailable- added by schwarze (Submitted the item)
  • -unavailable- added by schwarze
  •  

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

    Only logged-in users can vote.

     

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

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 16 Feb 2017 09:15:44 PM UTCcarstenkunzeItem GroupWishlist=>Incorrect behaviour
      StatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>1.22.4
    Wed 05 Oct 2016 03:31:47 PM UTCschwarzeAttached File-=>Added tag-no-width.patch, #38666
      Carbon-Copy-=>Added carstenkunze

    Back to the top


    Powered by Savane 3.1-cleanup1