[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #61683] [me] either document $r and $R registers or rename them
From: |
G. Branden Robinson |
Subject: |
[bug #61683] [me] either document $r and $R registers or rename them |
Date: |
Wed, 15 Dec 2021 19:48:16 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/bugs/?61683>
Summary: [me] either document $r and $R registers or rename
them
Project: GNU troff
Submitted by: gbranden
Submitted on: Thu 16 Dec 2021 12:48:15 AM UTC
Category: Macro - me
Severity: 2 - Minor
Item Group: None
Status: Need Info
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
me(7) is pretty consistent about exposing and documenting macro, register, and
string names that begin with a dollar sign.
The only exceptions I'm presently aware of (and I have looked) are `$r` and
`$R`.
These are alternative ratios for vertical spacing to type size that override
the (well-documented) `$v` and `$V` registers, respectively.
Here is the extent of their initialization and use in groff me(7).
1088 .de @M \" --- set modes for display
1089 .nr ?k 1
1090 .@C 1
1091 .@F \\n(df
1092 .if \\n($R .@V
1093 .vs \\n(.sp*\\n($Vu/100u
1094 .nf
1095 .if "\\*(|p"F" \
1096 . fi \" set fill mode if "F" parameter
1097 .if \\n(_d=4 \
1098 . in 0
1099 .if \\n(_d=3 \
1100 \{\
1101 . in +\\n(biu
1102 . xl -\\n(biu
1103 .\}
1104 .if \\n(_d=1 \
1105 . ce 10000
1106 ..
1462 .\" *** FONT AIDS ***
1463 .
1464 .
1465 .de sz \" *** set point size and vertical spacing
1466 .ps \\$1
1467 .if \\n($r .@v
1468 .vs \\n(.sp*\\n($vu/100u \" default vs at pointsize + 20%
1469 ..
1470 .
1471 .de @v \" --- possibly set $v from $r
1472 .if (1i>=240u)&(1p<=\\n($r)&(\\n($r<=4p) .nr $v \\n($r00/1p
1473 ..
1474 .
1475 .de @V \" --- possibly set $V from $R
1476 .if (1i>=240u)&(1p<=\\n($R)&(\\n($R<=4p) .nr $V \\n($R00/1p
1477 ..
2067 .@R $r\" \" ratio of vs to ps (may override $v)
2069 .@R $R\" \" same for displays (may override $V)
(Don't take the line numbers too literally, I'm pasting from a working tree.)
So `$r` overrides `$v` (and `$R` overrides `$V`) only if there are more than
240 basic units per inch (so, probably a typesetting device), and this ratio
variable is in the range of 1 to 4 points, inclusive.
It is not at all clear to me what these registers are for and I therefore am
not sure how to document them.
They are initialized to zero. Only someone who knows about them from reading
the package sources or folklore would think to set them.
I therefore propose to move them to a more private part of the name space. As
it happens, neither `_R` nor `_r` are taken. Perhaps in groff 1.24 we can get
rid of them entirely.
Or maybe someone will be able to locate a use case.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61683>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #61683] [me] either document $r and $R registers or rename them,
G. Branden Robinson <=