groff
[Top][All Lists]
Advanced

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

Re: '-' vs '\-' in TH (man(7))


From: Brian Inglis
Subject: Re: '-' vs '\-' in TH (man(7))
Date: Sun, 20 Aug 2023 15:51:04 -0600
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

On Sun, 20 Aug 2023 21:10:52 +0200, Alejandro Colomar wrote:
Hi Branden,
I just noticed that the Linux man-pages use '-' in TH.  That's
surprising to me, as Michael was careful to use '\-' correctly.
In the documentation, I couldn't find anything that says TH
should be different than anywhere else, and so I'd expect he
would have used it there.
$ grep -rn '^\.TH [^ ]*-' man* | wc -l
30q
$ grep -rn '^\.TH [^ ]*\\-' man* | wc -l
0
Was it just an oversight, or are there any obscure reasons to do
that?

Those are just normal *hyphens* *within* the page title command/function/... name; perhaps you are thinking of '\-' used as a *dash*(/minus) after the page title command/function/... name following .SH NAME in all 1111 files?

See groff_char(7):

"For best results in roff systems, use the “−” character in input outside an escape sequence only to mean a hyphen, as in the phrase “long-term”. For a minus sign in running text or a Unix command-line option dash, use \− (or \[−] in groff if you find it helps the clarity of the source document)."...

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                -- Antoine de Saint-Exupéry



reply via email to

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