bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #50789] mdoc(7) .Lk with more than two arguments


From: Ingo Schwarze
Subject: [bug #50789] mdoc(7) .Lk with more than two arguments
Date: Wed, 12 Apr 2017 07:30:21 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.gnu.org/bugs/?50789>

                 Summary: mdoc(7) .Lk with more than two arguments
                 Project: GNU troff
            Submitted by: schwarze
            Submitted on: Wed 12 Apr 2017 11:30:19 AM UTC
                Severity: 3 - Normal
              Item Group: Wishlist
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

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.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 12 Apr 2017 11:30:19 AM UTC  Name: mdoc-Lk.patch  Size: 2kB   By:
schwarze

<http://savannah.gnu.org/bugs/download.php?file_id=40370>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50789>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]