groff
[Top][All Lists]
Advanced

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

Re: [Groff] ASCII Minus Sign in man Pages


From: John Gardner
Subject: Re: [Groff] ASCII Minus Sign in man Pages
Date: Thu, 4 May 2017 02:10:57 +1000

>
> For that to paste from a man page, viewed as UTF-8 TTY,


Erm, I may be missing something, here... but if monospaced hyphens and
minus signs are optically indistinguishable, what's the worth in
differentiating between either?

IMHO, if any change is to be made, it should be with grotty's handling of \-.
A new escape sequence (or command-line switch) could always be added  for
authors/users who wish for a \- to *always* be rendered as U+2212, even for
Unicode-enabled terminals. Possible example might be character listings
(e.g., groff_char(7), or for Unicode-related documentation).

Of course, that still wouldn't do anything for code-blocks in PDFs. Then
again, I wouldn't be copying code from a PDF without expecting to clean it
up after pasting, anyway...

(I'm sure this suggestion is sounding silly to somebody...)



On 4 May 2017 at 00:51, Ralph Corderoy <address@hidden> wrote:

> Hi Mike,
>
> > Stable, to me, implies not changing much over time, and most changes
> > should be backward compatible.
> ...
> > Backward compatible means that all code written to the existing
> > definitions should turn out the same results as in the past when
> > submitted to new assemblers.  (I have nroff documents and C code from
> > the 1970s that still work.)
>
> Agreed.
>
> > Thus when we have pieces of documented definitions that contradict
> > each other the problem becomes which definition to change.  The
> > definitions for
> >
> >       -   \-   \(mi   \(hy   \(em   \(en   (others?)
>
> \N'45' ?
>
>     -       A hyphen for text, e.g. beer-flavoured ice-cream.
>     \-      A minus sign in the current font.
>     \(mi    A minus sign in the special font.
>     \(hy    Another name for plain `-', so a hyphen for text.
>     \N'45'  Glyph 45 in the current font.
>
> > To my mind  -  in groff should always default to the ASCII, 7-bit,
> > undistinguished character.
>
> But it's always meant hyphen in pre-groff troff because it's a lot more
> common to want a hyphen in writing than a minus sign.  Then Unicode
> decided ASCII minus had too many meanings and couldn't be used for any
> of them so created U+2010 for hyphen, and U+2212 for minus sign, and
> groff switched to producing those for the hyphen and minus sign, leaving
> ASCII minus unreproducible apart from \N'45'.
>
> man pages that were and are considered correctly written have used \-
> for a command-line minus sign, e.g. `wc \-l'.  (Incorrect man pages that
> wrote `wc -l' can be ignored for the discussion;  there seems to be the
> will to fix them.)  For that to paste from a man page, viewed as UTF-8
> TTY, PostScript, PDF, browser, ..., it needs to be character 45.
> Writing «wc \N'45'l» isn't going to gain support.  :-)  How to produce
> it is the issue.
>
> --
> Cheers, Ralph.
> https://plus.google.com/+RalphCorderoy
>
>


reply via email to

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