groff
[Top][All Lists]
Advanced

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

Re: Bug#1016412: dh-make: manpage.1.ex: Incorrect formatting for dash


From: Alejandro Colomar (man-pages)
Subject: Re: Bug#1016412: dh-make: manpage.1.ex: Incorrect formatting for dash
Date: Sun, 31 Jul 2022 14:04:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

Hi Baptiste,

On 7/31/22 13:49, Baptiste Beauplat wrote:
Hi Alejandro,

On 2022/07/31 12:35 PM, Alejandro Colomar wrote:
The template page 'manpage.1.ex' uses '-' instead of '\-' for a
dash that should be a Latin minus sign (as it's in the context of
command options).  Using '-' would produce a hyphen, which if
copy&pasted, wouldn't be interpreted correctly by a command.

The offending line in the file is 41:

options starting with two dashes ('-')

When I run the following command on the manpage :

    man ./manpage.1.ex | xxd

The resulting text from the dash line 41 is converted to the correct 2d
minus ascii char.

The same is true for the two examples following that text, which are
correctly shown as \-\- in the source.

I am missing something? Or maybe the fact that this text is in a .SH
section make it work correctly?

Upstream groff(1) renders '-' and '\-' differently, as they should.
However, since many manual pages in existence are incorrect, and they use '-' when they should use '\-', Debian modifies the behavior by downgrading hyphens into Latin minus sign.

Let's fix the page in the hope that Debian can some day remove that workaround.

See the relevant part of </etc/groff/man.local>:

.  \" Debian: Strictly, "-" is a hyphen while "\-" is a minus sign, and the
.  \" former may not always be rendered in the form expected for things like
.  \" command-line options.  Uncomment this if you want to make sure that
.  \" manual pages you're writing are clear of this problem.
.  if '\*[.T]'utf8' \
.    char - \[hy]

Cheers,

Alex

--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



reply via email to

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