I come into this very late and without having studied the on-going discussion. For this I apologize.
> However, since many manual pages in existence are incorrect, and they > use '-' >>> when they should use '\-' <<< ... Let me take exception to the claim that '-' should be '\-' . In manual pages of UNIX/Linux commands, system calls, libraries, etc. all the examples are for strings and negative numbers expressed in ASCII characters. man(1) execve(2) fileno(3) : To my mind the correct solution to the '-' controversy is to format everything at is an ASCII expression in an ASCII font which has no concept of '\-' . ((I come from the days when all UNIX documentation was formated using nroff.)) Mike Bianchi On Sun, Jul 31, 2022 at 02:04:23PM +0200, Alejandro Colomar (man-pages) wrote: > 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/