[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: |
Baptiste Beauplat |
Subject: |
Re: Bug#1016412: dh-make: manpage.1.ex: Incorrect formatting for dash |
Date: |
Sun, 31 Jul 2022 14:11:42 +0200 |
On 2022/07/31 02:04 PM, Alejandro Colomar (man-pages) wrote:
> 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]
Oh wow, I was not aware of this Debian-specific behaviour. Sure, let's
do this the correct way :)
--
Baptiste Beauplat - lyknode
signature.asc
Description: PGP signature