summaryrefslogtreecommitdiffstats
path: root/roff.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-05-31 20:23:05 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-05-31 20:23:05 +0000
commit91d4baecc6f10b6b8b7119f78bfec0721659961d (patch)
treeb0f0dc2950dbc8a97fcef44482127a53fc2e8cc8 /roff.7
parentafaba3e78072edb0c5149a491c9709b57f31745a (diff)
downloadmandoc-91d4baecc6f10b6b8b7119f78bfec0721659961d.tar.gz
Rudimentary implementation of the \A escape sequence, following groff
semantics (test identifier for syntactical validity), not at all following the completely unrelated Heirloom semantics (define hyperlink target position). The main motivation for providing this implementation is to get \A into the parsing class ESCAPE_EXPAND that corresponds to groff parsing behaviour, which is quite similar to the \B escape sequence (test numerical expression for syntactical validity). This is likely to improve parsing of nested escape sequences in the future. Validation isn't perfect yet. In particular, this implementation rejects \A arguments containing some escape sequences that groff allows to slip through. But that is unlikely to cause trouble even in documents using \A for non-trivial purposes. Rejecting the nested escapes in question might even improve robustnest because the rejected names are unlikely to really be usable for practical purposes - no matter that groff dubiously considers them syntactically valid.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.719
1 files changed, 17 insertions, 2 deletions
diff --git a/roff.7 b/roff.7
index 90b6ddc7..597d4aa7 100644
--- a/roff.7
+++ b/roff.7
@@ -2021,8 +2021,23 @@ End conditional input; see
Paddable non-breaking space character.
.It Ic \e0
Digit width space character.
-.It Ic \eA\(aq Ns Ar string Ns Ic \(aq
-Anchor definition; ignored by
+.It Ic \eA\(aq Ns Ar name Ns Ic \(aq
+Interpolate
+.Sq 1
+if
+.Ar name
+is a syntactically valid identifier that can be used
+as a name for a macro or user-defined string, or
+.Sq 0
+otherwise.
+This is a thoroughly non-portable groff extension.
+Heirloom troff uses the same escape sequence with the same syntax
+for a completely different purpose,
+defining a hyperlink target position, also called an
+.Dq anchor ,
+with the given
+.Ar name .
+The Heirloom semantics is not supported by
.Xr mandoc 1 .
.It Ic \ea
Leader character; ignored by