[BACK]Return to man.7 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/man.7, Revision 1.130

1.130   ! schwarze    1: .\"    $Id: man.7,v 1.129 2015/01/24 01:58:33 schwarze Exp $
1.1       kristaps    2: .\"
1.115     schwarze    3: .\" Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
1.129     schwarze    4: .\" Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
1.122     schwarze    5: .\" Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org>
1.1       kristaps    6: .\"
                      7: .\" Permission to use, copy, modify, and distribute this software for any
1.10      kristaps    8: .\" purpose with or without fee is hereby granted, provided that the above
                      9: .\" copyright notice and this permission notice appear in all copies.
                     10: .\"
                     11: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     12: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     13: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     14: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     15: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     16: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     17: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.1       kristaps   18: .\"
1.130   ! schwarze   19: .Dd $Mdocdate: January 24 2015 $
1.9       kristaps   20: .Dt MAN 7
1.1       kristaps   21: .Os
                     22: .Sh NAME
1.32      kristaps   23: .Nm man
1.111     schwarze   24: .Nd legacy formatting language for manual pages
1.1       kristaps   25: .Sh DESCRIPTION
1.111     schwarze   26: Traditionally, the
1.32      kristaps   27: .Nm man
1.111     schwarze   28: language has been used to write
1.32      kristaps   29: .Ux
1.111     schwarze   30: manuals for the
                     31: .Xr man 1
                     32: utility.
                     33: It supports limited control of presentational details like fonts,
                     34: indentation and spacing.
                     35: This reference document describes the structure of manual pages
                     36: and the syntax and usage of the man language.
1.32      kristaps   37: .Pp
                     38: .Bf -emphasis
1.20      kristaps   39: Do not use
1.32      kristaps   40: .Nm
1.111     schwarze   41: to write your manuals:
1.32      kristaps   42: .Ef
1.111     schwarze   43: It lacks support for semantic markup.
1.19      kristaps   44: Use the
1.32      kristaps   45: .Xr mdoc 7
1.1       kristaps   46: language, instead.
1.32      kristaps   47: .Pp
1.111     schwarze   48: In a
1.32      kristaps   49: .Nm
1.111     schwarze   50: document, lines beginning with the control character
1.32      kristaps   51: .Sq \&.
1.111     schwarze   52: are called
                     53: .Dq macro lines .
                     54: The first word is the macro name.
                     55: It usually consists of two capital letters.
                     56: For a list of available macros, see
                     57: .Sx MACRO OVERVIEW .
                     58: The words following the macro name are arguments to the macro.
                     59: .Pp
                     60: Lines not beginning with the control character are called
                     61: .Dq text lines .
                     62: They provide free-form text to be printed; the formatting of the text
                     63: depends on the respective processing context:
1.32      kristaps   64: .Bd -literal -offset indent
1.1       kristaps   65: \&.SH Macro lines change control state.
1.106     kristaps   66: Text lines are interpreted within the current state.
1.32      kristaps   67: .Ed
1.103     kristaps   68: .Pp
1.111     schwarze   69: Many aspects of the basic syntax of the
1.103     kristaps   70: .Nm
1.111     schwarze   71: language are based on the
                     72: .Xr roff 7
                     73: language; see the
                     74: .Em LANGUAGE SYNTAX
1.106     kristaps   75: and
1.111     schwarze   76: .Em MACRO SYNTAX
                     77: sections in the
                     78: .Xr roff 7
                     79: manual for details, in particular regarding
                     80: comments, escape sequences, whitespace, and quoting.
1.22      kristaps   81: .Sh MANUAL STRUCTURE
1.16      kristaps   82: Each
1.32      kristaps   83: .Nm
1.80      kristaps   84: document must contain the
1.39      kristaps   85: .Sx \&TH
1.68      kristaps   86: macro describing the document's section and title.
1.80      kristaps   87: It may occur anywhere in the document, although conventionally it
1.68      kristaps   88: appears as the first macro.
1.32      kristaps   89: .Pp
1.22      kristaps   90: Beyond
1.39      kristaps   91: .Sx \&TH ,
1.111     schwarze   92: at least one macro or text line must appear in the document.
1.100     kristaps   93: .Pp
                     94: The following is a well-formed skeleton
                     95: .Nm
                     96: file for a utility
                     97: .Qq progname :
