summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-03-24 15:04:41 +0000
committerwlemb <wlemb>2001-03-24 15:04:41 +0000
commitbb7f02eaa4aff2763e0869da3b32722aa2042d2b (patch)
tree1b8edb1fb087d532b3377574164131635ec47f5b
parent800c6f39a745ebf6b41d9f1c516dd11e66567c88 (diff)
downloadgroff-bb7f02eaa4aff2763e0869da3b32722aa2042d2b.tar.gz
* tmac/doc-nroff, tmac/doc-ditroff: Implement -rSxx switch for
selecting the font size. * tmac/groff_mdoc.man, NEWS: Document it. * tmac/groff_mdoc.reference.man: Small updates and renamed to ... * tmac/groff_mdoc.man: This. The quick reference has been removed. * tmac/Makefile.sub, NEWS: Updated.
-rw-r--r--ChangeLog10
-rw-r--r--NEWS6
-rw-r--r--tmac/Makefile.sub1
-rw-r--r--tmac/doc-ditroff19
-rw-r--r--tmac/doc-nroff5
-rw-r--r--tmac/groff_mdoc.man4205
-rwxr-xr-xtmac/groff_mdoc.reference.man3927
7 files changed, 3881 insertions, 4292 deletions
diff --git a/ChangeLog b/ChangeLog
index b3b66f21..9a45fba9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-24 Werner LEMBERG <wl@gnu.org>
+
+ * tmac/doc-nroff, tmac/doc-ditroff: Implement -rSxx switch for
+ selecting the font size.
+ * tmac/groff_mdoc.man, NEWS: Document it.
+
2001-03-23 Werner LEMBERG <wl@gnu.org>
* src/roff/troff/div.cc (save_vertical_space): Add default argument
@@ -9,6 +15,10 @@
* doc/groff.texinfo: More fixes and additions (mainly for font
manipulating commands).
+ * tmac/groff_mdoc.reference.man: Small updates and renamed to ...
+ * tmac/groff_mdoc.man: This. The quick reference has been removed.
+ * tmac/Makefile.sub, NEWS: Updated.
+
2001-03-23 Werner LEMBERG <wl@gnu.org>
Replaced mdoc implementation. The new version is `state of the
diff --git a/NEWS b/NEWS
index c650b66b..0ee1a2dd 100644
--- a/NEWS
+++ b/NEWS
@@ -38,9 +38,11 @@ o The mdoc package has been completely rewritten, using the full power of
. `.Bl -xwidth <string>': interpret <string> and use the resulting width
. `.Ld': prints `...'
. support for double-sided printing (-rD=1 command line switch)
+ . support for 11pt and 12pt document sizes (-rS11, -rS12 command line
+ switches)
- groff_mdoc.samples.man has been replaced with groff_mdoc.reference.man
- which completely documents the mdoc package.
+ `groff_mdoc.samples.man' replaces `groff_mdoc.man'; it now completely
+ documents the mdoc package.
Great care has been taken to assure backwards compatibility. If you
encounter any abnormal results, please report them to bug-groff@gnu.org.
diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
index dd8e2e37..6bd541d0 100644
--- a/tmac/Makefile.sub
+++ b/tmac/Makefile.sub
@@ -5,7 +5,6 @@ MAN7=\
groff_man.n \
groff_me.n \
groff_mdoc.n \
- groff_mdoc.reference.n \
groff_mwww.n
NORMALFILES=\
diff --git a/tmac/doc-ditroff b/tmac/doc-ditroff
index d3fed917..45b0f76e 100644
--- a/tmac/doc-ditroff
+++ b/tmac/doc-ditroff
@@ -48,9 +48,28 @@
.
.if !r cR .nr cR 0
.
+.\" use -rS={11,12} to change the font size from 10pt to 11pt or 12pt.
+.
+.if !r S .nr S 10
+.
.
.ec
.
+.
+.ie (\n[S] == 11) \{\
+. ps 10.95z
+. vs 13.6p
+.\}
+.el \{ .ie (\n[S] == 12) \{\
+. ps 12z
+. vs 14.5p
+.\}
+.el \{\
+. ps 10z
+. vs 12p
+.\}\}
+.
+.
.\" the `doc-xx-font' strings must not be empty!
.
.ds doc-caption-font \f[R]\s[\n[.ps]u]
diff --git a/tmac/doc-nroff b/tmac/doc-nroff
index fbbcfa46..f1cd847a 100644
--- a/tmac/doc-nroff
+++ b/tmac/doc-nroff
@@ -44,6 +44,11 @@
.
.if !r cR .nr cR 1
.
+.\" the following switches are ignored in nroff mode
+.
+.nr S 10
+.nr C 0
+.
.\" the `doc-xx-font' strings must not be empty!
.
.ds doc-caption-font \f[R]
diff --git a/tmac/groff_mdoc.man b/tmac/groff_mdoc.man
index 2c8dfb6d..fbb09cdd 100644
--- a/tmac/groff_mdoc.man
+++ b/tmac/groff_mdoc.man
@@ -1,7 +1,15 @@
-.\" $NetBSD: mdoc.7,v 1.14 1999/08/30 00:41:28 ross Exp $
+.\" groff_mdoc.man
.\"
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
+.\" A complete reference of the mdoc macro package for GNU troff.
+.\"
+.\" Based on NetBSD's mdoc.samples.7, version 1.21.
+.\"
+.\"
+.\" Warning: You can't format this file with the old mdoc macros!
+.\"
+.\"
+.\" Copyright (c) 1990, 1993
+.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -13,8 +21,8 @@
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
@@ -31,394 +39,3867 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)mdoc.7 8.2 (Berkeley) 12/30/93
+.\" @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93
.\"
-.Dd @MDATE@
-.Os "Groff Version @VERSION@"
-.Dt MDOC @MAN7EXT@
+.\" This reference invokes every macro in the package several
+.\" times and is guaranteed to give a worst case performance
+.\" for an already extremely slow package.
+.\"
+.
+.Dd January 1, 2001
+.Os
+.Dt GROFF_MDOC 7
+.
+.
.Sh NAME
-.Nm mdoc
-.Nd quick reference guide for the
-.Nm \-mdoc
-macro package
+.
+.Nm groff_mdoc
+.Nd reference for groff's mdoc implementation
+.
+.
.Sh SYNOPSIS
-.Nm groff
-.Fl m Ns Ar doc
-.Ar files ...
-.Nm groff
-.Fl m Ar mdoc
-.Ar files ...
+.
+.Nm man groff_mdoc
+.
+.
.Sh DESCRIPTION
+.
+A complete reference for writing
+.Ux
+manual pages with the
+.Nm \-mdoc
+macro package; a
+.Em content Ns -based
+and
+.Em domain Ns -based
+formatting package for
+.Tn GNU
+.Xr troff 1 .
+Its predecessor, the
+.Xr \-man 7
+package, addressed page layout leaving the manipulation of fonts and other
+typesetting details to the individual author.
+In
+.Nm \-mdoc ,
+page layout macros make up the
+.Em "page structure domain"
+which consists of macros for titles, section headers, displays and lists
+\- essentially items which affect the physical position of text on a
+formatted page.
+In addition to the page structure domain, there are two more domains, the
+.Em manual
+domain and the
+.Em general
+text domain.
+The general text domain is defined as macros which perform tasks such as
+quoting or emphasizing pieces of text.
+The manual domain is defined as macros that are a subset of the day to day
+informal language used to describe commands, routines and related to
+.Ux
+files.
+Macros in the manual domain handle command names, command line arguments and
+options, function names, function parameters, pathnames, variables, cross
+references to other manual pages, and so on.
+These domain items have value for both the author and the future user of the
+manual page.
+It is hoped the consistency gained across the manual set will provide easier
+translation to future documentation tools.
+.Pp
+Throughout the
+.Ux
+manual pages, a manual entry is simply referred to as a man page, regardless
+of actual length and without sexist intention.
+.
+.
+.Sh "GETTING STARTED"
+.
+The material presented in the remainder of this document is outlined
+as follows:
+.
+.Bl -enum -width 3n -offset indent
+. It
+. Tn "TROFF IDIOSYNCRASIES"
+.
+. Bl -tag -width 2n -compact
+. It "Macro Usage"
+. It "Passing Space Characters in an Argument"
+. It "Trailing Blank Space Characters"
+. It "Escaping Special Characters"
+. It "Other Possible Pitfalls"
+. El
+.
+. It
+. Tn "A MANUAL PAGE TEMPLATE"
+.
+. It
+. Tn "CONVENTIONS"
+.
+. It
+. Tn "TITLE MACROS"
+.
+. It
+. Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
+.
+. Bl -tag -width 2n -compact
+. It "What's in a Name" Ns Ld
+. It "General Syntax"
+. El
+.
+. It
+. Tn "MANUAL DOMAIN"
+.
+. Bl -tag -width 2n -compact
+. It "Addresses"
+. It "Author Name"
+. It "Arguments"
+. It "Configuration Declarations (Section Four Only)"
+. It "Command Modifiers"
+. It "Defined Variables"
+. It "Errno's (Section Two Only)"
+. It "Environment Variables"
+. It "Function Arguments"
+. It "Function Declarations"
+. It "Flags"
+. It "Functions (Library Routines)"
+. It "Function Types"
+. It "Return Values"
+. \" .It "Header File (including source code)"
+. It "Interactive Commands"
+. It "Library Names"
+. It "Literals"
+. It "Names"
+. It "Options"
+. It "Pathnames"
+. It "Standards"
+. It "Variables"
+. It "Manual Page Cross References"
+. El
+.
+. It
+. Tn "GENERAL TEXT DOMAIN"
+.
+. Bl -tag -width 2n -compact
+. It "AT&T Macro"
+. It "BSD Macro"
+. It "NetBSD Macro"
+. It "FreeBSD Macro"
+. It "OpenBSD Macro"
+. It "BSD/OS Macro"
+. It "UNIX Macro"
+. It "Emphasis Macro"
+. It "Font Mode"
+. It "Enclosure and Quoting Macros"
+. It "No-Op or Normal Text Macro"
+. It "No-Space Macro"
+. It "Section Cross References"
+. It "Symbolics"
+. It "Mathematical Symbols"
+. It "References and Citations"
+. It "Trade Names (or Acronyms and Type Names)"
+. It "Extended Arguments"
+. El
+.
+. It
+. Tn "PAGE STRUCTURE DOMAIN"
+.
+. Bl -tag -width 2n -compact
+. It "Section Headers"
+. It "Subsection Headers"
+. It "Paragraphs and Line Spacing"
+. It "Keeps"
+. It "Examples and Displays"
+. It "Tagged Lists and Columns"
+. El
+.
+. It
+. Tn "MISCELLANEOUS MACROS"
+.
+. It
+. Tn "PREDEFINED STRINGS"
+.
+. It
+. Tn "DIAGNOSTICS"
+.
+. It
+. Tn "FORMATTING WITH GROFF, TROFF, AND NROFF"
+.
+. It
+. Tn "FILES"
+.
+. It
+. Tn "SEE ALSO"
+.
+. It
+. Tn "BUGS"
+.El
+.
+.\" XXX
+.ne 7
+.
+.
+.Sh "TROFF IDIOSYNCRASIES"
+.
The
.Nm \-mdoc
-package is a set of content-based and domain-based macros
-used to format the
-.Bx
-man pages.
-The macro names and their meanings are
-listed below for quick reference; for
-a detailed explanation on using the package,
-see the tutorial sampler
-.Xr mdoc.samples @MAN7EXT@ .
-.Pp
-The macros are described in two groups, the first
-includes the structural and physical page layout macros.
-The second contains the manual and general text domain
-macros which differentiate the
+package attempts to simplify the process of writing a man page.
+Theoretically, one should not have to learn the dirty details of
+.Tn GNU
+.Xr troff 1
+to use
+.Nm \-mdoc ;
+however, there are a few limitations which are unavoidable and best gotten
+out of the way.
+And, too, be forewarned, this package is
+.Em not
+fast.
+.
+.Ss "Macro Usage"
+.
+As in
+.Tn GNU
+.Xr troff 1 ,
+a macro is called by placing a
+.Ql .\&
+(dot character) at the beginning of a line followed by the two-character
+(or three-character) name for the macro.
+There can be space characters between the dot and the macro name (but
+.Em no
+tabs).
+Arguments may follow the macro separated by spaces (again, no tabs).
+It is the dot character at the beginning of the line which causes
+.Tn GNU
+.Xr troff 1
+to interpret the next two (or more) characters as a macro name.
+A single starting dot followed by nothing is ignored.
+To place a
+.Ql .\&
+(dot character) at the beginning of an input line in some context other than
+a macro invocation, precede the
+.Ql .\&
+(dot) with the
+.Ql \e&
+escape sequence.
+The
+.Ql \e&
+translates literally to a zero-width space, and is never displayed in
+the output.
+.Pp
+In general,
+.Tn GNU
+.Xr troff 1
+macros accept an unlimited number of arguments (contrary to other versions
+of troff which can't handle more than nine arguments).
+In limited cases, arguments may be continued or extended on the next
+line (See
+.Sx Extended Arguments
+below).
+Almost all macros handle quoted arguments (see
+.Sx Passing Space Characters in an Argument
+below).
+.Pp
+Most of the
+.Nm \-mdoc
+general text domain and manual domain macros are special in that their
+argument lists are
+.Em parsed
+for callable macro names.
+This means an argument on the argument list which matches a general text or
+manual domain macro name and is determined to be callable will be executed
+or called when it is processed.
+In this case the argument, although the name of a macro, is not preceded by
+a
+.Ql .\&
+(dot).
+It is in this manner that many macros are nested; for example the
+option macro,
+.Ql .Op ,
+may
+.Em call
+the flag and argument macros,
+.Ql \&Fl
+and
+.Ql \&Ar ,
+to specify an optional flag with an argument:
+.
+.Bl -tag -xwidth ".Op Fl s Ar bytes" -offset indent
+.It Op Fl s Ar bytes
+is produced by
+.Ql ".Op Fl s Ar bytes"
+.El
+.
+.Pp
+To prevent a string from being interpreted as a macro name, precede the
+string with the escape sequence
+.Ql \e& :
+.
+.Bl -tag -xwidth ".Op \&Fl s \&Ar bytes" -offset indent
+.It Op \&Fl s \&Ar bytes
+is produced by
+.Ql ".Op \e&Fl s \e&Ar bytes"
+.El
+.
+.Pp
+Here the strings
+.Ql \&Fl
+and
+.Ql \&Ar
+are not interpreted as macros.
+Macros whose argument lists are parsed for callable arguments are referred
+to as
+.Em parsed
+and macros which may be called from an argument list are referred to as
+.Em callable
+throughout this document.
+This is a technical
+.Em faux pas
+as almost all of the macros in
+.Nm \-mdoc
+are parsed, but as it was cumbersome to constantly refer to macros as
+being callable and being able to call other macros, the term parsed
+has been used.
+.
+.Ss "Passing Space Characters in an Argument"
+.
+Sometimes it is desirable to give as an argument a string containing one or
+more blank space characters.
+This may be necessary to specify arguments to macros which expect particular
+arrangement of items in the argument list. Additionally, it makes
+.Nm \-mdoc
+working faster.
+For example, the function macro
+.Ql .Fn
+expects the first argument to be the name of a function and any remaining
+arguments to be function parameters.
+As
+.Tn ANSI\~C
+stipulates the declaration of function parameters in the parenthesized
+parameter list, each parameter is guaranteed to be at minimum a two word
+string.
+For example,
+.Fa int foo .
+.Pp
+There are two possible ways to pass an argument which contains
+an embedded space.
+One way of passing a string containing blank spaces is to use the hard or
+unpaddable space character
+.Ql \e\ ,
+that is, a blank space preceded by the escape character
+.Ql \e .
+This method may be used with any macro but has the side effect of
+interfering with the adjustment of text over the length of a line.
+.Xr Troff
+sees the hard space as if it were any other printable character and cannot
+split the string into blank or newline separated pieces as one would expect.
+This method is useful for strings which are not expected to overlap a line
+boundary.
+An alternative is to use
+.Ql \e~ ,
+a paddable (i.e.\& stretchable), unbreakable space (this is a
+.Tn GNU
+.Xr troff 1
+extension).
+The second method is to enclose the string with double quotes.
+.Pp
+For example:
+.
+.Bl -tag -xwidth ".Fn fetch char\ *str" -offset indent
+.It Fn fetch char\ *str
+is created by
+.Ql ".Fn fetch char\e *str"
+.It Fn fetch "char *str"
+can also be created by
+.Ql ".Fn fetch \*[q]char *str\*[q]"
+.El
+.
+.Pp
+If the
+.Ql \e
+before the space resp.\& the double quotes were omitted,
+.Ql .Fn
+would see three arguments, and the result would be:
+.Pp
+.Dl Fn fetch char *str
+.Pp
+For an example of what happens when the parameter list overlaps a newline
+boundary, see the
+.Sx BUGS
+section.
+.
+.Ss "Trailing Blank Space Characters"
+.
+.Xr Troff
+can be confused by blank space characters at the end of a line.
+It is a wise preventive measure to globally remove all blank spaces
+from
+.Ao blank-space Ac Ns Ao end-of-line Ac
+character sequences.
+Should the need arise to force a blank character at the end of a line, it
+may be forced with an unpaddable space and the
+.Ql \e&
+escape character.
+For example,
+.Ql string\e\ \e& .
+.
+.Ss "Escaping Special Characters"
+.
+Special characters like the newline character
+.Ql \en
+are handled by replacing the
+.Ql \e
+with
+.Ql \ee
+(e.g.\&
+.Ql \een )
+to preserve the backslash.
+.
+.Ss "Other Possible Pitfalls"
+.
+A warning is emitted when an empty input line is found outside of displays
+(see below).
+Use
+.Ql .sp
+instead.
+(Well, it is even better to use
+.Nm \-mdoc
+macros to avoid the usage of low-level commands).
+.Pp
+Leading spaces will cause a break and are output directly.
+Avoid this behaviour if possible.
+Similarly, don't use more than one space character between words in an
+ordinary text line; contrary to other text formatters, they are
+.Em not
+replaced with a single space.
+.Pp
+You can't pass
+.Ql \*[q]
+directly as an argument.
+Use
+.Ql \e*[q]
+(or
+.Ql \e*q )
+instead.
+.Pp
+By default,
+.Xr troff 1
+inserts two space characters after a punctuation mark closing a sentence
+(characters like
+.Ql \&)
+or
+.Ql \&'
+are treated transparently, not influencing the sentence-ending behaviour).
+To change this, insert
+.Ql \e&
+before or after the dot:
+.
+.Bd -literal -offset indent
+The
+\&.Ql .
+character.
+\&.Pp
+The
+\&.Ql \e&.
+character.
+\&.Pp
+\&.No test .
+test
+\&.Pp
+\&.No test.
+test
+.Ed
+.Pp
+.
+gives
+.
+.Bd -filled -offset indent
+The
+.Ql .
+character
+.Pp
+The
+.Ql \&.
+character.
+.Pp
+.No test .
+test
+.Pp
+.No test.
+test
+.Ed
+.Pp
+.
+As can be seen in the first and third line,
+.Nm \-mdoc
+handles punctuation characters specially in macro arguments.
+This will be explained in section
+.Sx General Syntax
+below.
+In the same way, you have to protect trailing full stops of abbreviations
+with a trailing zero-width space:
+.Ql e.g.\e& .
+.Pp
+A comment in the source file of a man page can be either started with
+.Ql .\e"
+on a single line,
+.Ql \e"
+after some input, or
+.Ql \e#
+anywhere (the latter is a
+.Tn GNU
+.Xr troff 1
+extension); the rest of such a line is ignored.
+.
+.
+.Sh "A MANUAL PAGE TEMPLATE"
+.
+The body of a man page is easily constructed from a basic template:
+.
+.Bd -literal -offset indent
+\&.\e" /usr/share/misc/mdoc.template:
+\&.\e" The following requests are required for all man pages.
+\&.
+\&.Dd Month day, year
+\&.Os OPERATING_SYSTEM [version/release]
+\&.Dt DOCUMENT_TITLE [section number] [volume]
+\&.Sh NAME
+\&.Nm name
+\&.Nd one line description of name
+\&.Sh SYNOPSIS
+\&.Sh DESCRIPTION
+\&.
+\&.\e" The following requests should be uncommented and
+\&.\e" used where appropriate.
+\&.\e" .Sh IMPLEMENTATION NOTES
+\&.\e" This next request is for sections 2, 3 and 9 function
+\&.\e" return values only.
+\&.\e" .Sh RETURN VALUES
+\&.
+\&.\e" This next request is for sections 1, 6, 7, 8 & 9 only
+\&.\e" .Sh ENVIRONMENT
+\&.\e" .Sh FILES
+\&.\e" .Sh EXAMPLES
+\&.
+\&.\e" This next request is for sections 1, 6, 7, 8 & 9 only
+\&.\e" (command return values (to shell) and
+\&.\e" fprintf/stderr type diagnostics)
+\&.\e" .Sh DIAGNOSTICS
+\&.
+\&.\e" The next request is for sections 2, 3 & 9 error
+\&.\e" and signal handling only.
+\&.\e" .Sh ERRORS
+\&.\e" .Sh SEE ALSO
+\&.\e" .Sh STANDARDS
+\&.\e" .Sh HISTORY
+\&.\e" .Sh AUTHORS
+\&.\e" .Sh BUGS
+.Ed
+.Pp
+.
+The first items in the template are the macros
+.Ql .Dd ,
+.Ql .Os ,
+and
+.Ql .Dt ;
+the document date, the operating system the man page or subject source is
+developed or modified for, and the man page title (in
+.Em upper case )
+along with the section of the manual the page belongs in.
+These macros identify the page and are discussed below in
+.Sx TITLE MACROS .
+.Pp
+The remaining items in the template are section headers
+.Pf ( Li .Sh ) ;
+of which
+.Sx NAME ,
+.Sx SYNOPSIS ,
+and
+.Sx DESCRIPTION
+are mandatory.
+The headers are discussed in
+.Sx "PAGE STRUCTURE DOMAIN" ,
+after presentation of
+.Sx "MANUAL DOMAIN" .
+Several content macros are used to demonstrate page layout macros; reading
+about content macros before page layout macros is recommended.
+.
+.
+.Sh CONVENTIONS
+.
+In the description of all macros below, optional arguments are put into
+brackets.
+An ellipsis
+.Pf ( Sq Ld )
+represents zero or more additional arguments.
+Alternative values for a parameter are separated with
+.Ql | .
+If there are alternative values for a mandatory parameter, braces are used
+(together with
+.Ql | )
+to enclose the value set.
+Meta-variables are specified within angles.
+.Pp
+Example:
+.
+.Bl -tag -width 6n -offset indent
+.It Li .Xx Xo
+.Aq foo
+.Brq bar1 | bar2
+.Op \-test1 Op \-test2 | \-test3
+.Ld
+.Xc
+.El
+.
+.Pp
+Except stated explicitly, all macros are parsed and callable.
+.Pp
+Most macros have a default width value which can be used to specify a label
+width
+.Pf ( Fl width )
+or offset
+.Pf ( Fl offset )
+for the
+.Ql .Bl
+and
+.Ql .Bd
+macros.
+It is recommended not to use this rather obscure feature to avoid
+dependencies on local modifications of the
+.Nm \-mdoc
+package.
+.
+.
+.Sh "TITLE MACROS"
+.
+The title macros are part of the page structure domain but are presented
+first and separately for someone who wishes to start writing a man page
+yesterday.
+Three header macros designate the document title or manual page title, the
+operating system, and the date of authorship.
+These macros are called once at the very beginning of the document and are
+used to construct headers and footers only.
+.
+.Bl -tag -width 6n
+.It Li .Dt Xo
+.Op Aq document title
+.Op Aq section number
+.Op Aq volume
+.Xc
+The document title is the subject of the man page and must be in
+.Tn CAPITALS
+due to troff limitations.
+If omitted,
+.Sq Tn UNTITLED
+is used.
+The section number may be a number in the range
+.No 1,\~ Ns Ld Ns ,\~9
+or
+.Ql unass ,
+.Ql draft ,
+or
+.Ql paper .
+If it is specified, and no volume name is given, a default volume name is
+used.
+A volume name may be arbitrary or one of the following:
+.
+.Pp
+.Bl -column LOCAL -offset indent -compact
+.It Li USD Ta "\*[volume-ds-USD]"
+.It Li PS1 Ta "\*[volume-ds-PS1]"
+.It Li AMD Ta "\*[volume-ds-AMD]"
+.It Li SMM Ta "\*[volume-ds-SMM]"
+.It Li URM Ta "\*[volume-ds-URM]"
+.It Li PRM Ta "\*[volume-ds-PRM]"
+.It Li KM Ta "\*[volume-ds-KM]"
+.It Li IND Ta "\*[volume-ds-IND]"
+.It Li LOCAL Ta "\*[volume-ds-LOCAL]"
+.It Li CON Ta "\*[volume-ds-CON]"
+.El
+.Pp
+.
+For compatibility,
+.Ql MMI
+can be used for
+.Ql IND ,
+and
+.Ql LOC
+for
+.Ql LOCAL .
+Values from the previous table will specify a new volume name.
+If the third parameter is a keyword designating a computer architecture,
+its value is appended to the volume name as specified by the second
+parameter. By default, the following architecture keywords are defined:
+.
+\# we use `No' to avoid hyphenation
+.Bd -ragged -offset indent
+.No alpha , amiga , arc , arm26 , arm32 , atari , bebox , cobalt , evbsh3 ,
+.No hp300 , hpcmips , i386 , luna68k , m68k , mac68k , macppc , mips ,
+.No mmeye , mvme68k , news68k , newsmips , next68k , ofppc , pc532 , pmax ,
+.No powerpc , prep , sgimips , sh3 , sparc , sparc64 , sun3 , tahoe , vax ,
+.No x68k
+.Ed
+.Pp
+.
+In the following examples, the left (which is identical to the right) and
+the middle part of the manual page header strings are shown.
+.
+.Bd -ragged
+.Bl -tag -xwidth ".Li .Dt\ FOO\ 2\ mac68k" -compact -offset indent
+.It Li ".Dt FOO 7"
+.Ql FOO(7)
+.Ql System Reference Manual
+.It Li ".Dt FOO 2 mac68k"
+.Ql FOO(2)
+.Ql System Programmer's Manual (mac68k Architecture)
+.It Li ".Dt FOO \*[q]\*[q] bar"
+.Ql FOO
+.Ql bar
+.El
+.Ed
+.Pp
+.
+Local, OS-specific additions might be found in the file
+.Pa mdoc.local ;
+look for strings named
+.Ql volume-ds-XXX
+(for the former type) and
+.Ql volume-as-XXX
+(for the latter type);
+.Ql XXX
+then denotes the keyword to be used with the
+.Ql .Dt
+macro.
+.Pp
+This macro is neither callable nor parsable.
+.
+.It Li .Os Xo
+.Op Aq operating system
+.Op Aq release
+.Xc
+If the first parameter is empty,
+.Sq Tn BSD
+is used as the default operating system.
+This may be overridden in the local configuration file.
+In general, the name of the operating system should be the common acronym,
+e.g.\&
+.Tn BSD
+or
+.Tn ATT .
+The release should be the standard release nomenclature for the system
+specified.
+In the following table, the possible second arguments for some predefined
+operating systems are listed.
+Similar to
+.Ql .Dt ,
+local additions might be defined in
+.Pa mdoc.local ;
+look for strings named
+.Ql operating-system-XXX-YYY ,
+where
+.Ql XXX
+is the acronym for the operating system and
+.Ql YYY
+the release ID.
+.
+.Bd -ragged -compact
+.Bl -tag -xwidth ".No FreeBSD" -offset indent
+.It ATT
+7th, 7, III, 3, V, V.2, V.3, V.4
+.It BSD
+3, 4, 4.1, 4.2, 4.3, 4.3t, 4.3T, 4.3r, 4.3R, 4.4
+.It NetBSD
+0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e,
+1.3, 1.3a, 1.4, 1.5
+.It FreeBSD
+1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1,
+2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1,
+4.2, 5.0
+.El
+.Ed
+.Pp
+.
+For
+.Tn ATT ,
+an unknown second parameter will be replaced with the string
+.Tn UNIX ;
+for the other predefined acronyms it will be ignored and a warning message
+emitted.
+Unrecognized arguments are displayed as given in the page footer.
+For instance, a typical footer might be:
+.Pp
+.Dl .Os BSD 4.3
+.Pp
+giving
+.Ql 4.3\~Berkeley Distribution ,
+or for a locally produced set
+.Pp
+.Dl .Os CS Department
+.Pp
+which will produce
+.Ql CS\~Department .
+.Pp
+If the
+.Ql .Os
+macro is not present, the bottom left corner of the manual page will be
+ugly.
+.Pp
+This macro is neither callable nor parsable.
+.
+.It Li .Dd Oo
+.Aq month
+.Aq day ,
+.Aq year
+.Oc
+If
+.Ql Dd
+has no arguments,
+.Ql Epoch
+is used for the date string.
+If it has exactly three arguments, they are concatenated, separated with
+unbreakable space:
+.Pp
+.Dl .Dd January 25, 2001
+.Pp
+Otherwise, the current date is used, ignoring the parameters.
+.Pp
+This macro is neither callable nor parsable.
+.El
+.
+.
+.Sh "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
+.
+.Ss "What's in a name" Ns Ld
+.
+The manual domain macro names are derived from the day to day informal
+language used to describe commands, subroutines and related files.
+Slightly different variations of this language are used to describe the
+three different aspects of writing a man page.
+First, there is the description of
+.Nm \-mdoc
+macro request usage.
+Second is the description of a
+.Ux
+command
+.Em with
+.Nm \-mdoc
+macros, and third, the description of a command to a user in the verbal
+sense; that is, discussion of a command in the text of a man page.
+.Pp
+In the first case,
+.Xr troff 1
+macros are themselves a type of command; the general syntax for a troff
+command is:
+.
+.Bd -filled -offset indent
+.Li ".Xx argument1 argument2" Ld
+.Ed
+.Pp
+.
+.Ql .Xx
+is a macro command or request, and anything following it are arguments to
+be processed.
+In the second case, the description of a
+.Ux
+command using the content macros is a bit more involved; a typical
+.Sx SYNOPSIS
+command line might be displayed as:
+.
+.Bd -filled -offset indent
+.Nm filter
+.Op Fl flag
+.Ao Ar infile Ac Ao Ar outfile Ac
+.Ed
+.Pp
+.
+Here,
+.Nm filter
+is the command name and the
+bracketed string
+.Fl flag
+is a
+.Em flag
+argument designated as optional by the option brackets.
+In
+.Nm \-mdoc
+terms,
+.Ao Ar infile Ac
+and
+.Ao Ar outfile Ac
+are called
+.Em meta arguments ;
+in this example, the user has to replace the meta expressions given in angle
+brackets with real file names.
+Note that in this document meta arguments are used to describe
+.Nm \-mdoc
+commands; in most man pages, meta variables are not specifically written
+with angle brackets.
+The macros which formatted the above example:
+.
+.Bd -literal -offset indent
+\&.Nm filter
+\&.Op Fl flag
+\&.Ao Ar infile Ac Ao Ar outfile Ac
+.Ed
+.Pp
+.
+In the third case, discussion of commands and command syntax includes both
+examples above, but may add more detail.
+The arguments
+.Ao Ar infile Ac
+and
+.Ao Ar outfile Ac
+from the example above might be referred to as
+.Em operands
+or
+.Em file arguments .
+Some command line argument lists are quite long:
+.
+.Bd -ragged
+.Bl -tag -xwidth ".Nm make" -offset indent -compact
+.It Nm make
+.Op Fl eiknqrstv
+.Op Fl D Ar variable
+.Op Fl d Ar flags
+.Op Fl f Ar makefile
+.Op Fl I Ar directory
+.Op Fl j Ar max_jobs
+.Op Ar variable=value
+.Bk
+.Op Ar target Ld
+.Ek
+.El
+.Ed
+.Pp
+.
+Here one might talk about the command
+.Nm make
+and qualify the argument,
+.Ar makefile ,
+as an argument to the flag,
+.Fl f ,
+or discuss the optional file operand
+.Ar target .
+In the verbal context, such detail can prevent confusion, however the
.Nm \-mdoc
-package from other
+package does not have a macro for an argument
+.Em to
+a flag.
+Instead the
+.Ql \&Ar
+argument macro is used for an operand or file argument like
+.Ar target
+as well as an argument to a flag like
+.Ar variable .
+The make command line was produced from:
+.
+.Bd -literal -offset indent
+\&.Nm make
+\&.Op Fl eiknqrstv
+\&.Op Fl D Ar variable
+\&.Op Fl d Ar flags
+\&.Op Fl f Ar makefile
+\&.Op Fl I Ar directory
+\&.Op Fl j Ar max_jobs
+\&.Op Ar variable=value
+\&.Bk
+\&.Op Ar target Ld
+\&.Ek
+.Ed
+.Pp
+.
+The
+.Ql .Bk
+and
+.Ql .Ek
+macros are explained in
+.Sx Keeps .
+.
+.Ss "General Syntax"
+.
+The manual domain and general text domain macros share a similar syntax with
+a few minor deviations; most notably,
+.Ql .Ar ,
+.Ql .Fl ,
+.Ql .Nm ,
+and
+.Ql .Pa
+differ only when called without arguments; and
+.Ql .Fn
+and
+.Ql .Xr
+impose an order on their argument lists.
+All content macros are capable of recognizing and properly handling
+punctuation, provided each punctuation character is separated by a leading
+space.
+If a request is given:
+.Pp
+.Dl \&.Ar sptr, ptr),
+.Pp
+The result is:
+.Pp
+.Dl Ar sptr, ptr),
+.Pp
+The punctuation is not recognized and all is output in the
+font used by
+.Ql .Ar .
+If the punctuation is separated by a leading white space:
+.Pp
+.Dl \&.Ar "sptr , ptr ) ,"
+.Pp
+The result is:
+.Pp
+.Dl Ar sptr , ptr ) ,
+.Pp
+The punctuation is now recognized and output in the default font
+distinguishing it from the argument strings.
+To remove the special meaning from a punctuation character escape it with
+.Ql \e& .
+.Pp
+.Xr Troff
+is limited as a macro language, and has difficulty when presented with a
+string containing a member of the mathematical, logical or quotation set:
+.
+.Bd -literal -offset indent-two
+{+,\-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
+.Ed
+.Pp
+.
+The problem is that
.Xr troff
-formatting packages.
-.Sh PAGE STRUCTURE DOMAIN
-.Ss Title Macros
-To create a valid manual page, these three macros, in this order,
-are required:
-.Bl -tag -width "xxxx.Os OPERATINGxSYSTEM [version/release]" -compact
-.It Li "\&.Dd " Ar "Month day, year"
-Document date.
-.It Li "\&.Dt " Ar "DOCUMENT_TITLE [section] [volume]"
-Title, in upper case.
-.It Li "\&.Os " Ar "OPERATING_SYSTEM [version/release]"
-Operating system
-.Pq Tn BSD .
-.El
-.Ss Page Layout Macros
-Section headers, paragraph breaks, lists and displays.
+may assume it is supposed to actually perform the operation or evaluation
+suggested by the characters.
+To prevent the accidental evaluation of these characters, escape them with
+.Ql \e& .
+Typical syntax is shown in the first content macro displayed below,
+.Ql .Ad .
+.
+.
+.Sh "MANUAL DOMAIN"
+.
+.Ss Addresses
+.
+The address macro identifies an address construct.
+.Pp
+.Dl Usage: .Ad Ao address Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Ad\ f1\ ,\ f2\ ,\ f3\ :" -compact -offset 15n
+.It Li ".Ad addr1"
+.Ad addr1
+.It Li ".Ad addr1 ."
+.Ad addr1 .
+.It Li ".Ad addr1 , file2"
+.Ad addr1 , file2
+.It Li ".Ad f1 , f2 , f3 :"
+.Ad f1 , f2 , f3 :
+.It Li ".Ad addr ) ) ,"
+.Ad addr ) ) ,
+.El
+.Pp
+.
+The default width is 12n.
+.
+.Ss "Author Name"
+.
+The
+.Ql .An
+macro is used to specify the name of the author of the item being
+documented, or the name of the author of the actual manual page.
+.Pp
+.Dl Usage: .An Ao author name Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .An\ \*[q]Joe\ Author\*[q]\ )\ )\ ," -offset 15n
+.It Li ".An \*[q]Joe Author\*[q]"
+.An "Joe Author"
+.It Li ".An \*[q]Joe Author\*[q] ,"
+.An "Joe Author" ,
+.It Li ".An \*[q]Joe Author\*[q] Aq nobody@FreeBSD.ORG"
+.An "Joe Author" Aq nobody@FreeBSD.ORG
+.It Li ".An \*[q]Joe Author\*[q] ) ) ,"
+.An "Joe Author" ) ) ,
+.El
+.Pp
+.
+The default width is 12n.
+.Pp
+In the
+.Sx AUTHORS
+section, the
+.Ql .An
+request causes a line break allowing each new name to appear on its own
+line.
+If this is not desirable,
+.
+.Bd -literal -offset indent
+\&.An -nosplit
+.Ed
+.Pp
+.
+call will turn this off.
+To turn splitting back on, say
+.
+.Bd -literal -offset indent
+\&.An -split
+.Ed
+.
+.Ss "Arguments"
+.
+The
+.Li .Ar
+argument macro may be used whenever an argument is referenced.
+.Pp
+.Dl Usage: .Ar Oo Ao argument Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Ar\ file1\ file2" -compact -offset 15n
+.It Li .Ar
+.Ar
+.It Li ".Ar file1"
+.Ar file1
+.It Li ".Ar file1 ."
+.Ar file1 .
+.It Li ".Ar file1 file2"
+.Ar file1 file2
+.It Li ".Ar f1 f2 f3 :"
+.Ar f1 f2 f3 :
+.It Li ".Ar file ) ) ,"
+.Ar file ) ) ,
+.El
+.Pp
+.
+The default width is 12n.
+.
+.Ss "Configuration Declaration (Section Four Only)"
+.
+The
+.Ql .Cd
+macro is used to demonstrate a
+.Xr config 8
+declaration for a device interface in a section four manual.
+.Pp
+.Dl Usage: .Cd Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Cd\ Xdevice\ le0\ at\ scode?X" -offset 15n
+.It Li ".Cd \*[q]device le0 at scode?\*[q]"
+\# since .Cd causes a break we use .Nm
+.Nm "device le0 at scode?"
+.El
+.Pp
+.
+The default width is 12n.
+.
+.Ss "Command Modifiers"
+.
+The command modifier is identical to the
+.Ql .Fl
+(flag) command with the exception that the
+.Ql .Cm
+macro does not assert a dash in front of every argument.
+Traditionally flags are marked by the preceding dash, however, some commands
+or subsets of commands do not use them.
+Command modifiers may also be specified in conjunction with interactive
+commands such as editor commands.
+See
+.Sx Flags .
+.Pp
+The default width is 10n.
+.
+.Ss "Defined Variables"
+.
+A variable which is defined in an include file is specified by the macro
+.Ql .Dv .
+.Pp
+.Dl Usage: .Dv Ao defined variable Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Dv\ MAXHOSTNAMELEN" -compact -offset 15n
+.It Li ".Dv MAXHOSTNAMELEN"
+.Dv MAXHOSTNAMELEN
+.It Li ".Dv TIOCGPGRP )"
+.Dv TIOCGPGRP )
+.El
+.Pp
+.
+The default width is 12n.
+.
+.Ss "Errno's (Section Two Only)"
+.
+The
+.Ql .Er
+errno macro specifies the error return value for section two library
+routines.
+The second example below shows
+.Ql .Er
+used with the
+.Ql .Bq
+general text domain macro, as it would be used in a section two manual page.
+.Pp
+.Dl Usage: .Er Ao errno type Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Bq\ Er\ ENOTDIR" -compact -offset 15n
+.It Li ".Er ENOENT"
+.Er ENOENT
+.It Li ".Er ENOENT ) ;"
+.Er ENOENT ) ;
+.It Li ".Bq Er ENOTDIR"
+.Bq Er ENOTDIR
+.El
+.Pp
+.
+The default width is 17n.
+.
+.Ss "Environment Variables"
+.
+The
+.Ql .Ev
+macro specifies an environment variable.
+.Pp
+.Dl Usage: .Ev Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Ev\ PRINTER\ )\ )\ ," -compact -offset 15n
+.It Li ".Ev DISPLAY"
+.Ev DISPLAY
+.It Li ".Ev PATH ."
+.Ev PATH .
+.It Li ".Ev PRINTER ) ) ,"
+.Ev PRINTER ) ) ,
+.El
+.Pp
+.
+The default width is 15n.
+.
+.Ss "Function Arguments"
+.
+The
+.Ql .Fa
+macro is used to refer to function arguments (parameters) outside of the
+.Sx SYNOPSIS
+section of the manual or inside the
+.Sx SYNOPSIS
+section if the enclosure macros
+.Ql .Fo
+and
+.Ql .Fc
+instead of
+.Ql .Fn
+are used.
+.Ql .Fa
+may also be used to refer to structure members.
+.Pp
+.Dl Usage: .Fa Ao function argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Fa\ d_namlen\ )\ )\ ," -compact -offset 15n
+.It Li ".Fa d_namlen ) ) ,"
+.Fa d_namlen ) ) ,
+.It Li ".Fa iov_len"
+.Fa iov_len
+.El
+.Pp
+.
+The default width is 12n.
+.
+.Ss "Function Declarations"
+.
+The
+.Ql .Fd
+macro is used in the
+.Sx SYNOPSIS
+section with section two or three functions.
+It is neither parsable nor callable.
+.Pp
+.Dl Usage: .Fd Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Fd\ X#include\ <sys/types.h>X" -compact -offset 15n
+.It Li ".Fd \*[q]#include <sys/types.h>\*[q]"
+.Fd "#include <sys/types.h>"
+.El
+.Pp
+In the
+.Sx SYNOPSIS
+section a
+.Ql .Fd
+request causes a line break if a function has already been presented and a
+break has not occurred.
+This leaves a nice vertical space in between the previous function call and
+the declaration for the next function.
+.
+.Ss Flags
+.
+The
+.Ql .Fl
+macro handles command line flags.
+It prepends a dash,
+.Ql \- ,
+to the flag.
+For interactive command flags, which are not prepended with a dash, the
+.Ql .Cm
+(command modifier)
+macro is identical, but without the dash.
+.Pp
+.Dl Usage: .Fl Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Fl\ xyz\ )\ ," -compact -offset 15n
+.It Li .Fl
+.Fl
+.It Li ".Fl cfv"
+.Fl cfv
+.It Li ".Fl cfv ."
+.Fl cfv .
+.It Li ".Cm cfv ."
+.Cm cfv .
+.It Li ".Fl s v t"
+.Fl s v t
+.It Li ".Fl \- ,"
+.Fl \- ,
+.It Li ".Fl xyz ) ,"
+.Fl xyz ) ,
+.It Li ".Fl |"
+.Fl |
+.El
+.Pp
+The
+.Ql .Fl
+macro without any arguments results in a dash representing stdin/stdout.
+Note that giving
+.Ql .Fl
+a single dash will result in two dashes.
+.Pp
+The default width is 12n.
+.
+.Ss "Functions (Library Routines)"
+.
+The
+.Ql .Fn
+macro is modeled on
+.Tn ANSI\~C
+conventions.
+.Pp
+.Dl Usage: .Fn Ao function Ac Oo Ao parameter Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Fn\ Xint\ alignX\ Xchar\ *ptrX\ ," -compact -offset 15n
+.It Li ".Fn getchar"
+.Fn getchar
+.It Li ".Fn strlen ) ,"
+.Fn strlen ) ,
+.It Li ".Fn \*[q]int align\*[q] \*[q]char *ptr\*[q] ,"
+.Fn "int align" "char *ptr" ,
+.El
+.Pp
+Note that any call to another macro signals the end of the
+.Ql .Fn
+call (it will insert a closing parenthesis at that point).
+.Pp
+For functions with many parameters (which is rare), the macros
+.Ql .Fo
+(function open)
+and
+.Ql .Fc
+(function close)
+may be used with
+.Ql .Fa
+(function argument).
+.Pp
+Example:
+.
+.Bd -literal -offset indent
+\&.Fo "int res_mkquery"
+\&.Fa "int op"
+\&.Fa "char *dname"
+\&.Fa "int class"
+\&.Fa "int type"
+\&.Fa "char *data"
+\&.Fa "int datalen"
+\&.Fa "struct rrec *newrr"
+\&.Fa "char *buf"
+\&.Fa "int buflen"
+\&.Fc
+.Ed
+.Pp
+.
+Produces:
+.
+.Bd -ragged -offset indent
+.Fo "int res_mkquery"
+.Fa "int op"
+.Fa "char *dname"
+.Fa "int class"
+.Fa "int type"
+.Fa "char *data"
+.Fa "int datalen"
+.Fa "struct rrec *newrr"
+.Fa "char *buf"
+.Fa "int buflen"
+.Fc
+.Ed
+.Pp
+.
+In the
+.Sx SYNOPSIS
+section, the function will always begin at the beginning of line.
+If there is more than one function presented in the
+.Sx SYNOPSIS
+section and a function type has not been given, a line break will occur,
+leaving a nice vertical space between the current function name and the one
+prior.
+.Pp
+The default width values of
+.Ql .Fn
+and
+.Ql .Fo
+are 12n and 16n, respectively.
+.
+.Ss "Function Types"
+.
+This macro is intended for the
+.Sx SYNOPSIS
+section.
+It may be used anywhere else in the man page without problems, but its main
+purpose is to present the function type in kernel normal form for the
+.Sx SYNOPSIS
+of sections two and three (it causes a page break, allowing the function
+name to appear on the next line).
+.Pp
+.Dl Usage: .Ft Ao type Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Ft\ struct\ stat" -compact -offset 15n
+.It Li ".Ft struct stat"
+.Ft struct stat
+.El
+.
+.Ss "Return Values"
+.
+The
+.Ql .Rv
+macro generates text for use in the
+.Sx RETURN VALUES
+section.
+.Pp
+.Dl Usage: .Rv Oo -std Oc Ao function Ac Ld
+.Pp
+For example,
+.Ql ".Rv -std atexit"
+produces:
+.
+.Bd -ragged -offset -indent
+\# a small hack to suppress a warning message
+.ds section-old "\*[section]
+.ds section 2
+.Rv -std atexit
+.ds section "\*[section-old]
+.Ed
+.Pp
+.
+The
+.Fl std
+option is valid only for manual page sections\~2 and\~3.
+Currently, this macro does nothing if used without the
+.Fl std
+flag.
+.
+.Ss "Interactive Commands"
+.
+The
+.Ql .Ic
+macro designates an interactive or internal command.
+.Pp
+.Dl Usage: .Ic Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Ic\ setenv\ ,\ unsetenv" -compact -offset 15n
+.It Li ".Ic :wq"
+.Ic :wq
+.It Li ".Ic \*[q]do while {...}\*[q]"
+.Ic "do while {...}"
+.It Li ".Ic setenv , unsetenv"
+.Ic setenv , unsetenv
+.El
+.Pp
+.
+The default width is 12n.
+.
+.Ss "Library Names"
+.
+The
+.Ql .Lb
+macro is used to specify the library where a particular function is compiled
+in.
+.Pp
+.Dl Usage: .Lb Ao argument Ac Ld
+.Pp
+Available arguments to
+.Ql .Lb
+and their results are:
+.
+.Pp
+.Bl -tag -xwidth ".Li libossaudio" -compact -offset indent
+.It Li libarm32
+.Li libarm32
+.It Li libc
+.Lb libc
+.It Li libcompat
+.Lb libcompat
+.It Li libcrypt
+.Lb libcrypt
+.It Li libcurses
+.Lb libcurses
+.It Li libedit
+.Lb libedit
+.It Li libi386
+.Lb libi386
+.It Li libipsec
+.Lb libipsec
+.It Li libkvm
+.Lb libkvm
+.It Li libm
+.Lb libm
+.It Li libmenu
+.Lb libmenu
+.It Li libossaudio
+.Lb libossaudio
+.It Li libposix
+.Lb libposix
+.It Li libresolv
+.Lb libresolv
+.It Li libtermcap
+.Lb libtermcap
+.It Li libutil
+.Lb libutil
+.It Li libz
+.Lb libz
+.El
+.Pp
+.
+Local, OS-specific additions might be found in the file
+.Pa mdoc.local ;
+look for strings named
+.Ql str-Lb-XXX .
+.Ql XXX
+then denotes the keyword to be used with the
+.Ql .Lb
+macro.
+.
+.Ss Literals
+.
+The
+.Ql .Li
+literal macro may be used for special characters, variable constants, etc.\&
+-- anything which should be displayed as it would be typed.
+.Pp
+.Dl Usage: .Li Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Li\ cntrl-D\ )\ ," -compact -offset 15n
+.It Li ".Li \een"
+.Li \en
+.It Li ".Li M1 M2 M3 ;"
+.Li M1 M2 M3 ;
+.It Li ".Li cntrl-D ) ,"
+.Li cntrl-D ) ,
+.It Li ".Li 1024 Ld"
+.Li 1024 Ld
+.El
+.Pp
+.
+The default width is 16n.
+.
+.Ss Names
+.
+The
+.Ql .Nm
+macro is used for the document title or subject name.
+It has the peculiarity of remembering the first argument it was called with,
+which should always be the subject name of the page.
+When called without arguments,
+.Ql .Nm
+regurgitates this initial name for the sole purpose of making less work for
+the author.
+Note: A section two or three document function name is addressed with the
+.Ql .Nm
+in the
+.Sx NAME
+section, and with
+.Ql .Fn
+in the
+.Sx SYNOPSIS
+and remaining sections.
+For interactive commands, such as the
+.Ql while
+command keyword in
+.Xr csh 1 ,
+the
+.Ql .Ic
+macro should be used.
+While
+.Ql .Ic
+is nearly identical
+to
+.Ql .Nm ,
+it can not recall the first argument it was invoked with.
+.Pp
+.Dl Usage: .Nm Oo Ao argument Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Nm\ groff_mdoc" -compact -offset 15n
+.It Li ".Nm groff_mdoc"
+.Nm groff_mdoc
+.It Li ".Nm \e-mdoc"
+.Nm \-mdoc
+.It Li ".Nm foo ) ) ,"
+.Nm foo ) ) ,
+.It Li ".Nm :"
+.Nm :
+.El
+.Pp
+.
+The default width is 10n.
+.
+.Ss Options
+.
+The
+.Ql .Op
+macro places option brackets around the any remaining arguments on the
+command line, and places any trailing punctuation outside the brackets.
+The macros
+.Ql .Oc
+and
+.Ql .Oo
+(which produce an opening resp.\& a closing option bracket) may be used
+across one or more lines or to specify the exact position of the closing
+parenthesis.
+.Pp
+.Dl Usage: .Op Oo Ao option Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Op\ Fl\ c\ Ar\ objfil\ Op\ Ar\ corfil\ ," -compact -offset 15n
+.It Li .Op
+.Op
+.It Li ".Op Fl k"
+.Op Fl k
+.It Li ".Op Fl k ) ."
+.Op Fl k ) .
+.It Li ".Op Fl k Ar kookfile"
+.Op Fl k Ar kookfile
+.It Li ".Op Fl k Ar kookfile ,"
+.Op Fl k Ar kookfile ,
+.It Li ".Op Ar objfil Op Ar corfil"
+.Op Ar objfil Op Ar corfil
+.It Li ".Op Fl c Ar objfil Op Ar corfil ,"
+.Op Fl c Ar objfil Op Ar corfil ,
+.It Li ".Op word1 word2"
+.Op word1 word2
+.It Li ".Li .Op Oo Ao option Ac Oc Ld"
+.Li .Op Oo Ao options Ac Oc Ld
+.El
+.Pp
+Here a typical example of the
+.Ql .Oc
+and
+.Ql .Oo
+macros:
+.
+.Bd -literal -offset indent
+\&.Oo
+\&.Op Fl k Ar kilobytes
+\&.Op Fl i Ar interval
+\&.Op Fl c Ar count
+\&.Oc
+.Ed
+.Pp
+.
+Produces:
+.
+.Bd -filled -offset indent
+.Oo
+.Op Fl k Ar kilobytes
+.Op Fl i Ar interval
+.Op Fl c Ar count
+.Oc
+.Ed
+.Pp
+.
+The default width values of
+.Ql .Op
+and
+.Ql .Oo
+are 14n resp.\& 10n.
+.
+.Ss Pathnames
+.
+The
+.Ql .Pa
+macro formats path or file names.
+.Pp
+.Dl Usage: .Pa Oo Ao pathname Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Pa\ /tmp/fooXXXXX\ )\ ." -compact -offset 15n
+.It Li .Pa
+.Pa
+.It Li ".Pa /usr/share"
+.Pa /usr/share
+.It Li ".Pa /tmp/fooXXXXX ) ."
+.Pa /tmp/fooXXXXX ) .
+.El
+.Pp
+.
+The default width is 32n.
+.
+.Ss Standards
+.
+The
+.Ql .St
+macro replaces standard abbreviations with their formal names.
+.Pp
+.Dl Usage: .St Ao abbreviation Ac Ld
+.Pp
+Available pairs for
+.Dq Abbreviation/Formal Name
+are:
+.
+.Pp
+.Tn ANSI/ISO C
+.Pp
+.Bl -tag -xwidth ".Li -iso9945-1-90" -compact -offset indent
+.It Li -ansiC
+.St -ansiC
+.It Li -ansiC-89
+.St -ansiC-89
+.It Li -isoC
+.St -isoC
+.It Li -isoC-99
+.St -isoC-99
+.El
+.Pp
+.
+.Tn POSIX
+Part 1: System API
+.Pp
+.Bl -tag -xwidth ".Li -p1003.1g-2000" -compact -offset indent
+.It Li -iso9945-1-90
+.St -iso9945-1-90
+.It Li -iso9945-1-96
+.St -iso9945-1-96
+.It Li -p1003.1
+.St -p1003.1
+.It Li -p1003.1-88
+.St -p1003.1-88
+.It Li -p1003.1-90
+.St -p1003.1-90
+.It Li -p1003.1-96
+.St -p1003.1-96
+.It Li -p1003.1b-93
+.St -p1003.1b-93
+.It Li -p1003.1c-95
+.St -p1003.1c-95
+.It Li -p1003.1g-2000
+.St -p1003.1g-2000
+.It Li -p1003.1i-95
+.St -p1003.1i-95
+.El
+.Pp
+.
+.Tn POSIX
+Part 2: Shell and Utilities
+.Pp
+.Bl -tag -xwidth ".Li -p1003.1g-2000" -compact -offset indent
+.It Li -iso9945-2-93
+.St -iso9945-2-93
+.It Li -p1003.2
+.St -p1003.2
+.It Li -p1003.2-92
+.St -p1003.2-92
+.It Li -p1003.2a-92
+.St -p1003.2a-92
+.El
+.Pp
+.
+X/Open
+.Bl -tag -xwidth ".Li -p1003.1g-2000" -compact -offset indent
+.Pp
+.It Li -susv2
+.St -susv2
+.It Li -svid4
+.St -svid4
+.It Li -xbd5
+.St -xbd5
+.It Li -xcu5
+.St -xcu5
+.It Li -xcurses4.2
+.St -xcurses4.2
+.It Li -xns5
+.St -xns5
+.It Li -xns5.2
+.St -xns5.2
+.It Li -xpg3
+.St -xpg3
+.It Li -xpg4
+.St -xpg4
+.It Li -xpg4.2
+.St -xpg4.2
+.It Li -xsh5
+.St -xsh5
+.El
+.Pp
+.
+Miscellaneous
+.Pp
+.Bl -tag -xwidth ".Li -p1003.1g-2000" -compact -offset indent
+.It Li -ieee754
+.St -ieee754
+.It Li -iso8802-3
+.St -iso8802-3
+.El
+.
+.Ss Variables
+.
+Generic variable reference.
+.Pp
+.Dl Usage: .Va Ao variable Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Va\ Xchar\ sX\ ]\ )\ )\ ," -compact -offset 15n
+.It Li ".Va count"
+.Va count
+.It Li ".Va settimer ,"
+.Va settimer ,
+.It Li ".Va \*[q]int *prt\*[q] ) :"
+.Va "int *prt" ) :
+.It Li ".Va \*[q]char s\*[q] ] ) ) ,"
+.Va "char s" ] ) ) ,
+.El
+.Pp
+.
+The default width is 12n.
+.
+.Ss "Manual Page Cross References"
+.
+The
+.Ql .Xr
+macro expects the first argument to be a manual page name.
+The optional second argument, if a string (defining the manual section), is
+put into parentheses.
+.Pp
+.Dl Usage: .Xr Ao man page name Ac Oo Ao section Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Xr\ xinit\ 1x\ ;" -compact -offset 15n
+.It Li ".Xr mdoc"
+.Xr mdoc
+.It Li ".Xr mdoc ,"
+.Xr mdoc ,
+.It Li ".Xr mdoc 7"
+.Xr mdoc 7
+.It Li ".Xr xinit 1x ;"
+.Xr xinit 1x ;
+.El
+.Pp
+.
+The default width is 10n.
+.
+.
+.Sh "GENERAL TEXT DOMAIN"
+.
+.Ss "AT&T Macro"
+.
+.Pp
+.Dl Usage: .At Oo Ao version Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .At\ v6\ ." -compact -offset 15n
+.It Li .At
+.At
+.It Li ".At v6 ."
+.At v6 .
+.El
+.Pp
+The following values for
+.Ao version Ac
+are possible:
+.Pp
+.Dl 32v, v1, v2, v3, v4, v5, v6, v7, V, V.1, V.2, V.3, V.4
+.
+.Ss "BSD Macro"
+.
+.Pp
+.Dl "Usage: .Bx" Bro -alpha | -beta | -devel Brc Ld
+.Dl " .Bx" Oo Ao version Ac Oo Ao release Ac Oc Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Bx\ -devel" -compact -offset 15n
+.It Li .Bx
+.Bx
+.It Li ".Bx 4.3 ."
+.Bx 4.3 .
+.It Li ".Bx \-devel"
+.Bx -devel
+.El
+.Pp
+.Ao version Ac
+will be prepended to the string
+.Sq Bx .
+The following values for
+.Ao release Ac
+are possible:
+.Pp
+.Dl Reno, reno, Tahoe, tahoe, Lite, lite, Lite2, lite2
+.
+.Ss "NetBSD Macro"
+.
+.Pp
+.Dl Usage: .Nx Oo Ao version Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Nx\ 1.4\ ." -compact -offset 15n
+.It Li .Nx
+.Nx
+.It Li ".Nx 1.4 ."
+.Nx 1.4 .
+.El
+.Pp
+For possible values of
+.Ao version Ac
+see the description of the
+.Ql .Os
+request above in section
+.Sx "TITLE MACROS" .
+.
+.Ss "FreeBSD Macro"
+.
+.Pp
+.Dl Usage: .Fx Oo Ao version Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Fx\ 2.2\ ." -compact -offset 15n
+.It Li .Fx
+.Fx
+.It Li ".Fx 2.2 ."
+.Fx 2.2 .
+.El
+.Pp
+For possible values of
+.Ao version Ac
+see the description of the
+.Ql .Os
+request above in section
+.Sx "TITLE MACROS" .
+.
+.Ss "OpenBSD Macro"
+.
+.Pp
+.Dl Usage: .Ox Oo Ao version Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Ox\ 1.0" -compact -offset 15n
+.It Li ".Ox 1.0"
+.Ox 1.0
+.El
+.
+.Ss "BSD/OS Macro"
+.
+.Pp
+.Dl Usage: .Bsx Oo Ao version Ac Oc Ld
+.Pp
+.Bl -tag -xwidth ".Li .Bsx\ 1.0" -compact -offset 15n
+.It Li ".Bsx 1.0"
+.Bsx 1.0
+.El
+.
+.Ss "UNIX Macro"
+.
+.Pp
+.Dl Usage: .Ux Ld
+.Pp
+.Bl -tag -xwidth ".Li .Ux" -compact -offset 15n
+.It Li .Ux
+.Ux
+.El
+.
+.Ss "Emphasis Macro"
+.
+Text may be stressed or emphasized with the
+.Ql .Em
+macro.
+The usual font for emphasis is italic.
+.Pp
+.Dl Usage: .Em Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Em\ vide\ infra\ )\ )\ ," -compact -offset 15n
+.It Li ".Em does not"
+.Em does not
+.It Li ".Em exceed 1024 ."
+.Em exceed 1024 .
+.It Li ".Em vide infra ) ) ,"
+.Em vide infra ) ) ,
+.El
+.Pp
+.
+The default width is 10n.
+.
+.Ss "Font Mode"
+.
+The
+.Ql .Bf
+font mode must be ended with the
+.Ql .Ef
+macro (the latter doesn't take parameters).
+Font modes may be nested within other font modes.
+.Pp
+.Ql .Bf
+has the following syntax:
+.Pp
+.Dl .Bf Ao font mode Ac
+.Pp
+.Ao font mode Ac
+must be one of the following three types:
+.Pp
+.Bl -tag -xwidth ".Sy \&Sy | Fl symbolic" -compact -offset indent
+.It Sy \&Em | Fl emphasis
+Same as if the
+.Ql .Em
+macro was used for the entire block of text.
+.It Sy \&Li | Fl literal
+Same as if the
+.Ql .Li
+macro was used for the entire block of text.
+.It Sy \&Sy | Fl symbolic
+Same as if the
+.Ql .Sy
+macro was used for the entire block of text.
+.El
+.Pp
+Both macros are neither callable nor parsed.
+.
+.Ss "Enclosure and Quoting Macros"
+.
+The concept of enclosure is similar to quoting.
+The object being to enclose one or more strings between a pair of characters
+like quotes or parentheses.
+The terms quoting and enclosure are used interchangeably throughout this
+document.
+Most of the one-line enclosure macros end in small letter
+.Ql q
+to give a hint of quoting, but there are a few irregularities.
+For each enclosure macro there is also a pair of open and close macros which
+end in small letters
+.Ql o
+and
+.Ql c
+respectively.
+.Pp
+\# XXX
+.if t \
+. ne 10
+.
+.Bd -filled -offset 4n
+.Bl -column "quote" "close" "open" "Angle Bracket Enclosure" "`string' or string"
+.Em Quote Ta Em Open Ta Em Close Ta Em Function Ta Em Result
+.No .Aq Ta .Ao Ta .Ac Ta "Angle Bracket Enclosure" Ta Ao string Ac
+.No .Bq Ta .Bo Ta .Bc Ta "Bracket Enclosure" Ta Bo string Bc
+.No .Brq Ta .Bro Ta .Brc Ta "Brace Enclosure" Ta Bro string Brc
+.No .Dq Ta .Do Ta .Dc Ta "Double Quote" Ta Do string Dc
+.No .Eq Ta .Eo Ta .Ec Ta "Enclose String (in XX)" Ta XXstringXX
+.No .Pq Ta .Po Ta .Pc Ta "Parenthesis Enclosure" Ta Po string Pc
+.No .Ql Ta Ta Ta "Quoted Literal" Ta "`string' or string"
+.No .Qq Ta .Qo Ta .Qc Ta "Straight Double Quote" Ta Qo string Qc
+.No .Sq Ta .So Ta .Sc Ta "Single Quote" Ta So string Sc
+.El
+.Ed
+.Pp
+All macros ending with
+.Sq q
+and
+.Sq o
+have a default width value of 12n.
+.
+.Bl -tag -xwidth ".Li .Ec , .Eo"
+.It Li .Ec , .Eo
+These macros expect the first argument to be the opening and closing strings
+respectively.
+.It Li .Es , .En
+Due to the nine-argument limit in the original troff program two other
+macros have been implemented which are now rather obsolete:
+.Ql .Es
+takes the first and second parameter as the left and right enclosure string,
+which are then used to enclose the arguments of
+.Ql .En .
+The default width value is 12n for both macros.
+.It Li .Eq
+The first and second argument of this macro are the opening resp.\& the
+closing string (followed by the arguments to be enclosed).
+.It Li .Ql
+The quoted literal macro behaves differently in troff and nroff mode.
+If formatted with
+.Xr nroff ,
+a quoted literal is always quoted.
+If formatted with troff, an item is only quoted if the width of the item is
+less than three constant width characters.
+This is to make short strings more visible where the font change to literal
+(constant width) is less noticeable.
+.Pp
+The default width is 16n.
+.It Li .Pf
+The prefix macro suppresses the whitespace between its first and second
+argument:
+.
+.Bl -tag -xwidth ".Li .Pf\ (\ Fa\ name2" -offset indent
+.It Li ".Pf ( Fa name2"
+.Pf ( Fa name2
+.El
+.Pp
+.
+The default width is 12n.
+.Pp
+The
+.Ql .Ns
+macro (see below) performs the analogous suffix function.
+.It Li .Ap
+The
+.Ql .Ap
+macro inserts an apostrophe and exits any special text modes, continuing in
+.Ql .No
+mode.
+.El
+.Pp
+.
+Examples of quoting:
+.
+.Pp
+.Bl -tag -xwidth ".Li .Bq\ Em\ Greek\ ,\ French\ ." -compact -offset indent
+.It Li .Aq
+.Aq
+.It Li ".Aq Ar ctype.h ) ,"
+.Aq Ar ctype.h ) ,
+.It Li .Bq
+.Bq
+.It Li ".Bq Em Greek , French ."
+.Bq Em Greek , French .
+.It Li .Dq
+.Dq
+.It Li ".Dq string abc ."
+.Dq string abc .
+.It Li ".Dq \'^[A-Z]\'"
+.Dq \'^[A-Z]\'
+.It Li ".Ql man mdoc"
+.Ql man mdoc
+.It Li .Qq
+.Qq
+.It Li ".Qq string ) ,"
+.Qq string ) ,
+.It Li ".Qq string Ns ),"
+.Qq string Ns ),
+.It Li .Sq
+.Sq
+.It Li ".Sq string"
+.Sq string
+.It Li ".Em or Ap ing"
+.Em or Ap ing
+.El
+.Pp
+.
+For a good example of nested enclosure macros, see the
+.Ql .Op
+option macro.
+It was created from the same underlying enclosure macros as those presented
+in the list above.
+The
+.Ql .Xo
+and
+.Ql .Xc
+extended argument list macros are discussed below.
+.
+.Ss "No-Op or Normal Text Macro"
+.
+The macro
+.Ql .No
+is
+can be used in a macro command line for parameters which should
+.Em not
+be formatted.
+Be careful to add
+.Ql \e&
+to the word
+.Ql \&No
+if you really want that English word (and not the macro) as a parameter.
+.Pp
+.Dl Usage: .No Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .No\ test\ Ta\ with\ Ta\ tabs" -compact -offset 15n
+.It Li ".No test Ta with Ta tabs"
+.No test Ta with Ta tabs
+.El
+.Pp
+.
+The default width is 12n.
+.
+.Ss "No-Space Macro"
+.
+The
+.Ql .Ns
+macro suppresses insertion of a space between the current position and its
+first parameter.
+For example, it is useful for old style argument lists where there is no
+space between the flag and argument:
+.Pp
+.Dl "Usage:" Ld Ao argument Ac \&Ns Oo Ao argument Ac Oc Ld
+.Dl " " .Ns Ao argument Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Op\ Fl\ I\ Ns\ Ar\ directory" -compact -offset 15n
+.It Li ".Op Fl I Ns Ar directory"
+.Op Fl I Ns Ar directory
+.El
+.Pp
+Note: The
+.Ql .Ns
+macro always invokes the
+.Ql .No
+macro after eliminating the space unless another macro name follows it.
+If used as a request (i.e., the second form above in the
+.Sq Usage
+line,
+.Ql .Ns
+is identical to
+.Ql .No .
+.
+.Ss "Section Cross References"
+.
+The
+.Ql .Sx
+macro designates a reference to a section header within the same document.
+.Pp
+.Dl Usage: .Sx Ao section reference Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Sx\ FILES" -offset 15n
+.It Li ".Sx FILES"
+.Sx FILES
+.El
+.Pp
+.
+The default width is 16n.
+.
+.Ss Symbolics
+.
+The symbolic emphasis macro is generally a boldface macro in either the
+symbolic sense or the traditional English usage.
+.Pp
+.Dl Usage: .Sy Ao symbol Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Sy\ Important\ Notice" -compact -offset 15n
+.It Li ".Sy Important Notice"
+.Sy Important Notice
+.El
+.Pp
+.
+The default width is 6n.
+.
+.Ss Mathematical Symbols
+.
+Use this macro for mathematical symbols and similar things.
+.Pp
+.Dl Usage: .Ms Ao math symbol Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Ms\ sigma" -compact -offset 15n
+.It Li ".Ms sigma"
+.Ms sigma
+.El
+.Pp
+.
+The default width is 6n.
+.
+.Ss "References and Citations"
+.
+The following macros make a modest attempt to handle references.
+At best, the macros make it convenient to manually drop in a subset of
+.Em refer
+style references.
+.Pp
+.Bl -tag -width 6n -offset indent -compact
+.It Li .Rs
+Reference start (does not take arguments).
+Causes a line break in the
+.Sx "SEE ALSO"
+section and begins collection of reference information until the reference
+end macro is read.
+.It Li .Re
+Reference end (does not take arguments).
+The reference is printed.
+.It Li .%A
+Reference author name; one name per invocation.
+.It Li .%B
+Book title.
+.It Li .%C
+City/place (not implemented yet).
+.It Li .%D
+Date.
+.It Li .%I
+Issuer/publisher name.
+.It Li .%J
+Journal name.
+.It Li .%N
+Issue number.
+.It Li .%O
+Optional information.
+.It Li .%P
+Page number.
+.It Li .%Q
+Corporate or foreign author.
+.It Li .%R
+Report name.
+.It Li .%T
+Title of article.
+.It Li .%V
+Volume.
+.El
+.Pp
+Macros beginning with
+.Ql %
+are not callable but accept multiple arguments in the usual way.
+Only the
+.Ql .Tn
+macro is handled properly as a parameter; other macros will cause strange
+output.
+.Ql .%B
+and
+.Ql .%T
+can be used outside of the
+.Ql .Rs/.Re
+environment.
+.Pp
+Example:
+.
+.Bd -literal -offset indent
+\&.Rs
+\&.%A "Matthew Bar"
+\&.%A "John Foo"
+\&.%T "Implementation Notes on foobar(1)"
+\&.%R "Technical Report ABC-DE-12-345"
+\&.%Q "Drofnats College, Nowhere"
+\&.%D "April 1991"
+\&.Re
+.Ed
+.Pp
+produces
+.
+.Bd -ragged -offset indent
+.Rs
+.%A "Matthew Bar"
+.%A "John Foo"
+.%T "Implementation Notes on foobar(1)"
+.%R "Technical Report ABC-DE-12-345"
+.%Q "Drofnats College, Nowhere"
+.%D "April 1991"
+.Re
+.Ed
+.
+.Ss "Trade Names (or Acronyms and Type Names)"
+.
+The trade name macro prints its arguments in a smaller font.
+Its intended use is to imitate a small caps fonts for uppercase acronyms.
+.Pp
+.Dl Usage: .Tn Ao symbol Ac Ld
+.Pp
+.Bl -tag -xwidth ".Li .Tn\ ASCII" -compact -offset 15n
+.It Li ".Tn DEC"
+.Tn DEC
+.It Li ".Tn ASCII"
+.Tn ASCII
+.El
+.Pp
+.
+The default width is 10n.
+.
+.Ss "Extended Arguments"
+.
+The
+.Li .Xo
+and
+.Li .Xc
+macros allow one to extend an argument list on a macro boundary for the
+.Ql .It
+macro (see below).
+Note that
+.Li .Xo
+and
+.Li .Xc
+are implemented similarly to all other macros opening and closing an
+enclosure (without inserting characters, of course).
+This means that the following is true for those macros also.
+.Pp
+Here is an example of
+.Ql .Xo
+using the space mode macro to turn spacing off:
+.
+.Bd -literal -offset indent
+\&.Sm off
+\&.It Xo Sy I Ar operation
+\&.No \een Ar count No \een
+\&.Xc
+\&.Sm on
+.Ed
+.Pp
+.
+produces
+.
+.Bd -filled -offset indent
+.Bl -tag -compact
+.Sm off
+.It Xo Sy I Ar operation
+.No \en Ar count No \en
+.Xc
+.Sm on
+.El
+.Ed
+.Pp
+.
+Another one:
+.
+.Bd -literal -offset indent
+\&.Sm off
+\&.It Cm S No / Ar old_pattern Xo
+\&.No / Ar new_pattern
+\&.No / Op Cm g
+\&.Xc
+\&.Sm on
+.Ed
+.Pp
+.
+produces
+.
+.Bd -filled -offset indent
+.Bl -tag -compact
+.Sm off
+.It Cm S No \&/ Ar old_pattern Xo
+.No \&/ Ar new_pattern
+.No \&/ Op Cm g
+.Xc
+.Sm on
+.El
+.Ed
+.Pp
+.
+Another example of
+.Ql .Xo
+and enclosure macros: Test the value of a variable.
+.
+.Bd -literal -offset indent
+\&.It Xo
+\&.Ic .ifndef
+\&.Oo \e&! Oc Ns Ar variable Oo
+\&.Ar operator variable Ld
+\&.Oc Xc
+.Ed
+.Pp
+.
+produces
+.
+.Bd -filled -offset indent
.Bl -tag -width flag -compact
-.It Li \&.Sh
-Section Headers.
-Valid headers, in the order of presentation:
-.Bl -tag -width "RETURN VALUES" -compact
-.It Ar NAME
-Name section, should include the
-.Ql \&.Nm
+.It Xo
+.Ic .ifndef
+.Oo \&! Oc Ns Ar variable Oo
+.Ar operator variable Ld
+.Oc Xc
+.El
+.Ed
+.Pp
+.
+.
+.Sh "PAGE STRUCTURE DOMAIN"
+.
+.Ss "Section Headers"
+.
+The first three
+.Ql .Sh
+section header macros listed below are required in every man page.
+The remaining section headers are recommended at the discretion of the
+author writing the manual page.
+The
+.Ql .Sh
+macro is parsed but not generally callable.
+It can be used as an argument in a call to
+.Ql .Sh
+only; it then reactivates the default font for
+.Ql .Sh .
+.Pp
+The default width is 8n.
+.
+.Bl -tag -xwidth ".Li .Sh\ DESCRIPTION"
+.It Li ".Sh NAME"
+The
+.Ql ".Sh NAME"
+macro is mandatory.
+If not specified, headers, footers and page layout defaults will not be set
+and things will be rather unpleasant.
+The
+.Sx NAME
+section consists of at least three items.
+The first is the
+.Ql .Nm
+name macro naming the subject of the man page.
+The second is the name description macro,
+.Ql .Nd ,
+which separates the subject name from the third item, which is the
+description.
+The description should be the most terse and lucid possible, as the space
+available is small.
+.Pp
+.Ql .Nd
+first prints
+.Ql - ,
+then all its arguments.
+.
+.It Li ".Sh SYNOPSIS"
+The
+.Sx SYNOPSIS
+section describes the typical usage of the subject of a man page.
+The macros required are either
+.Ql .Nm ,
+.Ql .Cd ,
or
-.Ql \&.Fn
-and the
-.Ql \&.Nd
-macros.
-.It Ar SYNOPSIS
-Usage.
-.It Ar DESCRIPTION
-General description, should include
-options and parameters.
-.It Ar RETURN VALUES
-Sections two and three function calls.
-.It Ar ENVIRONMENT
-Describe environment variables.
-.It Ar FILES
-Files associated with the subject.
-.It Ar EXAMPLES
-Examples and suggestions.
-.It Ar DIAGNOSTICS
-Normally used for section four device interface diagnostics.
-.It Ar ERRORS
-Sections two and three error and signal
-handling.
-.It Ar SEE ALSO
-Cross references and citations.
-.It Ar STANDARDS
-Conformance to standards if applicable.
-.It Ar HISTORY
-If a standard is not applicable, the history
-of the subject should be given.
-.It Ar BUGS
-Gotchas and caveats.
-.It Ar SECURITY CONSIDERATIONS
-Security issues to be aware of.
-.It Ar other
-Customized headers may be added at
-the authors discretion.
-.El
-.It Li \&.Ss
-Subsection Headers.
-.It Li \&.Pp
-Paragraph Break.
-Vertical space (one line).
-.It Li \&.D1
-(D-one) Display-one
-Indent and display one text line.
-.It Li \&.Dl
-(D-ell) Display-one literal.
-Indent and display one line of literal text.
-.It Li \&.Bd
-Begin-display block.
-Display options:
-.Bl -tag -width "xoffset string " -compact
+.Ql .Fn
+(and possibly
+.Ql .Fo ,
+.Ql .Fc ,
+.Ql .Fd ,
+and
+.Ql .Ft ) .
+The function name macro
+.Ql .Fn
+is required for manual page sections\~2 and\~3; the command and general name
+macro
+.Ql .Nm
+is required for sections 1, 5, 6, 7, and\~8.
+Section\~4 manuals require a
+.Ql .Nm ,
+.Ql .Fd
+or a
+.Ql .Cd
+configuration device usage macro.
+Several other macros may be necessary to produce the synopsis line as shown
+below:
+.
+.Bd -filled -offset indent
+.Nm cat
+.Op Fl benstuv
+.Op Fl
+.Ar
+.Ed
+.Pp
+.
+The following macros were used:
+.Pp
+.Dl ".Nm cat"
+.Dl ".Op Fl benstuv"
+.Dl ".Op Fl"
+.Dl .Ar
+.
+.It Li ".Sh DESCRIPTION"
+In most cases the first text in the
+.Sx DESCRIPTION
+section is a brief paragraph on the command, function or file, followed by a
+lexical list of options and respective explanations.
+To create such a list, the
+.Ql .Bl
+(begin list),
+.Ql .It
+(list item) and
+.Ql .El
+(end list)
+macros are used (see
+.Sx Lists and Columns
+below).
+.El
+.Pp
+.
+The following
+.Ql .Sh
+section headers are part of the preferred manual page layout and must be
+used appropriately to maintain consistency.
+They are listed in the order in which they would be used.
+.
+.Bl -tag -xwidth ".Li .Sh\ ENVIRONMENT"
+.It Li ".Sh ENVIRONMENT"
+The
+.Sx ENVIRONMENT
+section should reveal any related environment variables and clues to their
+behavior and/or usage.
+.It Li ".Sh EXAMPLES"
+There are several ways to create examples.
+See the
+.Sx EXAMPLES
+section below for details.
+.It Li ".Sh FILES"
+Files which are used or created by the man page subject should be listed via
+the
+.Ql .Pa
+macro in the
+.Sx FILES
+section.
+.It Li ".Sh SEE ALSO"
+References to other material on the man page topic and cross references to
+other relevant man pages should be placed in the
+.Sx "SEE ALSO"
+section.
+Cross references are specified using the
+.Ql .Xr
+macro.
+Currently
+.Xr refer 1
+style references are not accommodated.
+.Pp
+It is recommended that the cross references are sorted on the section
+number, and then alphabetically on the names within a section.
+Example:
+.Pp
+.Xr ls 1 ,
+.Xr ps 1 ,
+.Xr group 5 ,
+.Xr passwd 5
+.It Li ".Sh STANDARDS"
+If the command, library function or file adheres to a specific
+implementation such as
+.St -p1003.2
+or
+.St -ansiC
+this should be noted here.
+If the command does not adhere to any standard, its history should be noted
+in the
+.Sx HISTORY
+section.
+.It Li ".Sh HISTORY"
+Any command which does not adhere to any specific standards should be
+outlined historically in this section.
+.It Li ".Sh AUTHORS"
+Credits should be placed here.
+The
+.Ql .An
+macro should be used to specify the name(s) of the person(s).
+.It Li ".Sh DIAGNOSTICS"
+Diagnostic messages from a command should be placed in this section.
+.It Li ".Sh ERRORS"
+Specific error handling, especially from library functions (man page
+sections 2, 3, and\~9) should go here.
+The
+.Ql .Er
+macro is used to specify an error (errno).
+.It Li ".Sh BUGS"
+Blatant problems with the topic go here.
+.El
+.Pp
+.
+User-specified
+.Ql .Sh
+sections may be added; for example, this section was set with:
+.
+.Bd -literal -offset 15n
+\&.Sh "PAGE STRUCTURE DOMAIN"
+.Ed
+.
+.Ss "Subsection Headers"
+.
+Subsection headers have exactly the same syntax as section headers:
+.Ql .Ss
+is parsed but not generally callable.
+It can be used as an argument in a call to
+.Ql .Ss
+only; it then reactivates the default font for
+.Ql .Ss .
+.Pp
+The default width is 8n.
+.
+.Ss "Paragraphs and Line Spacing"
+.
+.Bl -tag -xwidth ".Li .Pp"
+.It Li .Pp
+The
+.Ql .Pp
+paragraph command may be used to specify a line space where necessary.
+The macro is not necessary after a
+.Ql .Sh
+or
+.Ql .Ss
+macro or before a
+.Ql .Bl
+or
+.Ql .Bd
+macro (which both assert a vertical distance unless the
+.Fl compact
+flag is given).
+.Pp
+The macro is neither callable nor parsed and doesn't take arguments; an
+alternative name is
+.Ql .Lp .
+.El
+.
+.\" XXX
+.
+.\" This worked with version one, need to redo for version three
+.\" .Pp
+.\" .Ds I
+.\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
+.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
+.\" .Cl Cx \t\t
+.\" .Li \&.Cx\ (
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Va ax
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Sy \+
+.\" .Cx
+.\" .Cl Cx \&(\&
+.\" .Va ax
+.\" .Cx +
+.\" .Va by
+.\" .Cx +
+.\" .Va c )
+.\" .Cx \t
+.\" .Em is produced by
+.\" .Cx \t
+.\" .Li \&.Va by
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Sy \+
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Va c )
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Cx
+.\" .Cx
+.\" .Cw
+.\" .De
+.\" .Pp
+.\" This example shows the same equation in a different format.
+.\" The spaces
+.\" around the
+.\" .Li \&+
+.\" signs were forced with
+.\" .Li \e :
+.\" .Pp
+.\" .Ds I
+.\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
+.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
+.\" .Cl Cx \t\t
+.\" .Li \&.Cx\ (
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Va a
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Sy x
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Cx \e\ +\e\ \e&
+.\" .Cx
+.\" .Cl Cx \&(\&
+.\" .Va a
+.\" .Sy x
+.\" .Cx \ +\ \&
+.\" .Va b
+.\" .Sy y
+.\" .Cx \ +\ \&
+.\" .Va c )
+.\" .Cx \t
+.\" .Em is produced by
+.\" .Cl Cx \t\t
+.\" .Li \&.Va b
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Sy y
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Cx \e\ +\e\ \e&
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Va c )
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Cx
+.\" .Cx
+.\" .Cw
+.\" .De
+.\" .Pp
+.\" The incantation below was
+.\" lifted from the
+.\" .Xr adb 1
+.\" manual page:
+.\" .Pp
+.\" .Ds I
+.\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
+.\" .Cl Cx \t\t
+.\" .Li \&.Cx Op Sy ?/
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Nm m
+.\" .Cx
+.\" .Cl Cx Op Sy ?/
+.\" .Nm m
+.\" .Ad \ b1 e1 f1
+.\" .Op Sy ?/
+.\" .Cx \t
+.\" .Em is produced by
+.\" .Cx \t
+.\" .Li \&.Ar \e\ b1 e1 f1
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Op Sy ?/
+.\" .Cx
+.\" .Cl Cx \t\t
+.\" .Li \&.Cx
+.\" .Cx
+.\" .Cw
+.\" .De
+.\" .Pp
+.
+.Ss Keeps
+.
+The only keep that is implemented at this time is for words.
+The macros are
+.Ql .Bk
+(begin keep)
+and
+.Ql .Ek
+(end keep).
+The only option that
+.Ql .Bl
+accepts currently is
+.Fl words
+(this is also the default if no option is given) which is useful for
+preventing line breaks in the middle of options.
+In the example for the make command line arguments (see
+.Sx What's in a name ) ,
+the keep prevented
+.Xr nroff
+from placing up the flag and the argument on separate lines.
+.Pp
+Both macros are neither callable nor parsed.
+.Pp
+More work needs to be done with the keep macros; specifically, a
+.Fl line
+option should be added.
+.
+.Ss "Examples and Displays"
+.
+There are six types of displays.
+.Pp
+.Bl -tag -xwidth ".Li .D1"
+.It Li .D1
+(This is D-one.)
+Display one line of indented text.
+This macro is parsed but not callable.
+.Pp
+.Dl Fl ldghfstru
+.Pp
+The above was produced by:
+.Li ".Dl Fl ldghfstru" .
+.
+.It Li .Dl
+(This is D-ell.)
+Display one line of indented
+.Em literal
+text.
+The
+.Ql .Dl
+example macro has been used throughout this file.
+It allows the indentation (display) of one line of text.
+Its default font is set to constant width (literal).
+.Ql .Dl
+is parsed but not callable.
+.Pp
+.Dl % ls -ldg /usr/local/bin
+.Pp
+The above was produced by:
+.Li ".Dl % ls -ldg /usr/local/bin" .
+.
+.It Li .Bd
+Begin display.
+The
+.Ql .Bd
+display must be ended with the
+.Ql .Ed
+macro.
+It has the following syntax:
+.Pp
+.Bl -tag -xwidth ".Li .Bd" -offset indent
+.It Li .Bd Xo
+.Bro \-literal | \-filled | \-unfilled | \-ragged | \-centered Brc
+.Oo \-offset Ao string Ac Oc Oo \-file Ao file name Ac Oc Oo \-compact Oc Xc
+.El
+.Pp
+.
+.Bl -tag -xwidth ".Fl file Ao Ar file name Ac " -compact
.It Fl ragged
-Unjustified (ragged edges).
-.It Fl filled
-Filled, and if
-.Xr troff 1 ,
-also justified.
+Fill, but do not adjust the right margin (only left-justify).
+.It Fl centered
+Center lines between the current left and right margin.
+Note that each single line is centered.
.It Fl unfilled
-Unfilled, unjustified.
+Do not fill; display a block of text as typed, using line breaks as
+specified by the user.
+This can produce overlong lines without warning messages.
+.It Fl filled
+Display a filled block.
+The block of text is formatted (i.e., the text is justified on both the left
+and right side).
.It Fl literal
-Literal text or code.
-.It Fl file Ar name
-Read in named
-.Ar file
-and display.
-.It Fl offset Ar string
-Offset display.
-Acceptable
-.Ar string
-values:
-.Bl -tag -width indent-two -compact
+Display block with literal font (usually fixed-width).
+Useful for source code or simple tabbed or spaced text.
+.It Fl file Ao Ar file name Ac
+The file which name follows the
+.Fl file
+flag is read and displayed before any data enclosed with
+.Ql .Bd
+and
+.Ql .Ed ,
+using the selected display type.
+Any
+.Xr troff/ Ns Nm \-mdoc
+commands in the file will be processed.
+.It Fl offset Ao Ar string Ac
+If
+.Fl offset
+is specified with one of the following strings, the string is interpreted to
+indicate the level of indentation for the forthcoming block of text:
+.
+.Pp
+.Bl -tag -xwidth ".Ar indent-two" -compact
.It Ar left
-Align block on left (default).
+Align block on the current left margin; this is the default mode of
+.Ql .Bd .
.It Ar center
-Approximate center margin.
+Supposedly center the block.
+At this time unfortunately, the block merely gets left aligned about an
+imaginary center margin.
.It Ar indent
-Six constant width spaces (a tab).
+Indent by one default indent value or tab.
+The default indent value is also used for the
+.Ql .D1
+and
+.Ql .Dl
+macros, so one is guaranteed the two types of displays will line up.
+The indentation value is normally set to\~6n or about two thirds of an inch
+(six constant width characters).
.It Ar indent-two
-Two tabs.
+Indent two times the default indent value.
.It Ar right
-Left aligns block 2 inches from
-right.
-.It Ar xx Ns Cm n
-Where
-.Ar xx
-is a number from
-.No \&4 Ns Cm n
-to
-.No \&9\&9 Ns Cm n .
-.It Ar Aa
-Where
-.Ar Aa
-is a callable macro name.
-.It Ar string
-The width of
-.Ar string
-is used.
-.El
+This
+.Em left
+aligns the block about two inches from the right side of the page.
+This macro needs work and perhaps may never do the right thing within
+.Xr troff .
.El
-.It Li \&.Ed
-End-display (matches \&.Bd).
-.It Li \&.Bl
-Begin-list.
-Create lists or columns. Options:
-.Bl -tag -width flag -compact
-.It Em List-types
-.Bl -column "xbullet " -compact
-.It Fl bullet Ta "Bullet Item List"
-.It Fl dash Ta "Dash Item List"
-.It Fl hyphen Ta "(as per" Fl dash ")"
-.It Fl item Ta "Unlabeled List"
-.It Fl enum Ta "Enumerated List"
-.It Fl tag Ta "Tag Labeled List"
-.It Fl diag Ta "Diagnostic List"
-.It Fl hang Ta "Hanging Labeled List"
-.It Fl ohang Ta "Overhanging Labeled List"
-.It Fl inset Ta "Inset or Run-on Labeled List"
-.It Fl column Ta "Multiple Columns"
-.El
-.It Em List-parameters
-.Bl -tag -width "xcompact " -compact
-.It Fl offset
-(All lists.) See
-.Ql \&.Bd
-begin-display above.
-.It Fl width
-.Pf ( Fl tag
-and
-.Fl hang
-lists only.)
-See
-.Ql \&.Bd .
-This parameter is effectively required for
-.Fl tag
-lists.
+.Pp
+.
+If
+.Ao string Ac
+is a valid numeric expression instead
+.Pf ( Em with a scale indicator other than
+.Sq Em u ) ,
+use that value for indentation.
+The most useful scale indicators are
+.Sq m
+and
+.Sq n ,
+specifying the so-called
+.Em \&Em
+and
+.Em "En square" .
+This is approximately the width of the letter
+.Sq m
+resp.\& the letter
+.Sq n
+of the current font (for nroff output, both scale indicators give the same
+values).
+If
+.Ao string Ac
+isn't a numeric expression, it is tested whether it is an
+.Nm \-mdoc
+macro name, and the default offset value associated with this macro is used.
+Finally, if all tests fail,
+the width of
+.Ao string Ac
+(typeset with a fixed-width font) is taken as the offset.
.It Fl compact
-(All lists.)
-Suppresses blank lines.
+Suppress insertion of vertical space before begin of display.
+.El
+.
+.It Li .Ed
+End display (doesn't take parameters).
+.El
+.
+.Ss "Tagged Lists and Columns"
+.
+There are several types of lists which may be initiated with the
+.Ql .Bl
+begin-list macro.
+Items within the list are specified with the
+.Ql .It
+item macro, and each list must end with the
+.Ql .El
+macro.
+Lists may be nested within themselves and within displays.
+The use of columns inside of lists or lists inside of columns is unproven.
+.Pp
+In addition, several list attributes may be specified such as the width of a
+tag, the list offset, and compactness (blank lines between items allowed or
+disallowed).
+Most of this document has been formatted with a tag style list
+.Pf ( Fl tag ) .
+.Pp
+It has the following syntax forms:
+.
+.Pp
+.Bl -tag -xwidth ".Li .Bl" -offset indent -compact
+.It Li .Bl Xo
+.Bro \-hang | \-ohang | \-tag | \-diag | \-inset Brc
+.Oo \-width Ao string Ac Oc Oo \-xwidth Ao command Ac Oc
+.Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
+.It Li .Bl Xo
+.No \-column Oo \-offset Ao string Ac Oc
+.Ao string1 Ac Ao string2 Ac Ld Xc
+.It Li .Bl Xo
+.Bro \-item | \-enum Oo \-nested Oc | \-bullet | \-hyphen | \-dash Brc
+.Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
.El
+.Pp
+.
+And now a detailed description of the list types.
+.
+.Pp
+.Bl -tag -xwidth ".Fl column" -compact
+.It Fl bullet
+A bullet list.
+.
+.Bd -literal -offset indent
+\&.Bl -bullet -offset indent -compact
+\&.It
+Bullet one goes here.
+\&.It
+Bullet two here.
+\&.El
+.Ed
+.Pp
+.
+Produces:
+.
+.Pp
+.Bl -bullet -offset indent -compact
+.It
+Bullet one goes here.
+.It
+Bullet two here.
.El
-.It Li \&.El
-End-list.
-.It Li \&.It
-List item.
+.Pp
+.
+.It Fl dash No ( or Fl hyphen )
+A dash list.
+.
+.Bd -literal -offset indent
+\&.Bl -dash -offset indent -compact
+\&.It
+Dash one goes here.
+\&.It
+Dash two here.
+\&.El
+.Ed
+.Pp
+.
+Produces:
+.
+.Pp
+.Bl -dash -offset indent -compact
+.It
+Dash one goes here.
+.It
+Dash two here.
.El
-.Sh MANUAL AND GENERAL TEXT DOMAIN MACROS
-The manual and general text domain macros are special in that
-most of them are parsed for callable macros
-for example:
-.Bl -tag -width ".Op Fl s Ar filex" -offset indent
-.It Li "\&.Op Fl s Ar file"
-Produces
-.Op Fl s Ar file
+.Pp
+.
+.It Fl enum
+An enumerated list.
+.
+.Bd -literal -offset indent
+\&.Bl -enum -offset indent -compact
+\&.It
+Item one goes here.
+\&.It
+And item two here.
+\&.El
+.Ed
+.Pp
+.
+The result:
+.
+.Pp
+.Bl -enum -offset indent -compact
+.It
+Item one goes here.
+.It
+And item two here.
.El
.Pp
-In this example, the option enclosure macro
-.Ql \&.Op
-is parsed, and calls the callable content macro
-.Ql \&Fl
-which operates on the argument
-.Ql s
-and then calls the callable content macro
-.Ql \&Ar
-which operates on the argument
-.Ql file .
-Some macros may be callable, but are not parsed and vice versa.
-These macros are indicated in the
-.Em parsed
+.
+If you want to nest enumerated lists, use the
+.Fl nested
+flag (starting with the second-level list):
+.
+.Bd -literal -offset indent
+\&.Bl -enum -offset indent -compact
+\&.It
+Item one goes here
+\&.Bl -enum -nested -compact
+\&.It
+Item two goes here.
+\&.It
+And item three here.
+\&.El
+\&.It
+And item four here.
+\&.El
+.Ed
+.Pp
+.
+Result:
+.
+.Pp
+.Bl -enum -offset indent -compact
+.It
+Item one goes here.
+.Bl -enum -nested -compact
+.It
+Item two goes here.
+.It
+And item three here.
+.El
+.It
+And item four here.
+.El
+.Pp
+.
+.It Fl item
+A list of type
+.Fl item
+without list markers.
+.
+.Bd -literal -offset indent
+\&.Bl -item -offset indent
+\&.It
+Item one goes here.
+Item one goes here.
+Item one goes here.
+\&.It
+Item two here.
+Item two here.
+Item two here.
+\&.El
+.Ed
+.Pp
+.
+Produces:
+.
+.Pp
+.Bl -item -offset indent
+.It
+Item one goes here.
+Item one goes here.
+Item one goes here.
+.It
+Item two here.
+Item two here.
+Item two here.
+.El
+.Pp
+.
+.It Fl tag
+A list with tags.
+Use
+.Fl width
+or
+.Fl xwidth
+to specify the tag width.
+.
+.Pp
+.Bl -tag -width "PPID" -compact -offset indent
+.It SL
+sleep time of the process (seconds blocked)
+.It PAGEIN
+number of disk
+.Tn I/O Ns 's
+resulting from references by the process
+to pages not loaded in core.
+.It UID
+numerical user-id of process owner
+.It PPID
+numerical id of parent of process priority
+(non-positive when in non-interruptible wait)
+.El
+.Pp
+.
+The raw text:
+.
+.Bd -literal -offset indent
+\&.Bl -tag -width "PPID" -compact -offset indent
+\&.It SL
+sleep time of the process (seconds blocked)
+\&.It PAGEIN
+number of disk
+\&.Tn I/O Ns 's
+resulting from references by the process
+to pages not loaded in core.
+\&.It UID
+numerical user-id of process owner
+\&.It PPID
+numerical id of parent of process priority
+(non-positive when in non-interruptible wait)
+\&.El
+.Ed
+.Pp
+.
+.It Fl diag
+Diag lists create section-four diagnostic lists and are similar to inset
+lists except callable macros are ignored.
+This list type can't be nested; the flags
+.Fl offset
and
-.Em callable
-columns below.
-.Pp
-Unless stated, manual domain macros share a common syntax:
-.Pp
-.Dl \&.Va argument [\ .\ ,\ ;\ :\ (\ )\ [\ ]\ argument \...\ ]
-.Pp
-.Sy Note :
-Opening and closing
-punctuation characters are only recognized as such if they are presented
-one at a time.
-The string
-.Ql "),"
-is not recognized as punctuation and will be output with a leading white
-space and in what ever font the calling macro uses.
-The
-argument list
-.Ql "] ) ,"
-is recognized as three sequential closing punctuation characters
-and a leading white space is not output between the characters
-and the previous argument (if any).
-The special meaning of a punctuation character may be escaped
-with the string
-.Ql \e& .
-For example the following string,
-.Bl -tag -width "&.Ar file1\ , file2\ , file3\ )\ ." -offset indent
-.It Li "\&.Ar file1\ , file2\ , file3\ )\ ."
-Produces
-.Ar file1 , file2 , file3 ) .
-.El
-.ne 1i
-.Ss Manual Domain Macros
-.Bl -column "Name" "Parsed" "Callable" -compact
-.It Em Name Parsed Callable Description
-.It Li \&Ad Ta Yes Ta Yes Ta Address. "(This macro may be deprecated.)"
-.It Li \&Ar Ta Yes Ta Yes Ta "Command line argument."
-.It Li \&Cd Ta \&No Ta \&No Ta "Configuration declaration (section four only)."
-.It Li \&Cm Ta Yes Ta Yes Ta "Command line argument modifier."
-.It Li \&Dv Ta Yes Ta Yes Ta "Defined variable (source code)."
-.It Li \&Er Ta Yes Ta Yes Ta "Error number (source code)."
-.It Li \&Ev Ta Yes Ta Yes Ta "Environment variable."
-.It Li \&Fa Ta Yes Ta Yes Ta "Function argument."
-.It Li \&Fd Ta \&No Ta \&No Ta "Function declaration."
-.It Li \&Fl Ta Yes Ta Yes Ta "Command line flag."
-.It Li \&Fn Ta Yes Ta Yes Ta "Function call (also .Fo and .Fc)."
-.It Li \&Ic Ta Yes Ta Yes Ta "Interactive command."
-.It Li \&Li Ta Yes Ta Yes Ta "Literal text."
-.It Li \&Nm Ta Yes Ta Yes Ta "Command name."
-.It Li \&Op Ta Yes Ta Yes Ta "Option (also .Oo and .Oc)."
-.It Li \&Ot Ta Yes Ta Yes Ta "Old style function type (Fortran only)."
-.It Li \&Pa Ta Yes Ta Yes Ta "Pathname or file name."
-.It Li \&St Ta Yes Ta Yes Ta "Standards (-p1003.2, -p1003.1 or -ansiC)"
-.It Li \&Va Ta Yes Ta Yes Ta "Variable name."
-.It Li \&Vt Ta Yes Ta Yes Ta "Variable type (Fortran only)."
-.It Li \&Xr Ta Yes Ta Yes Ta "Manual Page Cross Reference."
-.El
-.Ss General Text Domain Macros
-.Bl -column "Name" "Parsed" "Callable" -compact
-.It Em "Name Parsed Callable Description"
-.It Li \&%A Ta Yes Ta \&No Ta "Reference author."
-.It Li \&%B Ta Yes Ta Yes Ta "Reference book title."
-.It Li \&%\&C Ta \&No Ta \&No Ta "Reference place of publishing (city)."
-.It Li \&%\&D Ta \&No Ta \&No Ta "Reference date."
-.It Li \&%J Ta Yes Ta Yes Ta "Reference journal title."
-.It Li \&%N Ta \&No Ta \&No Ta "Reference issue number."
-.It Li \&%\&O Ta \&No Ta \&No Ta "Reference optional information."
-.It Li \&%P Ta \&No Ta \&No Ta "Reference page number(s)."
-.It Li \&%R Ta \&No Ta \&No Ta "Reference report Name."
-.It Li \&%T Ta Yes Ta Yes Ta "Reference article title."
-.It Li \&%V Ta \&No Ta \&No Ta "Reference volume."
-.It Li \&Ac Ta Yes Ta Yes Ta "Angle close quote."
-.It Li \&Ao Ta Yes Ta Yes Ta "Angle open quote."
-.It Li \&Ap Ta Yes Ta Yes Ta "Insert apostrophe; switch to .No mode "
-.It Li \&Aq Ta Yes Ta Yes Ta "Angle quote."
-.It Li \&At Ta \&No Ta \&No Ta Tn "AT&T UNIX."
-.It Li \&Bc Ta Yes Ta Yes Ta "Bracket close quote."
-.It Li \&Bf Ta \&No Ta \&No Ta "Begin font mode."
-.It Li \&Bo Ta Yes Ta Yes Ta "Bracket open quote."
-.It Li \&Bq Ta Yes Ta Yes Ta "Bracket quote."
-.It Li \&Bx Ta Yes Ta Yes Ta "BSD" .
-.It Li \&Db Ta \&No Ta \&No Ta "Debug (default is \\*qoff\\*q)."
-.It Li \&Dc Ta Yes Ta Yes Ta "Double close quote."
-.It Li \&Do Ta Yes Ta Yes Ta "Double open quote."
-.It Li \&Dq Ta Yes Ta Yes Ta "Double quote."
-.It Li \&Ec Ta Yes Ta Yes Ta "Enclose string close quote."
-.It Li \&Ef Ta \&No Ta \&No Ta "End font mode."
-.It Li \&Em Ta Yes Ta Yes Ta "Emphasis (traditional English)."
-.It Li \&Eo Ta Yes Ta Yes Ta "Enclose string open quote."
-.It Li \&Fx Ta \&No Ta \&No Ta "FreeBSD."
-.It Li \&No Ta Yes Ta Yes Ta "Normal text (no-op)."
-.It Li \&Ns Ta Yes Ta Yes Ta "No space."
-.It Li \&Nx Ta \&No Ta \&No Ta "NetBSD."
-.It Li \&Pc Ta Yes Ta Yes Ta "Parenthesis close quote."
-.It Li \&Pf Ta Yes Ta \&No Ta "Prefix string."
-.It Li \&Po Ta Yes Ta Yes Ta "Parenthesis open quote."
-.It Li \&Pq Ta Yes Ta Yes Ta "Parentheses quote."
-.It Li \&Qc Ta Yes Ta Yes Ta "Strait Double close quote."
-.It Li \&Ql Ta Yes Ta Yes Ta "Quoted literal."
-.It Li \&Qo Ta Yes Ta Yes Ta "Strait Double open quote."
-.It Li \&Qq Ta Yes Ta Yes Ta "Strait Double quote."
-.It Li \&Re Ta \&No Ta \&No Ta "Reference end."
-.It Li \&Rs Ta \&No Ta \&No Ta "Reference start."
-.It Li \&Sc Ta Yes Ta Yes Ta "Single close quote."
-.It Li \&So Ta Yes Ta Yes Ta "Single open quote."
-.It Li \&Sq Ta Yes Ta Yes Ta "Single quote."
-.It Li \&Sm Ta \&No Ta \&No Ta "Space mode (default is \\*qon\\*q)."
-.It Li \&Sx Ta Yes Ta Yes Ta "Section Cross Reference."
-.It Li \&Sy Ta Yes Ta Yes Ta "Symbolic (traditional English)."
-.It Li \&Tn Ta Yes Ta Yes Ta "Trade or type name (small Caps)."
-.It Li \&Ux Ta Yes Ta Yes Ta "UNIX."
-.It Li \&Xc Ta Yes Ta Yes Ta "Extend argument list close."
-.It Li \&Xo Ta Yes Ta Yes Ta "Extend argument list open."
-.El
-.\" .It Sy \&Hf Ta \&No Ta \&No Ta "Include file with header"
-.Pp
-Macro names ending in
-.Ql q
-quote remaining items on the argument list.
-Macro names ending in
-.Ql o
-begin a quote which may span more than one line of input and
-are close quoted with the matching macro name ending in
-.Ql c .
-Enclosure macros may be nested and are limited to
-eight arguments.
-.Pp
-Note: the extended argument list macros
-.Pf ( Ql \&.Xo ,
-.Ql \&.Xc )
-and the function enclosure macros
-.Pf ( Ql \&.Fo ,
-.Ql \&.Fc )
-are irregular.
-The extended list macros are used when the number of macro arguments
-would exceed the
+.Fl compact
+are ignored
+.Pf ( Fl width
+resp.\&
+.Fl xwidth
+are not meaningful in this context).
+.Pp
+Example:
+.
+.Bd -literal -offset indent
+\&.Bl -diag
+\&.It You can't use Sy here.
+The message says all.
+\&.El
+.Ed
+.Pp
+.
+produces
+.
+.Pp
+.Sy "You can't use Sy here" . "\ " No "The message says all" .
+.Pp
+.
+.It Fl hang
+A list with hanging tags.
+.
+.Bl -hang -offset indent
+.It Em Hanged
+labels appear similar to tagged lists when the
+label is smaller than the label width.
+.It Em Longer hanged list labels
+blend into the paragraph unlike
+tagged paragraph labels.
+.El
+.Pp
+And the unformatted text which created it:
+.
+.Bd -literal -offset indent
+\&.Bl -hang -offset indent
+\&.It Em Hanged
+labels appear similar to tagged lists when the
+label is smaller than the label width.
+\&.It Em Longer hanged list labels
+blend into the paragraph unlike
+tagged paragraph labels.
+\&.El
+.Ed
+.Pp
+.
+.It Fl ohang
+Lists with overhanging tags don't use indentation for the items; tags are
+written to a separate line.
+.Pp
+.Bl -ohang -offset indent
+.It Sy SL
+sleep time of the process (seconds blocked)
+.It Sy PAGEIN
+number of disk
+.Tn I/O Ns 's
+resulting from references by the process
+to pages not loaded in core.
+.It Sy UID
+numerical user-id of process owner
+.It Sy PPID
+numerical id of parent of process priority
+(non-positive when in non-interruptible wait)
+.El
+.Pp
+.
+The raw text:
+.
+.Bd -literal -offset indent
+\&.Bl -ohang -offset indent
+\&.It Sy SL
+sleep time of the process (seconds blocked)
+\&.It Sy PAGEIN
+number of disk
+\&.Tn I/O Ns 's
+resulting from references by the process
+to pages not loaded in core.
+\&.It Sy UID
+numerical user-id of process owner
+\&.It Sy PPID
+numerical id of parent of process priority
+(non-positive when in non-interruptible wait)
+\&.El
+.Ed
+.Pp
+.
+.It Fl inset
+Here is an example of inset labels:
+.Bl -inset -offset indent
+.It Em Tag
+The tagged list (also called a tagged paragraph)
+is the most common type of list used in the
+Berkeley manuals.
+Use a
+.Fl width
+attribute as described below.
+.It Em Diag
+Diag lists create section four diagnostic lists
+and are similar to inset lists except callable
+macros are ignored.
+.It Em Hang
+Hanged labels are a matter of taste.
+.It Em Ohang
+Overhanging labels are nice when space is constrained.
+.It Em Inset
+Inset labels are useful for controlling blocks of
+paragraphs and are valuable for converting
+.Nm \-mdoc
+manuals to other formats.
+.El
+.Pp
+Here is the source text which produced the above example:
+.
+.Bd -literal -offset indent
+\&.Bl -inset -offset indent
+\&.It Em Tag
+The tagged list (also called a tagged paragraph)
+is the most common type of list used in the
+Berkeley manuals.
+\&.It Em Diag
+Diag lists create section four diagnostic lists
+and are similar to inset lists except callable
+macros are ignored.
+\&.It Em Hang
+Hanged labels are a matter of taste.
+\&.It Em Ohang
+Overhanging labels are nice when space is constrained.
+\&.It Em Inset
+Inset labels are useful for controlling blocks of
+paragraphs and are valuable for converting
+\&.Nm \-mdoc
+manuals to other formats.
+\&.El
+.Ed
+.Pp
+.
+.It Fl column
+This list type generates multiple columns.
+The number of columns and the width of each column is determined by the
+arguments to the
+.Fl column
+list.
+Each
+.Ql .It
+argument is parsed to make a row, each column within the row is a separate
+argument separated by a tab or the
+.Ql .Ta
+macro.
+.Pp
+The table:
+.
+.Bl -column -offset indent String Nroff Troff
+.It Sy String Ta Sy Nroff Ta Sy Troff
+.It Li <= Ta <= Ta \*(<=
+.It Li >= Ta >= Ta \*(>=
+.El
+.Pp
+.
+was produced by:
+.
+.Bd -literal -offset indent
+\&.Bl -column -offset indent String Nroff Troff
+\&.It Sy String Ta Sy Nroff Ta Sy Troff
+\&.It Li <= Ta <= Ta \e*(<=
+\&.It Li >= Ta >= Ta \e*(>=
+\&.El
+.Ed
+.El
+.Pp
+.
+Other keywords:
+.
+.Bl -tag -xwidth ".Fl indent Ao Ar string Ac"
+.It Fl width Ao Ar string Ac
+If
+.Ao string Ac
+is a valid numeric expression
+.Pf ( Em with a scale indicator other than
+.Sq Em u ) ,
+use that value for indentation.
+The most useful scale indicators are
+.Sq m
+and
+.Sq n ,
+specifying the so-called
+.Em \&Em
+and
+.Em "En square" .
+This is approximately the width of the letter
+.Sq m
+resp.\& the letter
+.Sq n
+of the current font (for nroff output, both scale indicators give the same
+values).
+If
+.Ao string Ac
+isn't a numeric expression, it is tested whether it is an
+.Nm \-mdoc
+macro name, and the default offset value associated with this macro is used.
+Finally, if all tests fail,
+the width of
+.Ao string Ac
+(typeset with a fixed-width font) is taken as the offset.
+.Pp
+If a width is not specified for the tag list type, the first time
+.Ql .It
+is invoked, an attempt is made to determine an appropriate width.
+If the first argument to
+.Ql .It
+is a callable macro, the default width for that macro will be used as if the
+macro name had been supplied as the width (otherwise, the default width of
+.Ql .No
+is used).
+However, if another item in the list is given with a different callable
+macro name, a new and nested list is assumed.
+This effectively means that
+.Fl width
+or
+.Fl xwidth
+is required for more complicated tag lists.
+.It Fl xwidth Ao Ar string Ac
+Interpret
+.Ao string Ac
+and use the width of the result.
+Almost all lists in this document use this option.
+.Pp
+Example:
+.
+.Bd -literal -offset indent
+\&.Bl -tag -xwidth ".Fl test Ao Ar string Ac"
+\&.It Fl test Ao Ar string Ac
+This is a longer sentence to show how the
+\&.Fl xwidth
+flag works in combination with a tag list.
+\&.El
+.Ed
+.Pp
+.
+gives:
+.
+.Bl -tag -xwidth ".Fl test Ao Ar string Ac"
+.It Fl test Ao Ar string Ac
+This is a longer sentence to show how the
+.Fl xwidth
+flag works in combination with a tag list.
+.El
+.Pp
+.
+Note that the current state of
+.Nm \-mdoc
+is saved before
+.Ao string Ac
+is interpreted; afterwards, all variables are restored again.
+However, boxes (used for enclosures) can't be saved in
+.Tn GNU
+.Xr troff 1 ;
+as a consequence, arguments must always be
+.Em balanced
+to avoid nasty errors.
+For example, don't say
+.Ql ".Ao string"
+but
+.Ql ".Ao string Xc"
+instead if you really need only an opening angle bracket.
+.It Fl offset Ao Ar string Ac
+If
+.Ao string Ac
+is
+.Ql -indent ,
+a default indent value (normally set to\~6n, similar to the value used in
+.Ql .Dl
+or
+.Ql .Bd )
+is used.
+If
+.Ao string Ac
+is a valid numeric expression instead
+.Pf ( Em with a scale indicator other than
+.Sq Em u ) ,
+use that value for indentation.
+The most useful scale indicators are
+.Sq m
+and
+.Sq n ,
+specifying the so-called
+.Em \&Em
+and
+.Em "En square" .
+This is approximately the width of the letter
+.Sq m
+resp.\& the letter
+.Sq n
+of the current font (for nroff output, both scale indicators give the same
+values).
+If
+.Ao string Ac
+isn't a numeric expression, it is tested whether it is an
+.Nm \-mdoc
+macro name, and the default offset value associated with this macro is used.
+Finally, if all tests fail,
+the width of
+.Ao string Ac
+(typeset with a fixed-width font) is taken as the offset.
+.It Fl compact
+Suppress insertion of vertical space before the list and between list items.
+.El
+.
+.
+.Sh "MISCELLANEOUS MACROS"
+.
+Here a list of the remaining macros which don't fit well into one of the
+above sections.
+We couldn't find real examples for the following macros:
+.Ql .Me ,
+.Ql .Or ,
+.Ql .Ot ,
+and
+.Ql .Vt .
+They are documented here for completeness \- if you know how to use them
+properly please send a mail to
+.Mt bug-groff@gnu.org
+(including an example).
+.
+.Bl -tag -xwidth ".Li .Bt"
+.It Li .Bt
+prints
+.
+.Bd -ragged -offset indent
+.Bt
+.Ed
+.Pp
+It is neither callable nor parsable and takes no arguments.
+.
+.It Li .Fr
+.Pp
+.Dl Usage: .Fr Ao function return value Ac Ld
+.Pp
+Don't use this macro.
+It allows a break right before the return value (usually a single digit)
+which is bad typographical behaviour.
+Use
+.Ql \e~
+to tie the return value to the previous word.
+.
+.It Li .Hf
+Use this macro to include a (header) file literally.
+It first prints
+.Ql File:
+followed by the file name, then the contents of
+.Ao file Ac .
+.Pp
+.Dl Usage: .Hf Ao file Ac
+.Pp
+It is neither callable nor parsable.
+.
+.It Li .In
+Specify C\~header file as being called in a C\~program.
+.Pp
+.Dl Usage: .In Ao header file Ac
+.Pp
+This function causes a break.
+For example, the line
+.Pp
+.In stdio.h
+.Pp
+is produced by
+.Ql ".In stdio.h" .
+.Pp
+It is neither callable nor parsable.
+.
+.It Li .Ld
+This macro is similar to TeX's
+.Ql \eldots
+command; it prints
+.Sq Ld .
+.
+.It Li .Lk
+To be written.
+.
+.It Li .Me
+Exact usage unknown.
+The documentation in the
+.Nm \-mdoc
+source file describes it as a macro for
+.Dq "menu entries" .
+.Pp
+Its default width is 6n.
+.
+.It Li .Mt
+To be written.
+.
+.It Li .Or
+This macro does nothing (probably a bug in the old
+.Nm \-mdoc
+implementation) \- it should output a
+.Dq pipe symbol (OR)
+according to the documentation in the
+.Nm \-mdoc
+source.
+We don't have an example for its intended use.
+Note that a pipe symbol can always be produced by using
+.Ql | ;
+if you don't use
+.Tn GNU
.Xr troff
-limitation of nine arguments.
+requests directly, it will never interfere with the absolute position
+operator of troff.
+Alternatively, the string
+.Ql \e*[ba]
+is available.
+.Pp
+As a consequence, this macro is obsolete.
+.
+.It Li .Ot
+Exact usage unknown.
+The documentation in the
+.Nm \-mdoc
+source file describes it as
+.Dq old function type (fortran) .
+.
+.It Li .Sm
+Activate (toggle) space mode.
+.Pp
+.Dl Usage: .Sm Oo on | off Oc Ld
+.Pp
+If space mode is off, no spaces between macro arguments are inserted.
+If called without a parameter (or if the next parameter is neither
+.Ql on
+nor
+.Ql off ,
+.Ql .Sm
+toggles space mode.
+.
+.It Li .Ud
+prints
+.
+.Bd -ragged -offset indent
+.Ud
+.Ed
+.Pp
+It is neither callable nor parsable and takes no arguments.
+.
+.It Li .Vt
+Exact usage unknown.
+The documentation in the
+.Nm \-mdoc
+source file describes it as
+.Dq "variable type (for forcing old style variable declarations)" .
+.El
+.
+.
+.Sh "PREDEFINED STRINGS"
+.
+The following strings are predefined:
+.Pp
+.Bl -column String infinity "Troff " "straight double quote" -offset indent
+.It Sy String Ta Sy Nroff Ta Sy Troff Ta Sy Meaning
+.It Li <= Ta <= Ta \*[<=] Ta "less equal"
+.It Li >= Ta >= Ta \*[>=] Ta "greater equal"
+.It Li Rq Ta '' Ta \*[Rq] Ta "right double quote"
+.It Li Lq Ta `` Ta \*[Lq] Ta "left double quote"
+.It Li ua Ta ^ Ta \*[ua] Ta "upwards arrow"
+.It Li aa Ta \' Ta \*[aa] Ta "acute accent"
+.It Li ga Ta \` Ta \*[ga] Ta "grave accent"
+.It Li q Ta \&" Ta \*[q] Ta "straight double quote"
+.It Li Pi Ta pi Ta \*[Pi] Ta "greek pi"
+.It Li Ne Ta != Ta \*[Ne] Ta "not equal"
+.It Li Le Ta <= Ta \*[Le] Ta "less equal"
+.It Li Ge Ta >= Ta \*[Ge] Ta "greater equal"
+.It Li Lt Ta < Ta \*[Lt] Ta "less than"
+.It Li Gt Ta > Ta \*[Lt] Ta "greater than"
+.It Li Pm Ta +\- Ta \*[Pm] Ta "plus minus"
+.It Li If Ta infinity Ta \*[If] Ta "infinity"
+.It Li Na Ta \*[Na] Ta \*[Na] Ta "not a number"
+.It Li Ba Ta \*[Ba] Ta \*[Ba] Ta "vertical bar"
+.El
+.Pp
+The names of the columns
+.Sy Nroff
+and
+.Sy Troff
+are a bit misleading;
+.Sy Nroff
+shows the
+.Tn ASCII
+representation, while
+.Sy Troff
+gives the best glyph form available.
+For example, a Unicode enabled
+.Tn TTY Ns - Ns
+device will have proper glyph representations for all strings, whereas the
+enhancement for a Latin1
+.Tn TTY Ns - Ns
+device is only the plus-minus sign.
+.Pp
+String names which consist of two characters can be written as
+.Ql \e*(xx ;
+string names which consist of one character can be written as
+.Ql \e*x .
+A generic syntax for a string name of any length is
+.Ql \e*[xxx]
+(this is a
+.Tn GNU
+.Xr troff 1
+extension).
+.
+.
+\#
+\#=====================================================================
+\#
+.Sh DIAGNOSTICS
+.
+The debugging macro
+.Ql .Db
+available in previous versions of
+.Nm \-mdoc
+has been removed since
+.Tn GNU
+.Xr troff 1
+provides better facilities to check parameters; additionally, many error and
+warning messages have been added to this macro package, making it both more
+robust and verbose.
+.Pp
+The only remaining debugging macro is
+.Ql .Rd
+which yields a register dump of all global registers and strings.
+A normal user will never need it.
+.
+.
+.Sh "FORMATTING WITH GROFF, TROFF, AND NROFF"
+.
+By default, the package inhibits page breaks, headers, and footers if
+displayed with a
+.Tn TTY
+device like
+.Sq latin-1
+or
+.Sq unicode
+to make the manual more efficient for viewing on-line.
+This behaviour can be changed (e.g.\& to create a hardcopy of the
+.Tn TTY
+output) by setting the register
+.Ql cR
+to zero while calling groff:
+.Pp
+.Dl groff -Tlatin1 -rcR=0 -mdoc foo.man > foo.txt
+.Pp
+For double-sided printing, set register
+.Ql D :
+.Pp
+.Dl groff -Tps -rD1 -mdoc foo.man > foo.ps
+.Pp
+To change the document font size to 11pt or 12pt, set register
+.Ql S
+accordingly:
+.Pp
+.Dl groff -Tdvi -rS11 -mdoc foo.man > foo.dvi
+.Pp
+Register
+.Ql S
+is ignored for
+.Tn TTY
+devices.
+.
+.
.Sh FILES
-.Bl -tag -width "mdoc/doc-ditroff" -compact
+.
+.Bl -tag -width mdoc/doc-ditroff -compact
+.It Pa doc.tmac
+The main manual macro package.
.It Pa mdoc.tmac
-Wrapper file for
+A wrapper file to call
.Pa doc.tmac .
-.It Pa doc.tmac
-Manual and general text domain macros.
.It Pa mdoc/doc-common
-Common structural macros and definitions.
+Common strings, definitions, stuff related typographic output.
.It Pa mdoc/doc-nroff
-Site dependent
-.Xr nroff
-style file.
+Definitions used for a
+.Tn TTY
+output device.
.It Pa mdoc/doc-ditroff
-Site dependent
-.Xr troff
-style file.
-.It Pa mdoc/doc-syms
-Special defines (such as the standards macro).
+Definitions used for all other devices.
+.It Pa mdoc.local
+Local additions and customizations.
+.It Pa andoc.tmac
+This file checks whether the
+.Nm \-mdoc
+or the
+.Nm \-man
+package should be used.
.El
-.Sh SEE ALSO
-.Xr groff_mdoc.samples @MAN7EXT@
+.
+.
+.Sh "SEE ALSO"
+.
+.Xr man 1 ,
+.Xr groff_man 7 ,
+.Xr groff 1 ,
+.Xr troff 1
+.
+.
+.Sh BUGS
+.
+Section 3f has not been added to the header routines.
+.Pp
+.Ql \&.Nm
+font should be changed in
+.Sx NAME
+section.
+.Pp
+.Ql \&.Fn
+needs to have a check to prevent splitting up
+if the line length is too short.
+Occasionally it
+separates the last parenthesis, and sometimes
+looks ridiculous if a line is in fill mode.
+.Pp
+The list and display macros to not do any keeps
+and certainly should be able to.
+.\" Note what happens if the parameter list overlaps a newline
+.\" boundary.
+.\" to make sure a line boundary is crossed:
+.\" .Bd -literal
+.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
+.\" .Ed
+.\" .Pp
+.\" produces, nudge nudge,
+.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
+.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
+.\" nudge
+.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
+.\" .Pp
+.\" If double quotes are used, for example:
+.\" .Bd -literal
+.\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
+.\" .Ed
+.\" .Pp
+.\" produces, nudge nudge,
+.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
+.\" nudge
+.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
+.\" nudge
+.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
+.\" .Pp
+.\" Not a pretty sight...
+.\" In a paragraph, a long parameter containing unpaddable spaces as
+.\" in the former example will cause
+.\" .Xr troff
+.\" to break the line and spread
+.\" the remaining words out.
+.\" The latter example will adjust nicely to
+.\" justified margins, but may break in between an argument and its
+.\" declaration.
+.\" In
+.\" .Xr nroff
+.\" the right margin adjustment is normally ragged and the problem is
+.\" not as severe.
diff --git a/tmac/groff_mdoc.reference.man b/tmac/groff_mdoc.reference.man
deleted file mode 100755
index 23a1bf9e..00000000
--- a/tmac/groff_mdoc.reference.man
+++ /dev/null
@@ -1,3927 +0,0 @@
-.\" groff_mdoc.reference.man
-.\"
-.\" A complete reference of the mdoc macro package for GNU troff.
-.\"
-.\" Based on NetBSD's mdoc.samples.7, version 1.21.
-.\"
-.\"
-.\" Warning: You can't format this file with the old mdoc macros!
-.\"
-.\"
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93
-.\"
-.\" This reference invokes every macro in the package several
-.\" times and is guaranteed to give a worst case performance
-.\" for an already extremely slow package.
-.\"
-.
-.Dd January 1, 2001
-.Os
-.Dt MDOC.REFERENCE 7
-.
-.
-.Sh NAME
-.
-.Nm mdoc.reference
-.Nd reference for groff's mdoc implementation
-.
-.
-.Sh SYNOPSIS
-.
-.Nm man mdoc.reference
-.
-.
-.Sh DESCRIPTION
-.
-A complete reference for writing
-.Ux
-manual pages with the
-.Nm \-mdoc
-macro package; a
-.Em content Ns -based
-and
-.Em domain Ns -based
-formatting package for
-.Tn GNU
-.Xr troff 1 .
-Its predecessor, the
-.Xr \-man 7
-package, addressed page layout leaving the manipulation of fonts and other
-typesetting details to the individual author.
-In
-.Nm \-mdoc ,
-page layout macros make up the
-.Em "page structure domain"
-which consists of macros for titles, section headers, displays and lists
-\- essentially items which affect the physical position of text on a
-formatted page.
-In addition to the page structure domain, there are two more domains, the
-.Em manual
-domain and the
-.Em general
-text domain.
-The general text domain is defined as macros which perform tasks such as
-quoting or emphasizing pieces of text.
-The manual domain is defined as macros that are a subset of the day to day
-informal language used to describe commands, routines and related to
-.Ux
-files.
-Macros in the manual domain handle command names, command line arguments and
-options, function names, function parameters, pathnames, variables, cross
-references to other manual pages, and so on.
-These domain items have value for both the author and the future user of the
-manual page.
-It is hoped the consistency gained across the manual set will provide easier
-translation to future documentation tools.
-.Pp
-Throughout the
-.Ux
-manual pages, a manual entry is simply referred to as a man page, regardless
-of actual length and without sexist intention.
-.
-.
-.Sh "GETTING STARTED"
-.
-The material presented in the remainder of this document is outlined
-as follows:
-.
-.Bl -enum -width 3n -offset indent
-. It
-. Tn "TROFF IDIOSYNCRASIES"
-.
-. Bl -tag -width 2n -compact
-. It "Macro Usage"
-. It "Passing Space Characters in an Argument"
-. It "Trailing Blank Space Characters"
-. It "Escaping Special Characters"
-. It "Other Possible Pitfalls"
-. El
-.
-. It
-. Tn "A MANUAL PAGE TEMPLATE"
-.
-. It
-. Tn "CONVENTIONS"
-.
-. It
-. Tn "TITLE MACROS"
-.
-. It
-. Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
-.
-. Bl -tag -width 2n -compact
-. It "What's in a Name" Ns Ld
-. It "General Syntax"
-. El
-.
-. It
-. Tn "MANUAL DOMAIN"
-.
-. Bl -tag -width 2n -compact
-. It "Addresses"
-. It "Author Name"
-. It "Arguments"
-. It "Configuration Declarations (Section Four Only)"
-. It "Command Modifiers"
-. It "Defined Variables"
-. It "Errno's (Section Two Only)"
-. It "Environment Variables"
-. It "Function Arguments"
-. It "Function Declarations"
-. It "Flags"
-. It "Functions (Library Routines)"
-. It "Function Types"
-. It "Return Values"
-. \" .It "Header File (including source code)"
-. It "Interactive Commands"
-. It "Library Names"
-. It "Literals"
-. It "Names"
-. It "Options"
-. It "Pathnames"
-. It "Standards"
-. It "Variables"
-. It "Manual Page Cross References"
-. El
-.
-. It
-. Tn "GENERAL TEXT DOMAIN"
-.
-. Bl -tag -width 2n -compact
-. It "AT&T Macro"
-. It "BSD Macro"
-. It "NetBSD Macro"
-. It "FreeBSD Macro"
-. It "OpenBSD Macro"
-. It "BSD/OS Macro"
-. It "UNIX Macro"
-. It "Emphasis Macro"
-. It "Font Mode"
-. It "Enclosure and Quoting Macros"
-. It "No-Op or Normal Text Macro"
-. It "No-Space Macro"
-. It "Section Cross References"
-. It "Symbolics"
-. It "Mathematical Symbols"
-. It "References and Citations"
-. It "Trade Names (or Acronyms and Type Names)"
-. It "Extended Arguments"
-. El
-.
-. It
-. Tn "PAGE STRUCTURE DOMAIN"
-.
-. Bl -tag -width 2n -compact
-. It "Section Headers"
-. It "Subsection Headers"
-. It "Paragraphs and Line Spacing"
-. It "Keeps"
-. It "Examples and Displays"
-. It "Tagged Lists and Columns"
-. El
-.
-. It
-. Tn "MISCELLANEOUS MACROS"
-.
-. It
-. Tn "PREDEFINED STRINGS"
-.
-. It
-. Tn "DIAGNOSTICS"
-.
-. It
-. Tn "FORMATTING WITH GROFF, TROFF, AND NROFF"
-.
-. It
-. Tn "FILES"
-.
-. It
-. Tn "SEE ALSO"
-.
-. It
-. Tn "BUGS"
-.El
-.
-.\" XXX
-.ne 7
-.
-.
-.Sh "TROFF IDIOSYNCRASIES"
-.
-The
-.Nm \-mdoc
-package attempts to simplify the process of writing a man page.
-Theoretically, one should not have to learn the dirty details of
-.Tn GNU
-.Xr troff 1
-to use
-.Nm \-mdoc ;
-however, there are a few limitations which are unavoidable and best gotten
-out of the way.
-And, too, be forewarned, this package is
-.Em not
-fast.
-.
-.Ss "Macro Usage"
-.
-As in
-.Tn GNU
-.Xr troff 1 ,
-a macro is called by placing a
-.Ql .\&
-(dot character) at the beginning of a line followed by the two-character
-(or three-character) name for the macro.
-There can be space characters between the dot and the macro name (but
-.Em no
-tabs).
-Arguments may follow the macro separated by spaces (again, no tabs).
-It is the dot character at the beginning of the line which causes
-.Tn GNU
-.Xr troff 1
-to interpret the next two (or more) characters as a macro name.
-A single starting dot followed by nothing is ignored.
-To place a
-.Ql .\&
-(dot character) at the beginning of an input line in some context other than
-a macro invocation, precede the
-.Ql .\&
-(dot) with the
-.Ql \e&
-escape sequence.
-The
-.Ql \e&
-translates literally to a zero-width space, and is never displayed in
-the output.
-.Pp
-In general,
-.Tn GNU
-.Xr troff 1
-macros accept an unlimited number of arguments (contrary to other versions
-of troff which can't handle more than nine arguments).
-In limited cases, arguments may be continued or extended on the next
-line (See
-.Sx Extended Arguments
-below).
-Almost all macros handle quoted arguments (see
-.Sx Passing Space Characters in an Argument
-below).
-.Pp
-Most of the
-.Nm \-mdoc
-general text domain and manual domain macros are special in that their
-argument lists are
-.Em parsed
-for callable macro names.
-This means an argument on the argument list which matches a general text or
-manual domain macro name and is determined to be callable will be executed
-or called when it is processed.
-In this case the argument, although the name of a macro, is not preceded by
-a
-.Ql .\&
-(dot).
-It is in this manner that many macros are nested; for example the
-option macro,
-.Ql .Op ,
-may
-.Em call
-the flag and argument macros,
-.Ql \&Fl
-and
-.Ql \&Ar ,
-to specify an optional flag with an argument:
-.
-.Bl -tag -xwidth ".Op Fl s Ar bytes" -offset indent
-.It Op Fl s Ar bytes
-is produced by
-.Ql ".Op Fl s Ar bytes"
-.El
-.
-.Pp
-To prevent a string from being interpreted as a macro name, precede the
-string with the escape sequence
-.Ql \e& :
-.
-.Bl -tag -xwidth ".Op \&Fl s \&Ar bytes" -offset indent
-.It Op \&Fl s \&Ar bytes
-is produced by
-.Ql ".Op \e&Fl s \e&Ar bytes"
-.El
-.
-.Pp
-Here the strings
-.Ql \&Fl
-and
-.Ql \&Ar
-are not interpreted as macros.
-Macros whose argument lists are parsed for callable arguments are referred
-to as
-.Em parsed
-and macros which may be called from an argument list are referred to as
-.Em callable
-throughout this document and in the companion quick-reference manual
-.Xr groff_mdoc 7 .
-This is a technical
-.Em faux pas
-as almost all of the macros in
-.Nm \-mdoc
-are parsed, but as it was cumbersome to constantly refer to macros as
-being callable and being able to call other macros, the term parsed
-has been used.
-.
-.Ss "Passing Space Characters in an Argument"
-.
-Sometimes it is desirable to give as an argument a string containing one or
-more blank space characters.
-This may be necessary to specify arguments to macros which expect particular
-arrangement of items in the argument list. Additionally, it makes
-.Nm \-mdoc
-working faster.
-For example, the function macro
-.Ql .Fn
-expects the first argument to be the name of a function and any remaining
-arguments to be function parameters.
-As
-.Tn ANSI\~C
-stipulates the declaration of function parameters in the parenthesized
-parameter list, each parameter is guaranteed to be at minimum a two word
-string.
-For example,
-.Fa int foo .
-.Pp
-There are two possible ways to pass an argument which contains
-an embedded space.
-One way of passing a string containing blank spaces is to use the hard or
-unpaddable space character
-.Ql \e\ ,
-that is, a blank space preceded by the escape character
-.Ql \e .
-This method may be used with any macro but has the side effect of
-interfering with the adjustment of text over the length of a line.
-.Xr Troff
-sees the hard space as if it were any other printable character and cannot
-split the string into blank or newline separated pieces as one would expect.
-This method is useful for strings which are not expected to overlap a line
-boundary.
-An alternative is to use
-.Ql \e~ ,
-a paddable (i.e.\& stretchable), unbreakable space (this is a
-.Tn GNU
-.Xr troff 1
-extension).
-The second method is to enclose the string with double quotes.
-.Pp
-For example:
-.
-.Bl -tag -xwidth ".Fn fetch char\ *str" -offset indent
-.It Fn fetch char\ *str
-is created by
-.Ql ".Fn fetch char\e *str"
-.It Fn fetch "char *str"
-can also be created by
-.Ql ".Fn fetch \*[q]char *str\*[q]"
-.El
-.
-.Pp
-If the
-.Ql \e
-before the space resp.\& the double quotes were omitted,
-.Ql .Fn
-would see three arguments, and the result would be:
-.Pp
-.Dl Fn fetch char *str
-.Pp
-For an example of what happens when the parameter list overlaps a newline
-boundary, see the
-.Sx BUGS
-section.
-.
-.Ss "Trailing Blank Space Characters"
-.
-.Xr Troff
-can be confused by blank space characters at the end of a line.
-It is a wise preventive measure to globally remove all blank spaces
-from
-.Ao blank-space Ac Ns Ao end-of-line Ac
-character sequences.
-Should the need arise to force a blank character at the end of a line, it
-may be forced with an unpaddable space and the
-.Ql \e&
-escape character.
-For example,
-.Ql string\e\ \e& .
-.
-.Ss "Escaping Special Characters"
-.
-Special characters like the newline character
-.Ql \en
-are handled by replacing the
-.Ql \e
-with
-.Ql \ee
-(e.g.\&
-.Ql \een )
-to preserve the backslash.
-.
-.Ss "Other Possible Pitfalls"
-.
-A warning is emitted when an empty input line is found outside of displays
-(see below).
-Use
-.Ql .sp
-instead.
-(Well, it is even better to use
-.Nm \-mdoc
-macros to avoid the usage of low-level commands).
-.Pp
-Leading spaces will cause a break and are output directly.
-Avoid this behaviour if possible.
-Similarly, don't use more than one space character between words in an
-ordinary text line; contrary to other text formatters, they are
-.Em not
-replaced with a single space.
-.Pp
-You can't pass
-.Ql \*[q]
-directly as an argument.
-Use
-.Ql \e*[q]
-(or
-.Ql \e*q )
-instead.
-.Pp
-By default,
-.Xr troff 1
-inserts two space characters after a punctuation mark closing a sentence
-(characters like
-.Ql \&)
-or
-.Ql \&'
-are treated transparently, not influencing the sentence-ending behaviour).
-To change this, insert
-.Ql \e&
-before or after the dot:
-.
-.Bd -literal -offset indent
-The
-\&.Ql .
-character.
-\&.Pp
-The
-\&.Ql \e&.
-character.
-\&.Pp
-\&.No test .
-test
-\&.Pp
-\&.No test.
-test
-.Ed
-.Pp
-.
-gives
-.
-.Bd -filled -offset indent
-The
-.Ql .
-character
-.Pp
-The
-.Ql \&.
-character.
-.Pp
-.No test .
-test
-.Pp
-.No test.
-test
-.Ed
-.Pp
-.
-As can be seen in the first and third line,
-.Nm \-mdoc
-handles punctuation characters specially in macro arguments.
-This will be explained in section
-.Sx General Syntax
-below.
-In the same way, you have to protect trailing full stops of abbreviations
-with a trailing zero-width space:
-.Ql e.g.\e& .
-.Pp
-A comment in the source file of a man page can be either started with
-.Ql .\e"
-on a single line,
-.Ql \e"
-after some input, or
-.Ql \e#
-anywhere (the latter is a
-.Tn GNU
-.Xr troff 1
-extension); the rest of such a line is ignored.
-.
-.
-.Sh "A MANUAL PAGE TEMPLATE"
-.
-The body of a man page is easily constructed from a basic template:
-.
-.Bd -literal -offset indent
-\&.\e" /usr/share/misc/mdoc.template:
-\&.\e" The following requests are required for all man pages.
-\&.
-\&.Dd Month day, year
-\&.Os OPERATING_SYSTEM [version/release]
-\&.Dt DOCUMENT_TITLE [section number] [volume]
-\&.Sh NAME
-\&.Nm name
-\&.Nd one line description of name
-\&.Sh SYNOPSIS
-\&.Sh DESCRIPTION
-\&.
-\&.\e" The following requests should be uncommented and
-\&.\e" used where appropriate.
-\&.\e" .Sh IMPLEMENTATION NOTES
-\&.\e" This next request is for sections 2, 3 and 9 function
-\&.\e" return values only.
-\&.\e" .Sh RETURN VALUES
-\&.
-\&.\e" This next request is for sections 1, 6, 7, 8 & 9 only
-\&.\e" .Sh ENVIRONMENT
-\&.\e" .Sh FILES
-\&.\e" .Sh EXAMPLES
-\&.
-\&.\e" This next request is for sections 1, 6, 7, 8 & 9 only
-\&.\e" (command return values (to shell) and
-\&.\e" fprintf/stderr type diagnostics)
-\&.\e" .Sh DIAGNOSTICS
-\&.
-\&.\e" The next request is for sections 2, 3 & 9 error
-\&.\e" and signal handling only.
-\&.\e" .Sh ERRORS
-\&.\e" .Sh SEE ALSO
-\&.\e" .Sh STANDARDS
-\&.\e" .Sh HISTORY
-\&.\e" .Sh AUTHORS
-\&.\e" .Sh BUGS
-.Ed
-.Pp
-.
-The first items in the template are the macros
-.Ql .Dd ,
-.Ql .Os ,
-and
-.Ql .Dt ;
-the document date, the operating system the man page or subject source is
-developed or modified for, and the man page title (in
-.Em upper case )
-along with the section of the manual the page belongs in.
-These macros identify the page and are discussed below in
-.Sx TITLE MACROS .
-.Pp
-The remaining items in the template are section headers
-.Pf ( Li .Sh ) ;
-of which
-.Sx NAME ,
-.Sx SYNOPSIS ,
-and
-.Sx DESCRIPTION
-are mandatory.
-The headers are discussed in
-.Sx "PAGE STRUCTURE DOMAIN" ,
-after presentation of
-.Sx "MANUAL DOMAIN" .
-Several content macros are used to demonstrate page layout macros; reading
-about content macros before page layout macros is recommended.
-.
-.
-.Sh CONVENTIONS
-.
-In the description of all macros below, optional arguments are put into
-brackets.
-An ellipsis
-.Pf ( Sq Ld )
-represents zero or more additional arguments.
-Alternative values for a parameter are separated with
-.Ql | .
-If there are alternative values for a mandatory parameter, braces are used
-(together with
-.Ql | )
-to enclose the value set.
-Meta-variables are specified within angles.
-.Pp
-Example:
-.
-.Bl -tag -width 6n -offset indent
-.It Li .Xx Xo
-.Aq foo
-.Brq bar1 | bar2
-.Op \-test1 Op \-test2 | \-test3
-.Ld
-.Xc
-.El
-.
-.Pp
-Except stated explicitly, all macros are parsed and callable.
-.Pp
-Most macros have a default width value which can be used to specify a label
-width
-.Pf ( Fl width )
-or offset
-.Pf ( Fl offset )
-for the
-.Ql .Bl
-and
-.Ql .Bd
-macros.
-It is recommended not to use this rather obscure feature to avoid
-dependencies on local modifications of the
-.Nm \-mdoc
-package.
-.
-.
-.Sh "TITLE MACROS"
-.
-The title macros are part of the page structure domain but are presented
-first and separately for someone who wishes to start writing a man page
-yesterday.
-Three header macros designate the document title or manual page title, the
-operating system, and the date of authorship.
-These macros are called once at the very beginning of the document and are
-used to construct headers and footers only.
-.
-.Bl -tag -width 6n
-.It Li .Dt Xo
-.Op Aq document title
-.Op Aq section number
-.Op Aq volume
-.Xc
-The document title is the subject of the man page and must be in
-.Tn CAPITALS
-due to troff limitations.
-If omitted,
-.Sq Tn UNTITLED
-is used.
-The section number may be a number in the range
-.No 1,\~ Ns Ld Ns ,\~9
-or
-.Ql unass ,
-.Ql draft ,
-or
-.Ql paper .
-If it is specified, and no volume name is given, a default volume name is
-used.
-A volume name may be arbitrary or one of the following:
-.
-.Pp
-.Bl -column LOCAL -offset indent -compact
-.It Li USD Ta "\*[volume-ds-USD]"
-.It Li PS1 Ta "\*[volume-ds-PS1]"
-.It Li AMD Ta "\*[volume-ds-AMD]"
-.It Li SMM Ta "\*[volume-ds-SMM]"
-.It Li URM Ta "\*[volume-ds-URM]"
-.It Li PRM Ta "\*[volume-ds-PRM]"
-.It Li KM Ta "\*[volume-ds-KM]"
-.It Li IND Ta "\*[volume-ds-IND]"
-.It Li LOCAL Ta "\*[volume-ds-LOCAL]"
-.It Li CON Ta "\*[volume-ds-CON]"
-.El
-.Pp
-.
-For compatibility,
-.Ql MMI
-can be used for
-.Ql IND ,
-and
-.Ql LOC
-for
-.Ql LOCAL .
-Values from the previous table will specify a new volume name.
-If the third parameter is a keyword designating a computer architecture,
-its value is appended to the volume name as specified by the second
-parameter. By default, the following architecture keywords are defined:
-.
-\# we use `No' to avoid hyphenation
-.Bd -ragged -offset indent
-.No alpha , amiga , arc , arm26 , arm32 , atari , bebox , cobalt , evbsh3 ,
-.No hp300 , hpcmips , i386 , luna68k , m68k , mac68k , macppc , mips ,
-.No mmeye , mvme68k , news68k , newsmips , next68k , ofppc , pc532 , pmax ,
-.No powerpc , prep , sgimips , sh3 , sparc , sparc64 , sun3 , tahoe , vax ,
-.No x68k
-.Ed
-.Pp
-.
-In the following examples, the left (which is identical to the right) and
-the middle part of the manual page header strings are shown.
-.
-.Bd -ragged
-.Bl -tag -xwidth ".Li .Dt\ FOO\ 2\ mac68k" -compact -offset indent
-.It Li ".Dt FOO 7"
-.Ql FOO(7)
-.Ql System Reference Manual
-.It Li ".Dt FOO 2 mac68k"
-.Ql FOO(2)
-.Ql System Programmer's Manual (mac68k Architecture)
-.It Li ".Dt FOO \*[q]\*[q] bar"
-.Ql FOO
-.Ql bar
-.El
-.Ed
-.Pp
-.
-Local, OS-specific additions might be found in the file
-.Pa mdoc.local ;
-look for strings named
-.Ql volume-ds-XXX
-(for the former type) and
-.Ql volume-as-XXX
-(for the latter type);
-.Ql XXX
-then denotes the keyword to be used with the
-.Ql .Dt
-macro.
-.Pp
-This macro is neither callable nor parsable.
-.
-.It Li .Os Xo
-.Op Aq operating system
-.Op Aq release
-.Xc
-If the first parameter is empty,
-.Sq Tn BSD
-is used as the default operating system.
-This may be overridden in the local configuration file.
-In general, the name of the operating system should be the common acronym,
-e.g.\&
-.Tn BSD
-or
-.Tn ATT .
-The release should be the standard release nomenclature for the system
-specified.
-In the following table, the possible second arguments for some predefined
-operating systems are listed.
-Similar to
-.Ql .Dt ,
-local additions might be defined in
-.Pa mdoc.local ;
-look for strings named
-.Ql operating-system-XXX-YYY ,
-where
-.Ql XXX
-is the acronym for the operating system and
-.Ql YYY
-the release ID.
-.
-.Bd -ragged -compact
-.Bl -tag -xwidth ".No FreeBSD" -offset indent
-.It ATT
-7th, 7, III, 3, V, V.2, V.3, V.4
-.It BSD
-3, 4, 4.1, 4.2, 4.3, 4.3t, 4.3T, 4.3r, 4.3R, 4.4
-.It NetBSD
-0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e,
-1.3, 1.3a, 1.4, 1.5
-.It FreeBSD
-1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1,
-2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1,
-4.2, 5.0
-.El
-.Ed
-.Pp
-.
-For
-.Tn ATT ,
-an unknown second parameter will be replaced with the string
-.Tn UNIX ;
-for the other predefined acronyms it will be ignored and a warning message
-emitted.
-Unrecognized arguments are displayed as given in the page footer.
-For instance, a typical footer might be:
-.Pp
-.Dl .Os BSD 4.3
-.Pp
-giving
-.Ql 4.3\~Berkeley Distribution ,
-or for a locally produced set
-.Pp
-.Dl .Os CS Department
-.Pp
-which will produce
-.Ql CS\~Department .
-.Pp
-If the
-.Ql .Os
-macro is not present, the bottom left corner of the manual page will be
-ugly.
-.Pp
-This macro is neither callable nor parsable.
-.
-.It Li .Dd Oo
-.Aq month
-.Aq day ,
-.Aq year
-.Oc
-If
-.Ql Dd
-has no arguments,
-.Ql Epoch
-is used for the date string.
-If it has exactly three arguments, they are concatenated, separated with
-unbreakable space:
-.Pp
-.Dl .Dd January 25, 2001
-.Pp
-Otherwise, the current date is used, ignoring the parameters.
-.Pp
-This macro is neither callable nor parsable.
-.El
-.
-.
-.Sh "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS"
-.
-.Ss "What's in a name" Ns Ld
-.
-The manual domain macro names are derived from the day to day informal
-language used to describe commands, subroutines and related files.
-Slightly different variations of this language are used to describe the
-three different aspects of writing a man page.
-First, there is the description of
-.Nm \-mdoc
-macro request usage.
-Second is the description of a
-.Ux
-command
-.Em with
-.Nm \-mdoc
-macros, and third, the description of a command to a user in the verbal
-sense; that is, discussion of a command in the text of a man page.
-.Pp
-In the first case,
-.Xr troff 1
-macros are themselves a type of command; the general syntax for a troff
-command is:
-.
-.Bd -filled -offset indent
-.Li ".Xx argument1 argument2" Ld
-.Ed
-.Pp
-.
-.Ql .Xx
-is a macro command or request, and anything following it are arguments to
-be processed.
-In the second case, the description of a
-.Ux
-command using the content macros is a bit more involved; a typical
-.Sx SYNOPSIS
-command line might be displayed as:
-.
-.Bd -filled -offset indent
-.Nm filter
-.Op Fl flag
-.Ao Ar infile Ac Ao Ar outfile Ac
-.Ed
-.Pp
-.
-Here,
-.Nm filter
-is the command name and the
-bracketed string
-.Fl flag
-is a
-.Em flag
-argument designated as optional by the option brackets.
-In
-.Nm \-mdoc
-terms,
-.Ao Ar infile Ac
-and
-.Ao Ar outfile Ac
-are called
-.Em meta arguments ;
-in this example, the user has to replace the meta expressions given in angle
-brackets with real file names.
-Note that in this document meta arguments are used to describe
-.Nm \-mdoc
-commands; in most man pages, meta variables are not specifically written
-with angle brackets.
-The macros which formatted the above example:
-.
-.Bd -literal -offset indent
-\&.Nm filter
-\&.Op Fl flag
-\&.Ao Ar infile Ac Ao Ar outfile Ac
-.Ed
-.Pp
-.
-In the third case, discussion of commands and command syntax includes both
-examples above, but may add more detail.
-The arguments
-.Ao Ar infile Ac
-and
-.Ao Ar outfile Ac
-from the example above might be referred to as
-.Em operands
-or
-.Em file arguments .
-Some command line argument lists are quite long:
-.
-.Bd -ragged
-.Bl -tag -xwidth ".Nm make" -offset indent -compact
-.It Nm make
-.Op Fl eiknqrstv
-.Op Fl D Ar variable
-.Op Fl d Ar flags
-.Op Fl f Ar makefile
-.Op Fl I Ar directory
-.Op Fl j Ar max_jobs
-.Op Ar variable=value
-.Bk
-.Op Ar target Ld
-.Ek
-.El
-.Ed
-.Pp
-.
-Here one might talk about the command
-.Nm make
-and qualify the argument,
-.Ar makefile ,
-as an argument to the flag,
-.Fl f ,
-or discuss the optional file operand
-.Ar target .
-In the verbal context, such detail can prevent confusion, however the
-.Nm \-mdoc
-package does not have a macro for an argument
-.Em to
-a flag.
-Instead the
-.Ql \&Ar
-argument macro is used for an operand or file argument like
-.Ar target
-as well as an argument to a flag like
-.Ar variable .
-The make command line was produced from:
-.
-.Bd -literal -offset indent
-\&.Nm make
-\&.Op Fl eiknqrstv
-\&.Op Fl D Ar variable
-\&.Op Fl d Ar flags
-\&.Op Fl f Ar makefile
-\&.Op Fl I Ar directory
-\&.Op Fl j Ar max_jobs
-\&.Op Ar variable=value
-\&.Bk
-\&.Op Ar target Ld
-\&.Ek
-.Ed
-.Pp
-.
-The
-.Ql .Bk
-and
-.Ql .Ek
-macros are explained in
-.Sx Keeps .
-.
-.Ss "General Syntax"
-.
-The manual domain and general text domain macros share a similar syntax with
-a few minor deviations; most notably,
-.Ql .Ar ,
-.Ql .Fl ,
-.Ql .Nm ,
-and
-.Ql .Pa
-differ only when called without arguments; and
-.Ql .Fn
-and
-.Ql .Xr
-impose an order on their argument lists.
-All content macros are capable of recognizing and properly handling
-punctuation, provided each punctuation character is separated by a leading
-space.
-If a request is given:
-.Pp
-.Dl \&.Ar sptr, ptr),
-.Pp
-The result is:
-.Pp
-.Dl Ar sptr, ptr),
-.Pp
-The punctuation is not recognized and all is output in the
-font used by
-.Ql .Ar .
-If the punctuation is separated by a leading white space:
-.Pp
-.Dl \&.Ar "sptr , ptr ) ,"
-.Pp
-The result is:
-.Pp
-.Dl Ar sptr , ptr ) ,
-.Pp
-The punctuation is now recognized and output in the default font
-distinguishing it from the argument strings.
-To remove the special meaning from a punctuation character escape it with
-.Ql \e& .
-.Pp
-.Xr Troff
-is limited as a macro language, and has difficulty when presented with a
-string containing a member of the mathematical, logical or quotation set:
-.
-.Bd -literal -offset indent-two
-{+,\-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
-.Ed
-.Pp
-.
-The problem is that
-.Xr troff
-may assume it is supposed to actually perform the operation or evaluation
-suggested by the characters.
-To prevent the accidental evaluation of these characters, escape them with
-.Ql \e& .
-Typical syntax is shown in the first content macro displayed below,
-.Ql .Ad .
-.
-.
-.Sh "MANUAL DOMAIN"
-.
-.Ss Addresses
-.
-The address macro identifies an address construct.
-.Pp
-.Dl Usage: .Ad Ao address Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Ad\ f1\ ,\ f2\ ,\ f3\ :" -compact -offset 15n
-.It Li ".Ad addr1"
-.Ad addr1
-.It Li ".Ad addr1 ."
-.Ad addr1 .
-.It Li ".Ad addr1 , file2"
-.Ad addr1 , file2
-.It Li ".Ad f1 , f2 , f3 :"
-.Ad f1 , f2 , f3 :
-.It Li ".Ad addr ) ) ,"
-.Ad addr ) ) ,
-.El
-.Pp
-.
-The default width is 12n.
-.
-.Ss "Author Name"
-.
-The
-.Ql .An
-macro is used to specify the name of the author of the item being
-documented, or the name of the author of the actual manual page.
-.Pp
-.Dl Usage: .An Ao author name Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .An\ \*[q]Joe\ Author\*[q]\ )\ )\ ," -offset 15n
-.It Li ".An \*[q]Joe Author\*[q]"
-.An "Joe Author"
-.It Li ".An \*[q]Joe Author\*[q] ,"
-.An "Joe Author" ,
-.It Li ".An \*[q]Joe Author\*[q] Aq nobody@FreeBSD.ORG"
-.An "Joe Author" Aq nobody@FreeBSD.ORG
-.It Li ".An \*[q]Joe Author\*[q] ) ) ,"
-.An "Joe Author" ) ) ,
-.El
-.Pp
-.
-The default width is 12n.
-.Pp
-In the
-.Sx AUTHORS
-section, the
-.Ql .An
-request causes a line break allowing each new name to appear on its own
-line.
-If this is not desirable,
-.
-.Bd -literal -offset indent
-\&.An -nosplit
-.Ed
-.Pp
-.
-call will turn this off.
-To turn splitting back on, say
-.
-.Bd -literal -offset indent
-\&.An -split
-.Ed
-.
-.Ss "Arguments"
-.
-The
-.Li .Ar
-argument macro may be used whenever an argument is referenced.
-.Pp
-.Dl Usage: .Ar Oo Ao argument Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Ar\ file1\ file2" -compact -offset 15n
-.It Li .Ar
-.Ar
-.It Li ".Ar file1"
-.Ar file1
-.It Li ".Ar file1 ."
-.Ar file1 .
-.It Li ".Ar file1 file2"
-.Ar file1 file2
-.It Li ".Ar f1 f2 f3 :"
-.Ar f1 f2 f3 :
-.It Li ".Ar file ) ) ,"
-.Ar file ) ) ,
-.El
-.Pp
-.
-The default width is 12n.
-.
-.Ss "Configuration Declaration (Section Four Only)"
-.
-The
-.Ql .Cd
-macro is used to demonstrate a
-.Xr config 8
-declaration for a device interface in a section four manual.
-.Pp
-.Dl Usage: .Cd Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Cd\ Xdevice\ le0\ at\ scode?X" -offset 15n
-.It Li ".Cd \*[q]device le0 at scode?\*[q]"
-\# since .Cd causes a break we use .Nm
-.Nm "device le0 at scode?"
-.El
-.Pp
-.
-The default width is 12n.
-.
-.Ss "Command Modifiers"
-.
-The command modifier is identical to the
-.Ql .Fl
-(flag) command with the exception that the
-.Ql .Cm
-macro does not assert a dash in front of every argument.
-Traditionally flags are marked by the preceding dash, however, some commands
-or subsets of commands do not use them.
-Command modifiers may also be specified in conjunction with interactive
-commands such as editor commands.
-See
-.Sx Flags .
-.Pp
-The default width is 10n.
-.
-.Ss "Defined Variables"
-.
-A variable which is defined in an include file is specified by the macro
-.Ql .Dv .
-.Pp
-.Dl Usage: .Dv Ao defined variable Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Dv\ MAXHOSTNAMELEN" -compact -offset 15n
-.It Li ".Dv MAXHOSTNAMELEN"
-.Dv MAXHOSTNAMELEN
-.It Li ".Dv TIOCGPGRP )"
-.Dv TIOCGPGRP )
-.El
-.Pp
-.
-The default width is 12n.
-.
-.Ss "Errno's (Section Two Only)"
-.
-The
-.Ql .Er
-errno macro specifies the error return value for section two library
-routines.
-The second example below shows
-.Ql .Er
-used with the
-.Ql .Bq
-general text domain macro, as it would be used in a section two manual page.
-.Pp
-.Dl Usage: .Er Ao errno type Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Bq\ Er\ ENOTDIR" -compact -offset 15n
-.It Li ".Er ENOENT"
-.Er ENOENT
-.It Li ".Er ENOENT ) ;"
-.Er ENOENT ) ;
-.It Li ".Bq Er ENOTDIR"
-.Bq Er ENOTDIR
-.El
-.Pp
-.
-The default width is 17n.
-.
-.Ss "Environment Variables"
-.
-The
-.Ql .Ev
-macro specifies an environment variable.
-.Pp
-.Dl Usage: .Ev Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Ev\ PRINTER\ )\ )\ ," -compact -offset 15n
-.It Li ".Ev DISPLAY"
-.Ev DISPLAY
-.It Li ".Ev PATH ."
-.Ev PATH .
-.It Li ".Ev PRINTER ) ) ,"
-.Ev PRINTER ) ) ,
-.El
-.Pp
-.
-The default width is 15n.
-.
-.Ss "Function Arguments"
-.
-The
-.Ql .Fa
-macro is used to refer to function arguments (parameters) outside of the
-.Sx SYNOPSIS
-section of the manual or inside the
-.Sx SYNOPSIS
-section if the enclosure macros
-.Ql .Fo
-and
-.Ql .Fc
-instead of
-.Ql .Fn
-are used.
-.Ql .Fa
-may also be used to refer to structure members.
-.Pp
-.Dl Usage: .Fa Ao function argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Fa\ d_namlen\ )\ )\ ," -compact -offset 15n
-.It Li ".Fa d_namlen ) ) ,"
-.Fa d_namlen ) ) ,
-.It Li ".Fa iov_len"
-.Fa iov_len
-.El
-.Pp
-.
-The default width is 12n.
-.
-.Ss "Function Declarations"
-.
-The
-.Ql .Fd
-macro is used in the
-.Sx SYNOPSIS
-section with section two or three functions.
-It is neither parsable nor callable.
-.Pp
-.Dl Usage: .Fd Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Fd\ X#include\ <sys/types.h>X" -compact -offset 15n
-.It Li ".Fd \*[q]#include <sys/types.h>\*[q]"
-.Fd "#include <sys/types.h>"
-.El
-.Pp
-In the
-.Sx SYNOPSIS
-section a
-.Ql .Fd
-request causes a line break if a function has already been presented and a
-break has not occurred.
-This leaves a nice vertical space in between the previous function call and
-the declaration for the next function.
-.
-.Ss Flags
-.
-The
-.Ql .Fl
-macro handles command line flags.
-It prepends a dash,
-.Ql \- ,
-to the flag.
-For interactive command flags, which are not prepended with a dash, the
-.Ql .Cm
-(command modifier)
-macro is identical, but without the dash.
-.Pp
-.Dl Usage: .Fl Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Fl\ xyz\ )\ ," -compact -offset 15n
-.It Li .Fl
-.Fl
-.It Li ".Fl cfv"
-.Fl cfv
-.It Li ".Fl cfv ."
-.Fl cfv .
-.It Li ".Cm cfv ."
-.Cm cfv .
-.It Li ".Fl s v t"
-.Fl s v t
-.It Li ".Fl \- ,"
-.Fl \- ,
-.It Li ".Fl xyz ) ,"
-.Fl xyz ) ,
-.It Li ".Fl |"
-.Fl |
-.El
-.Pp
-The
-.Ql .Fl
-macro without any arguments results in a dash representing stdin/stdout.
-Note that giving
-.Ql .Fl
-a single dash will result in two dashes.
-.Pp
-The default width is 12n.
-.
-.Ss "Functions (Library Routines)"
-.
-The
-.Ql .Fn
-macro is modeled on
-.Tn ANSI\~C
-conventions.
-.Pp
-.Dl Usage: .Fn Ao function Ac Oo Ao parameter Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Fn\ Xint\ alignX\ Xchar\ *ptrX\ ," -compact -offset 15n
-.It Li ".Fn getchar"
-.Fn getchar
-.It Li ".Fn strlen ) ,"
-.Fn strlen ) ,
-.It Li ".Fn \*[q]int align\*[q] \*[q]char *ptr\*[q] ,"
-.Fn "int align" "char *ptr" ,
-.El
-.Pp
-Note that any call to another macro signals the end of the
-.Ql .Fn
-call (it will insert a closing parenthesis at that point).
-.Pp
-For functions with many parameters (which is rare), the macros
-.Ql .Fo
-(function open)
-and
-.Ql .Fc
-(function close)
-may be used with
-.Ql .Fa
-(function argument).
-.Pp
-Example:
-.
-.Bd -literal -offset indent
-\&.Fo "int res_mkquery"
-\&.Fa "int op"
-\&.Fa "char *dname"
-\&.Fa "int class"
-\&.Fa "int type"
-\&.Fa "char *data"
-\&.Fa "int datalen"
-\&.Fa "struct rrec *newrr"
-\&.Fa "char *buf"
-\&.Fa "int buflen"
-\&.Fc
-.Ed
-.Pp
-.
-Produces:
-.
-.Bd -ragged -offset indent
-.Fo "int res_mkquery"
-.Fa "int op"
-.Fa "char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "char *data"
-.Fa "int datalen"
-.Fa "struct rrec *newrr"
-.Fa "char *buf"
-.Fa "int buflen"
-.Fc
-.Ed
-.Pp
-.
-In the
-.Sx SYNOPSIS
-section, the function will always begin at the beginning of line.
-If there is more than one function presented in the
-.Sx SYNOPSIS
-section and a function type has not been given, a line break will occur,
-leaving a nice vertical space between the current function name and the one
-prior.
-.Pp
-The default width values of
-.Ql .Fn
-and
-.Ql .Fo
-are 12n and 16n, respectively.
-.
-.Ss "Function Types"
-.
-This macro is intended for the
-.Sx SYNOPSIS
-section.
-It may be used anywhere else in the man page without problems, but its main
-purpose is to present the function type in kernel normal form for the
-.Sx SYNOPSIS
-of sections two and three (it causes a page break, allowing the function
-name to appear on the next line).
-.Pp
-.Dl Usage: .Ft Ao type Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Ft\ struct\ stat" -compact -offset 15n
-.It Li ".Ft struct stat"
-.Ft struct stat
-.El
-.
-.Ss "Return Values"
-.
-The
-.Ql .Rv
-macro generates text for use in the
-.Sx RETURN VALUES
-section.
-.Pp
-.Dl Usage: .Rv Oo -std Oc Ao function Ac Ld
-.Pp
-For example,
-.Ql ".Rv -std atexit"
-produces:
-.
-.Bd -ragged -offset -indent
-\# a small hack to suppress a warning message
-.ds section-old "\*[section]
-.ds section 2
-.Rv -std atexit
-.ds section "\*[section-old]
-.Ed
-.Pp
-.
-The
-.Fl std
-option is valid only for manual page sections\~2 and\~3.
-Currently, this macro does nothing if used without the
-.Fl std
-flag.
-.
-.Ss "Interactive Commands"
-.
-The
-.Ql .Ic
-macro designates an interactive or internal command.
-.Pp
-.Dl Usage: .Ic Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Ic\ setenv\ ,\ unsetenv" -compact -offset 15n
-.It Li ".Ic :wq"
-.Ic :wq
-.It Li ".Ic \*[q]do while {...}\*[q]"
-.Ic "do while {...}"
-.It Li ".Ic setenv , unsetenv"
-.Ic setenv , unsetenv
-.El
-.Pp
-.
-The default width is 12n.
-.
-.Ss "Library Names"
-.
-The
-.Ql .Lb
-macro is used to specify the library where a particular function is compiled
-in.
-.Pp
-.Dl Usage: .Lb Ao argument Ac Ld
-.Pp
-Available arguments to
-.Ql .Lb
-and their results are:
-.
-.Pp
-.Bl -tag -xwidth ".Li libossaudio" -compact -offset indent
-.It Li libarm32
-.Li libarm32
-.It Li libc
-.Lb libc
-.It Li libcompat
-.Lb libcompat
-.It Li libcrypt
-.Lb libcrypt
-.It Li libcurses
-.Lb libcurses
-.It Li libedit
-.Lb libedit
-.It Li libi386
-.Lb libi386
-.It Li libipsec
-.Lb libipsec
-.It Li libkvm
-.Lb libkvm
-.It Li libm
-.Lb libm
-.It Li libmenu
-.Lb libmenu
-.It Li libossaudio
-.Lb libossaudio
-.It Li libposix
-.Lb libposix
-.It Li libresolv
-.Lb libresolv
-.It Li libtermcap
-.Lb libtermcap
-.It Li libutil
-.Lb libutil
-.It Li libz
-.Lb libz
-.El
-.Pp
-.
-Local, OS-specific additions might be found in the file
-.Pa mdoc.local ;
-look for strings named
-.Ql str-Lb-XXX .
-.Ql XXX
-then denotes the keyword to be used with the
-.Ql .Lb
-macro.
-.
-.Ss Literals
-.
-The
-.Ql .Li
-literal macro may be used for special characters, variable constants, etc.\&
--- anything which should be displayed as it would be typed.
-.Pp
-.Dl Usage: .Li Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Li\ cntrl-D\ )\ ," -compact -offset 15n
-.It Li ".Li \een"
-.Li \en
-.It Li ".Li M1 M2 M3 ;"
-.Li M1 M2 M3 ;
-.It Li ".Li cntrl-D ) ,"
-.Li cntrl-D ) ,
-.It Li ".Li 1024 Ld"
-.Li 1024 Ld
-.El
-.Pp
-.
-The default width is 16n.
-.
-.Ss Names
-.
-The
-.Ql .Nm
-macro is used for the document title or subject name.
-It has the peculiarity of remembering the first argument it was called with,
-which should always be the subject name of the page.
-When called without arguments,
-.Ql .Nm
-regurgitates this initial name for the sole purpose of making less work for
-the author.
-Note: A section two or three document function name is addressed with the
-.Ql .Nm
-in the
-.Sx NAME
-section, and with
-.Ql .Fn
-in the
-.Sx SYNOPSIS
-and remaining sections.
-For interactive commands, such as the
-.Ql while
-command keyword in
-.Xr csh 1 ,
-the
-.Ql .Ic
-macro should be used.
-While
-.Ql .Ic
-is nearly identical
-to
-.Ql .Nm ,
-it can not recall the first argument it was invoked with.
-.Pp
-.Dl Usage: .Nm Oo Ao argument Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Nm\ mdoc.reference" -compact -offset 15n
-.It Li ".Nm mdoc.reference"
-.Nm mdoc.reference
-.It Li ".Nm \e-mdoc"
-.Nm \-mdoc
-.It Li ".Nm foo ) ) ,"
-.Nm foo ) ) ,
-.It Li ".Nm :"
-.Nm :
-.El
-.Pp
-.
-The default width is 10n.
-.
-.Ss Options
-.
-The
-.Ql .Op
-macro places option brackets around the any remaining arguments on the
-command line, and places any trailing punctuation outside the brackets.
-The macros
-.Ql .Oc
-and
-.Ql .Oo
-(which produce an opening resp.\& a closing option bracket) may be used
-across one or more lines or to specify the exact position of the closing
-parenthesis.
-.Pp
-.Dl Usage: .Op Oo Ao option Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Op\ Fl\ c\ Ar\ objfil\ Op\ Ar\ corfil\ ," -compact -offset 15n
-.It Li .Op
-.Op
-.It Li ".Op Fl k"
-.Op Fl k
-.It Li ".Op Fl k ) ."
-.Op Fl k ) .
-.It Li ".Op Fl k Ar kookfile"
-.Op Fl k Ar kookfile
-.It Li ".Op Fl k Ar kookfile ,"
-.Op Fl k Ar kookfile ,
-.It Li ".Op Ar objfil Op Ar corfil"
-.Op Ar objfil Op Ar corfil
-.It Li ".Op Fl c Ar objfil Op Ar corfil ,"
-.Op Fl c Ar objfil Op Ar corfil ,
-.It Li ".Op word1 word2"
-.Op word1 word2
-.It Li ".Li .Op Oo Ao option Ac Oc Ld"
-.Li .Op Oo Ao options Ac Oc Ld
-.El
-.Pp
-Here a typical example of the
-.Ql .Oc
-and
-.Ql .Oo
-macros:
-.
-.Bd -literal -offset indent
-\&.Oo
-\&.Op Fl k Ar kilobytes
-\&.Op Fl i Ar interval
-\&.Op Fl c Ar count
-\&.Oc
-.Ed
-.Pp
-.
-Produces:
-.
-.Bd -filled -offset indent
-.Oo
-.Op Fl k Ar kilobytes
-.Op Fl i Ar interval
-.Op Fl c Ar count
-.Oc
-.Ed
-.Pp
-.
-The default width values of
-.Ql .Op
-and
-.Ql .Oo
-are 14n resp.\& 10n.
-.
-.Ss Pathnames
-.
-The
-.Ql .Pa
-macro formats path or file names.
-.Pp
-.Dl Usage: .Pa Oo Ao pathname Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Pa\ /tmp/fooXXXXX\ )\ ." -compact -offset 15n
-.It Li .Pa
-.Pa
-.It Li ".Pa /usr/share"
-.Pa /usr/share
-.It Li ".Pa /tmp/fooXXXXX ) ."
-.Pa /tmp/fooXXXXX ) .
-.El
-.Pp
-.
-The default width is 32n.
-.
-.Ss Standards
-.
-The
-.Ql .St
-macro replaces standard abbreviations with their formal names.
-.Pp
-.Dl Usage: .St Ao abbreviation Ac Ld
-.Pp
-Available pairs for
-.Dq Abbreviation/Formal Name
-are:
-.
-.Pp
-.Tn ANSI/ISO C
-.Pp
-.Bl -tag -xwidth ".Li -iso9945-1-90" -compact -offset indent
-.It Li -ansiC
-.St -ansiC
-.It Li -ansiC-89
-.St -ansiC-89
-.It Li -isoC
-.St -isoC
-.It Li -isoC-99
-.St -isoC-99
-.El
-.Pp
-.
-.Tn POSIX
-Part 1: System API
-.Pp
-.Bl -tag -xwidth ".Li -p1003.1g-2000" -compact -offset indent
-.It Li -iso9945-1-90
-.St -iso9945-1-90
-.It Li -iso9945-1-96
-.St -iso9945-1-96
-.It Li -p1003.1
-.St -p1003.1
-.It Li -p1003.1-88
-.St -p1003.1-88
-.It Li -p1003.1-90
-.St -p1003.1-90
-.It Li -p1003.1-96
-.St -p1003.1-96
-.It Li -p1003.1b-93
-.St -p1003.1b-93
-.It Li -p1003.1c-95
-.St -p1003.1c-95
-.It Li -p1003.1g-2000
-.St -p1003.1g-2000
-.It Li -p1003.1i-95
-.St -p1003.1i-95
-.El
-.Pp
-.
-.Tn POSIX
-Part 2: Shell and Utilities
-.Pp
-.Bl -tag -xwidth ".Li -p1003.1g-2000" -compact -offset indent
-.It Li -iso9945-2-93
-.St -iso9945-2-93
-.It Li -p1003.2
-.St -p1003.2
-.It Li -p1003.2-92
-.St -p1003.2-92
-.It Li -p1003.2a-92
-.St -p1003.2a-92
-.El
-.Pp
-.
-X/Open
-.Bl -tag -xwidth ".Li -p1003.1g-2000" -compact -offset indent
-.Pp
-.It Li -susv2
-.St -susv2
-.It Li -svid4
-.St -svid4
-.It Li -xbd5
-.St -xbd5
-.It Li -xcu5
-.St -xcu5
-.It Li -xcurses4.2
-.St -xcurses4.2
-.It Li -xns5
-.St -xns5
-.It Li -xns5.2
-.St -xns5.2
-.It Li -xpg3
-.St -xpg3
-.It Li -xpg4
-.St -xpg4
-.It Li -xpg4.2
-.St -xpg4.2
-.It Li -xsh5
-.St -xsh5
-.El
-.Pp
-.
-Miscellaneous
-.Pp
-.Bl -tag -xwidth ".Li -p1003.1g-2000" -compact -offset indent
-.It Li -ieee754
-.St -ieee754
-.It Li -iso8802-3
-.St -iso8802-3
-.El
-.
-.Ss Variables
-.
-Generic variable reference.
-.Pp
-.Dl Usage: .Va Ao variable Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Va\ Xchar\ sX\ ]\ )\ )\ ," -compact -offset 15n
-.It Li ".Va count"
-.Va count
-.It Li ".Va settimer ,"
-.Va settimer ,
-.It Li ".Va \*[q]int *prt\*[q] ) :"
-.Va "int *prt" ) :
-.It Li ".Va \*[q]char s\*[q] ] ) ) ,"
-.Va "char s" ] ) ) ,
-.El
-.Pp
-.
-The default width is 12n.
-.
-.Ss "Manual Page Cross References"
-.
-The
-.Ql .Xr
-macro expects the first argument to be a manual page name.
-The optional second argument, if a string (defining the manual section), is
-put into parentheses.
-.Pp
-.Dl Usage: .Xr Ao man page name Ac Oo Ao section Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Xr\ xinit\ 1x\ ;" -compact -offset 15n
-.It Li ".Xr mdoc"
-.Xr mdoc
-.It Li ".Xr mdoc ,"
-.Xr mdoc ,
-.It Li ".Xr mdoc 7"
-.Xr mdoc 7
-.It Li ".Xr xinit 1x ;"
-.Xr xinit 1x ;
-.El
-.Pp
-.
-The default width is 10n.
-.
-.
-.Sh "GENERAL TEXT DOMAIN"
-.
-.Ss "AT&T Macro"
-.
-.Pp
-.Dl Usage: .At Oo Ao version Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .At\ v6\ ." -compact -offset 15n
-.It Li .At
-.At
-.It Li ".At v6 ."
-.At v6 .
-.El
-.Pp
-The following values for
-.Ao version Ac
-are possible:
-.Pp
-.Dl 32v, v1, v2, v3, v4, v5, v6, v7, V, V.1, V.2, V.3, V.4
-.
-.Ss "BSD Macro"
-.
-.Pp
-.Dl "Usage: .Bx" Bro -alpha | -beta | -devel Brc Ld
-.Dl " .Bx" Oo Ao version Ac Oo Ao release Ac Oc Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Bx\ -devel" -compact -offset 15n
-.It Li .Bx
-.Bx
-.It Li ".Bx 4.3 ."
-.Bx 4.3 .
-.It Li ".Bx \-devel"
-.Bx -devel
-.El
-.Pp
-.Ao version Ac
-will be prepended to the string
-.Sq Bx .
-The following values for
-.Ao release Ac
-are possible:
-.Pp
-.Dl Reno, reno, Tahoe, tahoe, Lite, lite, Lite2, lite2
-.
-.Ss "NetBSD Macro"
-.
-.Pp
-.Dl Usage: .Nx Oo Ao version Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Nx\ 1.4\ ." -compact -offset 15n
-.It Li .Nx
-.Nx
-.It Li ".Nx 1.4 ."
-.Nx 1.4 .
-.El
-.Pp
-For possible values of
-.Ao version Ac
-see the description of the
-.Ql .Os
-request above in section
-.Sx "TITLE MACROS" .
-.
-.Ss "FreeBSD Macro"
-.
-.Pp
-.Dl Usage: .Fx Oo Ao version Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Fx\ 2.2\ ." -compact -offset 15n
-.It Li .Fx
-.Fx
-.It Li ".Fx 2.2 ."
-.Fx 2.2 .
-.El
-.Pp
-For possible values of
-.Ao version Ac
-see the description of the
-.Ql .Os
-request above in section
-.Sx "TITLE MACROS" .
-.
-.Ss "OpenBSD Macro"
-.
-.Pp
-.Dl Usage: .Ox Oo Ao version Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Ox\ 1.0" -compact -offset 15n
-.It Li ".Ox 1.0"
-.Ox 1.0
-.El
-.
-.Ss "BSD/OS Macro"
-.
-.Pp
-.Dl Usage: .Bsx Oo Ao version Ac Oc Ld
-.Pp
-.Bl -tag -xwidth ".Li .Bsx\ 1.0" -compact -offset 15n
-.It Li ".Bsx 1.0"
-.Bsx 1.0
-.El
-.
-.Ss "UNIX Macro"
-.
-.Pp
-.Dl Usage: .Ux Ld
-.Pp
-.Bl -tag -xwidth ".Li .Ux" -compact -offset 15n
-.It Li .Ux
-.Ux
-.El
-.
-.Ss "Emphasis Macro"
-.
-Text may be stressed or emphasized with the
-.Ql .Em
-macro.
-The usual font for emphasis is italic.
-.Pp
-.Dl Usage: .Em Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Em\ vide\ infra\ )\ )\ ," -compact -offset 15n
-.It Li ".Em does not"
-.Em does not
-.It Li ".Em exceed 1024 ."
-.Em exceed 1024 .
-.It Li ".Em vide infra ) ) ,"
-.Em vide infra ) ) ,
-.El
-.Pp
-.
-The default width is 10n.
-.
-.Ss "Font Mode"
-.
-The
-.Ql .Bf
-font mode must be ended with the
-.Ql .Ef
-macro (the latter doesn't take parameters).
-Font modes may be nested within other font modes.
-.Pp
-.Ql .Bf
-has the following syntax:
-.Pp
-.Dl .Bf Ao font mode Ac
-.Pp
-.Ao font mode Ac
-must be one of the following three types:
-.Pp
-.Bl -tag -xwidth ".Sy \&Sy | Fl symbolic" -compact -offset indent
-.It Sy \&Em | Fl emphasis
-Same as if the
-.Ql .Em
-macro was used for the entire block of text.
-.It Sy \&Li | Fl literal
-Same as if the
-.Ql .Li
-macro was used for the entire block of text.
-.It Sy \&Sy | Fl symbolic
-Same as if the
-.Ql .Sy
-macro was used for the entire block of text.
-.El
-.Pp
-Both macros are neither callable nor parsed.
-.
-.Ss "Enclosure and Quoting Macros"
-.
-The concept of enclosure is similar to quoting.
-The object being to enclose one or more strings between a pair of characters
-like quotes or parentheses.
-The terms quoting and enclosure are used interchangeably throughout this
-document.
-Most of the one-line enclosure macros end in small letter
-.Ql q
-to give a hint of quoting, but there are a few irregularities.
-For each enclosure macro there is also a pair of open and close macros which
-end in small letters
-.Ql o
-and
-.Ql c
-respectively.
-.Pp
-\# XXX
-.if t \
-. ne 10
-.
-.Bd -filled -offset 4n
-.Bl -column "quote" "close" "open" "Angle Bracket Enclosure" "`string' or string"
-.Em Quote Ta Em Open Ta Em Close Ta Em Function Ta Em Result
-.No .Aq Ta .Ao Ta .Ac Ta "Angle Bracket Enclosure" Ta Ao string Ac
-.No .Bq Ta .Bo Ta .Bc Ta "Bracket Enclosure" Ta Bo string Bc
-.No .Brq Ta .Bro Ta .Brc Ta "Brace Enclosure" Ta Bro string Brc
-.No .Dq Ta .Do Ta .Dc Ta "Double Quote" Ta Do string Dc
-.No .Eq Ta .Eo Ta .Ec Ta "Enclose String (in XX)" Ta XXstringXX
-.No .Pq Ta .Po Ta .Pc Ta "Parenthesis Enclosure" Ta Po string Pc
-.No .Ql Ta Ta Ta "Quoted Literal" Ta "`string' or string"
-.No .Qq Ta .Qo Ta .Qc Ta "Straight Double Quote" Ta Qo string Qc
-.No .Sq Ta .So Ta .Sc Ta "Single Quote" Ta So string Sc
-.El
-.Ed
-.Pp
-All macros ending with
-.Sq q
-and
-.Sq o
-have a default width value of 12n.
-.
-.Bl -tag -xwidth ".Li .Ec , .Eo"
-.It Li .Ec , .Eo
-These macros expect the first argument to be the opening and closing strings
-respectively.
-.It Li .Es , .En
-Due to the nine-argument limit in the original troff program two other
-macros have been implemented which are now rather obsolete:
-.Ql .Es
-takes the first and second parameter as the left and right enclosure string,
-which are then used to enclose the arguments of
-.Ql .En .
-The default width value is 12n for both macros.
-.It Li .Eq
-The first and second argument of this macro are the opening resp.\& the
-closing string (followed by the arguments to be enclosed).
-.It Li .Ql
-The quoted literal macro behaves differently in troff and nroff mode.
-If formatted with
-.Xr nroff ,
-a quoted literal is always quoted.
-If formatted with troff, an item is only quoted if the width of the item is
-less than three constant width characters.
-This is to make short strings more visible where the font change to literal
-(constant width) is less noticeable.
-.Pp
-The default width is 16n.
-.It Li .Pf
-The prefix macro suppresses the whitespace between its first and second
-argument:
-.
-.Bl -tag -xwidth ".Li .Pf\ (\ Fa\ name2" -offset indent
-.It Li ".Pf ( Fa name2"
-.Pf ( Fa name2
-.El
-.Pp
-.
-The default width is 12n.
-.Pp
-The
-.Ql .Ns
-macro (see below) performs the analogous suffix function.
-.It Li .Ap
-The
-.Ql .Ap
-macro inserts an apostrophe and exits any special text modes, continuing in
-.Ql .No
-mode.
-.El
-.Pp
-.
-Examples of quoting:
-.
-.Pp
-.Bl -tag -xwidth ".Li .Bq\ Em\ Greek\ ,\ French\ ." -compact -offset indent
-.It Li .Aq
-.Aq
-.It Li ".Aq Ar ctype.h ) ,"
-.Aq Ar ctype.h ) ,
-.It Li .Bq
-.Bq
-.It Li ".Bq Em Greek , French ."
-.Bq Em Greek , French .
-.It Li .Dq
-.Dq
-.It Li ".Dq string abc ."
-.Dq string abc .
-.It Li ".Dq \'^[A-Z]\'"
-.Dq \'^[A-Z]\'
-.It Li ".Ql man mdoc"
-.Ql man mdoc
-.It Li .Qq
-.Qq
-.It Li ".Qq string ) ,"
-.Qq string ) ,
-.It Li ".Qq string Ns ),"
-.Qq string Ns ),
-.It Li .Sq
-.Sq
-.It Li ".Sq string"
-.Sq string
-.It Li ".Em or Ap ing"
-.Em or Ap ing
-.El
-.Pp
-.
-For a good example of nested enclosure macros, see the
-.Ql .Op
-option macro.
-It was created from the same underlying enclosure macros as those presented
-in the list above.
-The
-.Ql .Xo
-and
-.Ql .Xc
-extended argument list macros are discussed below.
-.
-.Ss "No-Op or Normal Text Macro"
-.
-The macro
-.Ql .No
-is
-can be used in a macro command line for parameters which should
-.Em not
-be formatted.
-Be careful to add
-.Ql \e&
-to the word
-.Ql \&No
-if you really want that English word (and not the macro) as a parameter.
-.Pp
-.Dl Usage: .No Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .No\ test\ Ta\ with\ Ta\ tabs" -compact -offset 15n
-.It Li ".No test Ta with Ta tabs"
-.No test Ta with Ta tabs
-.El
-.Pp
-.
-The default width is 12n.
-.
-.Ss "No-Space Macro"
-.
-The
-.Ql .Ns
-macro suppresses insertion of a space between the current position and its
-first parameter.
-For example, it is useful for old style argument lists where there is no
-space between the flag and argument:
-.Pp
-.Dl "Usage:" Ld Ao argument Ac \&Ns Oo Ao argument Ac Oc Ld
-.Dl " " .Ns Ao argument Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Op\ Fl\ I\ Ns\ Ar\ directory" -compact -offset 15n
-.It Li ".Op Fl I Ns Ar directory"
-.Op Fl I Ns Ar directory
-.El
-.Pp
-Note: The
-.Ql .Ns
-macro always invokes the
-.Ql .No
-macro after eliminating the space unless another macro name follows it.
-If used as a request (i.e., the second form above in the
-.Sq Usage
-line,
-.Ql .Ns
-is identical to
-.Ql .No .
-.
-.Ss "Section Cross References"
-.
-The
-.Ql .Sx
-macro designates a reference to a section header within the same document.
-.Pp
-.Dl Usage: .Sx Ao section reference Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Sx\ FILES" -offset 15n
-.It Li ".Sx FILES"
-.Sx FILES
-.El
-.Pp
-.
-The default width is 16n.
-.
-.Ss Symbolics
-.
-The symbolic emphasis macro is generally a boldface macro in either the
-symbolic sense or the traditional English usage.
-.Pp
-.Dl Usage: .Sy Ao symbol Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Sy\ Important\ Notice" -compact -offset 15n
-.It Li ".Sy Important Notice"
-.Sy Important Notice
-.El
-.Pp
-.
-The default width is 6n.
-.
-.Ss Mathematical Symbols
-.
-Use this macro for mathematical symbols and similar things.
-.Pp
-.Dl Usage: .Ms Ao math symbol Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Ms\ sigma" -compact -offset 15n
-.It Li ".Ms sigma"
-.Ms sigma
-.El
-.Pp
-.
-The default width is 6n.
-.
-.Ss "References and Citations"
-.
-The following macros make a modest attempt to handle references.
-At best, the macros make it convenient to manually drop in a subset of
-.Em refer
-style references.
-.Pp
-.Bl -tag -width 6n -offset indent -compact
-.It Li .Rs
-Reference start (does not take arguments).
-Causes a line break in the
-.Sx "SEE ALSO"
-section and begins collection of reference information until the reference
-end macro is read.
-.It Li .Re
-Reference end (does not take arguments).
-The reference is printed.
-.It Li .%A
-Reference author name; one name per invocation.
-.It Li .%B
-Book title.
-.It Li .%C
-City/place (not implemented yet).
-.It Li .%D
-Date.
-.It Li .%I
-Issuer/publisher name.
-.It Li .%J
-Journal name.
-.It Li .%N
-Issue number.
-.It Li .%O
-Optional information.
-.It Li .%P
-Page number.
-.It Li .%Q
-Corporate or foreign author.
-.It Li .%R
-Report name.
-.It Li .%T
-Title of article.
-.It Li .%V
-Volume.
-.El
-.Pp
-Macros beginning with
-.Ql %
-are not callable but accept multiple arguments in the usual way.
-Only the
-.Ql .Tn
-macro is handled properly as a parameter; other macros will cause strange
-output.
-.Ql .%B
-and
-.Ql .%T
-can be used outside of the
-.Ql .Rs/.Re
-environment.
-.Pp
-Example:
-.
-.Bd -literal -offset indent
-\&.Rs
-\&.%A "Matthew Bar"
-\&.%A "John Foo"
-\&.%T "Implementation Notes on foobar(1)"
-\&.%R "Technical Report ABC-DE-12-345"
-\&.%Q "Drofnats College, Nowhere"
-\&.%D "April 1991"
-\&.Re
-.Ed
-.Pp
-produces
-.
-.Bd -ragged -offset indent
-.Rs
-.%A "Matthew Bar"
-.%A "John Foo"
-.%T "Implementation Notes on foobar(1)"
-.%R "Technical Report ABC-DE-12-345"
-.%Q "Drofnats College, Nowhere"
-.%D "April 1991"
-.Re
-.Ed
-.
-.Ss "Trade Names (or Acronyms and Type Names)"
-.
-The trade name macro prints its arguments in a smaller font.
-Its intended use is to imitate a small caps fonts for uppercase acronyms.
-.Pp
-.Dl Usage: .Tn Ao symbol Ac Ld
-.Pp
-.Bl -tag -xwidth ".Li .Tn\ ASCII" -compact -offset 15n
-.It Li ".Tn DEC"
-.Tn DEC
-.It Li ".Tn ASCII"
-.Tn ASCII
-.El
-.Pp
-.
-The default width is 10n.
-.
-.Ss "Extended Arguments"
-.
-The
-.Li .Xo
-and
-.Li .Xc
-macros allow one to extend an argument list on a macro boundary for the
-.Ql .It
-macro (see below).
-Note that
-.Li .Xo
-and
-.Li .Xc
-are implemented similarly to all other macros opening and closing an
-enclosure (without inserting characters, of course).
-This means that the following is true for those macros also.
-.Pp
-Here is an example of
-.Ql .Xo
-using the space mode macro to turn spacing off:
-.
-.Bd -literal -offset indent
-\&.Sm off
-\&.It Xo Sy I Ar operation
-\&.No \een Ar count No \een
-\&.Xc
-\&.Sm on
-.Ed
-.Pp
-.
-produces
-.
-.Bd -filled -offset indent
-.Bl -tag -compact
-.Sm off
-.It Xo Sy I Ar operation
-.No \en Ar count No \en
-.Xc
-.Sm on
-.El
-.Ed
-.Pp
-.
-Another one:
-.
-.Bd -literal -offset indent
-\&.Sm off
-\&.It Cm S No / Ar old_pattern Xo
-\&.No / Ar new_pattern
-\&.No / Op Cm g
-\&.Xc
-\&.Sm on
-.Ed
-.Pp
-.
-produces
-.
-.Bd -filled -offset indent
-.Bl -tag -compact
-.Sm off
-.It Cm S No \&/ Ar old_pattern Xo
-.No \&/ Ar new_pattern
-.No \&/ Op Cm g
-.Xc
-.Sm on
-.El
-.Ed
-.Pp
-.
-Another example of
-.Ql .Xo
-and enclosure macros: Test the value of a variable.
-.
-.Bd -literal -offset indent
-\&.It Xo
-\&.Ic .ifndef
-\&.Oo \e&! Oc Ns Ar variable Oo
-\&.Ar operator variable Ld
-\&.Oc Xc
-.Ed
-.Pp
-.
-produces
-.
-.Bd -filled -offset indent
-.Bl -tag -width flag -compact
-.It Xo
-.Ic .ifndef
-.Oo \&! Oc Ns Ar variable Oo
-.Ar operator variable Ld
-.Oc Xc
-.El
-.Ed
-.Pp
-.
-.
-.Sh "PAGE STRUCTURE DOMAIN"
-.
-.Ss "Section Headers"
-.
-The first three
-.Ql .Sh
-section header macros listed below are required in every man page.
-The remaining section headers are recommended at the discretion of the
-author writing the manual page.
-The
-.Ql .Sh
-macro is parsed but not generally callable.
-It can be used as an argument in a call to
-.Ql .Sh
-only; it then reactivates the default font for
-.Ql .Sh .
-.Pp
-The default width is 8n.
-.
-.Bl -tag -xwidth ".Li .Sh\ DESCRIPTION"
-.It Li ".Sh NAME"
-The
-.Ql ".Sh NAME"
-macro is mandatory.
-If not specified, headers, footers and page layout defaults will not be set
-and things will be rather unpleasant.
-The
-.Sx NAME
-section consists of at least three items.
-The first is the
-.Ql .Nm
-name macro naming the subject of the man page.
-The second is the name description macro,
-.Ql .Nd ,
-which separates the subject name from the third item, which is the
-description.
-The description should be the most terse and lucid possible, as the space
-available is small.
-.Pp
-.Ql .Nd
-first prints
-.Ql - ,
-then all its arguments.
-.
-.It Li ".Sh SYNOPSIS"
-The
-.Sx SYNOPSIS
-section describes the typical usage of the subject of a man page.
-The macros required are either
-.Ql .Nm ,
-.Ql .Cd ,
-or
-.Ql .Fn
-(and possibly
-.Ql .Fo ,
-.Ql .Fc ,
-.Ql .Fd ,
-and
-.Ql .Ft ) .
-The function name macro
-.Ql .Fn
-is required for manual page sections\~2 and\~3; the command and general name
-macro
-.Ql .Nm
-is required for sections 1, 5, 6, 7, and\~8.
-Section\~4 manuals require a
-.Ql .Nm ,
-.Ql .Fd
-or a
-.Ql .Cd
-configuration device usage macro.
-Several other macros may be necessary to produce the synopsis line as shown
-below:
-.
-.Bd -filled -offset indent
-.Nm cat
-.Op Fl benstuv
-.Op Fl
-.Ar
-.Ed
-.Pp
-.
-The following macros were used:
-.Pp
-.Dl ".Nm cat"
-.Dl ".Op Fl benstuv"
-.Dl ".Op Fl"
-.Dl .Ar
-.
-.It Li ".Sh DESCRIPTION"
-In most cases the first text in the
-.Sx DESCRIPTION
-section is a brief paragraph on the command, function or file, followed by a
-lexical list of options and respective explanations.
-To create such a list, the
-.Ql .Bl
-(begin list),
-.Ql .It
-(list item) and
-.Ql .El
-(end list)
-macros are used (see
-.Sx Lists and Columns
-below).
-.El
-.Pp
-.
-The following
-.Ql .Sh
-section headers are part of the preferred manual page layout and must be
-used appropriately to maintain consistency.
-They are listed in the order in which they would be used.
-.
-.Bl -tag -xwidth ".Li .Sh\ ENVIRONMENT"
-.It Li ".Sh ENVIRONMENT"
-The
-.Sx ENVIRONMENT
-section should reveal any related environment variables and clues to their
-behavior and/or usage.
-.It Li ".Sh EXAMPLES"
-There are several ways to create examples.
-See the
-.Sx EXAMPLES
-section below for details.
-.It Li ".Sh FILES"
-Files which are used or created by the man page subject should be listed via
-the
-.Ql .Pa
-macro in the
-.Sx FILES
-section.
-.It Li ".Sh SEE ALSO"
-References to other material on the man page topic and cross references to
-other relevant man pages should be placed in the
-.Sx "SEE ALSO"
-section.
-Cross references are specified using the
-.Ql .Xr
-macro.
-Currently
-.Xr refer 1
-style references are not accommodated.
-.Pp
-It is recommended that the cross references are sorted on the section
-number, and then alphabetically on the names within a section.
-Example:
-.Pp
-.Xr ls 1 ,
-.Xr ps 1 ,
-.Xr group 5 ,
-.Xr passwd 5
-.It Li ".Sh STANDARDS"
-If the command, library function or file adheres to a specific
-implementation such as
-.St -p1003.2
-or
-.St -ansiC
-this should be noted here.
-If the command does not adhere to any standard, its history should be noted
-in the
-.Sx HISTORY
-section.
-.It Li ".Sh HISTORY"
-Any command which does not adhere to any specific standards should be
-outlined historically in this section.
-.It Li ".Sh AUTHORS"
-Credits should be placed here.
-The
-.Ql .An
-macro should be used to specify the name(s) of the person(s).
-.It Li ".Sh DIAGNOSTICS"
-Diagnostic messages from a command should be placed in this section.
-.It Li ".Sh ERRORS"
-Specific error handling, especially from library functions (man page
-sections 2, 3, and\~9) should go here.
-The
-.Ql .Er
-macro is used to specify an error (errno).
-.It Li ".Sh BUGS"
-Blatant problems with the topic go here.
-.El
-.Pp
-.
-User-specified
-.Ql .Sh
-sections may be added; for example, this section was set with:
-.
-.Bd -literal -offset 15n
-\&.Sh "PAGE STRUCTURE DOMAIN"
-.Ed
-.
-.Ss "Subsection Headers"
-.
-Subsection headers have exactly the same syntax as section headers:
-.Ql .Ss
-is parsed but not generally callable.
-It can be used as an argument in a call to
-.Ql .Ss
-only; it then reactivates the default font for
-.Ql .Ss .
-.Pp
-The default width is 8n.
-.
-.Ss "Paragraphs and Line Spacing"
-.
-.Bl -tag -xwidth ".Li .Pp"
-.It Li .Pp
-The
-.Ql .Pp
-paragraph command may be used to specify a line space where necessary.
-The macro is not necessary after a
-.Ql .Sh
-or
-.Ql .Ss
-macro or before a
-.Ql .Bl
-or
-.Ql .Bd
-macro (which both assert a vertical distance unless the
-.Fl compact
-flag is given).
-.Pp
-The macro is neither callable nor parsed and doesn't take arguments; an
-alternative name is
-.Ql .Lp .
-.El
-.
-.\" XXX
-.
-.\" This worked with version one, need to redo for version three
-.\" .Pp
-.\" .Ds I
-.\" .Cw (ax+bx+c) \ is\ produced\ by\ \&
-.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx\ (
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Va ax
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Sy \+
-.\" .Cx
-.\" .Cl Cx \&(\&
-.\" .Va ax
-.\" .Cx +
-.\" .Va by
-.\" .Cx +
-.\" .Va c )
-.\" .Cx \t
-.\" .Em is produced by
-.\" .Cx \t
-.\" .Li \&.Va by
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Sy \+
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Va c )
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx
-.\" .Cx
-.\" .Cw
-.\" .De
-.\" .Pp
-.\" This example shows the same equation in a different format.
-.\" The spaces
-.\" around the
-.\" .Li \&+
-.\" signs were forced with
-.\" .Li \e :
-.\" .Pp
-.\" .Ds I
-.\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \&
-.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\&
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx\ (
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Va a
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Sy x
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx \e\ +\e\ \e&
-.\" .Cx
-.\" .Cl Cx \&(\&
-.\" .Va a
-.\" .Sy x
-.\" .Cx \ +\ \&
-.\" .Va b
-.\" .Sy y
-.\" .Cx \ +\ \&
-.\" .Va c )
-.\" .Cx \t
-.\" .Em is produced by
-.\" .Cl Cx \t\t
-.\" .Li \&.Va b
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Sy y
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx \e\ +\e\ \e&
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Va c )
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx
-.\" .Cx
-.\" .Cw
-.\" .De
-.\" .Pp
-.\" The incantation below was
-.\" lifted from the
-.\" .Xr adb 1
-.\" manual page:
-.\" .Pp
-.\" .Ds I
-.\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx Op Sy ?/
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Nm m
-.\" .Cx
-.\" .Cl Cx Op Sy ?/
-.\" .Nm m
-.\" .Ad \ b1 e1 f1
-.\" .Op Sy ?/
-.\" .Cx \t
-.\" .Em is produced by
-.\" .Cx \t
-.\" .Li \&.Ar \e\ b1 e1 f1
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Op Sy ?/
-.\" .Cx
-.\" .Cl Cx \t\t
-.\" .Li \&.Cx
-.\" .Cx
-.\" .Cw
-.\" .De
-.\" .Pp
-.
-.Ss Keeps
-.
-The only keep that is implemented at this time is for words.
-The macros are
-.Ql .Bk
-(begin keep)
-and
-.Ql .Ek
-(end keep).
-The only option that
-.Ql .Bl
-accepts currently is
-.Fl words
-(this is also the default if no option is given) which is useful for
-preventing line breaks in the middle of options.
-In the example for the make command line arguments (see
-.Sx What's in a name ) ,
-the keep prevented
-.Xr nroff
-from placing up the flag and the argument on separate lines.
-.Pp
-Both macros are neither callable nor parsed.
-.Pp
-More work needs to be done with the keep macros; specifically, a
-.Fl line
-option should be added.
-.
-.Ss "Examples and Displays"
-.
-There are six types of displays.
-.Pp
-.Bl -tag -xwidth ".Li .D1"
-.It Li .D1
-(This is D-one.)
-Display one line of indented text.
-This macro is parsed but not callable.
-.Pp
-.Dl Fl ldghfstru
-.Pp
-The above was produced by:
-.Li ".Dl Fl ldghfstru" .
-.
-.It Li .Dl
-(This is D-ell.)
-Display one line of indented
-.Em literal
-text.
-The
-.Ql .Dl
-example macro has been used throughout this file.
-It allows the indentation (display) of one line of text.
-Its default font is set to constant width (literal).
-.Ql .Dl
-is parsed but not callable.
-.Pp
-.Dl % ls -ldg /usr/local/bin
-.Pp
-The above was produced by:
-.Li ".Dl % ls -ldg /usr/local/bin" .
-.
-.It Li .Bd
-Begin display.
-The
-.Ql .Bd
-display must be ended with the
-.Ql .Ed
-macro.
-It has the following syntax:
-.Pp
-.Bl -tag -xwidth ".Li .Bd" -offset indent
-.It Li .Bd Xo
-.Bro \-literal | \-filled | \-unfilled | \-ragged | \-centered Brc
-.Oo \-offset Ao string Ac Oc Oo \-file Ao file name Ac Oc Oo \-compact Oc Xc
-.El
-.Pp
-.
-.Bl -tag -xwidth ".Fl file Ao Ar file name Ac " -compact
-.It Fl ragged
-Fill, but do not adjust the right margin (only left-justify).
-.It Fl centered
-Center lines between the current left and right margin.
-Note that each single line is centered.
-.It Fl unfilled
-Do not fill; display a block of text as typed, using line breaks as
-specified by the user.
-This can produce overlong lines without warning messages.
-.It Fl filled
-Display a filled block.
-The block of text is formatted (i.e., the text is justified on both the left
-and right side).
-.It Fl literal
-Display block with literal font (usually fixed-width).
-Useful for source code or simple tabbed or spaced text.
-.It Fl file Ao Ar file name Ac
-The file which name follows the
-.Fl file
-flag is read and displayed before any data enclosed with
-.Ql .Bd
-and
-.Ql .Ed ,
-using the selected display type.
-Any
-.Xr troff/ Ns Nm \-mdoc
-commands in the file will be processed.
-.It Fl offset Ao Ar string Ac
-If
-.Fl offset
-is specified with one of the following strings, the string is interpreted to
-indicate the level of indentation for the forthcoming block of text:
-.
-.Pp
-.Bl -tag -xwidth ".Ar indent-two" -compact
-.It Ar left
-Align block on the current left margin; this is the default mode of
-.Ql .Bd .
-.It Ar center
-Supposedly center the block.
-At this time unfortunately, the block merely gets left aligned about an
-imaginary center margin.
-.It Ar indent
-Indent by one default indent value or tab.
-The default indent value is also used for the
-.Ql .D1
-and
-.Ql .Dl
-macros, so one is guaranteed the two types of displays will line up.
-The indentation value is normally set to\~6n or about two thirds of an inch
-(six constant width characters).
-.It Ar indent-two
-Indent two times the default indent value.
-.It Ar right
-This
-.Em left
-aligns the block about two inches from the right side of the page.
-This macro needs work and perhaps may never do the right thing within
-.Xr troff .
-.El
-.Pp
-.
-If
-.Ao string Ac
-is a valid numeric expression instead
-.Pf ( Em with a scale indicator other than
-.Sq Em u ) ,
-use that value for indentation.
-The most useful scale indicators are
-.Sq m
-and
-.Sq n ,
-specifying the so-called
-.Em \&Em
-and
-.Em "En square" .
-This is approximately the width of the letter
-.Sq m
-resp.\& the letter
-.Sq n
-of the current font (for nroff output, both scale indicators give the same
-values).
-If
-.Ao string Ac
-isn't a numeric expression, it is tested whether it is an
-.Nm \-mdoc
-macro name, and the default offset value associated with this macro is used.
-Finally, if all tests fail,
-the width of
-.Ao string Ac
-(typeset with a fixed-width font) is taken as the offset.
-.It Fl compact
-Suppress insertion of vertical space before begin of display.
-.El
-.
-.It Li .Ed
-End display (doesn't take parameters).
-.El
-.
-.Ss "Tagged Lists and Columns"
-.
-There are several types of lists which may be initiated with the
-.Ql .Bl
-begin-list macro.
-Items within the list are specified with the
-.Ql .It
-item macro, and each list must end with the
-.Ql .El
-macro.
-Lists may be nested within themselves and within displays.
-The use of columns inside of lists or lists inside of columns is unproven.
-.Pp
-In addition, several list attributes may be specified such as the width of a
-tag, the list offset, and compactness (blank lines between items allowed or
-disallowed).
-Most of this document has been formatted with a tag style list
-.Pf ( Fl tag ) .
-.Pp
-It has the following syntax forms:
-.
-.Pp
-.Bl -tag -xwidth ".Li .Bl" -offset indent -compact
-.It Li .Bl Xo
-.Bro \-hang | \-ohang | \-tag | \-diag | \-inset Brc
-.Oo \-width Ao string Ac Oc Oo \-xwidth Ao command Ac Oc
-.Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
-.It Li .Bl Xo
-.No \-column Oo \-offset Ao string Ac Oc
-.Ao string1 Ac Ao string2 Ac Ld Xc
-.It Li .Bl Xo
-.Bro \-item | \-enum Oo \-nested Oc | \-bullet | \-hyphen | \-dash Brc
-.Oo \-offset Ao string Ac Oc Oo \-compact Oc Xc
-.El
-.Pp
-.
-And now a detailed description of the list types.
-.
-.Pp
-.Bl -tag -xwidth ".Fl column" -compact
-.It Fl bullet
-A bullet list.
-.
-.Bd -literal -offset indent
-\&.Bl -bullet -offset indent -compact
-\&.It
-Bullet one goes here.
-\&.It
-Bullet two here.
-\&.El
-.Ed
-.Pp
-.
-Produces:
-.
-.Pp
-.Bl -bullet -offset indent -compact
-.It
-Bullet one goes here.
-.It
-Bullet two here.
-.El
-.Pp
-.
-.It Fl dash No ( or Fl hyphen )
-A dash list.
-.
-.Bd -literal -offset indent
-\&.Bl -dash -offset indent -compact
-\&.It
-Dash one goes here.
-\&.It
-Dash two here.
-\&.El
-.Ed
-.Pp
-.
-Produces:
-.
-.Pp
-.Bl -dash -offset indent -compact
-.It
-Dash one goes here.
-.It
-Dash two here.
-.El
-.Pp
-.
-.It Fl enum
-An enumerated list.
-.
-.Bd -literal -offset indent
-\&.Bl -enum -offset indent -compact
-\&.It
-Item one goes here.
-\&.It
-And item two here.
-\&.El
-.Ed
-.Pp
-.
-The result:
-.
-.Pp
-.Bl -enum -offset indent -compact
-.It
-Item one goes here.
-.It
-And item two here.
-.El
-.Pp
-.
-If you want to nest enumerated lists, use the
-.Fl nested
-flag (starting with the second-level list):
-.
-.Bd -literal -offset indent
-\&.Bl -enum -offset indent -compact
-\&.It
-Item one goes here
-\&.Bl -enum -nested -compact
-\&.It
-Item two goes here.
-\&.It
-And item three here.
-\&.El
-\&.It
-And item four here.
-\&.El
-.Ed
-.Pp
-.
-Result:
-.
-.Pp
-.Bl -enum -offset indent -compact
-.It
-Item one goes here.
-.Bl -enum -nested -compact
-.It
-Item two goes here.
-.It
-And item three here.
-.El
-.It
-And item four here.
-.El
-.Pp
-.
-.It Fl item
-A list of type
-.Fl item
-without list markers.
-.
-.Bd -literal -offset indent
-\&.Bl -item -offset indent
-\&.It
-Item one goes here.
-Item one goes here.
-Item one goes here.
-\&.It
-Item two here.
-Item two here.
-Item two here.
-\&.El
-.Ed
-.Pp
-.
-Produces:
-.
-.Pp
-.Bl -item -offset indent
-.It
-Item one goes here.
-Item one goes here.
-Item one goes here.
-.It
-Item two here.
-Item two here.
-Item two here.
-.El
-.Pp
-.
-.It Fl tag
-A list with tags.
-Use
-.Fl width
-or
-.Fl xwidth
-to specify the tag width.
-.
-.Pp
-.Bl -tag -width "PPID" -compact -offset indent
-.It SL
-sleep time of the process (seconds blocked)
-.It PAGEIN
-number of disk
-.Tn I/O Ns 's
-resulting from references by the process
-to pages not loaded in core.
-.It UID
-numerical user-id of process owner
-.It PPID
-numerical id of parent of process priority
-(non-positive when in non-interruptible wait)
-.El
-.Pp
-.
-The raw text:
-.
-.Bd -literal -offset indent
-\&.Bl -tag -width "PPID" -compact -offset indent
-\&.It SL
-sleep time of the process (seconds blocked)
-\&.It PAGEIN
-number of disk
-\&.Tn I/O Ns 's
-resulting from references by the process
-to pages not loaded in core.
-\&.It UID
-numerical user-id of process owner
-\&.It PPID
-numerical id of parent of process priority
-(non-positive when in non-interruptible wait)
-\&.El
-.Ed
-.Pp
-.
-.It Fl diag
-Diag lists create section-four diagnostic lists and are similar to inset
-lists except callable macros are ignored.
-This list type can't be nested; the flags
-.Fl offset
-and
-.Fl compact
-are ignored
-.Pf ( Fl width
-resp.\&
-.Fl xwidth
-are not meaningful in this context).
-.Pp
-Example:
-.
-.Bd -literal -offset indent
-\&.Bl -diag
-\&.It You can't use Sy here.
-The message says all.
-\&.El
-.Ed
-.Pp
-.
-produces
-.
-.Pp
-.Sy "You can't use Sy here" . "\ " No "The message says all" .
-.Pp
-.
-.It Fl hang
-A list with hanging tags.
-.
-.Bl -hang -offset indent
-.It Em Hanged
-labels appear similar to tagged lists when the
-label is smaller than the label width.
-.It Em Longer hanged list labels
-blend into the paragraph unlike
-tagged paragraph labels.
-.El
-.Pp
-And the unformatted text which created it:
-.
-.Bd -literal -offset indent
-\&.Bl -hang -offset indent
-\&.It Em Hanged
-labels appear similar to tagged lists when the
-label is smaller than the label width.
-\&.It Em Longer hanged list labels
-blend into the paragraph unlike
-tagged paragraph labels.
-\&.El
-.Ed
-.Pp
-.
-.It Fl ohang
-Lists with overhanging tags don't use indentation for the items; tags are
-written to a separate line.
-.Pp
-.Bl -ohang -offset indent
-.It Sy SL
-sleep time of the process (seconds blocked)
-.It Sy PAGEIN
-number of disk
-.Tn I/O Ns 's
-resulting from references by the process
-to pages not loaded in core.
-.It Sy UID
-numerical user-id of process owner
-.It Sy PPID
-numerical id of parent of process priority
-(non-positive when in non-interruptible wait)
-.El
-.Pp
-.
-The raw text:
-.
-.Bd -literal -offset indent
-\&.Bl -ohang -offset indent
-\&.It Sy SL
-sleep time of the process (seconds blocked)
-\&.It Sy PAGEIN
-number of disk
-\&.Tn I/O Ns 's
-resulting from references by the process
-to pages not loaded in core.
-\&.It Sy UID
-numerical user-id of process owner
-\&.It Sy PPID
-numerical id of parent of process priority
-(non-positive when in non-interruptible wait)
-\&.El
-.Ed
-.Pp
-.
-.It Fl inset
-Here is an example of inset labels:
-.Bl -inset -offset indent
-.It Em Tag
-The tagged list (also called a tagged paragraph)
-is the most common type of list used in the
-Berkeley manuals.
-Use a
-.Fl width
-attribute as described below.
-.It Em Diag
-Diag lists create section four diagnostic lists
-and are similar to inset lists except callable
-macros are ignored.
-.It Em Hang
-Hanged labels are a matter of taste.
-.It Em Ohang
-Overhanging labels are nice when space is constrained.
-.It Em Inset
-Inset labels are useful for controlling blocks of
-paragraphs and are valuable for converting
-.Nm \-mdoc
-manuals to other formats.
-.El
-.Pp
-Here is the source text which produced the above example:
-.
-.Bd -literal -offset indent
-\&.Bl -inset -offset indent
-\&.It Em Tag
-The tagged list (also called a tagged paragraph)
-is the most common type of list used in the
-Berkeley manuals.
-\&.It Em Diag
-Diag lists create section four diagnostic lists
-and are similar to inset lists except callable
-macros are ignored.
-\&.It Em Hang
-Hanged labels are a matter of taste.
-\&.It Em Ohang
-Overhanging labels are nice when space is constrained.
-\&.It Em Inset
-Inset labels are useful for controlling blocks of
-paragraphs and are valuable for converting
-\&.Nm \-mdoc
-manuals to other formats.
-\&.El
-.Ed
-.Pp
-.
-.It Fl column
-This list type generates multiple columns.
-The number of columns and the width of each column is determined by the
-arguments to the
-.Fl column
-list.
-Each
-.Ql .It
-argument is parsed to make a row, each column within the row is a separate
-argument separated by a tab or the
-.Ql .Ta
-macro.
-.Pp
-The table:
-.
-.Bl -column -offset indent String Nroff Troff
-.It Sy String Ta Sy Nroff Ta Sy Troff
-.It Li <= Ta <= Ta \*(<=
-.It Li >= Ta >= Ta \*(>=
-.El
-.Pp
-.
-was produced by:
-.
-.Bd -literal -offset indent
-\&.Bl -column -offset indent String Nroff Troff
-\&.It Sy String Ta Sy Nroff Ta Sy Troff
-\&.It Li <= Ta <= Ta \e*(<=
-\&.It Li >= Ta >= Ta \e*(>=
-\&.El
-.Ed
-.El
-.Pp
-.
-Other keywords:
-.
-.Bl -tag -xwidth ".Fl indent Ao Ar string Ac"
-.It Fl width Ao Ar string Ac
-If
-.Ao string Ac
-is a valid numeric expression
-.Pf ( Em with a scale indicator other than
-.Sq Em u ) ,
-use that value for indentation.
-The most useful scale indicators are
-.Sq m
-and
-.Sq n ,
-specifying the so-called
-.Em \&Em
-and
-.Em "En square" .
-This is approximately the width of the letter
-.Sq m
-resp.\& the letter
-.Sq n
-of the current font (for nroff output, both scale indicators give the same
-values).
-If
-.Ao string Ac
-isn't a numeric expression, it is tested whether it is an
-.Nm \-mdoc
-macro name, and the default offset value associated with this macro is used.
-Finally, if all tests fail,
-the width of
-.Ao string Ac
-(typeset with a fixed-width font) is taken as the offset.
-.Pp
-If a width is not specified for the tag list type, the first time
-.Ql .It
-is invoked, an attempt is made to determine an appropriate width.
-If the first argument to
-.Ql .It
-is a callable macro, the default width for that macro will be used as if the
-macro name had been supplied as the width (otherwise, the default width of
-.Ql .No
-is used).
-However, if another item in the list is given with a different callable
-macro name, a new and nested list is assumed.
-This effectively means that
-.Fl width
-or
-.Fl xwidth
-is required for more complicated tag lists.
-.It Fl xwidth Ao Ar string Ac
-Interpret
-.Ao string Ac
-and use the width of the result.
-Almost all lists in this document use this option.
-.Pp
-Example:
-.
-.Bd -literal -offset indent
-\&.Bl -tag -xwidth ".Fl test Ao Ar string Ac"
-\&.It Fl test Ao Ar string Ac
-This is a longer sentence to show how the
-\&.Fl xwidth
-flag works in combination with a tag list.
-\&.El
-.Ed
-.Pp
-.
-gives:
-.
-.Bl -tag -xwidth ".Fl test Ao Ar string Ac"
-.It Fl test Ao Ar string Ac
-This is a longer sentence to show how the
-.Fl xwidth
-flag works in combination with a tag list.
-.El
-.Pp
-.
-Note that the current state of
-.Nm \-mdoc
-is saved before
-.Ao string Ac
-is interpreted; afterwards, all variables are restored again.
-However, boxes (used for enclosures) can't be saved in
-.Tn GNU
-.Xr troff 1 ;
-as a consequence, arguments must always be
-.Em balanced
-to avoid nasty errors.
-For example, don't say
-.Ql ".Ao string"
-but
-.Ql ".Ao string Xc"
-instead if you really need only an opening angle bracket.
-.It Fl offset Ao Ar string Ac
-If
-.Ao string Ac
-is
-.Ql -indent ,
-a default indent value (normally set to\~6n, similar to the value used in
-.Ql .Dl
-or
-.Ql .Bd )
-is used.
-If
-.Ao string Ac
-is a valid numeric expression instead
-.Pf ( Em with a scale indicator other than
-.Sq Em u ) ,
-use that value for indentation.
-The most useful scale indicators are
-.Sq m
-and
-.Sq n ,
-specifying the so-called
-.Em \&Em
-and
-.Em "En square" .
-This is approximately the width of the letter
-.Sq m
-resp.\& the letter
-.Sq n
-of the current font (for nroff output, both scale indicators give the same
-values).
-If
-.Ao string Ac
-isn't a numeric expression, it is tested whether it is an
-.Nm \-mdoc
-macro name, and the default offset value associated with this macro is used.
-Finally, if all tests fail,
-the width of
-.Ao string Ac
-(typeset with a fixed-width font) is taken as the offset.
-.It Fl compact
-Suppress insertion of vertical space before the list and between list items.
-.El
-.
-.
-.Sh "MISCELLANEOUS MACROS"
-.
-Here a list of the remaining macros which don't fit well into one of the
-above sections.
-We couldn't find real examples for the following macros:
-.Ql .Me ,
-.Ql .Or ,
-.Ql .Ot ,
-and
-.Ql .Vt .
-They are documented here for completeness \- if you know how to use them
-properly please send a mail to
-.Mt bug-groff@gnu.org
-(including an example).
-.
-.Bl -tag -xwidth ".Li .Bt"
-.It Li .Bt
-prints
-.
-.Bd -ragged -offset indent
-.Bt
-.Ed
-.Pp
-It is neither callable nor parsable and takes no arguments.
-.
-.It Li .Fr
-.Pp
-.Dl Usage: .Fr Ao function return value Ac Ld
-.Pp
-Don't use this macro.
-It allows a break right before the return value (usually a single digit)
-which is bad typographical behaviour.
-Use
-.Ql \e~
-to tie the return value to the previous word.
-.
-.It Li .Hf
-Use this macro to include a (header) file literally.
-It first prints
-.Ql File:
-followed by the file name, then the contents of
-.Ao file Ac .
-.Pp
-.Dl Usage: .Hf Ao file Ac
-.Pp
-It is neither callable nor parsable.
-.
-.It Li .In
-Specify C\~header file as being called in a C\~program.
-.Pp
-.Dl Usage: .In Ao header file Ac
-.Pp
-This function causes a break.
-For example, the line
-.Pp
-.In stdio.h
-.Pp
-is produced by
-.Ql ".In stdio.h" .
-.Pp
-It is neither callable nor parsable.
-.
-.It Li .Ld
-This macro is similar to TeX's
-.Ql \eldots
-command; it prints
-.Sq Ld .
-.
-.It Li .Lk
-To be written.
-.
-.It Li .Me
-Exact usage unknown.
-The documentation in the
-.Nm \-mdoc
-source file describes it as a macro for
-.Dq "menu entries" .
-.Pp
-Its default width is 6n.
-.
-.It Li .Mt
-To be written.
-.
-.It Li .Or
-This macro does nothing (probably a bug in the old
-.Nm \-mdoc
-implementation) \- it should output a
-.Dq pipe symbol (OR)
-according to the documentation in the
-.Nm \-mdoc
-source.
-We don't have an example for its intended use.
-Note that a pipe symbol can always be produced by using
-.Ql | ;
-if you don't use
-.Tn GNU
-.Xr troff
-requests directly, it will never interfere with the absolute position
-operator of troff.
-Alternatively, the string
-.Ql \e*[ba]
-is available.
-.Pp
-As a consequence, this macro is obsolete.
-.
-.It Li .Ot
-Exact usage unknown.
-The documentation in the
-.Nm \-mdoc
-source file describes it as
-.Dq old function type (fortran) .
-.
-.It Li .Sm
-Activate (toggle) space mode.
-.Pp
-.Dl Usage: .Sm Oo on | off Oc Ld
-.Pp
-If space mode is off, no spaces between macro arguments are inserted.
-If called without a parameter (or if the next parameter is neither
-.Ql on
-nor
-.Ql off ,
-.Ql .Sm
-toggles space mode.
-.
-.It Li .Ud
-prints
-.
-.Bd -ragged -offset indent
-.Ud
-.Ed
-.Pp
-It is neither callable nor parsable and takes no arguments.
-.
-.It Li .Vt
-Exact usage unknown.
-The documentation in the
-.Nm \-mdoc
-source file describes it as
-.Dq "variable type (for forcing old style variable declarations)" .
-.El
-.
-.
-.Sh "PREDEFINED STRINGS"
-.
-The following strings are predefined:
-.Pp
-.Bl -column String infinity "Troff " "straight double quote" -offset indent
-.It Sy String Ta Sy Nroff Ta Sy Troff Ta Sy Meaning
-.It Li <= Ta <= Ta \*[<=] Ta "less equal"
-.It Li >= Ta >= Ta \*[>=] Ta "greater equal"
-.It Li Rq Ta '' Ta \*[Rq] Ta "right double quote"
-.It Li Lq Ta `` Ta \*[Lq] Ta "left double quote"
-.It Li ua Ta ^ Ta \*[ua] Ta "upwards arrow"
-.It Li aa Ta \' Ta \*[aa] Ta "acute accent"
-.It Li ga Ta \` Ta \*[ga] Ta "grave accent"
-.It Li q Ta \&" Ta \*[q] Ta "straight double quote"
-.It Li Pi Ta pi Ta \*[Pi] Ta "greek pi"
-.It Li Ne Ta != Ta \*[Ne] Ta "not equal"
-.It Li Le Ta <= Ta \*[Le] Ta "less equal"
-.It Li Ge Ta >= Ta \*[Ge] Ta "greater equal"
-.It Li Lt Ta < Ta \*[Lt] Ta "less than"
-.It Li Gt Ta > Ta \*[Lt] Ta "greater than"
-.It Li Pm Ta +\- Ta \*[Pm] Ta "plus minus"
-.It Li If Ta infinity Ta \*[If] Ta "infinity"
-.It Li Na Ta \*[Na] Ta \*[Na] Ta "not a number"
-.It Li Ba Ta \*[Ba] Ta \*[Ba] Ta "vertical bar"
-.El
-.Pp
-The names of the columns
-.Sy Nroff
-and
-.Sy Troff
-are a bit misleading;
-.Sy Nroff
-shows the
-.Tn ASCII
-representation, while
-.Sy Troff
-gives the best glyph form available.
-For example, a Unicode enabled
-.Tn TTY Ns - Ns
-device will have proper glyph representations for all strings, whereas the
-enhancement for a Latin1
-.Tn TTY Ns - Ns
-device is only the plus-minus sign.
-.Pp
-String names which consist of two characters can be written as
-.Ql \e*(xx ;
-string names which consist of one character can be written as
-.Ql \e*x .
-A generic syntax for a string name of any length is
-.Ql \e*[xxx]
-(this is a
-.Tn GNU
-.Xr troff 1
-extension).
-.
-.
-\#
-\#=====================================================================
-\#
-.Sh DIAGNOSTICS
-.
-The debugging macro
-.Ql .Db
-available in previous versions of
-.Nm \-mdoc
-has been removed since
-.Tn GNU
-.Xr troff 1
-provides better facilities to check parameters; additionally, many error and
-warning messages have been added to this macro package, making it both more
-robust and verbose.
-.Pp
-The only remaining debugging macro is
-.Ql .Rd
-which yields a register dump of all global registers and strings.
-A normal user will never need it.
-.
-.
-.Sh "FORMATTING WITH GROFF, TROFF, AND NROFF"
-.
-By default, the package inhibits page breaks, headers, and footers if
-displayed with a
-.Tn TTY
-device like
-.Sq latin-1
-or
-.Sq unicode
-to make the manual more efficient for viewing on-line.
-This behaviour can be changed (e.g.\& to create a hardcopy of the
-.Tn TTY
-output) by setting the register
-.Ql cR
-to zero while calling groff:
-.Pp
-.Dl groff -Tlatin1 -rcR=0 -mdoc foo.man > foo.txt
-.Pp
-For double-sided printing, set register
-.Ql D :
-.Pp
-.Dl groff -Tps -rD=1 -mdoc foo.man > foo.ps
-.Pp
-.Nm \-mdoc
-is completely independent from the font size; it simply uses the value which
-is in effect before loading
-.Nm \-mdoc .
-For example, to prepare an eleven-point
-.Tn DVI
-printout, create a small file called
-.Pa 11pt.tmac ,
-containing the following two lines:
-.Pp
-.Dl .ps 10.95z
-.Dl .vs 13.6p
-.Pp
-.Ql .ps
-specifies the font size (10.95\|pt as used by TeX),
-.Ql .vs
-the vertical spacing (13.6\|pt) between adjacent lines.
-For historical reasons, you should always use
-.Ql z
-instead of
-.Ql p
-as the scale indicator for the
-.Ql .ps
-request.
-Now you can say
-.Pp
-.Dl groff -Tdvi -M. -m11pt -mdoc foo.man > foo.dvi
-.Pp
-The
-.Fl M
-option adds a directory (the current one in our example) to the search path
-for macro files.
-.
-.
-.Sh FILES
-.
-.Bl -tag -width mdoc/doc-ditroff -compact
-.It Pa doc.tmac
-The main manual macro package.
-.It Pa mdoc.tmac
-A wrapper file to call
-.Pa doc.tmac .
-.It Pa mdoc/doc-common
-Common strings, definitions, stuff related typographic output.
-.It Pa mdoc/doc-nroff
-Definitions used for a
-.Tn TTY
-output device.
-.It Pa mdoc/doc-ditroff
-Definitions used for all other devices.
-.It Pa mdoc.local
-Local additions and customizations.
-.It Pa andoc.tmac
-This file checks whether the
-.Nm \-mdoc
-or the
-.Nm \-man
-package should be used.
-.El
-.
-.
-.Sh "SEE ALSO"
-.
-.Xr man 1 ,
-.Xr groff_man 7 ,
-.Xr groff 1 ,
-.Xr troff 1
-.
-.
-.Sh BUGS
-.
-Section 3f has not been added to the header routines.
-.Pp
-.Ql \&.Nm
-font should be changed in
-.Sx NAME
-section.
-.Pp
-.Ql \&.Fn
-needs to have a check to prevent splitting up
-if the line length is too short.
-Occasionally it
-separates the last parenthesis, and sometimes
-looks ridiculous if a line is in fill mode.
-.Pp
-The list and display macros to not do any keeps
-and certainly should be able to.
-.\" Note what happens if the parameter list overlaps a newline
-.\" boundary.
-.\" to make sure a line boundary is crossed:
-.\" .Bd -literal
-.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[]
-.\" .Ed
-.\" .Pp
-.\" produces, nudge nudge,
-.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
-.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] ,
-.\" nudge
-.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] .
-.\" .Pp
-.\" If double quotes are used, for example:
-.\" .Bd -literal
-.\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q
-.\" .Ed
-.\" .Pp
-.\" produces, nudge nudge,
-.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
-.\" nudge
-.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" ,
-.\" nudge
-.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" .
-.\" .Pp
-.\" Not a pretty sight...
-.\" In a paragraph, a long parameter containing unpaddable spaces as
-.\" in the former example will cause
-.\" .Xr troff
-.\" to break the line and spread
-.\" the remaining words out.
-.\" The latter example will adjust nicely to
-.\" justified margins, but may break in between an argument and its
-.\" declaration.
-.\" In
-.\" .Xr nroff
-.\" the right margin adjustment is normally ragged and the problem is
-.\" not as severe.