summaryrefslogtreecommitdiffstats
path: root/roff.7
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-26 15:22:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-26 15:22:19 +0000
commita7a9c3b662c1cf6ee6766d865a9dcc58376ea2c9 (patch)
tree5c739a65041bac0ed88bd64df638e92fc2af41ef /roff.7
parent730c5a1572228d1c4a1ef49a9748be04a119c1e8 (diff)
downloadmandoc-a7a9c3b662c1cf6ee6766d865a9dcc58376ea2c9.tar.gz
First step of adding register support. This is inspired by a significant
patch by schwarze@. This commit adds support to libroff parsing `nr' into register set defined in regs.h. This will propogate into libmdoc and libman in later commits.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.734
1 files changed, 34 insertions, 0 deletions
diff --git a/roff.7 b/roff.7
index 58fb4d19..e35f37d4 100644
--- a/roff.7
+++ b/roff.7
@@ -268,6 +268,34 @@ This macro is intended to have one argument,
the name of the request, macro or string to be undefined.
Currently, it is ignored including its arguments,
and the number of arguments is not checked.
+.Ss \&nr
+Define a register.
+A register is an arbitrary string value that defines some sort of state,
+which influences parsing and/or formatting.
+Its syntax is as follows:
+.Pp
+.D1 Pf \. Sx \&nr Cm name value
+.Pp
+The
+.Cm value
+may, at the moment, only be an integer.
+The
+.Cm name
+is defined up to the next whitespace.
+The following register
+.Cm name
+requests are recognised:
+.Bl -tag -width Ds
+.It Cm nS
+If set to a positive integer value, certain
+.Xr mdoc 7
+macros will behave as if they are defined in the
+.Em SYNOPSIS
+section to a manual.
+Otherwise, this behaviour is unset (even if called within the
+.Em SYNOPSIS
+section itself).
+.El
.Ss \&tr
Output character translation.
This macro is intended to have one argument,
@@ -287,6 +315,12 @@ file re-write
.Pp
.Bl -dash -compact
.It
+The
+.Cm nS
+request to
+.Sx \&nr
+is only compatible with OpenBSD's groff.
+.It
Historic groff did not accept white-space buffering the custom END tag
for the
.Sx \&ig