bugGNU roff - Bugs: bug #50789, [mdoc] .Lk should behave better...

 
 

bug #50789: [mdoc] .Lk should behave better with more than two arguments

Submitter:  Ingo Schwarze <schwarze>
Submitted:  Wed 12 Apr 2017 11:30:19 AM UTC
   
 
Category:  Macro mdoc Severity:  3 - Normal
Item Group:  Feature change Status:  Fixed
Privacy:  Public Assigned to:  schwarze
Open/Closed:  Closed Planned Release:  1.22.4
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 05 Mar 2022 11:19:39 PM UTC, comment #1: 


commit 24904c378090cdb17f8e2390829ad41b7fee3ec0
Author:     Ingo Schwarze <schwarze@usta.de>
AuthorDate: Thu Apr 13 22:39:28 2017 +0200
Commit:     Ingo Schwarze <schwarze@usta.de>
CommitDate: Thu Apr 13 22:39:28 2017 +0200

    Make .Lk with more than two arguments spec conform

    See https://savannah.gnu.org/bugs/?50789


G. Branden Robinson <gbranden>
Group administrator
Wed 12 Apr 2017 11:30:19 AM UTC, original submission:  

Currently, the .Lk macro exhibits useless and confusing behaviour when given more than two arguments.  For example,

  .Lk target four words of text

results in

  four: target words of text

where "four:" is italic and the rest (even "words of text") is bold.  Note that having the ":" italic is also dubious, it would better be roman.

A more useful rendering would be

  four words of text: target

Of course, the issue can partially be worked around with quoting:

  .Lk target "four words of text"

but than trailing punctuation does not work in the usual way.
Besides, given how common it is to have link texts that consist of more than one word, i'd suggest to just make this more intuitive for the users.

The attached patch does the following:

  • Use the second and following arguments as the link text.
  • Do not mark up the following colon with \fI.
  • Handle any number of trailing delimiters.


It is made availabel under the license already contained in the file, such that it can easily be included into groff.

Unfortunate behaviour reported by Antony <Bentley at OpenBSD dot org>, patch by me, and patch tested by Anthony.

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 #40370:  mdoc-Lk.patch added by schwarze (2KiB - text/x-patch)

 

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)
  •  

    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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-03-05 gbranden CategoryNone Macro mdoc
        Assigned tocarstenkunze schwarze
        Summarymdoc(7) .Lk with more than two arguments [mdoc] .Lk should behave better with more than two arguments
    2017-04-15 carstenkunze StatusReady for Merge Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.22.4
    2017-04-13 carstenkunze StatusNone Ready for Merge
        Assigned toNone carstenkunze
    2017-04-12 schwarze Attached File- Added mdoc-Lk.patch, #40370

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code