nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] manpage table help

2013-02-21 17:38:58
Hi Ken,

Also ... why, exactly, do we use \- instead of -?

Because \- is a true minus sign in the current font whereas - is a
hyphen.

   $ printf '1-2\n.br\n1\-2\n' | nroff | grep .
   1‐2 1−2
   $

Ah, I see ... you get "-" producing U+2010 where \- makes U+2212.  I
see that's what happens on my MacOS X system as well.  Thanks!

Right.  Of course, one likes to paste fragments of man page examples to
the command line and expect them to work, and argv[] processing tends to
prefer plain ol' - rather than either of those two you gave.  Colin
Watson, all-round good egg and Debian's man(1) maintainer, has
/etc/groff/man.local set up to turn \- into - if outputting to a utf8
terminal.

    http://lists.gnu.org/archive/html/groff/2003-12/msg00102.html

That file does a few more things these days.

So use \- in the man page where you really mean the key next to 0 and it
should come out as usable on a terminal but still looking nice in a PDF.
(Proof-reading of man pages should always vet the Postscript/PDF
version.)

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>