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 | 712ec41a30db9c8794ec92168b9d2b39f1dee6da (patch) | |
tree | 806d94fb8a0c37e22702bd3d39e6ebe9d45925e8 /roff.7 | |
parent | 3234ace1ba2fef84ad009e6822dd76699a34e344 (diff) | |
download | mandoc-712ec41a30db9c8794ec92168b9d2b39f1dee6da.tar.gz mandoc-712ec41a30db9c8794ec92168b9d2b39f1dee6da.tar.zst mandoc-712ec41a30db9c8794ec92168b9d2b39f1dee6da.zip |
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 | 38 |
1 files changed, 36 insertions, 2 deletions
@@ -1,4 +1,4 @@ -.\" $Id: roff.7,v 1.9 2010/06/10 21:42:02 kristaps Exp $ +.\" $Id: roff.7,v 1.10 2010/06/26 15:22:19 kristaps Exp $ .\" .\" Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv> .\" @@ -14,7 +14,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: June 10 2010 $ +.Dd $Mdocdate: June 26 2010 $ .Dt ROFF 7 .Os .Sh NAME @@ -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 |