groff
[Top][All Lists]
Advanced

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

mdoc(7): Lk


From: Alejandro Colomar
Subject: mdoc(7): Lk
Date: Thu, 27 Apr 2023 14:04:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

Hi Branden and Ingo!

Here's some difference between man(7) and mdoc(7).  Lk doesn't enclose
the URI within <>, nor use italics or bold.  By comparison, man(7)'s UR
encloses the URI (but doesn't use ':').

I think man(7) behavior is more reasonable, according to URI(7).

Also, mandoc(1) behaves different than groff(1), by using bold in the
URI.  While I don't really care about this difference, I wanted to
point it out, since AFAIK, mandoc(1) attempts to be compatible with
groff(1) bug-per-bug.

Cheers,
Alex

---

$ cat foo.mdoc 
.Dd 2023-02-27
.Dt experiments 7
.Os alx
.Sh Name
.Nm foo
.Nd a sample name for absolutely anything
.Sh Examples
int foo;
.Sh See also
.Lk https://xkcd.com/2109/
.Pp
.Lk https://xkcd.com/2109/ formatting


$ groff -mdoc -Tutf8 -rLL=70n ./foo.mdoc
experiments(7)      Miscellaneous Information Manual    experiments(7)

Name
       foo — a sample name for absolutely anything

Examples
       int foo;

See also
       https://xkcd.com/2109/

       formatting: https://xkcd.com/2109/

alx                           2023‐02‐27                experiments(7)


For comparison:

$ cat foo.man 
.TH a s d f
.SH See also
.UR https://xkcd.com/2109/
.UE
.PP
.UR https://xkcd.com/2109/
foo
.UE


which produces:


a(s)                                                              a(s)

See also
       ⟨https://xkcd.com/2109/⟩

       foo ⟨https://xkcd.com/2109/⟩

f                                  d                              a(s)


[1]:  URI(7):

   Writing a URI
       When written, URIs should be placed inside double quotes (e.g.,
       "http://www.kernel.org";), enclosed  in  angle  brackets  (e.g.,
       <http://lwn.net>),  or placed on a line by themselves.  A warn‐
       ing for those who  use  double‐quotes:  never  move  extraneous
       punctuation  (such as the period ending a sentence or the comma
       in a list) inside a URI, since this will change  the  value  of
       the  URI.   Instead, use angle brackets instead, or switch to a
       quoting system that never includes extraneous characters inside
       quotation marks.  This latter system, called the ’new’ or ’log‐
       ical’ quoting system by "Hart’s Rules" and the "Oxford  Dictio‐
       nary  for  Writers and Editors", is preferred practice in Great
       Britain and in various  European  languages.   Older  documents
       suggested  inserting the prefix "URL:" just before the URI, but
       this form has never caught on.




-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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