[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: |
Fri, 21 Apr 2017 15:11:20 +0100 |
Hi,
Clarke wrote:
> used the simple hyphen character because it was all monospace.
...
> If a minus sign appeared in regular text, I always used \(mi.
It was a lot easier then when the was only ASCII `-' and nothing else.
:-)
Here's how R and TR fonts map onto character 45 in groff.
$ cd /usr/share/groff/1.22.3/font
$ for f in dev*/?(T)R; do
> echo $f
> awk '$2 != "\"" {p=0} $4 ~ /^(45|0+55|0x0*2[dD])$/ {p=1} p' $f
> echo
> done
devascii/R
\- 24 0 0055
hy "
- "
mi "
en "
So -Tascii is simple.
devdvi/TR
hy 349526,451470 0 0055
- "
So `\-' isn't 45 in -Tdvi. And TR doesn't mention it or `\(mi'. (Those
two are always the same AIUI, which makes me wonder about -Tascii
defining both.)
devhtml/R
hy 24 0 0x002D
- "
devlatin1/R
\- 24 0 0055
mi "
- "
hy "
en "
-Tlatin1 is like -Tascii. Correct, since it offer no alternatives.
devlbp/TR
- 1110 0 0x2d 0,45 # hyphen
\- 1110 0 0x2d 0,45 # hyphen
hy 1110 0 0x2d 0,45 # "
hy 1880 0 0x2d 6,0 # hyphen
.C1 1110 0 0x2d 0,45 # - minus "minus sign from current
font"
devlj4/TR
?
devpdf/TR
- 333,257 0 45 hyphen
hy "
devps/TR
- 333,257 0 45 hyphen
hy "
`\-' is 173 in -Tpdf and -Tps; ISO-8859-1's `soft hyphen'.
devutf8/R
One must use `\N[45]' for -Tutf8.
$ groff -Tutf8 <<<'-\-\(mi\(en\N[45]' | uniq | recode ..dump
UCS2 Mne Description
2010 -1 hyphen
2212 -2 minus sign
2212 -2 minus sign
2013 -N en dash
002D - hyphen-minus
000A LF line feed (lf)
000A LF line feed (lf)
$
devX100-12/TR
\- 5,5 0 055
devX100/TR
\- 4,4 0 055
devX75-12/TR
\- 4,4 0 055
devX75/TR
\- 4,3 0 055
-TdevX* are all the same; `\-' gives 45, 055 in octal. Out of
interest, they map `-' and `\(hy' onto 0255, `soft hyphen' in
ISO-8859-1.
I'm no clearer. Except I'm not sure what I want is possible. So what's
"best practice" when aiming at groff, non-groff, old systems,
proprietary systems?
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
Re: [Groff] ASCII Minus Sign in man Pages., Doug McIlroy, 2017/04/23