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 | d188baa4f65eb607975e6eac9d3709fd7724d486 (patch) | |
tree | dc15a5178b9f83e919f95bc29024e089f1d62625 /roff.7 | |
parent | 7dcbb6ff063b997d62c7738d0904f8e0d6fdfc79 (diff) | |
download | mandoc-d188baa4f65eb607975e6eac9d3709fd7724d486.tar.gz mandoc-d188baa4f65eb607975e6eac9d3709fd7724d486.tar.zst mandoc-d188baa4f65eb607975e6eac9d3709fd7724d486.zip |
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 | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -1,4 +1,4 @@ -.\" $Id: roff.7,v 1.53 2014/04/07 15:07:13 schwarze Exp $ +.\" $Id: roff.7,v 1.54 2014/04/08 01:37:27 schwarze Exp $ .\" .\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2010, 2011, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 7 2014 $ +.Dd $Mdocdate: April 8 2014 $ .Dt ROFF 7 .Os .Sh NAME @@ -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 |