summaryrefslogtreecommitdiff
path: root/usr/src/man
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man')
-rw-r--r--usr/src/man/man1/mandoc.1257
-rw-r--r--usr/src/man/man5/eqn.557
-rw-r--r--usr/src/man/man5/mandoc_char.525
-rw-r--r--usr/src/man/man5/mandoc_roff.521
-rw-r--r--usr/src/man/man5/mdoc.5233
-rw-r--r--usr/src/man/man5/tbl.513
6 files changed, 456 insertions, 150 deletions
diff --git a/usr/src/man/man1/mandoc.1 b/usr/src/man/man1/mandoc.1
index f2765db33a..eaafde344f 100644
--- a/usr/src/man/man1/mandoc.1
+++ b/usr/src/man/man1/mandoc.1
@@ -1,7 +1,7 @@
-.\" $Id: mandoc.1,v 1.237 2019/02/23 18:53:54 schwarze Exp $
+.\" $OpenBSD: mandoc.1,v 1.166 2020/02/15 15:28:01 schwarze Exp $
.\"
+.\" Copyright (c) 2012, 2014-2021 Ingo Schwarze <schwarze@openbsd.org>
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
-.\" Copyright (c) 2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: February 23 2019 $
+.Dd $Mdocdate: August 14 2021 $
.Dt MANDOC 1
.Os
.Sh NAME
@@ -52,13 +52,13 @@ The options are as follows:
If the standard output is a terminal device and
.Fl c
is not specified, use
-.Xr more 1
+.Xr less 1
to paginate the output, just like
.Xr man 1
would.
.It Fl c
Copy the formatted manual pages to the standard output without using
-.Xr more 1
+.Xr less 1
to paginate them.
This is the default.
It can be specified to override
@@ -238,10 +238,28 @@ where
is the back-space character number 8.
Emboldened characters are rendered as
.Sq c Ns \e[bs] Ns c .
+This markup is typically converted to appropriate terminal sequences by
+the pager or
+.Xr ul 1 .
+To remove the markup, pipe the output to
+.Xr col 1
+.Fl b
+instead.
.Pp
The special characters documented in
.Xr mandoc_char 5
are rendered best-effort in an ASCII equivalent.
+In particular, opening and closing
+.Sq single quotes
+are represented as characters number 0x60 and 0x27, respectively,
+which agrees with all ASCII standards from 1965 to the latest
+revision (2012) and which matches the traditional way in which
+.Xr roff 5
+formatters represent single quotes in ASCII output.
+This correct ASCII rendering may look strange with modern
+Unicode-compatible fonts because contrary to ASCII, Unicode uses
+the code point U+0060 for the grave accent only, never for an opening
+quote.
.Pp
The following
.Fl O
@@ -256,34 +274,16 @@ and seven for
.Xr man 5 .
Increasing this is not recommended; it may result in degraded formatting,
for example overfull lines or ugly line breaks.
-This markup is typically converted to appropriate terminal sequences by
-the pager or
-.Xr ul 1 .
-To remove the markup, pipe the output to
-.Xr col 1
-.Fl b
-instead.
When output is to a pager on a terminal that is less than 66 columns
wide, the default is reduced to three columns.
.It Cm mdoc
Format
-In particular, opening and closing
-.Sq single quotes
-are represented as characters number 0x60 and 0x27, respectively,
-which agrees with all ASCII standards from 1965 to the latest
-revision (2012) and which matches the traditional way in which
-.Xr roff 7
-formatters represent single quotes in ASCII output.
-This correct ASCII rendering may look strange with modern
-Unicode-compatible fonts because contrary to ASCII, Unicode uses
-the code point U+0060 for the grave accent only, never for an opening
-quote.
.Xr man 5
input files in
.Xr mdoc 5
output style.
-Specifically, this suppresses the two additional blank lines near the
-top and the bottom of each page, and it implies
+This prints the operating system name rather than the page title
+on the right side of the footer line, and it implies
.Fl O Cm indent Ns =5 .
One useful application is for checking that
.Fl T Cm man
@@ -391,6 +391,30 @@ The file
is used for an external style-sheet.
This must be a valid absolute or
relative URI.
+.It Cm tag Ns Op = Ns Ar term
+Same syntax and semantics as for
+.Sx ASCII Output .
+This is implemented by passing a
+.Ic file://
+URI ending in a fragment identifier to the pager
+rather than passing merely a file name.
+When using this argument, use a pager supporting such URIs, for example
+.Bd -literal -offset 3n
+MANPAGER='lynx -force_html' man -T html -O tag=MANPAGER man
+MANPAGER='w3m -T text/html' man -T html -O tag=toc mandoc
+.Ed
+.Pp
+Consequently, for HTML output, this argument does not work with
+.Xr more 1
+or
+.Xr less 1 .
+For example,
+.Ql MANPAGER=less man -T html -O tag=toc mandoc
+does not work because
+.Xr less 1
+does not support
+.Ic file://
+URIs.
.It Cm toc
If an input file contains at least two non-standard sections,
print a table of contents near the beginning of the output.
@@ -424,13 +448,15 @@ This is useful for distributing manual sources to legacy systems
lacking
.Xr mdoc 5
formatters.
+Embedded
+.Xr eqn 5
+and
+.Xr tbl 5
+code is not supported.
.Pp
If the input format of a file is
.Xr man 5 ,
-the input is copied to the output, expanding any
-.Xr mandoc_roff 5
-.Ic so
-requests.
+the input is copied to the output.
The parser is also run, and as usual, the
.Fl W
level controls which
@@ -605,6 +631,31 @@ When
.Sx Locale Output
is selected, it decides whether to use ASCII or UTF-8 output format.
It never affects the interpretation of input files.
+.It Ev MANPAGER
+Any non-empty value of the environment variable
+.Ev MANPAGER
+is used instead of the standard pagination program,
+.Xr less 1 ;
+see
+.Xr man 1
+for details.
+Only used if
+.Fl a
+or
+.Fl l
+is specified.
+.It Ev PAGER
+Specifies the pagination program to use when
+.Ev MANPAGER
+is not defined.
+If neither PAGER nor MANPAGER is defined,
+.Xr less 1
+is used.
+Only used if
+.Fl a
+or
+.Fl l
+is specified.
.El
.Sh EXIT STATUS
The
@@ -653,7 +704,7 @@ No input files have been read.
.It 6
An operating system error occurred, for example exhaustion
of memory, file descriptors, or process table entries.
-Such errors cause
+Such errors may cause
.Nm
to exit at once, possibly in the middle of parsing or formatting a file.
.El
@@ -733,6 +784,13 @@ fields.
.Pp
Message levels have the following meanings:
.Bl -tag -width "warning"
+.It Cm syserr
+An operating system error occurred.
+There isn't necessarily anything wrong with the input files.
+Output may all the same be missing or incomplete.
+.It Cm badarg
+Invalid command line arguments were specified.
+No input files have been read and no output is produced.
.It Cm unsupp
An input file uses unsupported low-level
.Xr mandoc_roff 5
@@ -781,8 +839,7 @@ Messages of the
.Cm error ,
and
.Cm unsupp
-levels except those about non-existent or unreadable input files
-are hidden unless their level, or a lower level, is requested using a
+levels are hidden unless their level, or a lower level, is requested using a
.Fl W
option or
.Fl T Cm lint
@@ -846,18 +903,10 @@ generated by CVS
or
.Ic NetBSD
keyword substitution as conventionally used in these operating systems.
-.It Sy "referenced manual not found"
-.Pq mdoc
-An
-.Ic \&Xr
-macro references a manual page that is not found in the base system.
-The path to look for base system manuals is configurable at compile
-time and defaults to
-.Pa /usr/share/man : /usr/X11R6/man .
.El
.Ss Style suggestions
.Bl -ohang
-.It Sy "legacy man(7) date format"
+.It Sy "legacy man(5) date format"
.Pq mdoc
The
.Ic \&Dd
@@ -940,6 +989,35 @@ list contains two consecutive
entries describing the same
.Ic \&Er
number.
+.It Sy "referenced manual not found"
+.Pq mdoc
+An
+.Ic \&Xr
+macro references a manual page that was not found.
+When running with
+.Fl W Cm base ,
+the search is restricted to the base system, by default to
+.Pa /usr/share/man .
+This path can be configured at compile time using the
+.Dv MANPATH_BASE
+preprocessor macro.
+When running with
+.Fl W Cm style ,
+the search is done along the full search path as described in the
+.Xr man 1
+manual page, respecting the
+.Fl m
+and
+.Fl M
+command line options, the
+.Ev MANPATH
+environment variable, the
+.Xr man.conf 5
+file and falling back to the default of
+.Pa /usr/share/man : Ns Pa /usr/X11R6/man : Ns Pa /usr/local/man ,
+also configurable at compile time using the
+.Dv MANPATH_DEFAULT
+preprocessor macro.
.It Sy "trailing delimiter"
.Pq mdoc
The last argument of an
@@ -969,6 +1047,9 @@ An
request occurs even though the document already switched to no-fill mode
and did not switch back to fill mode yet.
It has no effect.
+.It Sy "input text line longer than 80 bytes"
+Consider breaking the input text line
+at one of the blank characters before column 80.
.It Sy "verbatim \(dq--\(dq, maybe consider using \e(em"
.Pq mdoc
Even though the ASCII output device renders an em-dash as
@@ -1022,7 +1103,21 @@ macro lacks the mandatory section argument.
The section number in a
.Ic \&Dt
line is invalid, but still used.
-.It Sy "missing date, using today's date"
+.It Sy "filename/section mismatch"
+.Pq mdoc , man
+The name of the input file being processed is known and its file
+name extension starts with a non-zero digit, but the
+.Ic \&Dt
+or
+.Ic \&TH
+macro contains a
+.Ar section
+argument that starts with a different non-zero digit.
+The
+.Ar section
+argument is used as provided anyway.
+Consider checking whether the file name or the argument need a correction.
+.It Sy "missing date, using \(dq\(dq"
.Pq mdoc, man
The document was parsed as
.Xr mdoc 5
@@ -1623,15 +1718,15 @@ An
macro has an argument other than
.Cm on
or
+.Cm off .
+The invalid argument is moved out of the macro, which leaves the macro
+empty, causing it to toggle the spacing mode.
.It Sy "argument contains two font escapes"
.Pq roff
The second argument of a
.Ic char
request contains more than one font escape sequence.
A wrong font may remain active after using the character.
-.Cm off .
-The invalid argument is moved out of the macro, which leaves the macro
-empty, causing it to toggle the spacing mode.
.It Sy "unknown font, skipping request"
.Pq man , tbl
A
@@ -1661,6 +1756,9 @@ However, for compatibility with groff, blank lines in fill mode
are replaced with
.Ic \&sp
requests.
+To request a paragraph break, use
+.Ic \&Pp
+instead of a blank line.
.It Sy "tab in filled text"
.Pq mdoc , man
The meaning of tab characters is only well-defined in non-fill mode:
@@ -1760,6 +1858,10 @@ The invalid character is discarded.
A table layout specification contains an opening parenthesis,
but no matching closing parenthesis.
The rest of the input line, starting from the parenthesis, has no effect.
+.It Sy "ignoring excessive spacing in tbl layout"
+.Pq tbl
+A spacing modifier in a table layout is unreasonably large.
+The default spacing of 3n is used instead.
.It Sy "tbl without any data cells"
.Pq tbl
A table does not contain any data cells.
@@ -2196,6 +2298,71 @@ or
macro or of an undefined macro.
The macro is ignored, and its arguments are handled
as if they were a text line.
+.It Sy "skipping tbl in -Tman mode"
+.Pq mdoc , tbl
+An input file contains the
+.Ic \&TS
+macro.
+This message is only generated in
+.Fl T Cm man
+output mode, where
+.Xr tbl 5
+input is not supported.
+.It Sy "skipping eqn in -Tman mode"
+.Pq mdoc , eqn
+An input file contains the
+.Ic \&EQ
+macro.
+This message is only generated in
+.Fl T Cm man
+output mode, where
+.Xr eqn 5
+input is not supported.
+.El
+.Ss Bad command line arguments
+.Bl -ohang
+.It Sy "bad command line argument"
+The argument following one of the
+.Fl IKMmOTW
+command line options is invalid, or a
+.Ar file
+given as a command line argument cannot be opened.
+.It Sy "duplicate command line argument"
+The
+.Fl I
+command line option was specified twice.
+.It Sy "option has a superfluous value"
+An argument to the
+.Fl O
+option has a value but does not accept one.
+.It Sy "missing option value"
+An argument to the
+.Fl O
+option has no argument but requires one.
+.It Sy "bad option value"
+An argument to the
+.Fl O
+.Cm indent
+or
+.Cm width
+option has an invalid value.
+.It Sy "duplicate option value"
+The same
+.Fl O
+option is specified more than once.
+.It Sy "no such tag"
+The
+.Fl O Cm tag
+option was specified but the tag was not found in any of the displayed
+manual pages.
+.It Sy "\-Tmarkdown unsupported for man(5) input"
+.Pq man
+The
+.Fl T Cm markdown
+option was specified but an input file uses the
+.Xr man 5
+language.
+No output is produced for that input file.
.El
.Sh SEE ALSO
.Xr eqn 5 ,
diff --git a/usr/src/man/man5/eqn.5 b/usr/src/man/man5/eqn.5
index 28baf08109..c8c33e7214 100644
--- a/usr/src/man/man5/eqn.5
+++ b/usr/src/man/man5/eqn.5
@@ -1,4 +1,4 @@
-.\" $Id: eqn.7,v 1.37 2017/09/04 10:35:27 schwarze Exp $
+.\" $Id: eqn.7,v 1.39 2020/01/10 11:55:04 schwarze Exp $
.\"
.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: September 4 2017 $
+.Dd $Mdocdate: January 10 2020 $
.Dt EQN 5
.Os
.Sh NAME
@@ -44,28 +44,16 @@ specification (see
.Sx SEE ALSO
for references).
.Pp
-Equations within
-.Xr mdoc 5
-or
-.Xr man 5
-documents are enclosed by the standalone
-.Sq \&.EQ
-and
-.Sq \&.EN
-tags.
-Equations are multi-line blocks consisting of formulas and control
-statements.
-.Sh EQUATION STRUCTURE
-Each equation is bracketed by
-.Sq \&.EQ
-and
-.Sq \&.EN
-strings.
-.Em Note :
-these are not the same as
-.Xr mandoc_roff 5
-macros, and may only be invoked as
-.Sq \&.EQ .
+An equation starts with an input line containing exactly the characters
+.Sq \&.EQ ,
+may contain multiple input lines, and ends with an input line
+containing exactly the characters
+.Sq \&.EN .
+Equivalently, an equation can be given in the middle of a single
+text input line by surrounding it with the equation delimiters
+defined with the
+.Cm delim
+statement.
.Pp
The equation grammar is as follows, where quoted strings are
case-sensitive literals in the input:
@@ -178,6 +166,25 @@ statement is a synonym for
while
.Cm tdefine
is discarded.
+.It Cm delim
+This statement takes a string argument consisting of two bytes,
+to be used as the opening and closing delimiters for equations
+in the middle of text input lines.
+Conventionally, the dollar sign is used for both delimiters,
+as follows:
+.Bd -literal -offset indent
+\&.EQ
+delim $$
+\&.EN
+An equation like $sin pi = 0$ can now be entered
+in the middle of a text input line.
+.Ed
+.Pp
+The special statement
+.Cm delim off
+temporarily disables previously declared delimiters and
+.Cm delim on
+reenables them.
.It Cm gfont
Set the default font of subsequent output.
Its syntax is as follows:
@@ -470,7 +477,7 @@ commands are also ignored.
.%T System for Typesetting Mathematics
.%J Communications of the ACM
.%V 18
-.%P 151\(en157
+.%P pp. 151\(en157
.%D March, 1975
.Re
.Rs
diff --git a/usr/src/man/man5/mandoc_char.5 b/usr/src/man/man5/mandoc_char.5
index b6b1d7848b..fd2b91800f 100644
--- a/usr/src/man/man5/mandoc_char.5
+++ b/usr/src/man/man5/mandoc_char.5
@@ -1,8 +1,8 @@
-.\" $Id: mandoc_char.7,v 1.75 2018/12/15 19:30:26 schwarze Exp $
+.\" $Id: mandoc_char.7,v 1.78 2020/10/31 11:45:16 schwarze Exp $
.\"
.\" Copyright (c) 2003 Jason McIntyre <jmc@openbsd.org>
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
-.\" Copyright (c) 2011,2013,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2011,2013,2015,2017-2020 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: December 15 2018 $
+.Dd $Mdocdate: October 31 2020 $
.Dt MANDOC_CHAR 5
.Os
.Sh NAME
@@ -107,8 +107,8 @@ supporting it, for example in
.Fl T Cm utf8
and
.Fl T Cm html .
-But currently, no practically relevant manual page formatter actually
-requires that subtlety, so in manual pages just write plain
+But currently, no practically relevant manual page formatter requires
+that subtlety, so in manual pages, it is sufficient to write plain
.Sq -
to represent hyphen, minus, and hyphen-minus.
.Pp
@@ -261,15 +261,15 @@ subsection of the
.Xr mandoc_roff 5
manual.
.Pp
-Spacing:
+Spaces, non-breaking unless stated otherwise:
.Bl -column "Input" "Description" -offset indent -compact
.It Em Input Ta Em Description
-.It Sq \e\ \& Ta unpaddable non-breaking space
-.It \e\(ti Ta paddable non-breaking space
-.It \e0 Ta digit-width space allowing line break
+.It Sq \e\ \& Ta unpaddable space
+.It \e\(ti Ta paddable space
+.It \e0 Ta digit-width space
.It \e| Ta one-sixth \e(em narrow space, zero width in nroff mode
.It \e^ Ta one-twelfth \e(em half-narrow space, zero width in nroff
-.It \e& Ta zero-width non-breaking space
+.It \e& Ta zero-width space
.It \e) Ta zero-width space transparent to end-of-sentence detection
.It \e% Ta zero-width space allowing hyphenation
.It \e: Ta zero-width space allowing line break
@@ -709,11 +709,6 @@ Their syntax is similar to special characters, using
and
.Sq \e*[N]
.Pq N-character .
-For details, see the
-.Em Predefined Strings
-subsection of the
-.Xr mandoc_roff 5
-manual.
.Bl -column "Input" "Rendered" "Description" -offset indent
.It Em Input Ta Em Rendered Ta Em Description
.It \e*(Ba Ta \*(Ba Ta vertical bar
diff --git a/usr/src/man/man5/mandoc_roff.5 b/usr/src/man/man5/mandoc_roff.5
index 0a9aa7cbd8..17e9d2e09c 100644
--- a/usr/src/man/man5/mandoc_roff.5
+++ b/usr/src/man/man5/mandoc_roff.5
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.111 2019/01/01 03:45:29 schwarze Exp $
+.\" $Id: roff.7,v 1.116 2021/09/18 12:23:06 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: January 1 2019 $
+.Dd $Mdocdate: September 18 2021 $
.Dt ROFF 5
.Os
.Sh NAME
@@ -315,12 +315,18 @@ delimiters
The proper spacing is also intelligently preserved if a sentence ends at
the boundary of a macro line.
.Pp
+If an input line happens to end with a period, exclamation or question
+mark that isn't the end of a sentence, append a zero-width space
+.Pq Sq \e& .
+.Pp
Examples:
.Bd -literal -offset indent -compact
Do not end sentences mid-line like this. Instead,
end a sentence like this.
A macro would end like this:
\&.Xr mandoc 1 \&.
+An abbreviation at the end of an input line needs escaping, e.g.\e&
+like this.
.Ed
.Sh REQUEST SYNTAX
A request or macro line consists of:
@@ -503,10 +509,9 @@ This is a Heirloom extension and currently unsupported.
.It Ic \&br
Break the output line.
.It Ic \&break
-Break out of a
+Break out of the innermost
.Ic \&while
loop.
-Currently unsupported.
.It Ic \&breakchar Ar char ...
Optional line break characters.
This is a Heirloom extension and currently ignored.
@@ -619,7 +624,7 @@ Its syntax can be either
.Pp
or
.Bd -literal -offset indent
-.Pf . Ic \&de Ar macroname Ar endmacro
+.Pf . Ic \&de Ar macroname endmacro
.Ar definition
.Pf . Ar endmacro
.Ed
@@ -1306,7 +1311,7 @@ Change the output line length.
If the
.Ar width
argument is omitted, the line length is reset to its previous value.
-The default setting for terminal output is 58n.
+The default setting for terminal output is 78n.
If a sign is given, the line length is added to or subtracted from;
otherwise, it is set to the provided value.
Using this request in new manuals is discouraged for several reasons,
@@ -1815,7 +1820,7 @@ Each number may be followed by one optional scaling unit described below
.Sx Scaling Widths .
The following equations hold:
.Bd -literal -offset indent
-1i = 6v = 6P = 10m = 10n = 52p = 1000M = 240u = 240
+1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240
254c = 100i = 24000u = 24000
1f = 65536u = 65536
.Ed
@@ -2326,7 +2331,7 @@ for
.At v2 ,
then ported nroff to C as troff, which Brian W. Kernighan released with
.At v7 .
-In 1989, James Clarke re-implemented troff in C++, naming it groff.
+In 1989, James Clark re-implemented troff in C++, naming it groff.
.Sh AUTHORS
.An -nosplit
This
diff --git a/usr/src/man/man5/mdoc.5 b/usr/src/man/man5/mdoc.5
index 603755894e..4c85b861a7 100644
--- a/usr/src/man/man5/mdoc.5
+++ b/usr/src/man/man5/mdoc.5
@@ -1,7 +1,7 @@
-.\" $Id: mdoc.7,v 1.276 2019/02/07 15:45:53 schwarze Exp $
+.\" $Id: mdoc.7,v 1.287 2021/07/29 17:32:01 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
-.\" Copyright (c) 2010, 2011, 2013-2018 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2010, 2011, 2013-2020 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -19,7 +19,7 @@
.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
.\" Copyright 2018 Nexenta Systems, Inc.
.\"
-.Dd $Mdocdate: February 7 2019 $
+.Dd $Mdocdate: July 29 2021 $
.Dt MDOC 5
.Os
.Sh NAME
@@ -140,7 +140,7 @@ The
utility processes files ...
\&.\e\(dq .Sh IMPLEMENTATION NOTES
\&.\e\(dq .Sh RETURN VALUES
-\&.\e\(dq For sections 2, 3, and 9 only.
+\&.\e\(dq For sections 2, 3, 7, and 9 only.
\&.\e\(dq .Sh CONTEXT
\&.\e\(dq For section 9 functions only.
\&.\e\(dq .Sh ENVIRONMENT
@@ -151,7 +151,7 @@ utility processes files ...
\&.\e\(dq .Sh EXAMPLES
\&.\e\(dq .Sh DIAGNOSTICS
\&.\e\(dq .Sh ERRORS
-\&.\e\(dq For sections 2, 3, and 9 only.
+\&.\e\(dq For sections 2, 3, 7, and 9 only.
\&.\e\(dq .Sh ARCHITECTURE
\&.\e\(dq .Sh CODE SET INDEPENDENCE
\&.\e\(dq For sections 1, 1M, and 3 only.
@@ -302,7 +302,7 @@ utility does this, that, and the other.
It usually follows with a breakdown of the options (if documenting a
command), such as:
.Bd -literal -offset indent
-The arguments are as follows:
+The options are as follows:
\&.Bl \-tag \-width Ds
\&.It Fl v
Print verbose information.
@@ -385,7 +385,7 @@ See
.Ic \&Bl
.Fl diag .
.It Em ERRORS
-Documents error handling in sections 2, 3, and 9.
+Documents error handling in sections 2, 3, 7, and 9.
.Pp
See
.Ic \&Er .
@@ -562,11 +562,11 @@ in the alphabetical
.Sx MACRO REFERENCE .
.Ss Document preamble and NAME section macros
.Bl -column "Brq, Bro, Brc" description
-.It Sx \&Dd Ta document date: Cm $\&Mdocdate$ | Ar month day , year
-.It Sx \&Dt Ta document title: Ar TITLE section Op Ar arch
-.It Sx \&Os Ta operating system version: Op Ar system Op Ar version
-.It Sx \&Nm Ta document name (one argument)
-.It Sx \&Nd Ta document description (one line)
+.It Ic \&Dd Ta document date: Cm $\&Mdocdate$ | Ar month day , year
+.It Ic \&Dt Ta document title: Ar TITLE section Op Ar arch
+.It Ic \&Os Ta operating system version: Op Ar system Op Ar version
+.It Ic \&Nm Ta document name (one argument)
+.It Ic \&Nd Ta document description (one line)
.El
.Ss Sections and cross references
.Bl -column "Brq, Bro, Brc" description
@@ -574,6 +574,7 @@ in the alphabetical
.It Ic \&Ss Ta subsection header (one line)
.It Ic \&Sx Ta internal cross reference to a section or subsection
.It Ic \&Xr Ta cross reference to another manual page: Ar name section
+.It Ic \&Tg Ta tag the definition of a Ar term Pq <= 1 arguments
.It Ic \&Pp Ta start a text paragraph (no arguments)
.El
.Ss Displays and lists
@@ -721,6 +722,13 @@ block.
Book or journal page number of an
.Ic \&Rs
block.
+Conventionally, the argument starts with
+.Ql p.\&
+for a single page or
+.Ql pp.\&
+for a range of pages, for example:
+.Pp
+.Dl .%P pp. 42\e(en47
.It Ic \&%Q Ar name
Institutional author (school, government, etc.) of an
.Ic \&Rs
@@ -749,6 +757,7 @@ Close an
.Ic \&Ao
block.
Does not have any tail arguments.
+.Tg Ad
.It Ic \&Ad Ar address
Memory address.
Do not use this for postal addresses.
@@ -756,6 +765,7 @@ Do not use this for postal addresses.
Examples:
.Dl \&.Ad [0,$]
.Dl \&.Ad 0x00000000
+.Tg An
.It Ic \&An Fl split | nosplit | Ar first_name ... last_name
Author name.
Can be used both for the authors of the program, function, or driver
@@ -796,6 +806,7 @@ This macro is almost never useful.
See
.Ic \&Aq
for more details.
+.Tg Ap
.It Ic \&Ap
Inserts an apostrophe without any surrounding whitespace.
This is generally used as a grammatical device when referring to the verb
@@ -803,6 +814,7 @@ form of a function.
.Pp
Examples:
.Dl \&.Fn execve \&Ap d
+.Tg Aq
.It Ic \&Aq Ar line
Enclose the rest of the input line in angle brackets.
The only important use case is for email addresses.
@@ -847,6 +859,7 @@ as needed.
.Pp
See also
.Ic \&Ao .
+.Tg Ar
.It Ic \&Ar Op Ar placeholder ...
Command arguments.
If an argument is not provided, the string
@@ -865,6 +878,7 @@ for fixed strings to be passed verbatim as arguments, use
.Ic \&Fl
or
.Ic \&Cm .
+.Tg At
.It Ic \&At Op Ar version
Formats an
.At
@@ -902,6 +916,7 @@ Close a
.Ic \&Bo
block.
Does not have any tail arguments.
+.Tg Bd
.It Ic \&Bd Fl Ns Ar type Oo Fl offset Ar width Oc Op Fl compact
Begin a display block.
Display blocks are used to select a different indentation and
@@ -992,6 +1007,7 @@ See also
.Ic \&D1
and
.Ic \&Dl .
+.Tg Bf
.It Ic \&Bf Fl emphasis | literal | symbolic | Cm \&Em | \&Li | \&Sy
Change the font mode for a scoped block of text.
The
@@ -1018,6 +1034,7 @@ See also
.Ic \&Em ,
and
.Ic \&Sy .
+.Tg Bk
.It Ic \&Bk Fl words
For each macro, keep its output together on the same output line,
until the end of the macro or the end of the input line is reached,
@@ -1040,6 +1057,7 @@ macro line:
.Pp
Be careful in using over-long lines within a keep block!
Doing so will clobber the right margin.
+.Tg Bl
.It Xo
.Ic \&Bl
.Fl Ns Ar type
@@ -1182,6 +1200,7 @@ Examples:
.Pp
See also
.Ic \&Bq .
+.Tg Bq
.It Ic \&Bq Ar line
Encloses its arguments in square brackets.
.Pp
@@ -1215,6 +1234,7 @@ Examples:
.Pp
See also
.Ic \&Brq .
+.Tg Brq
.It Ic \&Brq Ar line
Encloses its arguments in curly braces.
.Pp
@@ -1223,6 +1243,7 @@ Examples:
.Pp
See also
.Ic \&Bro .
+.Tg Bsx
.It Ic \&Bsx Op Ar version
Format the
.Bsx
@@ -1245,6 +1266,7 @@ and
Supported only for compatibility, do not use this in new manuals.
Prints
.Dq is currently in beta test.
+.Tg Bx
.It Ic \&Bx Op Ar version Op Ar variant
Format the
.Bx
@@ -1264,6 +1286,7 @@ See also
.Ic \&Nx ,
and
.Ic \&Ox .
+.Tg Cd
.It Ic \&Cd Ar line
Kernel configuration declaration.
It is found in pages for
@@ -1279,9 +1302,12 @@ whitespace and align consecutive
.Ic \&Cd
declarations.
This practise is discouraged.
+.Tg Cm
.It Ic \&Cm Ar keyword ...
Command modifiers.
-Typically used for fixed strings passed as arguments, unless
+Typically used for fixed strings passed as arguments to interactive
+commands, to commands in interpreted scripts, or to configuration
+file directives, unless
.Ic \&Fl
is more appropriate.
Also useful when specifying configuration options or keys.
@@ -1290,8 +1316,10 @@ Examples:
.Dl ".Nm mt Fl f Ar device Cm rewind"
.Dl ".Nm ps Fl o Cm pid , Ns Cm command"
.Dl ".Nm dd Cm if= Ns Ar file1 Cm of= Ns Ar file2"
-.Dl ".Cm IdentityFile Pa ~/.ssh/id_rsa"
-.Dl ".Cm LogLevel Dv DEBUG"
+.Dl ".Ic set Fl o Cm vi"
+.Dl ".Ic lookup Cm file bind"
+.Dl ".Ic permit Ar identity Op Cm as Ar target"
+.Tg D1
.It Ic \&D1 Ar line
One-line indented display.
This is formatted by the default rules and is useful for simple indented
@@ -1317,8 +1345,10 @@ Close a
.Ic \&Do
block.
Does not have any tail arguments.
+.Tg Dd
.It Ic \&Dd Cm $\&Mdocdate$ | Ar month day , year
-Document date for display in the page footer.
+Document date for display in the page footer,
+by convention the date of the last change.
This is the mandatory first macro of any
.Nm
manual.
@@ -1364,6 +1394,7 @@ See also
.Ic \&Dt
and
.Ic \&Os .
+.Tg Dl
.It Ic \&Dl Ar line
One-line indented display.
This is formatted as literal text and is useful for commands and
@@ -1392,6 +1423,7 @@ April is the cruellest month
.Pp
See also
.Ic \&Dq .
+.Tg Dq
.It Ic \&Dq Ar line
Encloses its arguments in
.Dq typographic
@@ -1408,6 +1440,7 @@ See also
.Ic \&Sq ,
and
.Ic \&Do .
+.Tg Dt
.It Ic \&Dt Ar TITLE section Op Ar arch
Document title for display in the page header.
This is the mandatory second macro of any
@@ -1452,6 +1485,7 @@ for variable symbols, and
.Ic \&Fd
for listing preprocessor variable definitions in the
.Em SYNOPSIS .
+.Tg Dx
.It Ic \&Dx Op Ar version
Format the
.Dx
@@ -1493,6 +1527,7 @@ End a list context started by
.Ic \&Bl .
See also
.Ic \&It .
+.Tg Em
.It Ic \&Em Ar word ...
Request an italic font.
If the output device does not provide that, underline.
@@ -1532,6 +1567,7 @@ or any of the other enclosure macros.
It encloses its argument in the delimiters specified by the last
.Ic \&Es
macro.
+.Tg Eo
.It Ic \&Eo Op Ar opening_delimiter
An arbitrary enclosure.
The
@@ -1539,6 +1575,7 @@ The
argument is used as the enclosure head, for example, specifying \e(lq
will emulate
.Ic \&Do .
+.Tg Er
.It Ic \&Er Ar identifier ...
Error constants for definitions of the
.Va errno
@@ -1561,6 +1598,7 @@ or any of the other enclosure macros.
It takes two arguments, defining the delimiters to be used by subsequent
.Ic \&En
macros.
+.Tg Ev
.It Ic \&Ev Ar identifier ...
Environmental variables such as those specified in
.Xr environ 5 .
@@ -1572,6 +1610,7 @@ Examples:
See also
.Ic \&Dv
for general constants.
+.Tg Ex
.It Ic \&Ex Fl std Op Ar utility ...
Insert a standard sentence regarding command exit values of 0 on success
and >0 on failure.
@@ -1588,6 +1627,7 @@ arguments are treated as separate utilities.
.Pp
See also
.Ic \&Rv .
+.Tg Fa
.It Ic \&Fa Ar argument ...
Function argument or parameter.
Each argument may be a name and a type (recommended for the
@@ -1625,6 +1665,7 @@ See also
.It Ic \&Fc
End a function context started by
.Ic \&Fo .
+.Tg Fd
.It Ic \&Fd Pf # Ar directive Op Ar argument ...
Preprocessor directive, in particular for listing it in the
.Em SYNOPSIS .
@@ -1645,25 +1686,33 @@ See also
.Ic \&In ,
and
.Ic \&Dv .
+.Tg Fl
.It Ic \&Fl Op Ar word ...
Command-line flag or option.
Used when listing arguments to command-line utilities.
-Prints a fixed-width hyphen
-.Sq \-
-directly followed by each argument.
-If no arguments are provided, a hyphen is printed followed by a space.
-If the argument is a macro, a hyphen is prefixed to the subsequent macro
-output.
+For each argument, prints an ASCII hyphen-minus character
+.Sq \- ,
+immediately followed by the argument.
+If no arguments are provided, a hyphen-minus is printed followed by a space.
+If the argument is a macro, a hyphen-minus is prefixed
+to the subsequent macro output.
.Pp
Examples:
-.Dl ".Fl R Op Fl H | L | P"
-.Dl ".Op Fl 1AaCcdFfgHhikLlmnopqRrSsTtux"
-.Dl ".Fl type Cm d Fl name Pa CVS"
-.Dl ".Fl Ar signal_number"
-.Dl ".Fl o Fl"
+.Dl ".Nm du Op Fl H | L | P"
+.Dl ".Nm ls Op Fl 1AaCcdFfgHhikLlmnopqRrSsTtux"
+.Dl ".Nm route Cm add Fl inet Ar destination gateway"
+.Dl ".Nm locate.updatedb Op Fl \e-fcodes Ns = Ns Ar dbfile"
+.Dl ".Nm aucat Fl o Fl"
+.Dl ".Nm kill Fl Ar signal_number"
+.Pp
+For GNU-sytle long options, escaping the additional hyphen-minus is not
+strictly required, but may be safer with future versions of GNU troff; see
+.Xr mandoc_char 5
+for details.
.Pp
See also
.Ic \&Cm .
+.Tg Fn
.It Ic \&Fn Ar funcname Op Ar argument ...
A function name.
.Pp
@@ -1692,6 +1741,7 @@ See also
.Ic \&Fo ,
and
.Ic \&Ft .
+.Tg Fo
.It Ic \&Fo Ar funcname
Begin a function block.
This is a multi-line version of
@@ -1726,6 +1776,7 @@ This macro is obsolete.
No replacement markup is needed.
.Pp
It was used to show numerical function return values in an italic font.
+.Tg Ft
.It Ic \&Ft Ar functype
A function type.
.Pp
@@ -1745,6 +1796,7 @@ See also
.Ic \&Fn ,
and
.Ic \&Fo .
+.Tg Fx
.It Ic \&Fx Op Ar version
Format the
.Fx
@@ -1767,11 +1819,12 @@ and
This macro is not implemented in
.Xr mandoc 1 .
It was used to include the contents of a (header) file literally.
+.Tg Ic
.It Ic \&Ic Ar keyword ...
-Designate an internal or interactive command.
-This is similar to
-.Ic \&Cm
-but used for instructions rather than values.
+Internal or interactive command, or configuration instruction
+in a configuration file.
+See also
+.Ic \&Cm .
.Pp
Examples:
.Dl \&.Ic :wq
@@ -1786,6 +1839,7 @@ or
is preferred for displaying code samples; the
.Ic \&Ic
macro is used when referring to an individual command name.
+.Tg In
.It Ic \&In Ar filename
The name of an include file.
This macro is most often used in section 2, 3, and 9 manual pages.
@@ -1805,6 +1859,7 @@ Examples:
.Pp
See also
.Sx MANUAL STRUCTURE .
+.Tg It
.It Ic \&It Op Ar head
A list item.
The syntax of this macro depends on the list type.
@@ -1895,6 +1950,7 @@ but not the whitespace before the semicolon.
.Pp
See also
.Ic \&Bl .
+.Tg Lb
.It Ic \&Lb Cm lib Ns Ar name
Specify a library.
.Pp
@@ -1914,7 +1970,8 @@ section as described in
.Pp
Examples:
.Dl \&.Lb libz
-.Dl \&.Lb mdoc
+.Dl \&.Lb libmandoc
+.Tg Li
.It Ic \&Li Ar word ...
Request a typewriter (literal) font.
Deprecated because on terminal output devices, this is usually
@@ -1925,24 +1982,27 @@ For literal displays, use
or
.Ic \&Bd Fl literal Pq multi-line
instead.
+.Tg Lk
.It Ic \&Lk Ar uri Op Ar display_name
Format a hyperlink.
.Pp
Examples:
-.Dl \&.Lk http://bsd.lv \(dqThe BSD.lv Project\(dq
-.Dl \&.Lk http://bsd.lv
+.Dl \&.Lk https://bsd.lv \(dqThe BSD.lv Project\(dq
+.Dl \&.Lk https://bsd.lv
.Pp
See also
.Ic \&Mt .
.It Ic \&Lp
Deprecated synonym for
.Ic \&Pp .
+.Tg Ms
.It Ic \&Ms Ar name
Display a mathematical symbol.
.Pp
Examples:
.Dl \&.Ms sigma
.Dl \&.Ms aleph
+.Tg Mt
.It Ic \&Mt Ar localpart Ns @ Ns Ar domain
Format a
.Dq mailto:
@@ -1951,6 +2011,7 @@ hyperlink.
Examples:
.Dl \&.Mt discuss@manpages.bsd.lv
.Dl \&.An Kristaps Dzonsons \&Aq \&Mt kristaps@bsd.lv
+.Tg Nd
.It Ic \&Nd Ar line
A one line description of the manual's content.
This is the mandatory last macro of the
@@ -1973,6 +2034,7 @@ arguments and will display macros verbatim.
.Pp
See also
.Ic \&Nm .
+.Tg Nm
.It Ic \&Nm Op Ar name
The name of the manual page, or \(em in particular in section 1
pages \(em of an additional command or feature documented in
@@ -2010,6 +2072,7 @@ of section 2, 3 and 9 manual pages, use the
macro rather than
.Ic \&Nm
to mark up the name of the manual page.
+.Tg No
.It Ic \&No Ar word ...
Normal text.
Closes the scope of any preceding in-line macro.
@@ -2034,6 +2097,7 @@ See also
.Ic \&Ql ,
and
.Ic \&Sy .
+.Tg Ns
.It Ic \&Ns
Suppress a space between the output of the preceding macro
and the following text or macro.
@@ -2053,6 +2117,7 @@ See also
.Ic \&No
and
.Ic \&Sm .
+.Tg Nx
.It Ic \&Nx Op Ar version
Format the
.Nx
@@ -2085,6 +2150,7 @@ Examples:
\&.Op Fl flag Ns Ar value
\&.Oc
.Ed
+.Tg Op
.It Ic \&Op Ar line
Optional part of a command line.
Prints the argument(s) in brackets.
@@ -2098,6 +2164,7 @@ Examples:
.Pp
See also
.Ic \&Oo .
+.Tg Os
.It Ic \&Os Op Ar system Op Ar version
Operating system version for display in the page footer.
This is the mandatory third macro of
@@ -2140,6 +2207,7 @@ Historical
.Nm
packages described it as
.Dq "old function type (FORTRAN)" .
+.Tg Ox
.It Ic \&Ox Op Ar version
Format the
.Ox
@@ -2158,6 +2226,7 @@ See also
.Ic \&Fx ,
and
.Ic \&Nx .
+.Tg Pa
.It Ic \&Pa Ar name ...
An absolute or relative file system path, or a file or directory name.
If an argument is not provided, the character
@@ -2173,6 +2242,7 @@ See also
.It Ic \&Pc
Close parenthesised context opened by
.Ic \&Po .
+.Tg Pf
.It Ic \&Pf Ar prefix macro Op Ar argument ...
Removes the space between its argument and the following macro.
It is equivalent to:
@@ -2196,6 +2266,7 @@ and
.It Ic \&Po Ar block
Multi-line version of
.Ic \&Pq .
+.Tg Pp
.It Ic \&Pp
Break a paragraph.
This will assert vertical space between prior and subsequent macros
@@ -2212,6 +2283,7 @@ or lists
unless the
.Fl compact
flag is given.
+.Tg Pq
.It Ic \&Pq Ar line
Parenthesised enclosure.
.Pp
@@ -2220,6 +2292,7 @@ See also
.It Ic \&Qc
Close quoted context opened by
.Ic \&Qo .
+.Tg Ql
.It Ic \&Ql Ar line
In-line literal display.
This can be used for complete command invocations and for multi-word
@@ -2233,6 +2306,7 @@ and
.It Ic \&Qo Ar block
Multi-line version of
.Ic \&Qq .
+.Tg Qq
.It Ic \&Qq Ar line
Encloses its arguments in
.Qq typewriter
@@ -2250,6 +2324,7 @@ Close an
.Ic \&Rs
block.
Does not have any tail arguments.
+.Tg Rs
.It Ic \&Rs
Begin a bibliographic
.Pq Dq reference
@@ -2290,6 +2365,7 @@ If an
block is used within a SEE ALSO section, a vertical space is asserted
before the rendered output, else the block continues on the current
line.
+.Tg Rv
.It Ic \&Rv Fl std Op Ar function ...
Insert a standard sentence regarding a function call's return value of 0
on success and \-1 on error, with the
@@ -2310,6 +2386,7 @@ See also
.It Ic \&Sc
Close single-quoted context opened by
.Ic \&So .
+.Tg Sh
.It Ic \&Sh Ar TITLE LINE
Begin a new section.
For a list of conventional manual sections, see
@@ -2328,6 +2405,7 @@ See also
.Ic \&Ss ,
and
.Ic \&Sx .
+.Tg Sm
.It Ic \&Sm Op Cm on | off
Switches the spacing mode for output generated from macros.
.Pp
@@ -2346,6 +2424,7 @@ Using this is not recommended because it makes the code harder to read.
.It Ic \&So Ar block
Multi-line version of
.Ic \&Sq .
+.Tg Sq
.It Ic \&Sq Ar line
Encloses its arguments in
.Sq typewriter
@@ -2356,6 +2435,7 @@ See also
.Ic \&Qq ,
and
.Ic \&So .
+.Tg Ss
.It Ic \&Ss Ar Title line
Begin a new subsection.
Unlike with
@@ -2378,6 +2458,7 @@ See also
.Ic \&Sh ,
and
.Ic \&Sx .
+.Tg St
.It Ic \&St Fl Ns Ar abbreviation
Replace an abbreviation for a standard with the full form.
The following standards are recognised.
@@ -2588,6 +2669,7 @@ Ethernet local area networks.
.St -ieee1275-94
.El
.El
+.Tg Sx
.It Ic \&Sx Ar Title line
Reference a section or subsection in the same manual page.
The referenced section or subsection name must be identical to the
@@ -2600,6 +2682,7 @@ See also
.Ic \&Sh
and
.Ic \&Ss .
+.Tg Sy
.It Ic \&Sy Ar word ...
Request a boldface font.
.Pp
@@ -2625,11 +2708,56 @@ See also
.Ic \&No ,
and
.Ic \&Ql .
+.Tg Ta
.It Ic \&Ta
Table cell separator in
.Ic \&Bl Fl column
lists; can only be used below
.Ic \&It .
+.Tg Tg
+.It Ic \&Tg Op Ar term
+Announce that the next input line starts a definition of the
+.Ar term .
+This macro must appear alone on its own input line.
+The argument defaults to the first argument of the first macro
+on the next line.
+The argument may not contain whitespace characters, not even when it is quoted.
+This macro is a
+.Xr mandoc 1
+extension and is typically ignored by other formatters.
+.Pp
+When viewing terminal output with
+.Xr less 1 ,
+the interactive
+.Ic :t
+command can be used to go to the definition of the
+.Ar term
+as described for the
+.Ev MANPAGER
+variable in
+.Xr man 1 ;
+when producing HTML output, a fragment identifier
+.Pq Ic id No attribute
+is generated, to be used for deep linking to this place of the document.
+.Pp
+In most cases, adding a
+.Ic \&Tg
+macro would be redundant because
+.Xr mandoc 1
+is able to automatically tag most definitions.
+This macro is intended for cases where automatic tagging of a
+.Ar term
+is unsatisfactory, for example if a definition is not tagged
+automatically (false negative) or if places are tagged that do
+not define the
+.Ar term
+(false positives).
+When there is at least one
+.Ic \&Tg
+macro for a
+.Ar term ,
+no other places are automatically marked as definitions of that
+.Ar term .
.It Ic \&Tn Ar word ...
Supported only for compatibility, do not use this in new manuals.
Even though the macro name
@@ -2644,6 +2772,7 @@ Prints out
Supported only for compatibility, do not use this in new manuals.
Prints out
.Dq Ux .
+.Tg Va
.It Ic \&Va Oo Ar type Oc Ar identifier ...
A variable name.
.Pp
@@ -2658,6 +2787,7 @@ For declarations of global variables in the
.Em SYNOPSIS
section, use
.Ic \&Vt .
+.Tg Vt
.It Ic \&Vt Ar type Op Ar identifier
A variable type.
.Pp
@@ -2701,6 +2831,7 @@ beyond the end of the input line.
This macro originally existed to work around the 9-argument limit
of historic
.Xr mandoc_roff 5 .
+.Tg Xr
.It Ic \&Xr Ar name section
Link to another manual
.Pq Qq cross-reference .
@@ -2763,7 +2894,7 @@ column, if applicable, describes closure rules.
.Ss Block full-explicit
Multi-line scope closed by an explicit closing macro.
All macros contains bodies; only
-.Ic \s&Bf
+.Ic \&Bf
and
.Pq optionally
.Ic \&Bl
@@ -2994,6 +3125,7 @@ then the macro accepts an arbitrary number of arguments.
.It Ic \&St Ta \&No Ta Yes Ta 1
.It Ic \&Sx Ta Yes Ta Yes Ta >0
.It Ic \&Sy Ta Yes Ta Yes Ta >0
+.It Ic \&Tg Ta \&No Ta \&No Ta <2
.It Ic \&Tn Ta Yes Ta Yes Ta >0
.It Ic \&Ud Ta \&No Ta \&No Ta 0
.It Ic \&Ux Ta Yes Ta Yes Ta n
@@ -3060,7 +3192,7 @@ exclamation mark
Note that even a period preceded by a backslash
.Pq Sq \e.\&
gets this special handling; use
-.Sq \e&.
+.Sq \e&.\&
to prevent that.
.Pp
Many in-line macros interrupt their scope when they encounter
@@ -3087,6 +3219,13 @@ in the same way as a plain
.Sq \&|
character.
Using this predefined string is not recommended in new manuals.
+.Pp
+Appending a zero-width space
+.Pq Sq \e&
+to the end of an input line is also useful to prevent the interpretation
+of a trailing period, exclamation or question mark as the end of a
+sentence, for example when an abbreviation happens to occur
+at the end of a text or macro input line.
.Ss Font handling
In
.Nm
@@ -3114,17 +3253,6 @@ The following problematic behaviour is found in groff:
.Pp
.Bl -dash -compact
.It
-.Ic \&Dd
-with non-standard arguments behaves very strangely.
-When there are three arguments, they are printed verbatim.
-Any other number of arguments is replaced by the current date,
-but without any arguments the string
-.Dq Epoch
-is printed.
-.It
-.Ic \&Lk
-only accepts a single link-name argument; the remainder is misformatted.
-.It
.Ic \&Pa
does not format its arguments when used in the FILES section under
certain list types.
@@ -3132,9 +3260,6 @@ certain list types.
.Ic \&Ta
can only be called by other macros, but not at the beginning of a line.
.It
-.Ic \&%C
-is not implemented (up to and including groff-1.22.2).
-.It
.Sq \ef
.Pq font face
and
@@ -3184,10 +3309,16 @@ but produces large indentations.
.Xr tbl 5
.Pp
The web page
-.Lk http://mandoc.bsd.lv/mdoc/ "extended documentation for the mdoc language"
+.Lk https://mandoc.bsd.lv/mdoc/ "extended documentation for the mdoc language"
provides a few tutorial-style pages for beginners, an extensive style
guide for advanced authors, and an alphabetic index helping to choose
the best macros for various kinds of content.
+.Pp
+The manual page
+.Lk https://man.voidlinux.org/groff_mdoc "groff_mdoc(7)"
+contained in the
+.Dq groff
+package documents exactly the same language in a somewhat different style.
.Sh HISTORY
The
.Nm
diff --git a/usr/src/man/man5/tbl.5 b/usr/src/man/man5/tbl.5
index 21cb9ddcdd..4bbeb9379e 100644
--- a/usr/src/man/man5/tbl.5
+++ b/usr/src/man/man5/tbl.5
@@ -1,4 +1,4 @@
-.\" $Id: tbl.7,v 1.34 2019/03/02 21:03:02 schwarze Exp $
+.\" $Id: tbl.7,v 1.37 2021/09/18 12:34:27 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2014,2015,2017,2018,2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: March 2 2019 $
+.Dd $Mdocdate: September 18 2021 $
.Dt TBL 5
.Os
.Sh NAME
@@ -94,7 +94,7 @@ Allow page breaks within the table.
This is a GNU extension and currently ignored.
.It Cm nospaces
Ignore leading and trailing spaces in data cells.
-This is a GNU extension and currently ignored.
+This is a GNU extension.
.It Cm nowarn
Suppress warnings about tables exceeding the current line length.
This is a GNU extension and currently ignored.
@@ -178,10 +178,11 @@ of any other column also having the
.Cm e
modifier.
.It Cm f
-The next character selects the font to use for this cell.
+The next one or two characters select the font to use for this cell.
+One-character font names must be followed by a blank or period.
See the
.Xr mandoc_roff 5
-manual for supported one-character font names.
+manual for supported font names.
.It Cm i
Use an italic font for the contents of this cell.
.It Cm m
@@ -416,7 +417,7 @@ equations inside tables.
.Xr mdoc 5
.Rs
.%A M. E. Lesk
-.%T Tbl\(emA Program to Format Tables
+.%T Tbl \(em A Program to Format Tables
.%D June 11, 1976
.Re
.Sh HISTORY