diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-08 01:37:27 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-08 01:37:27 +0000 |
commit | 4ceb7196c5a7cbee79cd5e93dee6f864e9b35949 (patch) | |
tree | 20e2e9476c702dc1e34a0dfbd26fd7e5896b3d2e /roff.7 | |
parent | 710a62e5240ad4a0f3ebc05b57319d98b097afc7 (diff) | |
download | mandoc-4ceb7196c5a7cbee79cd5e93dee6f864e9b35949.tar.gz |
Fully implement the \B (validate numerical expression) and
partially implement the \w (measure text width) escape sequence
in a way that makes them usable in numerical expressions and in
conditional requests, similar to how \n (interpolate number register)
and \* (expand user-defined string) are implemented.
This lets mandoc(1) handle the baroque low-level roff code
found at the beginning of the ggrep(1) manual.
Thanks to pascal@ for the report.
Diffstat (limited to 'roff.7')
-rw-r--r-- | roff.7 | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -1172,10 +1172,15 @@ Digit width space character. Anchor definition; ignored by .Xr mandoc 1 . .Ss \eB\(aq Ns Ar string Ns \(aq -Test whether +Interpolate +.Sq 1 +if .Ar string -is a numerical expession; ignored by -.Xr mandoc 1 . +conforms to the syntax of +.Sx Numerical expressions +explained above and +.Sq 0 +otherwise. .Ss \eb\(aq Ns Ar string Ns \(aq Bracket building function; ignored by .Xr mandoc 1 . @@ -1299,9 +1304,13 @@ Vertical motion; ignored by .Xr mandoc 1 . .Ss \ew\(aq Ns Ar string Ns \(aq Interpolate the width of the -.Ar string ; -ignored by -.Xr mandoc 1 . +.Ar string . +The +.Xr mandoc 1 +implementation assumes that after expansion of user-defined strings, the +.Ar string +only contains normal characters, no escape sequences, and that each +character has a width of 24 basic units. .Ss \eX\(aq Ns Ar string Ns \(aq Output .Ar string |