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: Ralph Corderoy
Subject: Re: [Groff] ASCII Minus Sign in man Pages
Date: Thu, 04 May 2017 11:30:20 +0100

Hi Mike,

> > But - has always meant hyphen in pre-groff troff because it's a lot
> > more common to want a hyphen in writing than a minus sign.
>
> _I_ would claim this interpretation was a mistake.

Well, 7th Ed. documents that have `.if n' and `.if t' use - for an
English hyphen and \- for a numeric minus, e.g.
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/doc/ratfor/m2

    As a useful example, consider this problem:
    the variable
    .UL f
    is to be set to
    \-1 if
    .UL x
    is less than zero,
    to
    +1
    if
    .UL x
    is greater than 100,
    and to 0 otherwise.

    Following an
    .UL else
    with an
    .UL if
    is one way to write a multi-way branch in Ratfor.

And CSTR 54, 23.2 Font description files says - is the same as \(hy for
the PostScript printer they use as an example.

    Each line following charset describes one character: its name, its
    width..., ..., and a decimal, ... value by which the output device
    knows it (the \N "number" of the character).  ...  If the width
    field contains ", the name is a synonym for the previous character.
    ...

    Here are excerpts from a typical font description file for the same
    Postscript printer.

    hy  33  0  45  hyphen \(hy
    -   "          - is a synonym for \(hy
    Q   72  3  81
    a   44  0  97
    b   50  2  98

I also found in 8th Ed.
http://www.tuhs.org/Archive/Distributions/Research/Dan_Cross_v8/v8.tar.bz2
the directory usr/src/cmd/troff/devaps with these entries in R and S
that show - is \(hy and \- has the width of +.

    name R
    hy      35      0       83      font 21
    -       "
    em      96      0       82      font 21
    en      52      0       81
    +       77      0       73      font 21
    \-      77      0       74      font 21

    name S
    special
    pl      72      0       15
    +       "
    mi      72      0       16
    \-      "

So - is a hyphen in troff.  That makes sense since it's for writing, not
just man pages.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy



reply via email to

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