Home Man
Today's Posts

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:
Select Section of Man Page:
Select Man Page Repository:

NetBSD 6.1.5 - man page for mandoc_mdoc (netbsd section 7)

MDOC(7) 		       BSD Miscellaneous Information Manual			  MDOC(7)

     mdoc -- semantic markup language for formatting manual pages

     The mdoc language supports authoring of manual pages for the man(1) utility by allowing
     semantic annotations of words, phrases, page sections and complete manual pages.  Such anno-
     tations are used by formatting tools to achieve a uniform presentation across all manuals
     written in mdoc, and to support hyperlinking if supported by the output medium.

     This reference document describes the structure of manual pages and the syntax and usage of
     the mdoc language.  The reference implementation of a parsing and formatting tool is
     mandoc(1); the COMPATIBILITY section describes compatibility with other implementations.

     In an mdoc document, lines beginning with the control character '.' are called ``macro
     lines''.  The first word is the macro name.  It consists of two or three letters.	Most
     macro names begin with a capital letter.  For a list of available macros, see MACRO
     OVERVIEW.	The words following the macro name are arguments to the macro, optionally includ-
     ing the names of other, callable macros; see MACRO SYNTAX for details.

     Lines not beginning with the control character are called ``text lines''.	They provide
     free-form text to be printed; the formatting of the text depends on the respective process-
     ing context:

	   .Sh Macro lines change control state.
	   Text lines are interpreted within the current state.

     Many aspects of the basic syntax of the mdoc language are based on the roff(7) language; see
     the LANGUAGE SYNTAX and MACRO SYNTAX sections in the roff(7) manual for details, in particu-
     lar regarding comments, escape sequences, whitespace, and quoting.  However, using roff(7)
     requests in mdoc documents is discouraged; mandoc(1) supports some of them merely for back-
     ward compatibility.

     A well-formed mdoc document consists of a document prologue followed by one or more sec-

     The prologue, which consists of the Dd, Dt, and Os macros in that order, is required for
     every document.

     The first section (sections are denoted by Sh) must be the NAME section, consisting of at
     least one Nm followed by Nd.

     Following that, convention dictates specifying at least the SYNOPSIS and DESCRIPTION sec-
     tions, although this varies between manual sections.

     The following is a well-formed skeleton mdoc file for a utility "progname":

	   .Dd $Mdocdate$
	   .Dt PROGNAME section
	   .Sh NAME
	   .Nm progname
	   .Nd one line about what it does
	   .\" .Sh LIBRARY
	   .\" For sections 2, 3, & 9 only.
	   .\" Not used in OpenBSD.
	   .Nm progname
	   .Op Fl options
	   utility processes files ...
	   .\" Not used in OpenBSD.
	   .\" For sections 2, 3, & 9 only.
	   .\" For sections 1, 6, 7, & 8 only.
	   .\" .Sh FILES
	   .\" .Sh EXIT STATUS
	   .\" For sections 1, 6, & 8 only.
	   .\" .Sh EXAMPLES
	   .\" For sections 1, 4, 6, 7, & 8 only.
	   .\" .Sh ERRORS
	   .\" For sections 2, 3, & 9 only.
	   .\" .Sh SEE ALSO
	   .\" .Xr foobar 1
	   .\" .Sh STANDARDS
	   .\" .Sh HISTORY
	   .\" .Sh AUTHORS
	   .\" .Sh CAVEATS
	   .\" .Sh BUGS
	   .\" Not used in OpenBSD.

     The sections in an mdoc document are conventionally ordered as they appear above.	Sections
     should be composed as follows:

	   The name(s) and a one line description of the documented material.  The syntax for
	   this as follows:

		 .Nm name0 ,
		 .Nm name1 ,
		 .Nm name2
		 .Nd a one line description

	   Multiple 'Nm' names should be separated by commas.

	   The Nm macro(s) must precede the Nd macro.

	   See Nm and Nd.

	   The name of the library containing the documented material, which is assumed to be a
	   function in a section 2, 3, or 9 manual.  The syntax for this is as follows:

		 .Lb libarm

	   See Lb.

	   Documents the utility invocation syntax, function call syntax, or device configura-

	   For the first, utilities (sections 1, 6, and 8), this is generally structured as fol-

		 .Nm bar
		 .Op Fl v
		 .Op Fl o Ar file
		 .Op Ar
		 .Nm foo
		 .Op Fl v
		 .Op Fl o Ar file
		 .Op Ar

	   Commands should be ordered alphabetically.

	   For the second, function calls (sections 2, 3, 9):

		 .In header.h
		 .Vt extern const char *global;
		 .Ft "char *"
		 .Fn foo "const char *src"
		 .Ft "char *"
		 .Fn bar "const char *src"

	   Ordering of In, Vt, Fn, and Fo macros should follow C header-file conventions.

	   And for the third, configurations (section 4):

		 .Cd "it* at isa? port 0x2e"
		 .Cd "it* at isa? port 0x4e"

	   Manuals not in these sections generally don't need a SYNOPSIS.

	   Some macros are displayed differently in the SYNOPSIS section, particularly Nm, Cd,
	   Fd, Fn, Fo, In, Vt, and Ft.	All of these macros are output on their own line.  If two
	   such dissimilar macros are pairwise invoked (except for Ft before Fo or Fn), they are
	   separated by a vertical space, unless in the case of Fo, Fn, and Ft, which are always
	   separated by vertical space.

	   When text and macros following an Nm macro starting an input line span multiple output
	   lines, all output lines but the first will be indented to align with the text immedi-
	   ately following the Nm macro, up to the next Nm, Sh, or Ss macro or the end of an
	   enclosing block, whichever comes first.

	   This begins with an expansion of the brief, one line description in NAME:

		 utility does this, that, and the other.

	   It usually follows with a breakdown of the options (if documenting a command), such

		 The arguments are as follows:
		 .Bl -tag -width Ds
		 .It Fl v
		 Print verbose information.

	   Manuals not documenting a command won't include the above fragment.

	   Since the DESCRIPTION section usually contains most of the text of a manual, longer
	   manuals often use the Ss macro to form subsections.	In very long manuals, the
	   DESCRIPTION may be split into multiple sections, each started by an Sh macro followed
	   by a non-standard section name, and each having several subsections, like in the
	   present mdoc manual.

	   Implementation-specific notes should be kept here.  This is useful when implementing
	   standard functions that may have side effects or notable algorithmic implications.

	   This section documents the return values of functions in sections 2, 3, and 9.

	   See Rv.

	   Lists the environment variables used by the utility, and explains the syntax and
	   semantics of their values.  The environ(7) manual provides examples of typical content
	   and formatting.

	   See Ev.

	   Documents files used.  It's helpful to document both the file name and a short
	   description of how the file is used (created, modified, etc.).

	   See Pa.

	   This section documents the command exit status for section 1, 6, and 8 utilities.
	   Historically, this information was described in DIAGNOSTICS, a practise that is now

	   See Ex.

	   Example usages.  This often contains snippets of well-formed, well-tested invocations.
	   Make sure that examples work properly!

	   Documents error conditions.	This is most useful in section 4 manuals.  Historically,
	   this section was used in place of EXIT STATUS for manuals in sections 1, 6, and 8;
	   however, this practise is discouraged.

	   See Bl -diag.

	   Documents error handling in sections 2, 3, and 9.

	   See Er.

	   References other manuals with related topics.  This section should exist for most man-
	   uals.  Cross-references should conventionally be ordered first by section, then alpha-

	   References to other documentation concerning the topic of the manual page, for example
	   authoritative books or journal articles, may also be provided in this section.

	   See Rs and Xr.

	   References any standards implemented or used.  If not adhering to any standards, the
	   HISTORY section should be used instead.

	   See St.

	   A brief history of the subject, including where it was first implemented, and when it
	   was ported to or reimplemented for the operating system at hand.

	   Credits to the person or persons who wrote the code and/or documentation.  Authors
	   should generally be noted by both name and email address.

	   See An.

	   Common misuses and misunderstandings should be explained in this section.

	   Known bugs, limitations, and work-arounds should be described in this section.

	   Documents any security precautions that operators should consider.

     This overview is sorted such that macros of similar purpose are listed together, to help
     find the best macro for any given purpose.  Deprecated macros are not included in the over-
     view, but can be found below in the alphabetical MACRO REFERENCE.

   Document preamble and NAME section macros
     Dd 	      document date: $Mdocdate$ | month day, year
     Dt 	      document title: TITLE section [volume | arch]
     Os 	      operating system version: [system [version]]
     Nm 	      document name (one argument)
     Nd 	      document description (one line)

   Sections and cross references
     Sh 	      section header (one line)
     Ss 	      subsection header (one line)
     Sx 	      internal cross reference to a section or subsection
     Xr 	      cross reference to another manual page: name section
     Pp, Lp	      start a text paragraph (no arguments)

   Displays and lists
     Bd, Ed	      display block: -type [-offset width] [-compact]
     D1 	      indented display (one line)
     Dl 	      indented literal display (one line)
     Bl, El	      list block: -type [-width val] [-offset val] [-compact]
     It 	      list item (syntax depends on -type)
     Ta 	      table cell separator in Bl -column lists
     Rs, %*, Re       bibliographic block (references)

   Spacing control
     Pf 	      prefix, no following horizontal space (one argument)
     Ns 	      roman font, no preceding horizontal space (no arguments)
     Ap 	      apostrophe without surrounding whitespace (no arguments)
     Sm 	      switch horizontal spacing mode: on | off
     Bk, Ek	      keep block: -words
     br 	      force output line break in text mode (no arguments)
     sp 	      force vertical space: [height]

   Semantic markup for command line utilities:
     Nm 	      start a SYNOPSIS block with the name of a utility
     Fl 	      command line options (flags) (>=0 arguments)
     Cm 	      command modifier (>0 arguments)
     Ar 	      command arguments (>=0 arguments)
     Op, Oo, Oc       optional syntax elements (enclosure)
     Ic 	      internal or interactive command (>0 arguments)
     Ev 	      environmental variable (>0 arguments)
     Pa 	      file system path (>=0 arguments)

   Semantic markup for function libraries:
     Lb 	      function library (one argument)
     In 	      include file (one argument)
     Ft 	      function type (>0 arguments)
     Fo, Fc	      function block: funcname
     Fn 	      function name: [functype] funcname [[argtype] argname]
     Fa 	      function argument (>0 arguments)
     Vt 	      variable type (>0 arguments)
     Va 	      variable name (>0 arguments)
     Dv 	      defined variable or preprocessor constant (>0 arguments)
     Er 	      error constant (>0 arguments)
     Ev 	      environmental variable (>0 arguments)

   Various semantic markup:
     An 	      author name (>0 arguments)
     Lk 	      hyperlink: uri [name]
     Mt 	      ``mailto'' hyperlink: address
     Cd 	      kernel configuration declaration (>0 arguments)
     Ad 	      memory address (>0 arguments)
     Ms 	      mathematical symbol (>0 arguments)
     Tn 	      tradename (>0 arguments)

   Physical markup
     Em 	      italic font or underline (emphasis) (>0 arguments)
     Sy 	      boldface font (symbolic) (>0 arguments)
     Li 	      typewriter font (literal) (>0 arguments)
     No 	      return to roman font (normal) (no arguments)
     Bf, Ef	      font block: [-type | Em | Li | Sy]

   Physical enclosures
     Dq, Do, Dc       enclose in typographic double quotes: ``text''
     Qq, Qo, Qc       enclose in typewriter double quotes: "text"
     Sq, So, Sc       enclose in single quotes: 'text'
     Ql 	      single-quoted literal text: 'text'
     Pq, Po, Pc       enclose in parentheses: (text)
     Bq, Bo, Bc       enclose in square brackets: [text]
     Brq, Bro, Brc    enclose in curly braces: {text}
     Aq, Ao, Ac       enclose in angle brackets: <text>
     Eo, Ec	      generic enclosure

   Text production
     Ex -std	      standard command exit values: [utility ...]
     Rv -std	      standard function return values: [function ...]
     St 	      reference to a standards document (one argument)
     Ux 	      UNIX
     At 	      AT&T UNIX
     Bx 	      BSD
     Bsx	      BSD/OS
     Nx 	      NetBSD
     Fx 	      FreeBSD
     Ox 	      OpenBSD
     Dx 	      DragonFly

     This section is a canonical reference of all macros, arranged alphabetically.  For the scop-
     ing of individual macros, see MACRO SYNTAX.

     Author name of an Rs block.  Multiple authors should each be accorded their own %A line.
     Author names should be ordered with full or abbreviated forename(s) first, then full sur-

     Book title of an Rs block.  This macro may also be used in a non-bibliographic context when
     referring to book titles.

     Publication city or location of an Rs block.

     Publication date of an Rs block.  Recommended formats of arguments are month day, year or
     just year.

     Publisher or issuer name of an Rs block.

     Journal name of an Rs block.

     Issue number (usually for journals) of an Rs block.

     Optional information of an Rs block.

     Book or journal page number of an Rs block.

     Institutional author (school, government, etc.) of an Rs block.  Multiple institutional
     authors should each be accorded their own %Q line.

     Technical report name of an Rs block.

     Article title of an Rs block.  This macro may also be used in a non-bibliographical context
     when referring to article titles.

     URI of reference document.

     Volume number of an Rs block.

     Close an Ao block.  Does not have any tail arguments.

     Memory address.  Do not use this for postal addresses.

	   .Ad [0,$]
	   .Ad 0x00000000

     Author name.  Can be used both for the authors of the program, function, or driver docu-
     mented in the manual, or for the authors of the manual itself.  Requires either the name of
     an author or one of the following arguments:

	   -split     Start a new output line before each subsequent invocation of An.
	   -nosplit   The opposite of -split.

     The default is -nosplit.  The effect of selecting either of the -split modes ends at the
     beginning of the AUTHORS section.	In the AUTHORS section, the default is -nosplit for the
     first author listing and -split for all other author listings.

	   .An -nosplit
	   .An Kristaps Dzonsons Aq kristaps@bsd.lv

     Begin a block enclosed by angle brackets.	Does not have any head arguments.

	   .Fl -key= Ns Ao Ar val Ac

     See also Aq.

     Inserts an apostrophe without any surrounding whitespace.	This is generally used as a gram-
     matical device when referring to the verb form of a function.

	   .Fn execve Ap d

     Encloses its arguments in angle brackets.

	   .Fl -key= Ns Aq Ar val

     Remarks: this macro is often abused for rendering URIs, which should instead use Lk or Mt,
     or to note pre-processor ``#include'' statements, which should use In.

     See also Ao.

     Command arguments.  If an argument is not provided, the string ``file ...'' is used as a

	   .Fl o Ar file
	   .Ar arg1 , arg2 .

     The arguments to the Ar macro are names and placeholders for command arguments; for fixed
     strings to be passed verbatim as arguments, use Fl or Cm.

     Formats an AT&T version.  Accepts one optional argument:

	   v[1-7] | 32v   A version of AT&T UNIX.
	   V[.[1-4]]?	  A version of AT&T System V UNIX.

     Note that these arguments do not begin with a hyphen.

	   .At III
	   .At V.1

     See also Bsx, Bx, Dx, Fx, Nx, Ox, and Ux.

     Close a Bo block.	Does not have any tail arguments.

     Begin a display block.  Its syntax is as follows:

	   .Bd -type [-offset width] [-compact]

     Display blocks are used to select a different indentation and justification than the one
     used by the surrounding text.  They may contain both macro lines and text lines.  By
     default, a display block is preceded by a vertical space.

     The type must be one of the following:

	   -centered	  Produce one output line from each input line, and centre-justify each
			  line.  Using this display type is not recommended; many mdoc implemen-
			  tations render it poorly.

	   -filled	  Change the positions of line breaks to fill each line, and left- and
			  right-justify the resulting block.

	   -literal	  Produce one output line from each input line, and do not justify the
			  block at all.  Preserve white space as it appears in the input.  Always
			  use a constant-width font.  Use this for displaying source code.

	   -ragged	  Change the positions of line breaks to fill each line, and left-justify
			  the resulting block.

	   -unfilled	  The same as -literal, but using the same font as for normal text, which
			  is a variable width font if supported by the output device.

     The type must be provided first.  Additional arguments may follow:

	   -offset width  Indent the display by the width, which may be one of the following:

			  One of the pre-defined strings indent, the width of a standard indenta-
			  tion (six constant width characters); indent-two, twice indent; left,
			  which has no effect; right, which justifies to the right margin; or
			  center, which aligns around an imagined centre axis.

			  A macro invocation, which selects a predefined width associated with
			  that macro.  The most popular is the imaginary macro Ds, which resolves
			  to 6n.

			  A width using the syntax described in Scaling Widths.

			  An arbitrary string, which indents by the length of this string.

			  When the argument is missing, -offset is ignored.

	   -compact	  Do not assert vertical space before the display.


	   .Bd -literal -offset indent -compact
	      Hello	  world.

     See also D1 and Dl.

     Change the font mode for a scoped block of text.  Its syntax is as follows:

	   .Bf [-emphasis | -literal | -symbolic | Em | Li | Sy]

     The -emphasis and Em argument are equivalent, as are -symbolic and Sy, and -literal and Li.
     Without an argument, this macro does nothing.  The font mode continues until broken by a new
     font mode in a nested scope or Ef is encountered.

     See also Li, Ef, Em, and Sy.

     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, whichever comes first.  Line breaks in text lines
     are unaffected.  The syntax is as follows:

	   .Bk -words

     The -words argument is required; additional arguments are ignored.

     The following example will not break within each Op macro line:

	   .Bk -words
	   .Op Fl f Ar flags
	   .Op Fl o Ar output

     Be careful in using over-long lines within a keep block!  Doing so will clobber the right

     Begin a list.  Lists consist of items specified using the It macro, containing a head or a
     body or both.  The list syntax is as follows:

	   .Bl -type [-width val] [-offset val] [-compact] [HEAD ...]

     The list type is mandatory and must be specified first.  The -width and -offset arguments
     accept Scaling Widths or use the length of the given string.  The -offset is a global inden-
     tation for the whole list, affecting both item heads and bodies.  For those list types sup-
     porting it, the -width argument requests an additional indentation of item bodies, to be
     added to the -offset.  Unless the -compact argument is specified, list entries are separated
     by vertical space.

     A list must specify one of the following list types:

	   -bullet	 No item heads can be specified, but a bullet will be printed at the head
			 of each item.	Item bodies start on the same output line as the bullet
			 and are indented according to the -width argument.

	   -column	 A columnated list.  The -width argument has no effect; instead, each
			 argument specifies the width of one column, using either the Scaling
			 Widths syntax or the string length of the argument.  If the first line
			 of the body of a -column list is not an It macro line, It contexts span-
			 ning one input line each are implied until an It macro line is encoun-
			 tered, at which point items start being interpreted as described in the
			 It documentation.

	   -dash	 Like -bullet, except that dashes are used in place of bullets.

	   -diag	 Like -inset, except that item heads are not parsed for macro invoca-
			 tions.  Most often used in the DIAGNOSTICS section with error constants
			 in the item heads.

	   -enum	 A numbered list.  No item heads can be specified.  Formatted like
			 -bullet, except that cardinal numbers are used in place of bullets,
			 starting at 1.

	   -hang	 Like -tag, except that the first lines of item bodies are not indented,
			 but follow the item heads like in -inset lists.

	   -hyphen	 Synonym for -dash.

	   -inset	 Item bodies follow items heads on the same line, using normal inter-word
			 spacing.  Bodies are not indented, and the -width argument is ignored.

	   -item	 No item heads can be specified, and none are printed.	Bodies are not
			 indented, and the -width argument is ignored.

	   -ohang	 Item bodies start on the line following item heads and are not indented.
			 The -width argument is ignored.

	   -tag 	 Item bodies are indented according to the -width argument.  When an item
			 head fits inside the indentation, the item body follows this head on the
			 same output line.  Otherwise, the body starts on the output line follow-
			 ing the head.

     Lists may be nested within lists and displays.  Nesting of -column and -enum lists may not
     be portable.

     See also El and It.

     Begin a block enclosed by square brackets.  Does not have any head arguments.

	   .Bo 1 ,
	   .Dv BUFSIZ Bc

     See also Bq.

     Encloses its arguments in square brackets.

	   .Bq 1, Dv BUFSIZ

     Remarks: this macro is sometimes abused to emulate optional arguments for commands; the cor-
     rect macros to use for this purpose are Op, Oo, and Oc.

     See also Bo.

     Close a Bro block.  Does not have any tail arguments.

     Begin a block enclosed by curly braces.  Does not have any head arguments.

	   .Bro 1 , ... ,
	   .Va n Brc

     See also Brq.

     Encloses its arguments in curly braces.

	   .Brq 1, ..., Va n

     See also Bro.

     Format the BSD/OS version provided as an argument, or a default value if no argument is pro-

	   .Bsx 1.0

     See also At, Bx, Dx, Fx, Nx, Ox, and Ux.

     Prints ``is currently in beta test.''

     Format the BSD version provided as an argument, or a default value if no argument is pro-

	   .Bx 4.3 Tahoe
	   .Bx 4.4

     See also At, Bsx, Dx, Fx, Nx, Ox, and Ux.

     Kernel configuration declaration.	This denotes strings accepted by config(8).  It is most
     often used in section 4 manual pages.

	   .Cd device le0 at scode?

     Remarks: this macro is commonly abused by using quoted literals to retain whitespace and
     align consecutive Cd declarations.  This practise is discouraged.

     Command modifiers.  Typically used for fixed strings passed as arguments, unless Fl is more
     appropriate.  Also useful when specifying configuration options or keys.

	   .Nm mt Fl f Ar device Cm rewind
	   .Nm ps Fl o Cm pid , Ns Cm command
	   .Nm dd Cm if= Ns Ar file1 Cm of= Ns Ar file2
	   .Cm IdentityFile Pa ~/.ssh/id_rsa
	   .Cm LogLevel Dv DEBUG

     One-line indented display.  This is formatted by the default rules and is useful for simple
     indented statements.  It is followed by a newline.

	   .D1 Fl abcdefgh

     See also Bd and Dl.

     Switch debugging mode.  Its syntax is as follows:

	   .Db on | off

     This macro is ignored by mandoc(1).

     Close a Do block.	Does not have any tail arguments.

     Document date.  This is the mandatory first macro of any mdoc manual.  Its syntax is as fol-

	   .Dd month day, year

     The month is the full English month name, the day is an optionally zero-padded numeral, and
     the year is the full four-digit year.

     Other arguments are not portable; the mandoc(1) utility handles them as follows:
	-   To have the date automatically filled in by the OpenBSD version of cvs(1), the spe-
	    cial string ``$Mdocdate$'' can be given as an argument.
	-   A few alternative date formats are accepted as well and converted to the standard
	-   If a date string cannot be parsed, it is used verbatim.
	-   If no date string is given, the current date is used.

	   .Dd $Mdocdate$
	   .Dd $Mdocdate: July 21 2007$
	   .Dd July 21, 2007

     See also Dt and Os.

     One-line intended display.  This is formatted as literal text and is useful for commands and
     invocations.  It is followed by a newline.

	   .Dl % mandoc mdoc.7 \(ba less

     See also Bd and D1.

     Begin a block enclosed by double quotes.  Does not have any head arguments.

	   April is the cruellest month
	   \(em T.S. Eliot

     See also Dq.

     Encloses its arguments in ``typographic'' double-quotes.

	   .Dq April is the cruellest month
	   \(em T.S. Eliot

     See also Qq, Sq, and Do.

     Document title.  This is the mandatory second macro of any mdoc file.  Its syntax is as fol-

	   .Dt [title [section [volume] [arch]]]

     Its arguments are as follows:

	   title   The document's title (name), defaulting to ``UNKNOWN'' if unspecified.  It
		   should be capitalised.

		   The manual section.	This may be one of 1 (utilities), 2 (system calls), 3
		   (libraries), 3p (Perl libraries), 4 (devices), 5 (file formats), 6 (games), 7
		   (miscellaneous), 8 (system utilities), 9 (kernel functions), X11 (X Window
		   System), X11R6 (X Window System), unass (unassociated), local (local system),
		   draft (draft manual), or paper (paper).  It should correspond to the manual's
		   filename suffix and defaults to ``1'' if unspecified.

	   volume  This overrides the volume inferred from section.  This field is optional, and
		   if specified, must be one of USD (users' supplementary documents), PS1
		   (programmers' supplementary documents), AMD (administrators' supplementary
		   documents), SMM (system managers' manuals), URM (users' reference manuals),
		   PRM (programmers' reference manuals), KM (kernel manuals), IND (master index),
		   MMI (master index), LOCAL (local manuals), LOC (local manuals), or CON
		   (contributed manuals).

	   arch    This specifies the machine architecture a manual page applies to, where rele-
		   vant, for example alpha, amd64, i386, or sparc64.  The list of supported
		   architectures varies by operating system.  For the full list of all architec-
		   tures recognized by mandoc(1), see the file arch.in in the source distribu-

	   .Dt FOO 1
	   .Dt FOO 4 KM
	   .Dt FOO 9 i386

     See also Dd and Os.

     Defined variables such as preprocessor constants, constant symbols, enumeration values, and
     so on.

	   .Dv NULL
	   .Dv BUFSIZ

     See also Er and Ev for special-purpose constants and Va for variable symbols.

     Format the DragonFly BSD version provided as an argument, or a default value if no argument
     is provided.

	   .Dx 2.4.1

     See also At, Bsx, Bx, Fx, Nx, Ox, and Ux.

     Close a scope started by Eo.  Its syntax is as follows:

	   .Ec [TERM]

     The TERM argument is used as the enclosure tail, for example, specifying \(rq will emulate

     End a display context started by Bd.

     End a font mode context started by Bf.

     End a keep context started by Bk.

     End a list context started by Bl.

     See also Bl and It.

     Denotes text that should be emphasised.  Note that this is a presentation term and should
     not be used for stylistically decorating technical terms.	Depending on the output device,
     this is usually represented using an italic font or underlined characters.

	   .Em Warnings!
	   .Em Remarks:

     See also Bf, Li, No, and Sy.

     This macro is obsolete and not implemented in mandoc(1).

     An arbitrary enclosure.  Its syntax is as follows:

	   .Eo [TERM]

     The TERM argument is used as the enclosure head, for example, specifying \(lq will emulate

     Error constants for definitions of the errno libc global variable.  This is most often used
     in section 2 and 3 manual pages.

	   .Er EPERM
	   .Er ENOENT

     See also Dv for general constants.

     This macro is obsolete and not implemented.

     Environmental variables such as those specified in environ(7).

	   .Ev PATH

     See also Dv for general constants.

     Insert a standard sentence regarding command exit values of 0 on success and >0 on failure.
     This is most often used in section 1, 6, and 8 manual pages.  Its syntax is as follows:

	   .Ex -std [utility ...]

     If utility is not specified, the document's name set by Nm is used.  Multiple utility argu-
     ments are treated as separate utilities.

     See also Rv.

     Function argument.  Its syntax is as follows:

	   .Fa [argtype] argname

     This may be invoked for names with or without the corresponding type.  It is also used to
     specify the field name of a structure.  Most often, the Fa macro is used in the SYNOPSIS
     within Fo section when documenting multi-line function prototypes.  If invoked with multiple
     arguments, the arguments are separated by a comma.  Furthermore, if the following macro is
     another Fa, the last argument will also have a trailing comma.

	   .Fa "const char *p"
	   .Fa "int a" "int b" "int c"
	   .Fa foo

     See also Fo.

     End a function context started by Fo.

     Historically used to document include files.  This usage has been deprecated in favour of
     In.  Do not use this macro.

     See also MANUAL STRUCTURE and In.

     Command-line flag or option.  Used when listing arguments to command-line utilities.  Prints
     a fixed-width hyphen '-' 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.

	   .Fl R Op Fl H | L | P
	   .Op Fl 1AaCcdFfgHhikLlmnopqRrSsTtux
	   .Fl type Cm d Fl name Pa CVS
	   .Fl Ar signal_number
	   .Fl o Fl

     See also Cm.

     A function name.  Its syntax is as follows:

	   .Fn [functype] funcname [[argtype] argname]

     Function arguments are surrounded in parenthesis and are delimited by commas.  If no argu-
     ments are specified, blank parenthesis are output.  In the SYNOPSIS section, this macro
     starts a new output line, and a blank line is automatically inserted between function defi-

	   .Fn "int funcname" "int arg0" "int arg1"
	   .Fn funcname "int arg0"
	   .Fn funcname arg0

	   .Ft functype
	   .Fn funcname

     When referring to a function documented in another manual page, use Xr instead.  See also
     MANUAL STRUCTURE, Fo, and Ft.

     Begin a function block.  This is a multi-line version of Fn.  Its syntax is as follows:

	   .Fo funcname

     Invocations usually occur in the following context:

	   .Ft functype
	   .Fo funcname
	   .Fa [argtype] argname

     A Fo scope is closed by Fc.

     See also MANUAL STRUCTURE, Fa, Fc, and Ft.

     This macro is obsolete and not implemented in mandoc(1).

     It was used to show function return values.  The syntax was:

	   .Fr value

     A function type.  Its syntax is as follows:

	   .Ft functype

     In the SYNOPSIS section, a new output line is started after this macro.

	   .Ft int
	   .Ft functype
	   .Fn funcname

     See also MANUAL STRUCTURE, Fn, and Fo.

     Format the FreeBSD version provided as an argument, or a default value if no argument is

	   .Fx 7.1

     See also At, Bsx, Bx, Dx, Nx, Ox, and Ux.

     This macro is not implemented in mandoc(1).

     It was used to include the contents of a (header) file literally.	The syntax was:

	   .Hf filename

     Designate an internal or interactive command.  This is similar to Cm but used for instruc-
     tions rather than values.

	   .Ic :wq
	   .Ic hash
	   .Ic alias

     Note that using Bd -literal or D1 is preferred for displaying code; the Ic macro is used
     when referring to specific instructions.

     An ``include'' file.  When invoked as the first macro on an input line in the SYNOPSIS sec-
     tion, the argument is displayed in angle brackets and preceded by ``#include'', and a blank
     line is inserted in front if there is a preceding function declaration.  This is most often
     used in section 2, 3, and 9 manual pages.

	   .In sys/types.h


     A list item.  The syntax of this macro depends on the list type.

     Lists of type -hang, -ohang, -inset, and -diag have the following syntax:

	   .It args

     Lists of type -bullet, -dash, -enum, -hyphen and -item have the following syntax:


     with subsequent lines interpreted within the scope of the It until either a closing El or
     another It.

     The -tag list has the following syntax:

	   .It [args]

     Subsequent lines are interpreted as with -bullet and family.  The line arguments correspond
     to the list's left-hand side; body arguments correspond to the list's contents.

     The -column list is the most complicated.	Its syntax is as follows:

	   .It cell [<TAB> cell ...]
	   .It cell [Ta cell ...]

     The arguments consist of one or more lines of text and macros representing a complete table
     line.  Cells within the line are delimited by tabs or by the special Ta block macro.  The
     tab cell delimiter may only be used within the It line itself; on following lines, only the
     Ta macro can be used to delimit cells, and Ta is only recognised as a macro when called by
     other macros, not as the first macro on a line.

     Note that quoted strings may span tab-delimited cells on an It line.  For example,

	   .It "col1; <TAB> col2 ;" ;

     will preserve the semicolon whitespace except for the last.

     See also Bl.

     Specify a library.  The syntax is as follows:

	   .Lb library

     The library parameter may be a system library, such as libz or libpam, in which case a small
     library description is printed next to the linker invocation; or a custom library, in which
     case the library name is printed in quotes.  This is most commonly used in the SYNOPSIS sec-
     tion as described in MANUAL STRUCTURE.

	   .Lb libz
	   .Lb mdoc

     Denotes text that should be in a literal font mode.  Note that this is a presentation term
     and should not be used for stylistically decorating technical terms.

     On terminal output devices, this is often indistinguishable from normal text.

     See also Bf, Em, No, and Sy.

     Format a hyperlink.  Its syntax is as follows:

	   .Lk uri [name]

	   .Lk http://bsd.lv "The BSD.lv Project"
	   .Lk http://bsd.lv

     See also Mt.

     Synonym for Pp.

     Display a mathematical symbol.  Its syntax is as follows:

	   .Ms symbol

	   .Ms sigma
	   .Ms aleph

     Format a ``mailto:'' hyperlink.  Its syntax is as follows:

	   .Mt address

	   .Mt discuss@manpages.bsd.lv

     A one line description of the manual's content.  This may only be invoked in the SYNOPSIS
     section subsequent the Nm macro.

	   .Nd mdoc language reference
	   .Nd format and display UNIX manuals

     The Nd macro technically accepts child macros and terminates with a subsequent Sh invoca-
     tion.  Do not assume this behaviour: some whatis(1) database generators are not smart enough
     to parse more than the line arguments and will display macros verbatim.

     See also Nm.

     The name of the manual page, or -- in particular in section 1, 6, and 8 pages -- of an addi-
     tional command or feature documented in the manual page.  When first invoked, the Nm macro
     expects a single argument, the name of the manual page.  Usually, the first invocation hap-
     pens in the NAME section of the page.  The specified name will be remembered and used when-
     ever the macro is called again without arguments later in the page.  The Nm macro uses Block
     full-implicit semantics when invoked as the first macro on an input line in the SYNOPSIS
     section; otherwise, it uses ordinary In-line semantics.


	   .Nm cat
	   .Op Fl benstuv
	   .Op Ar

     In the SYNOPSIS of section 2, 3 and 9 manual pages, use the Fn macro rather than Nm to mark
     up the name of the manual page.

     Normal text.  Closes the scope of any preceding in-line macro.  When used after physical
     formatting macros like Em or Sy, switches back to the standard font face and weight.  Can
     also be used to embed plain text strings in macro lines using semantic annotation macros.

	   .Em italic , Sy bold , No and roman

	   .Sm off
	   .Cm :C No / Ar pattern No / Ar replacement No /
	   .Sm on

     See also Em, Li, and Sy.

     Suppress a space between the output of the preceding macro and the following text or macro.
     Following invocation, input is interpreted as normal text just like after an No macro.

     This has no effect when invoked at the start of a macro line.

	   .Ar name Ns = Ns Ar value
	   .Cm :M Ns Ar pattern
	   .Fl o Ns Ar output

     See also No and Sm.

     Format the NetBSD version provided as an argument, or a default value if no argument is pro-

	   .Nx 5.01

     See also At, Bsx, Bx, Dx, Fx, Ox, and Ux.

     Close multi-line Oo context.

     Multi-line version of Op.

	   .Op Fl flag Ns Ar value

     Optional part of a command line.  Prints the argument(s) in brackets.  This is most often
     used in the SYNOPSIS section of section 1 and 8 manual pages.

	   .Op Fl a Ar b
	   .Op Ar a | b

     See also Oo.

     Document operating system version.  This is the mandatory third macro of any mdoc file.  Its
     syntax is as follows:

	   .Os [system [version]]

     The optional system parameter specifies the relevant operating system or environment.  Left
     unspecified, it defaults to the local operating system version.  This is the suggested form.

	   .Os BSD 4.3

     See also Dd and Dt.

     This macro is obsolete and not implemented in mandoc(1).

     Historical mdoc(7) packages described it as ``old function type (FORTRAN)''.

     Format the OpenBSD version provided as an argument, or a default value if no argument is

	   .Ox 4.5

     See also At, Bsx, Bx, Dx, Fx, Nx, and Ux.

     An absolute or relative file system path, or a file or directory name.  If an argument is
     not provided, the character '~' is used as a default.

	   .Pa /usr/bin/mandoc
	   .Pa /usr/share/man/man7/mdoc.7

     See also Lk.

     Close parenthesised context opened by Po.

     Removes the space between its argument (``prefix'') and the following macro.  Its syntax is
     as follows:

	   .Pf prefix macro arguments ...

     This is equivalent to:

	   .No prefix Ns macro arguments ...

	   .Pf $ Ar variable_name
	   .Pf 0x Ar hex_digits

     See also Ns and Sm.

     Multi-line version of Pq.

     Break a paragraph.  This will assert vertical space between prior and subsequent macros
     and/or text.

     Paragraph breaks are not needed before or after Sh or Ss macros or before displays (Bd) or
     lists (Bl) unless the -compact flag is given.

     Parenthesised enclosure.

     See also Po.

     Close quoted context opened by Qo.

     Format a single-quoted literal.  See also Qq and Sq.

     Multi-line version of Qq.

     Encloses its arguments in "typewriter" double-quotes.  Consider using Dq.

     See also Dq, Sq, and Qo.

     Close an Rs block.  Does not have any tail arguments.

     Begin a bibliographic (``reference'') block.  Does not have any head arguments.  The block
     macro may only contain %A, %B, %C, %D, %I, %J, %N, %O, %P, %Q, %R, %T, %U, and %V child
     macros (at least one must be specified).

	   .%A J. E. Hopcroft
	   .%A J. D. Ullman
	   .%B Introduction to Automata Theory, Languages, and Computation
	   .%I Addison-Wesley
	   .%C Reading, Massachusettes
	   .%D 1979

     If an Rs 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.

     Insert a standard sentence regarding a function call's return value of 0 on success and -1
     on error, with the errno libc global variable set on error.  Its syntax is as follows:

	   .Rv -std [function ...]

     If function is not specified, the document's name set by Nm is used.  Multiple function
     arguments are treated as separate functions.

     See also Ex.

     Close single-quoted context opened by So.

     Begin a new section.  For a list of conventional manual sections, see MANUAL STRUCTURE.
     These sections should be used unless it's absolutely necessary that custom sections be used.

     Section names should be unique so that they may be keyed by Sx.  Although this macro is
     parsed, it should not consist of child node or it may not be linked with Sx.

     See also Pp, Ss, and Sx.

     Switches the spacing mode for output generated from macros.  Its syntax is as follows:

	   .Sm on | off

     By default, spacing is on.  When switched off, no white space is inserted between macro
     arguments and between the output generated from adjacent macros, but text lines still get
     normal spacing between words and sentences.

     Multi-line version of Sq.

     Encloses its arguments in 'typewriter' single-quotes.

     See also Dq, Qq, and So.

     Begin a new subsection.  Unlike with Sh, there is no convention for the naming of subsec-
     tions.  Except DESCRIPTION, the conventional sections described in MANUAL STRUCTURE rarely
     have subsections.

     Sub-section names should be unique so that they may be keyed by Sx.  Although this macro is
     parsed, it should not consist of child node or it may not be linked with Sx.

     See also Pp, Sh, and Sx.

     Replace an abbreviation for a standard with the full form.  The following standards are

     -p1003.1-88      IEEE Std 1003.1-1988 (``POSIX.1'')
     -p1003.1-90      ISO/IEC 9945-1:1990 (``POSIX.1'')
     -p1003.1-96      ISO/IEC 9945-1:1996 (``POSIX.1'')
     -p1003.1-2001    IEEE Std 1003.1-2001 (``POSIX.1'')
     -p1003.1-2004    IEEE Std 1003.1-2004 (``POSIX.1'')
     -p1003.1-2008    IEEE Std 1003.1-2008 (``POSIX.1'')
     -p1003.1	      IEEE Std 1003.1 (``POSIX.1'')
     -p1003.1b-93     IEEE Std 1003.1b-1993 (``POSIX.1'')
     -p1003.1c-95     IEEE Std 1003.1c-1995 (``POSIX.1'')
     -p1003.1g-2000   IEEE Std 1003.1g-2000 (``POSIX.1'')
     -p1003.1i-95     IEEE Std 1003.1i-1995 (``POSIX.1'')
     -p1003.2-92      IEEE Std 1003.2-1992 (``POSIX.2'')
     -p1003.2a-92     IEEE Std 1003.2a-1992 (``POSIX.2'')
     -p1003.2	      IEEE Std 1003.2 (``POSIX.2'')
     -isoC	      ISO/IEC 9899:1990 (``ISO C90'')
     -isoC-90	      ISO/IEC 9899:1990 (``ISO C90'')
     -isoC-amd1       ISO/IEC 9899/AMD1:1995 (``ISO C90, Amendment 1'')
     -isoC-tcor1      ISO/IEC 9899/TCOR1:1994 (``ISO C90, Technical Corrigendum 1'')
     -isoC-tcor2      ISO/IEC 9899/TCOR2:1995 (``ISO C90, Technical Corrigendum 2'')
     -isoC-99	      ISO/IEC 9899:1999 (``ISO C99'')
     -iso9945-1-90    ISO/IEC 9945-1:1990 (``POSIX.1'')
     -iso9945-1-96    ISO/IEC 9945-1:1996 (``POSIX.1'')
     -iso9945-2-93    ISO/IEC 9945-2:1993 (``POSIX.2'')
     -ansiC	      ANSI X3.159-1989 (``ANSI C89'')
     -ansiC-89	      ANSI X3.159-1989 (``ANSI C89'')
     -ieee754	      IEEE Std 754-1985
     -iso8802-3       ISO/IEC 8802-3:1989
     -ieee1275-94     IEEE Std 1275-1994 (``Open Firmware'')
     -xpg3	      X/Open Portability Guide Issue 3 (``XPG3'')
     -xpg4	      X/Open Portability Guide Issue 4 (``XPG4'')
     -xpg4.2	      X/Open Portability Guide Issue 4, Version 2 (``XPG4.2'')
     -xbd5	      X/Open System Interface Definitions Issue 5 (``XBD5'')
     -xcu5	      X/Open Commands and Utilities Issue 5 (``XCU5'')
     -xsh5	      X/Open System Interfaces and Headers Issue 5 (``XSH5'')
     -xns5	      X/Open Networking Services Issue 5 (``XNS5'')
     -xns5.2	      X/Open Networking Services Issue 5.2 (``XNS5.2'')
     -xcurses4.2      X/Open Curses Issue 4, Version 2 (``XCURSES4.2'')
     -susv2	      Version 2 of the Single UNIX Specification (``SUSv2'')
     -susv3	      Version 3 of the Single UNIX Specification (``SUSv3'')
     -svid4	      System V Interface Definition, Fourth Edition (``SVID4'')

     Reference a section or subsection in the same manual page.  The referenced section or sub-
     section name must be identical to the enclosed argument, including whitespace.


     See also Sh and Ss.

     Format enclosed arguments in symbolic (``boldface'').  Note that this is a presentation term
     and should not be used for stylistically decorating technical terms.

     See also Bf, Em, Li, and No.

     Table cell separator in Bl -column lists; can only be used below It.

     Format a tradename.

     Since this macro is often implemented to use a small caps font, it has historically been
     used for acronyms (like ASCII) as well.  Such usage is not recommended because it would use
     the same macro sometimes for semantical annotation, sometimes for physical formatting.

	   .Tn IBM

     Prints out ``currently under development.''

     Format the UNIX name.  Accepts no argument.


     See also At, Bsx, Bx, Dx, Fx, Nx, and Ox.

     A variable name.

	   .Va foo
	   .Va const char *bar;

     A variable type.  This is also used for indicating global variables in the SYNOPSIS section,
     in which case a variable name is also specified.  Note that it accepts Block
     partial-implicit syntax when invoked as the first macro on an input line in the SYNOPSIS
     section, else it accepts ordinary In-line syntax.	In the former case, this macro starts a
     new output line, and a blank line is inserted in front if there is a preceding function def-
     inition or include directive.

     Note that this should not be confused with Ft, which is used for function return types.

	   .Vt unsigned char
	   .Vt extern const char * const sys_signame[] ;

     See also MANUAL STRUCTURE and Va.

     Close a scope opened by Xo.

     Extend the header of an It macro or the body of a partial-implicit block macro beyond the
     end of the input line.  This macro originally existed to work around the 9-argument limit of
     historic roff(7).

     Link to another manual ("cross-reference").  Its syntax is as follows:

	   .Xr name section

     The name and section are the name and section of the linked manual.  If section is followed
     by non-punctuation, an Ns is inserted into the token stream.  This behaviour is for compati-
     bility with GNU troff.

	   .Xr mandoc 1
	   .Xr mandoc 1 ;
	   .Xr mandoc 1 Ns s behaviour

     Emits a line-break.  This macro should not be used; it is implemented for compatibility with
     historical manuals.

     Consider using Pp in the event of natural paragraph breaks.

     Emits vertical space.  This macro should not be used; it is implemented for compatibility
     with historical manuals.  Its syntax is as follows:

	   .sp [height]

     The height argument must be formatted as described in Scaling Widths.  If unspecified, sp
     asserts a single vertical space.

     The syntax of a macro depends on its classification.  In this section, '-arg' refers to
     macro arguments, which may be followed by zero or more 'parm' parameters; 'Yo' opens the
     scope of a macro; and if specified, 'Yc' closes it out.

     The Callable column indicates that the macro may also be called by passing its name as an
     argument to another macro.  For example, '.Op Fl O Ar file' produces '[-O file]'.	To pre-
     vent a macro call and render the macro name literally, escape it by prepending a zero-width
     space, '\&'.  For example, 'Op \&Fl O' produces '[Fl O]'.	If a macro is not callable but
     its name appears as an argument to another macro, it is interpreted as opaque text.  For
     example, '.Fl Sh' produces '-Sh'.

     The Parsed column indicates whether the macro may call other macros by receiving their names
     as arguments.  If a macro is not parsed but the name of another macro appears as an argu-
     ment, it is interpreted as opaque text.

     The Scope column, if applicable, describes closure rules.

   Block full-explicit
     Multi-line scope closed by an explicit closing macro.  All macros contains bodies; only Bf
     and (optionally) Bl contain a head.

	   .Yo [-arg [parm...]] [head...]

	   Macro     Callable	  Parsed     Scope
	   Bd	     No 	  No	     closed by Ed
	   Bf	     No 	  No	     closed by Ef
	   Bk	     No 	  No	     closed by Ek
	   Bl	     No 	  No	     closed by El
	   Ed	     No 	  No	     opened by Bd
	   Ef	     No 	  No	     opened by Bf
	   Ek	     No 	  No	     opened by Bk
	   El	     No 	  No	     opened by Bl

   Block full-implicit
     Multi-line scope closed by end-of-file or implicitly by another macro.  All macros have bod-
     ies; some (It -bullet, -hyphen, -dash, -enum, -item) don't have heads; only one (It in Bl
     -column) has multiple heads.

	   .Yo [-arg [parm...]] [head... [Ta head...]]

	   Macro     Callable	  Parsed     Scope
	   It	     No 	  Yes	     closed by It, El
	   Nd	     No 	  No	     closed by Sh
	   Nm	     No 	  Yes	     closed by Nm, Sh, Ss
	   Sh	     No 	  Yes	     closed by Sh
	   Ss	     No 	  Yes	     closed by Sh, Ss

     Note that the Nm macro is a Block full-implicit macro only when invoked as the first macro
     in a SYNOPSIS section line, else it is In-line.

   Block partial-explicit
     Like block full-explicit, but also with single-line scope.  Each has at least a body and, in
     limited circumstances, a head (Fo, Eo) and/or tail (Ec).

	   .Yo [-arg [parm...]] [head...]
	   .Yc [tail...]

	   .Yo [-arg [parm...]] [head...] [body...] Yc [tail...]

	   Macro     Callable	  Parsed     Scope
	   Ac	     Yes	  Yes	     opened by Ao
	   Ao	     Yes	  Yes	     closed by Ac
	   Bc	     Yes	  Yes	     closed by Bo
	   Bo	     Yes	  Yes	     opened by Bc
	   Brc	     Yes	  Yes	     opened by Bro
	   Bro	     Yes	  Yes	     closed by Brc
	   Dc	     Yes	  Yes	     opened by Do
	   Do	     Yes	  Yes	     closed by Dc
	   Ec	     Yes	  Yes	     opened by Eo
	   Eo	     Yes	  Yes	     closed by Ec
	   Fc	     Yes	  Yes	     opened by Fo
	   Fo	     No 	  No	     closed by Fc
	   Oc	     Yes	  Yes	     closed by Oo
	   Oo	     Yes	  Yes	     opened by Oc
	   Pc	     Yes	  Yes	     closed by Po
	   Po	     Yes	  Yes	     opened by Pc
	   Qc	     Yes	  Yes	     opened by Oo
	   Qo	     Yes	  Yes	     closed by Oc
	   Re	     No 	  No	     opened by Rs
	   Rs	     No 	  No	     closed by Re
	   Sc	     Yes	  Yes	     opened by So
	   So	     Yes	  Yes	     closed by Sc
	   Xc	     Yes	  Yes	     opened by Xo
	   Xo	     Yes	  Yes	     closed by Xc

   Block partial-implicit
     Like block full-implicit, but with single-line scope closed by the end of the line.

	   .Yo [-arg [val...]] [body...] [res...]

	   Macro     Callable	  Parsed
	   Aq	     Yes	  Yes
	   Bq	     Yes	  Yes
	   Brq	     Yes	  Yes
	   D1	     No 	  Yes
	   Dl	     No 	  Yes
	   Dq	     Yes	  Yes
	   Op	     Yes	  Yes
	   Pq	     Yes	  Yes
	   Ql	     Yes	  Yes
	   Qq	     Yes	  Yes
	   Sq	     Yes	  Yes
	   Vt	     Yes	  Yes

     Note that the Vt macro is a Block partial-implicit only when invoked as the first macro in a
     SYNOPSIS section line, else it is In-line.

   Special block macro
     The Ta macro can only be used below It in Bl -column lists.  It delimits blocks representing
     table cells; these blocks have bodies, but no heads.

	   Macro     Callable	  Parsed     Scope
	   Ta	     Yes	  Yes	     closed by Ta, It

     Closed by the end of the line, fixed argument lengths, and/or subsequent macros.  In-line
     macros have only text children.  If a number (or inequality) of arguments is (n), then the
     macro accepts an arbitrary number of arguments.

	   .Yo [-arg [val...]] [args...] [res...]

	   .Yo [-arg [val...]] [args...] Yc...

	   .Yo [-arg [val...]] arg0 arg1 argN

	   Macro     Callable	  Parsed     Arguments
	   %A	     No 	  No	     >0
	   %B	     No 	  No	     >0
	   %C	     No 	  No	     >0
	   %D	     No 	  No	     >0
	   %I	     No 	  No	     >0
	   %J	     No 	  No	     >0
	   %N	     No 	  No	     >0
	   %O	     No 	  No	     >0
	   %P	     No 	  No	     >0
	   %Q	     No 	  No	     >0
	   %R	     No 	  No	     >0
	   %T	     No 	  No	     >0
	   %U	     No 	  No	     >0
	   %V	     No 	  No	     >0
	   Ad	     Yes	  Yes	     >0
	   An	     Yes	  Yes	     >0
	   Ap	     Yes	  Yes	     0
	   Ar	     Yes	  Yes	     n
	   At	     Yes	  Yes	     1
	   Bsx	     Yes	  Yes	     n
	   Bt	     No 	  No	     0
	   Bx	     Yes	  Yes	     n
	   Cd	     Yes	  Yes	     >0
	   Cm	     Yes	  Yes	     >0
	   Db	     No 	  No	     1
	   Dd	     No 	  No	     n
	   Dt	     No 	  No	     n
	   Dv	     Yes	  Yes	     >0
	   Dx	     Yes	  Yes	     n
	   Em	     Yes	  Yes	     >0
	   En	     No 	  No	     0
	   Er	     Yes	  Yes	     >0
	   Es	     No 	  No	     0
	   Ev	     Yes	  Yes	     >0
	   Ex	     No 	  No	     n
	   Fa	     Yes	  Yes	     >0
	   Fd	     No 	  No	     >0
	   Fl	     Yes	  Yes	     n
	   Fn	     Yes	  Yes	     >0
	   Fr	     No 	  No	     n
	   Ft	     Yes	  Yes	     >0
	   Fx	     Yes	  Yes	     n
	   Hf	     No 	  No	     n
	   Ic	     Yes	  Yes	     >0
	   In	     No 	  No	     1
	   Lb	     No 	  No	     1
	   Li	     Yes	  Yes	     >0
	   Lk	     Yes	  Yes	     >0
	   Lp	     No 	  No	     0
	   Ms	     Yes	  Yes	     >0
	   Mt	     Yes	  Yes	     >0
	   Nm	     Yes	  Yes	     n
	   No	     Yes	  Yes	     0
	   Ns	     Yes	  Yes	     0
	   Nx	     Yes	  Yes	     n
	   Os	     No 	  No	     n
	   Ot	     No 	  No	     n
	   Ox	     Yes	  Yes	     n
	   Pa	     Yes	  Yes	     n
	   Pf	     Yes	  Yes	     1
	   Pp	     No 	  No	     0
	   Rv	     No 	  No	     n
	   Sm	     No 	  No	     1
	   St	     No 	  Yes	     1
	   Sx	     Yes	  Yes	     >0
	   Sy	     Yes	  Yes	     >0
	   Tn	     Yes	  Yes	     >0
	   Ud	     No 	  No	     0
	   Ux	     Yes	  Yes	     n
	   Va	     Yes	  Yes	     n
	   Vt	     Yes	  Yes	     >0
	   Xr	     Yes	  Yes	     >0
	   br	     No 	  No	     0
	   sp	     No 	  No	     1

     When a macro argument consists of one single input character considered as a delimiter, the
     argument gets special handling.  This does not apply when delimiters appear in arguments
     containing more than one character.  Consequently, to prevent special handling and just han-
     dle it like any other argument, a delimiter can be escaped by prepending a zero-width space
     ('\&').  In text lines, delimiters never need escaping, but may be used as normal punctua-

     For many macros, when the leading arguments are opening delimiters, these delimiters are put
     before the macro scope, and when the trailing arguments are closing delimiters, these delim-
     iters are put after the macro scope.  For example,

	   .Aq ( [ word ] ) .

     renders as:


     Opening delimiters are:

	   (	   left parenthesis
	   [	   left bracket

     Closing delimiters are:

	   .	   period
	   ,	   comma
	   :	   colon
	   ;	   semicolon
	   )	   right parenthesis
	   ]	   right bracket
	   ?	   question mark
	   !	   exclamation mark

     Note that even a period preceded by a backslash ('\.') gets this special handling; use '\&.'
     to prevent that.

     Many in-line macros interrupt their scope when they encounter delimiters, and resume their
     scope when more arguments follow that are not delimiters.	For example,

	   .Fl a ( b | c \*(Ba d ) e

     renders as:

	   -a (-b | -c | -d) -e

     This applies to both opening and closing delimiters, and also to the middle delimiter:

	   |	   vertical bar

     As a special case, the predefined string \*(Ba is handled and rendered in the same way as a
     plain '|' character.  Using this predefined string is not recommended in new manuals.

   Font handling
     In mdoc documents, usage of semantic markup is recommended in order to have proper fonts
     automatically selected; only when no fitting semantic markup is available, consider falling
     back to Physical markup macros.  Whenever any mdoc macro switches the roff(7) font mode, it
     will automatically restore the previous font when exiting its scope.  Manually switching the
     font using the roff(7) '\f' font escape sequences is never required.

     This section documents compatibility between mandoc and other other troff implementations,
     at this time limited to GNU troff ("groff").  The term "historic groff" refers to groff ver-
     sions before 1.17, which featured a significant update of the doc.tmac file.

     Heirloom troff, the other significant troff implementation accepting -mdoc, is similar to
     historic groff.

     The following problematic behaviour is found in groff:

     -	 Display macros (Bd, Dl, and D1) may not be nested.  (Historic groff only.)
     -	 At with unknown arguments produces no output at all.  (Historic groff only.)  Newer
	 groff and mandoc print "AT&T UNIX" and the arguments.
     -	 Bl -column does not recognise trailing punctuation characters when they immediately pre-
	 cede tabulator characters, but treats them as normal text and outputs a space before
     -	 Bd -ragged -compact does not start a new line.  (Historic groff only.)
     -	 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 ``Epoch'' is printed.
     -	 Fl does not print a dash for an empty argument.  (Historic groff only.)
     -	 Fn does not start a new line unless invoked as the line macro in the SYNOPSIS section.
	 (Historic groff only.)
     -	 Fo with non-Fa children causes inconsistent spacing between arguments.  In mandoc, a
	 single space is always inserted between arguments.
     -	 Ft in the SYNOPSIS causes inconsistent vertical spacing, depending on whether a prior Fn
	 has been invoked.  See Ft and Fn for the normalised behaviour in mandoc.
     -	 In ignores additional arguments and is not treated specially in the SYNOPSIS.	(Historic
	 groff only.)
     -	 It sometimes requires a -nested flag.	(Historic groff only.)	In new groff and mandoc,
	 any list may be nested by default and -enum lists will restart the sequence only for the
     -	 Li followed by a delimiter is incorrectly used in some manuals instead of properly quot-
	 ing that character, which sometimes works with historic groff.
     -	 Lk only accepts a single link-name argument; the remainder is misformatted.
     -	 Pa does not format its arguments when used in the FILES section under certain list
     -	 Ta can only be called by other macros, but not at the beginning of a line.
     -	 %C is not implemented.
     -	 Historic groff only allows up to eight or nine arguments per macro input line, depending
	 on the exact situation.  Providing more arguments causes garbled output.  The number of
	 arguments on one input line is not limited with mandoc.
     -	 Historic groff has many un-callable macros.  Most of these (excluding some block-level
	 macros) are callable in new groff and mandoc.
     -	 '|' (vertical bar) is not fully supported as a delimiter.  (Historic groff only.)
     -	 '\f' (font face) and '\f' (font family face) Text Decoration escapes behave irregularly
	 when specified within line-macro scopes.
     -	 Negative scaling units return to prior lines.	Instead, mandoc truncates them to zero.

     The following features are unimplemented in mandoc:

     -	 Bd -file file.
     -	 Bd -offset center and -offset right.  Groff does not implement centred and flush-right
	 rendering either, but produces large indentations.
     -	 The '\h' (horizontal position), '\v' (vertical position), '\m' (text colour), '\M' (text
	 filling colour), '\z' (zero-length character), '\w' (string length), '\k' (horizontal
	 position marker), '\o' (text overstrike), and '\s' (text size) escape sequences are all
	 discarded in mandoc.
     -	 The '\f' scaling unit is accepted by mandoc, but rendered as the default unit.
     -	 In quoted literals, groff allows pairwise double-quotes to produce a standalone double-
	 quote in formatted output.  This is not supported by mandoc.

     man(1), mandoc(1), eqn(7), man(7), mandoc_char(7), roff(7), tbl(7)

     The mdoc language first appeared as a troff macro package in 4.4BSD.  It was later signifi-
     cantly updated by Werner Lemberg and Ruslan Ermilov in groff-1.17.  The standalone implemen-
     tation that is part of the mandoc(1) utility written by Kristaps Dzonsons appeared in
     OpenBSD 4.6.

     The mdoc reference was written by Kristaps Dzonsons, kristaps@bsd.lv.

BSD					 January 3, 2012				      BSD

All times are GMT -4. The time now is 05:23 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password