1.32      kristaps   98: .Bd -literal -offset indent
1.100     kristaps   99: \&.TH PROGNAME 1 2009-10-10
1.22      kristaps  100: \&.SH NAME
1.124     schwarze  101: \efBprogname\efR \e(en one line about what it does
1.106     kristaps  102: \&.\e\(dq .SH LIBRARY
1.124     schwarze  103: \&.\e\(dq For sections 2, 3, and 9 only.
1.106     kristaps  104: \&.\e\(dq Not used in OpenBSD.
1.22      kristaps  105: \&.SH SYNOPSIS
1.124     schwarze  106: \efBprogname\efR [\efB\e-options\efR] \efIfile ...\efR
1.22      kristaps  107: \&.SH DESCRIPTION
1.124     schwarze  108: The \efBfoo\efR utility processes files ...
1.126     schwarze  109: \&.\e\(dq .Sh CONTEXT
                    110: \&.\e\(dq For section 9 functions only.
1.106     kristaps  111: \&.\e\(dq .SH IMPLEMENTATION NOTES
                    112: \&.\e\(dq Not used in OpenBSD.
                    113: \&.\e\(dq .SH RETURN VALUES
1.124     schwarze  114: \&.\e\(dq For sections 2, 3, and 9 function return values only.
1.106     kristaps  115: \&.\e\(dq .SH ENVIRONMENT
1.124     schwarze  116: \&.\e\(dq For sections 1, 6, 7, and 8 only.
1.106     kristaps  117: \&.\e\(dq .SH FILES
                    118: \&.\e\(dq .SH EXIT STATUS
1.124     schwarze  119: \&.\e\(dq For sections 1, 6, and 8 only.
1.106     kristaps  120: \&.\e\(dq .SH EXAMPLES
                    121: \&.\e\(dq .SH DIAGNOSTICS
1.124     schwarze  122: \&.\e\(dq For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only.
1.106     kristaps  123: \&.\e\(dq .SH ERRORS
1.124     schwarze  124: \&.\e\(dq For sections 2, 3, 4, and 9 errno settings only.
1.106     kristaps  125: \&.\e\(dq .SH SEE ALSO
1.124     schwarze  126: \&.\e\(dq .BR foobar ( 1 )
1.106     kristaps  127: \&.\e\(dq .SH STANDARDS
                    128: \&.\e\(dq .SH HISTORY
                    129: \&.\e\(dq .SH AUTHORS
                    130: \&.\e\(dq .SH CAVEATS
                    131: \&.\e\(dq .SH BUGS
                    132: \&.\e\(dq .SH SECURITY CONSIDERATIONS
                    133: \&.\e\(dq Not used in OpenBSD.
1.32      kristaps  134: .Ed
1.41      kristaps  135: .Pp
                    136: The sections in a
                    137: .Nm
1.68      kristaps  138: document are conventionally ordered as they appear above.
                    139: Sections should be composed as follows:
1.42      kristaps  140: .Bl -ohang -offset indent
                    141: .It Em NAME
1.68      kristaps  142: The name(s) and a short description of the documented material.
                    143: The syntax for this is generally as follows:
1.41      kristaps  144: .Pp
                    145: .D1 \efBname\efR \e(en description
1.42      kristaps  146: .It Em LIBRARY
1.41      kristaps  147: The name of the library containing the documented material, which is
1.68      kristaps  148: assumed to be a function in a section 2 or 3 manual.
                    149: For functions in the C library, this may be as follows:
1.41      kristaps  150: .Pp
                    151: .D1 Standard C Library (libc, -lc)
1.42      kristaps  152: .It Em SYNOPSIS
1.41      kristaps  153: Documents the utility invocation syntax, function call syntax, or device
1.55      kristaps  154: configuration.
1.41      kristaps  155: .Pp
                    156: For the first, utilities (sections 1, 6, and 8), this is
                    157: generally structured as follows:
                    158: .Pp
                    159: .D1 \efBname\efR [-\efBab\efR] [-\efBc\efR\efIarg\efR] \efBpath\efR...
                    160: .Pp
                    161: For the second, function calls (sections 2, 3, 9):
                    162: .Pp
1.44      kristaps  163: .D1 \&.B char *name(char *\efIarg\efR);
1.41      kristaps  164: .Pp
                    165: And for the third, configurations (section 4):
                    166: .Pp
1.44      kristaps  167: .D1 \&.B name* at cardbus ? function ?
1.41      kristaps  168: .Pp
1.55      kristaps  169: Manuals not in these sections generally don't need a
1.42      kristaps  170: .Em SYNOPSIS .
                    171: .It Em DESCRIPTION
1.55      kristaps  172: This expands upon the brief, one-line description in
1.42      kristaps  173: .Em NAME .
                    174: It usually contains a break-down of the options (if documenting a
                    175: command).
1.126     schwarze  176: .It Em CONTEXT
                    177: This section lists the contexts in which functions can be called in section 9.
                    178: The contexts are autoconf, process, or interrupt.
1.42      kristaps  179: .It Em IMPLEMENTATION NOTES
1.68      kristaps  180: Implementation-specific notes should be kept here.
                    181: This is useful when implementing standard functions that may have side
                    182: effects or notable algorithmic implications.
1.42      kristaps  183: .It Em RETURN VALUES
1.80      kristaps  184: This section documents the return values of functions in sections 2, 3, and 9.
1.42      kristaps  185: .It Em ENVIRONMENT
                    186: Documents any usages of environment variables, e.g.,
                    187: .Xr environ 7 .
                    188: .It Em FILES
1.68      kristaps  189: Documents files used.
1.78      schwarze  190: It's helpful to document both the file name and a short description of how
1.68      kristaps  191: the file is used (created, modified, etc.).
1.67      kristaps  192: .It Em EXIT STATUS
1.80      kristaps  193: This section documents the command exit status for
                    194: section 1, 6, and 8 utilities.
1.68      kristaps  195: Historically, this information was described in
1.67      kristaps  196: .Em DIAGNOSTICS ,
                    197: a practise that is now discouraged.
1.42      kristaps  198: .It Em EXAMPLES
1.68      kristaps  199: Example usages.
                    200: This often contains snippets of well-formed,
                    201: well-tested invocations.
1.80      kristaps  202: Make sure that examples work properly!
1.42      kristaps  203: .It Em DIAGNOSTICS
1.68      kristaps  204: Documents error conditions.
1.124     schwarze  205: In section 4 and 9 manuals, these are usually messages
                    206: printed by the kernel to the console and to the kernel log.
                    207: In section 1, 6, 7, and 8, these are usually messages
                    208: printed by userland programs to the standard error output.
                    209: .Pp
1.42      kristaps  210: Historically, this section was used in place of
                    211: .Em EXIT STATUS
                    212: for manuals in sections 1, 6, and 8; however, this practise is
                    213: discouraged.
                    214: .It Em ERRORS
1.124     schwarze  215: Documents
                    216: .Xr errno 2
                    217: settings in sections 2, 3, 4, and 9.
1.42      kristaps  218: .It Em SEE ALSO
1.68      kristaps  219: References other manuals with related topics.
                    220: This section should exist for most manuals.
1.44      kristaps  221: .Pp
                    222: .D1 \&.BR bar \&( 1 \&),
                    223: .Pp
                    224: Cross-references should conventionally be ordered
1.42      kristaps  225: first by section, then alphabetically.
                    226: .It Em STANDARDS
                    227: References any standards implemented or used, such as
                    228: .Pp
                    229: .D1 IEEE Std 1003.2 (\e(lqPOSIX.2\e(rq)
                    230: .Pp
                    231: If not adhering to any standards, the
                    232: .Em HISTORY
                    233: section should be used.
                    234: .It Em HISTORY
1.81      schwarze  235: A brief history of the subject, including where support first appeared.
1.42      kristaps  236: .It Em AUTHORS
1.81      schwarze  237: Credits to the person or persons who wrote the code and/or documentation.
1.78      schwarze  238: Authors should generally be noted by both name and email address.
1.42      kristaps  239: .It Em CAVEATS
1.78      schwarze  240: Common misuses and misunderstandings should be explained
1.42      kristaps  241: in this section.
                    242: .It Em BUGS
1.80      kristaps  243: Known bugs, limitations, and work-arounds should be described
1.78      schwarze  244: in this section.
1.42      kristaps  245: .It Em SECURITY CONSIDERATIONS
                    246: Documents any security precautions that operators should consider.
1.41      kristaps  247: .El
1.110     schwarze  248: .Sh MACRO OVERVIEW
                    249: This overview is sorted such that macros of similar purpose are listed
                    250: together, to help find the best macro for any given purpose.
                    251: Deprecated macros are not included in the overview, but can be found
                    252: in the alphabetical reference below.
                    253: .Ss Page header and footer meta-data
                    254: .Bl -column "PP, LP, P" description
                    255: .It Sx TH Ta set the title: Ar title section date Op Ar source Op Ar volume
                    256: .It Sx AT Ta display AT&T UNIX version in the page footer (<= 1 argument)
                    257: .It Sx UC Ta display BSD version in the page footer (<= 1 argument)
                    258: .El
                    259: .Ss Sections and paragraphs
                    260: .Bl -column "PP, LP, P" description
                    261: .It Sx SH Ta section header (one line)
                    262: .It Sx SS Ta subsection header (one line)
                    263: .It Sx PP , LP , P Ta start an undecorated paragraph (no arguments)
                    264: .It Sx RS , RE Ta reset the left margin: Op Ar width
                    265: .It Sx IP Ta indented paragraph: Op Ar head Op Ar width
                    266: .It Sx TP Ta tagged paragraph: Op Ar width
                    267: .It Sx HP Ta hanged paragraph: Op Ar width
1.118     schwarze  268: .It Sx PD Ta set vertical paragraph distance: Op Ar height
1.110     schwarze  269: .It Sx \&br Ta force output line break in text mode (no arguments)
                    270: .It Sx \&sp Ta force vertical space: Op Ar height
                    271: .It Sx fi , nf Ta fill mode and no-fill mode (no arguments)
                    272: .It Sx in Ta additional indent: Op Ar width
                    273: .El
                    274: .Ss Physical markup
                    275: .Bl -column "PP, LP, P" description
                    276: .It Sx B Ta boldface font
                    277: .It Sx I Ta italic font
                    278: .It Sx R Ta roman (default) font
                    279: .It Sx SB Ta small boldface font
                    280: .It Sx SM Ta small roman font
                    281: .It Sx BI Ta alternate between boldface and italic fonts
                    282: .It Sx BR Ta alternate between boldface and roman fonts
                    283: .It Sx IB Ta alternate between italic and boldface fonts
                    284: .It Sx IR Ta alternate between italic and roman fonts
                    285: .It Sx RB Ta alternate between roman and boldface fonts
                    286: .It Sx RI Ta alternate between roman and italic fonts
                    287: .El
1.111     schwarze  288: .Sh MACRO REFERENCE
1.22      kristaps  289: This section is a canonical reference to all macros, arranged
1.68      kristaps  290: alphabetically.
                    291: For the scoping of individual macros, see
1.32      kristaps  292: .Sx MACRO SYNTAX .
1.72      joerg     293: .Ss \&AT
                    294: Sets the volume for the footer for compatibility with man pages from
1.123     schwarze  295: .At
1.72      joerg     296: releases.
                    297: The optional arguments specify which release it is from.
1.39      kristaps  298: .Ss \&B
1.22      kristaps  299: Text is rendered in bold face.
1.44      kristaps  300: .Pp
                    301: See also
1.92      kristaps  302: .Sx \&I
1.44      kristaps  303: and
1.92      kristaps  304: .Sx \&R .
1.39      kristaps  305: .Ss \&BI
1.68      kristaps  306: Text is rendered alternately in bold face and italic.
                    307: Thus,
1.32      kristaps  308: .Sq .BI this word and that
1.22      kristaps  309: causes
1.32      kristaps  310: .Sq this
1.22      kristaps  311: and
1.32      kristaps  312: .Sq and
1.55      kristaps  313: to render in bold face, while
1.32      kristaps  314: .Sq word
1.22      kristaps  315: and
1.32      kristaps  316: .Sq that
1.68      kristaps  317: render in italics.
                    318: Whitespace between arguments is omitted in output.
1.44      kristaps  319: .Pp
                    320: Examples:
1.46      kristaps  321: .Pp
1.93      kristaps  322: .Dl \&.BI bold italic bold italic
1.44      kristaps  323: .Pp
                    324: The output of this example will be emboldened
                    325: .Dq bold
                    326: and italicised
                    327: .Dq italic ,
                    328: with spaces stripped between arguments.
                    329: .Pp
                    330: See also
                    331: .Sx \&IB ,
                    332: .Sx \&BR ,
                    333: .Sx \&RB ,
                    334: .Sx \&RI ,
                    335: and
                    336: .Sx \&IR .
1.39      kristaps  337: .Ss \&BR
1.22      kristaps  338: Text is rendered alternately in bold face and roman (the default font).
                    339: Whitespace between arguments is omitted in output.
1.44      kristaps  340: .Pp
                    341: See
                    342: .Sx \&BI
                    343: for an equivalent example.
                    344: .Pp
                    345: See also
                    346: .Sx \&BI ,
                    347: .Sx \&IB ,
                    348: .Sx \&RB ,
                    349: .Sx \&RI ,
                    350: and
                    351: .Sx \&IR .
1.39      kristaps  352: .Ss \&DT
1.68      kristaps  353: Has no effect.
                    354: Included for compatibility.
1.116     schwarze  355: .Ss \&EE
                    356: This is a non-standard GNU extension, included only for compatibility.
                    357: In
                    358: .Xr mandoc 1 ,
                    359: it does the same as
                    360: .Sx \&fi .
                    361: .Ss \&EX
                    362: This is a non-standard GNU extension, included only for compatibility.
                    363: In
                    364: .Xr mandoc 1 ,
                    365: it does the same as
                    366: .Sx \&nf .
1.39      kristaps  367: .Ss \&HP
1.23      kristaps  368: Begin a paragraph whose initial output line is left-justified, but
1.27      kristaps  369: subsequent output lines are indented, with the following syntax:
1.44      kristaps  370: .Bd -filled -offset indent
                    371: .Pf \. Sx \&HP
1.130   ! schwarze  372: .Op Ar width
1.32      kristaps  373: .Ed
1.44      kristaps  374: .Pp
                    375: The
1.130   ! schwarze  376: .Ar width
1.117     schwarze  377: argument is a
                    378: .Xr roff 7
                    379: scaling width.
1.44      kristaps  380: If specified, it's saved for later paragraph left-margins; if unspecified, the
                    381: saved or default width is used.
                    382: .Pp
                    383: See also
1.45      kristaps  384: .Sx \&IP ,
                    385: .Sx \&LP ,
                    386: .Sx \&P ,
                    387: .Sx \&PP ,
1.44      kristaps  388: and
1.45      kristaps  389: .Sx \&TP .
1.39      kristaps  390: .Ss \&I
1.22      kristaps  391: Text is rendered in italics.
1.44      kristaps  392: .Pp
                    393: See also
1.92      kristaps  394: .Sx \&B
1.44      kristaps  395: and
1.92      kristaps  396: .Sx \&R .
1.39      kristaps  397: .Ss \&IB
1.80      kristaps  398: Text is rendered alternately in italics and bold face.
                    399: Whitespace between arguments is omitted in output.
1.44      kristaps  400: .Pp
                    401: See
                    402: .Sx \&BI
                    403: for an equivalent example.
                    404: .Pp
                    405: See also
                    406: .Sx \&BI ,
                    407: .Sx \&BR ,
                    408: .Sx \&RB ,
                    409: .Sx \&RI ,
                    410: and
                    411: .Sx \&IR .
1.39      kristaps  412: .Ss \&IP
1.44      kristaps  413: Begin an indented paragraph with the following syntax:
                    414: .Bd -filled -offset indent
                    415: .Pf \. Sx \&IP
1.130   ! schwarze  416: .Op Ar head Op Ar width
1.32      kristaps  417: .Ed
1.44      kristaps  418: .Pp
                    419: The
1.130   ! schwarze  420: .Ar width
1.117     schwarze  421: argument is a
                    422: .Xr roff 7
                    423: scaling width defining the left margin.
1.44      kristaps  424: It's saved for later paragraph left-margins; if unspecified, the saved or
                    425: default width is used.
                    426: .Pp
                    427: The
1.130   ! schwarze  428: .Ar head
1.68      kristaps  429: argument is used as a leading term, flushed to the left margin.
                    430: This is useful for bulleted paragraphs and so on.
1.44      kristaps  431: .Pp
                    432: See also
1.45      kristaps  433: .Sx \&HP ,
                    434: .Sx \&LP ,
                    435: .Sx \&P ,
                    436: .Sx \&PP ,
1.44      kristaps  437: and
1.45      kristaps  438: .Sx \&TP .
1.39      kristaps  439: .Ss \&IR
1.22      kristaps  440: Text is rendered alternately in italics and roman (the default font).
                    441: Whitespace between arguments is omitted in output.
1.44      kristaps  442: .Pp
                    443: See
                    444: .Sx \&BI
                    445: for an equivalent example.
                    446: .Pp
                    447: See also
                    448: .Sx \&BI ,
                    449: .Sx \&IB ,
                    450: .Sx \&BR ,
                    451: .Sx \&RB ,
                    452: and
                    453: .Sx \&RI .
1.39      kristaps  454: .Ss \&LP
1.68      kristaps  455: Begin an undecorated paragraph.
                    456: The scope of a paragraph is closed by a subsequent paragraph,
                    457: sub-section, section, or end of file.
1.78      schwarze  458: The saved paragraph left-margin width is reset to the default.
1.44      kristaps  459: .Pp
                    460: See also
1.45      kristaps  461: .Sx \&HP ,
                    462: .Sx \&IP ,
                    463: .Sx \&P ,
                    464: .Sx \&PP ,
1.44      kristaps  465: and
1.45      kristaps  466: .Sx \&TP .
1.113     kristaps  467: .Ss \&OP
                    468: Optional command-line argument.
1.114     schwarze  469: This is a non-standard GNU extension, included only for compatibility.
                    470: It has the following syntax:
1.113     kristaps  471: .Bd -filled -offset indent
                    472: .Pf \. Sx \&OP
1.130   ! schwarze  473: .Ar key Op Ar value
1.113     kristaps  474: .Ed
                    475: .Pp
                    476: The
1.130   ! schwarze  477: .Ar key
1.113     kristaps  478: is usually a command-line flag and
1.130   ! schwarze  479: .Ar value
1.113     kristaps  480: its argument.
1.39      kristaps  481: .Ss \&P
                    482: Synonym for
                    483: .Sx \&LP .
1.44      kristaps  484: .Pp
                    485: See also
1.45      kristaps  486: .Sx \&HP ,
                    487: .Sx \&IP ,
                    488: .Sx \&LP ,
                    489: .Sx \&PP ,
1.118     schwarze  490: and
                    491: .Sx \&TP .
                    492: .Ss \&PD
                    493: Specify the vertical space to be inserted before each new paragraph.
                    494: .br
                    495: The syntax is as follows:
                    496: .Bd -filled -offset indent
                    497: .Pf \. Sx \&PD
1.130   ! schwarze  498: .Op Ar height
1.118     schwarze  499: .Ed
                    500: .Pp
                    501: The
1.130   ! schwarze  502: .Ar height
1.118     schwarze  503: argument is a
                    504: .Xr roff 7
                    505: scaling width.
                    506: It defaults to
                    507: .Cm 1v .
                    508: If the unit is omitted,
                    509: .Cm v
                    510: is assumed.
                    511: .Pp
                    512: This macro affects the spacing before any subsequent instances of
                    513: .Sx \&HP ,
                    514: .Sx \&IP ,
                    515: .Sx \&LP ,
                    516: .Sx \&P ,
                    517: .Sx \&PP ,
                    518: .Sx \&SH ,
                    519: .Sx \&SS ,
1.44      kristaps  520: and
1.45      kristaps  521: .Sx \&TP .
1.39      kristaps  522: .Ss \&PP
                    523: Synonym for
                    524: .Sx \&LP .
1.44      kristaps  525: .Pp
                    526: See also
1.45      kristaps  527: .Sx \&HP ,
                    528: .Sx \&IP ,
                    529: .Sx \&LP ,
                    530: .Sx \&P ,
1.44      kristaps  531: and
1.45      kristaps  532: .Sx \&TP .
1.39      kristaps  533: .Ss \&R
1.22      kristaps  534: Text is rendered in roman (the default font).
1.44      kristaps  535: .Pp
                    536: See also
1.92      kristaps  537: .Sx \&I
1.44      kristaps  538: and
1.92      kristaps  539: .Sx \&B .
1.39      kristaps  540: .Ss \&RB
1.22      kristaps  541: Text is rendered alternately in roman (the default font) and bold face.
                    542: Whitespace between arguments is omitted in output.
1.44      kristaps  543: .Pp
                    544: See
                    545: .Sx \&BI
                    546: for an equivalent example.
                    547: .Pp
                    548: See also
                    549: .Sx \&BI ,
                    550: .Sx \&IB ,
                    551: .Sx \&BR ,
                    552: .Sx \&RI ,
                    553: and
                    554: .Sx \&IR .
1.39      kristaps  555: .Ss \&RE
1.30      kristaps  556: Explicitly close out the scope of a prior
1.39      kristaps  557: .Sx \&RS .
1.129     schwarze  558: The default left margin is restored to the state before that
1.102     kristaps  559: .Sx \&RS
                    560: invocation.
1.129     schwarze  561: .Pp
                    562: The syntax is as follows:
                    563: .Bd -filled -offset indent
                    564: .Pf \. Sx \&RE
                    565: .Op Ar level
                    566: .Ed
                    567: .Pp
                    568: Without an argument, the most recent
                    569: .Sx \&RS
                    570: block is closed out.
                    571: If
                    572: .Ar level
                    573: is 1, all open
                    574: .Sx \&RS
                    575: blocks are closed out.
                    576: Otherwise,
                    577: .Ar level No \(mi 1
                    578: nested
                    579: .Sx \&RS
                    580: blocks remain open.
1.39      kristaps  581: .Ss \&RI
1.22      kristaps  582: Text is rendered alternately in roman (the default font) and italics.
                    583: Whitespace between arguments is omitted in output.
1.44      kristaps  584: .Pp
                    585: See
                    586: .Sx \&BI
                    587: for an equivalent example.
                    588: .Pp
                    589: See also
                    590: .Sx \&BI ,
                    591: .Sx \&IB ,
                    592: .Sx \&BR ,
                    593: .Sx \&RB ,
                    594: and
                    595: .Sx \&IR .
1.39      kristaps  596: .Ss \&RS
1.102     kristaps  597: Temporarily reset the default left margin.
1.44      kristaps  598: This has the following syntax:
                    599: .Bd -filled -offset indent
1.102     kristaps  600: .Pf \. Sx \&RS
1.130   ! schwarze  601: .Op Ar width
1.32      kristaps  602: .Ed
1.44      kristaps  603: .Pp
                    604: The
1.130   ! schwarze  605: .Ar width
1.117     schwarze  606: argument is a
                    607: .Xr roff 7
                    608: scaling width.
1.55      kristaps  609: If not specified, the saved or default width is used.
1.102     kristaps  610: .Pp
                    611: See also
                    612: .Sx \&RE .
1.39      kristaps  613: .Ss \&SB
1.22      kristaps  614: Text is rendered in small size (one point smaller than the default font)
                    615: bold face.
1.39      kristaps  616: .Ss \&SH
1.68      kristaps  617: Begin a section.
                    618: The scope of a section is only closed by another section or the end of
                    619: file.
1.78      schwarze  620: The paragraph left-margin width is reset to the default.
1.39      kristaps  621: .Ss \&SM
1.22      kristaps  622: Text is rendered in small size (one point smaller than the default
                    623: font).
1.39      kristaps  624: .Ss \&SS
1.68      kristaps  625: Begin a sub-section.
                    626: The scope of a sub-section is closed by a subsequent sub-section,
                    627: section, or end of file.
1.78      schwarze  628: The paragraph left-margin width is reset to the default.
1.39      kristaps  629: .Ss \&TH
1.128     schwarze  630: Sets the title of the manual page for use in the page header
                    631: and footer with the following syntax:
1.44      kristaps  632: .Bd -filled -offset indent
                    633: .Pf \. Sx \&TH
1.99      schwarze  634: .Ar title section date
                    635: .Op Ar source Op Ar volume
1.44      kristaps  636: .Ed
1.43      kristaps  637: .Pp
1.99      schwarze  638: Conventionally, the document
                    639: .Ar title
                    640: is given in all caps.
                    641: The recommended
                    642: .Ar date
                    643: format is
                    644: .Sy YYYY-MM-DD
                    645: as specified in the ISO-8601 standard;
                    646: if the argument does not conform, it is printed verbatim.
                    647: If the
                    648: .Ar date
                    649: is empty or not specified, the current date is used.
                    650: The optional
                    651: .Ar source
1.68      kristaps  652: string specifies the organisation providing the utility.
1.128     schwarze  653: When unspecified,
                    654: .Xr mandoc 1
                    655: uses its
                    656: .Fl Ios
                    657: argument.
1.68      kristaps  658: The
1.99      schwarze  659: .Ar volume
1.43      kristaps  660: string replaces the default rendered volume, which is dictated by the
                    661: manual section.
                    662: .Pp
                    663: Examples:
1.46      kristaps  664: .Pp
1.93      kristaps  665: .Dl \&.TH CVS 5 "1992-02-12" GNU
1.39      kristaps  666: .Ss \&TP
1.25      kristaps  667: Begin a paragraph where the head, if exceeding the indentation width, is
1.24      kristaps  668: followed by a newline; if not, the body follows on the same line after a
1.68      kristaps  669: buffer to the indentation width.
                    670: Subsequent output lines are indented.
1.44      kristaps  671: The syntax is as follows:
                    672: .Bd -filled -offset indent
                    673: .Pf \. Sx \&TP
1.130   ! schwarze  674: .Op Ar width
1.32      kristaps  675: .Ed
                    676: .Pp
1.44      kristaps  677: The
1.130   ! schwarze  678: .Ar width
1.117     schwarze  679: argument is a
                    680: .Xr roff 7
                    681: scaling width.
1.44      kristaps  682: If specified, it's saved for later paragraph left-margins; if
1.27      kristaps  683: unspecified, the saved or default width is used.
1.44      kristaps  684: .Pp
                    685: See also
1.45      kristaps  686: .Sx \&HP ,
                    687: .Sx \&IP ,
                    688: .Sx \&LP ,
                    689: .Sx \&P ,
1.44      kristaps  690: and
1.45      kristaps  691: .Sx \&PP .
1.72      joerg     692: .Ss \&UC
                    693: Sets the volume for the footer for compatibility with man pages from
1.120     schwarze  694: .Bx
                    695: releases.
1.72      joerg     696: The optional first argument specifies which release it is from.
1.121     schwarze  697: .Ss \&UE
                    698: End a uniform resource identifier block.
                    699: This is a non-standard GNU extension, included only for compatibility.
                    700: See
                    701: .Sx \&UE .
                    702: .Ss \&UR
                    703: Begin a uniform resource identifier block.
                    704: This is a non-standard GNU extension, included only for compatibility.
                    705: It has the following syntax:
                    706: .Bd -literal -offset indent
                    707: .Pf \. Sx \&UR Ar uri
                    708: link description to be shown
                    709: .Pf \. Sx UE
                    710: .Ed
1.39      kristaps  711: .Ss \&br
1.68      kristaps  712: Breaks the current line.
                    713: Consecutive invocations have no further effect.
1.44      kristaps  714: .Pp
                    715: See also
                    716: .Sx \&sp .
1.39      kristaps  717: .Ss \&fi
1.22      kristaps  718: End literal mode begun by
1.39      kristaps  719: .Sx \&nf .
1.79      kristaps  720: .Ss \&in
                    721: Indent relative to the current indentation:
                    722: .Pp
1.130   ! schwarze  723: .D1 Pf \. Sx \&in Op Ar width
1.79      kristaps  724: .Pp
                    725: If
1.130   ! schwarze  726: .Ar width
1.79      kristaps  727: is signed, the new offset is relative.
                    728: Otherwise, it is absolute.
                    729: This value is reset upon the next paragraph, section, or sub-section.
1.39      kristaps  730: .Ss \&na
1.36      kristaps  731: Don't align to the right margin.
1.39      kristaps  732: .Ss \&nf
1.22      kristaps  733: Begin literal mode: all subsequent free-form lines have their end of
1.68      kristaps  734: line boundaries preserved.
                    735: May be ended by
1.39      kristaps  736: .Sx \&fi .
1.101     kristaps  737: Literal mode is implicitly ended by
                    738: .Sx \&SH
                    739: or
                    740: .Sx \&SS .
1.39      kristaps  741: .Ss \&sp
1.44      kristaps  742: Insert vertical spaces into output with the following syntax:
                    743: .Bd -filled -offset indent
                    744: .Pf \. Sx \&sp
1.130   ! schwarze  745: .Op Ar height
1.44      kristaps  746: .Ed
                    747: .Pp
1.117     schwarze  748: The
1.130   ! schwarze  749: .Ar height
1.117     schwarze  750: argument is a scaling width as described in
                    751: .Xr roff 7 .
1.44      kristaps  752: If 0, this is equivalent to the
1.39      kristaps  753: .Sx \&br
1.68      kristaps  754: macro.
                    755: Defaults to 1, if unspecified.
1.44      kristaps  756: .Pp
                    757: See also
                    758: .Sx \&br .
1.111     schwarze  759: .Sh MACRO SYNTAX
                    760: The
                    761: .Nm
                    762: macros are classified by scope: line scope or block scope.
                    763: Line macros are only scoped to the current line (and, in some
                    764: situations, the subsequent line).
                    765: Block macros are scoped to the current line and subsequent lines until
                    766: closed by another block macro.
                    767: .Ss Line Macros
                    768: Line macros are generally scoped to the current line, with the body
                    769: consisting of zero or more arguments.
                    770: If a macro is scoped to the next line and the line arguments are empty,
                    771: the next line, which must be text, is used instead.
                    772: Thus:
                    773: .Bd -literal -offset indent
                    774: \&.I
                    775: foo
                    776: .Ed
                    777: .Pp
                    778: is equivalent to
                    779: .Sq \&.I foo .
                    780: If next-line macros are invoked consecutively, only the last is used.
                    781: If a next-line macro is followed by a non-next-line macro, an error is
                    782: raised, except for
                    783: .Sx \&br ,
                    784: .Sx \&sp ,
                    785: and
                    786: .Sx \&na .
                    787: .Pp
                    788: The syntax is as follows:
                    789: .Bd -literal -offset indent
                    790: \&.YO \(lBbody...\(rB
                    791: \(lBbody...\(rB
                    792: .Ed
                    793: .Bl -column "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX" -offset indent
                    794: .It Em Macro Ta Em Arguments Ta Em Scope     Ta Em Notes
                    795: .It Sx \&AT  Ta    <=1       Ta    current   Ta    \&
                    796: .It Sx \&B   Ta    n         Ta    next-line Ta    \&
                    797: .It Sx \&BI  Ta    n         Ta    current   Ta    \&
                    798: .It Sx \&BR  Ta    n         Ta    current   Ta    \&
                    799: .It Sx \&DT  Ta    0         Ta    current   Ta    \&
1.121     schwarze  800: .It Sx \&EE  Ta    0         Ta    current   Ta    compat
                    801: .It Sx \&EX  Ta    0         Ta    current   Ta    compat
1.111     schwarze  802: .It Sx \&I   Ta    n         Ta    next-line Ta    \&
                    803: .It Sx \&IB  Ta    n         Ta    current   Ta    \&
                    804: .It Sx \&IR  Ta    n         Ta    current   Ta    \&
1.113     kristaps  805: .It Sx \&OP  Ta    0, 1      Ta    current   Ta    compat
1.121     schwarze  806: .It Sx \&PD  Ta    1         Ta    current   Ta    \&
1.111     schwarze  807: .It Sx \&R   Ta    n         Ta    next-line Ta    \&
                    808: .It Sx \&RB  Ta    n         Ta    current   Ta    \&
                    809: .It Sx \&RI  Ta    n         Ta    current   Ta    \&
                    810: .It Sx \&SB  Ta    n         Ta    next-line Ta    \&
                    811: .It Sx \&SM  Ta    n         Ta    next-line Ta    \&
                    812: .It Sx \&TH  Ta    >1, <6    Ta    current   Ta    \&
                    813: .It Sx \&UC  Ta    <=1       Ta    current   Ta    \&
                    814: .It Sx \&br  Ta    0         Ta    current   Ta    compat
                    815: .It Sx \&fi  Ta    0         Ta    current   Ta    compat
                    816: .It Sx \&in  Ta    1         Ta    current   Ta    compat
                    817: .It Sx \&na  Ta    0         Ta    current   Ta    compat
                    818: .It Sx \&nf  Ta    0         Ta    current   Ta    compat
                    819: .It Sx \&sp  Ta    1         Ta    current   Ta    compat
                    820: .El
                    821: .Pp
                    822: Macros marked as
                    823: .Qq compat
                    824: are included for compatibility with the significant corpus of existing
                    825: manuals that mix dialects of roff.
                    826: These macros should not be used for portable
                    827: .Nm
                    828: manuals.
                    829: .Ss Block Macros
                    830: Block macros comprise a head and body.
                    831: As with in-line macros, the head is scoped to the current line and, in
                    832: one circumstance, the next line (the next-line stipulations as in
                    833: .Sx Line Macros
                    834: apply here as well).
                    835: .Pp
                    836: The syntax is as follows:
                    837: .Bd -literal -offset indent
                    838: \&.YO \(lBhead...\(rB
                    839: \(lBhead...\(rB
                    840: \(lBbody...\(rB
                    841: .Ed
                    842: .Pp
                    843: The closure of body scope may be to the section, where a macro is closed
                    844: by
                    845: .Sx \&SH ;
                    846: sub-section, closed by a section or
                    847: .Sx \&SS ;
                    848: part, closed by a section, sub-section, or
                    849: .Sx \&RE ;
                    850: or paragraph, closed by a section, sub-section, part,
                    851: .Sx \&HP ,
                    852: .Sx \&IP ,
                    853: .Sx \&LP ,
                    854: .Sx \&P ,
                    855: .Sx \&PP ,
                    856: or
                    857: .Sx \&TP .
                    858: No closure refers to an explicit block closing macro.
                    859: .Pp
                    860: As a rule, block macros may not be nested; thus, calling a block macro
                    861: while another block macro scope is open, and the open scope is not
                    862: implicitly closed, is syntactically incorrect.
                    863: .Bl -column "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX" -offset indent
                    864: .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope  Ta Em Notes
                    865: .It Sx \&HP  Ta    <2        Ta    current    Ta    paragraph   Ta    \&
                    866: .It Sx \&IP  Ta    <3        Ta    current    Ta    paragraph   Ta    \&
                    867: .It Sx \&LP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
                    868: .It Sx \&P   Ta    0         Ta    current    Ta    paragraph   Ta    \&
                    869: .It Sx \&PP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
                    870: .It Sx \&RE  Ta    0         Ta    current    Ta    none        Ta    compat
                    871: .It Sx \&RS  Ta    1         Ta    current    Ta    part        Ta    compat
                    872: .It Sx \&SH  Ta    >0        Ta    next-line  Ta    section     Ta    \&
                    873: .It Sx \&SS  Ta    >0        Ta    next-line  Ta    sub-section Ta    \&
                    874: .It Sx \&TP  Ta    n         Ta    next-line  Ta    paragraph   Ta    \&
1.121     schwarze  875: .It Sx \&UE  Ta    0         Ta    current    Ta    none        Ta    compat
                    876: .It Sx \&UR  Ta    1         Ta    current    Ta    part        Ta    compat
1.111     schwarze  877: .El
                    878: .Pp
                    879: Macros marked
                    880: .Qq compat
                    881: are as mentioned in
                    882: .Sx Line Macros .
                    883: .Pp
                    884: If a block macro is next-line scoped, it may only be followed by in-line
                    885: macros for decorating text.
                    886: .Ss Font handling
                    887: In
                    888: .Nm
                    889: documents, both
                    890: .Sx Physical markup
                    891: macros and
                    892: .Xr roff 7
                    893: .Ql \ef
                    894: font escape sequences can be used to choose fonts.
                    895: In text lines, the effect of manual font selection by escape sequences
                    896: only lasts until the next macro invocation; in macro lines, it only lasts
                    897: until the end of the macro scope.
                    898: Note that macros like
                    899: .Sx \&BR
                    900: open and close a font scope for each argument.
1.18      kristaps  901: .Sh COMPATIBILITY
1.127     schwarze  902: This section mentions some areas of questionable portability between
1.58      kristaps  903: implementations of the
                    904: .Nm
                    905: language.
1.127     schwarze  906: More incompatibilities exist.
1.51      kristaps  907: .Pp
                    908: .Bl -dash -compact
1.109     kristaps  909: .It
                    910: Do not depend on
                    911: .Sx \&SH
                    912: or
                    913: .Sx \&SS
                    914: to close out a literal context opened with
                    915: .Sx \&nf .
                    916: This behaviour may not be portable.
1.77      kristaps  917: .It
1.82      kristaps  918: troff suppresses a newline before
                    919: .Sq \(aq
                    920: macro output; in mandoc, it is an alias for the standard
                    921: .Sq \&.
                    922: control character.
                    923: .It
1.112     schwarze  924: In page header lines, GNU troff versions up to and including 1.21
                    925: only print
                    926: .Ar volume
                    927: names explicitly specified in the
                    928: .Sx \&TH
                    929: macro; mandoc and newer groff print the default volume name
                    930: corresponding to the
                    931: .Ar section
                    932: number when no
                    933: .Ar volume
                    934: is given, like in
                    935: .Xr mdoc 7 .
1.32      kristaps  936: .El
1.113     kristaps  937: .Pp
                    938: The
1.127     schwarze  939: .Sx EE ,
                    940: .Sx EX ,
                    941: .Sx OP ,
                    942: .Sx UE ,
                    943: and
                    944: .Sx UR
                    945: macros are part of the GNU extended
1.113     kristaps  946: .Nm
                    947: macro set, and may not be portable to non-GNU troff implementations.
1.1       kristaps  948: .Sh SEE ALSO
1.89      schwarze  949: .Xr man 1 ,
1.32      kristaps  950: .Xr mandoc 1 ,
1.98      kristaps  951: .Xr eqn 7 ,
1.89      schwarze  952: .Xr mandoc_char 7 ,
1.94      kristaps  953: .Xr mdoc 7 ,
                    954: .Xr roff 7 ,
                    955: .Xr tbl 7
1.78      schwarze  956: .Sh HISTORY
                    957: The
                    958: .Nm
                    959: language first appeared as a macro package for the roff typesetting
                    960: system in
                    961: .At v7 .
                    962: It was later rewritten by James Clark as a macro package for groff.
1.113     kristaps  963: Eric S. Raymond wrote the extended
                    964: .Nm
                    965: macros for groff in 2007.
1.78      schwarze  966: The stand-alone implementation that is part of the
                    967: .Xr mandoc 1
                    968: utility written by Kristaps Dzonsons appeared in
1.80      kristaps  969: .Ox 4.6 .
1.1       kristaps  970: .Sh AUTHORS
1.78      schwarze  971: This
1.32      kristaps  972: .Nm
1.23      kristaps  973: reference was written by
1.119     schwarze  974: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
1.1       kristaps  975: .Sh CAVEATS
1.68      kristaps  976: Do not use this language.
                    977: Use
1.32      kristaps  978: .Xr mdoc 7 ,
1.1       kristaps  979: instead.

CVSweb