From: Alejandro Colomar <alx@kernel.org>
To: Jonny Grant <jg@jguk.org>
Cc: groff <groff@gnu.org>, linux-man <linux-man@vger.kernel.org>
Subject: Re: ⟨ vs < in hostname man page of hostname
Date: Wed, 9 Aug 2023 12:16:12 +0200 [thread overview]
Message-ID: <d508ed7b-7dfb-7b72-e052-c918c24bb1bf@kernel.org> (raw)
In-Reply-To: <b743023a-4453-aba4-883d-3e896e2f38de@jguk.org>
[-- Attachment #1.1: Type: text/plain, Size: 3846 bytes --]
Hi Jinny,
On 2023-08-07 17:36, Jonny Grant wrote:
>>>
>>> Noticed that sometimes the '⟨' doesn't render, perhaps it is not in all fonts, would it be possible to use consider using regular '<' and '>' character in the man page?
>>
>> That is implemented using man(7)'s UR, which is for URIs. The source
>> code of the manual page doesn't know about the glyph that will be
>> produced in your system. In your system, groff(1) will try to find
>> the most appropriate one. You (or your distributor) can also tweak
>> that. You can for example change it to use ASCII '<' and '>'.
>>
>> In man7.org, I guess that you read it correctly from any machine.
>> In your systems' pages there's no COLOPHON anymore (I removed it
>> in man-pages-6.01). If you're on an old system, you can tweak it.
>>
>> But you'll still see that character in pages that have URIs in them.
>> For example, let's consider hier(7):
>>
>> $ grep -n '^\.UR ' man7/hier.7;
>> 640:.UR https://refspecs.linuxfoundation.org/fhs.shtml
>>
>> which renders as (including the whole section):
>>
>> STANDARDS
>> The Filesystem Hierarchy Standard (FHS), Version 3.0
>> ⟨https://refspecs.linuxfoundation.org/fhs.shtml⟩, published
>> March 19, 2015
>
>
> Fair enough. Some pages even have both.
Pages that use both are bad. That means that in some places they used
the correct UR man(7) macro, and in some others they hardcoded <>, which
is wrong. It may happen in <man7.org>, because the COLOPHON was added
by Michael, while the page was written by a different author. In other
places, it means that the page is badly written.
I know of uri.7, where this happens, and some day I'll fix it.
> I saw sometime <> is used, as I expected,
Those pages are wrongly written. I expect that most of those pages are
not written in man(7), but rather translated from some other source
language by a program, which usually produce crap man(7) source.
> other times '⟨⟩' .
When you see that, the page was written properly in man(7) (or
mdoc(7)? I expect both produce the same glyph; Branden?).
> "SEE ALSO"
>
> https://man7.org/linux/man-pages/man1/cp.1.html
I think GNU coreutils is one of those projects that don't write man(7)
source, but rather translate it from a different language.
alx@debian:~/src/gnu/coreutils$ find | grep 'cp\.1'
alx@debian:~/src/gnu/coreutils$
>
> But though "COLOPHON" looks like it was appended by a man7 website script with the '⟨⟩' instead,
Yes, Michael uses a script to generate the COLOPHON. That script uses
the proper method for writing URIs: the UR man(7) macro. He used a
similar script for releasing man-pages until 5.13, as you'll find our
pages in versions <=5.13 had a COLOPHON in them.
I temporarily added a script that did the same thing:
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/scripts/append_COLOPHON.sh?h=cd34c839d3c9878db9105714b1e460f30057e7f2>
You can expect that Michael's script will be similar.
However, shortly after I decided to just remove the COLOPHON section,
and thus the script:
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?h=8c3052b0322580eba62de91f04ba657f7dfe360e>
> so I thought maybe that could be changed for consistency to <>.
No. It should be <> that are fixed to use the UR man(7) macro.
> There are so many different characters that could be used, but <> is on every keyboard :)
But nobody types ⟨⟩. It's generated by groff(1). When you write
an email or anything similar, you can use <>, but for manual pages,
those symbols are fine, I guess.
> Kind regards, Jonny
Cheers,
Alex
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-08-09 10:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <9d4608c3-1a01-b134-c0f5-423af14563eb@jguk.org>
2023-08-07 15:13 ` ⟨ vs < in hostname man page of hostname Alejandro Colomar
2023-08-07 15:36 ` Jonny Grant
2023-08-09 10:16 ` Alejandro Colomar [this message]
2023-08-09 10:39 ` Jonny Grant
2023-08-10 3:25 ` G. Branden Robinson
2023-08-13 23:52 ` Jonny Grant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d508ed7b-7dfb-7b72-e052-c918c24bb1bf@kernel.org \
--to=alx@kernel.org \
--cc=groff@gnu.org \
--cc=jg@jguk.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox