diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-26 15:22:19 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-26 15:22:19 +0000 |
commit | a7a9c3b662c1cf6ee6766d865a9dcc58376ea2c9 (patch) | |
tree | 5c739a65041bac0ed88bd64df638e92fc2af41ef /roff.7 | |
parent | 730c5a1572228d1c4a1ef49a9748be04a119c1e8 (diff) | |
download | mandoc-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.7 | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -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 |