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

Annotation of mandoc/man.7, Revision 1.142

1.142   ! schwarze    1: .\"    $Id: man.7,v 1.141 2018/12/16 02:21:00 schwarze Exp $
1.1       kristaps    2: .\"
1.115     schwarze    3: .\" Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
1.142   ! schwarze    4: .\" Copyright (c) 2011-2015,2017,2018,2019 Ingo Schwarze <schwarze@openbsd.org>
1.139     schwarze    5: .\" Copyright (c) 2017 Anthony Bentley <bentley@openbsd.org>
1.122     schwarze    6: .\" Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org>
1.1       kristaps    7: .\"
                      8: .\" Permission to use, copy, modify, and distribute this software for any
1.10      kristaps    9: .\" purpose with or without fee is hereby granted, provided that the above
                     10: .\" copyright notice and this permission notice appear in all copies.
                     11: .\"
                     12: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     13: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     14: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     15: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     16: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     17: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     18: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.1       kristaps   19: .\"
1.142   ! schwarze   20: .Dd $Mdocdate: December 16 2018 $
1.9       kristaps   21: .Dt MAN 7
1.1       kristaps   22: .Os
                     23: .Sh NAME
1.32      kristaps   24: .Nm man
1.111     schwarze   25: .Nd legacy formatting language for manual pages
1.1       kristaps   26: .Sh DESCRIPTION
1.140     schwarze   27: The
1.32      kristaps   28: .Nm man
1.140     schwarze   29: language was the standard formatting language for
                     30: .At
                     31: manual pages from 1979 to 1989.
                     32: Do not use it to write new manual pages: it is a purely presentational
                     33: language and lacks support for semantic markup.
1.19      kristaps   34: Use the
1.32      kristaps   35: .Xr mdoc 7
1.1       kristaps   36: language, instead.
1.32      kristaps   37: .Pp
1.111     schwarze   38: In a
1.32      kristaps   39: .Nm
1.111     schwarze   40: document, lines beginning with the control character
1.32      kristaps   41: .Sq \&.
1.111     schwarze   42: are called
                     43: .Dq macro lines .
                     44: The first word is the macro name.
                     45: It usually consists of two capital letters.
1.140     schwarze   46: For a list of portable macros, see
1.111     schwarze   47: .Sx MACRO OVERVIEW .
                     48: The words following the macro name are arguments to the macro.
                     49: .Pp
                     50: Lines not beginning with the control character are called
                     51: .Dq text lines .
                     52: They provide free-form text to be printed; the formatting of the text
                     53: depends on the respective processing context:
1.32      kristaps   54: .Bd -literal -offset indent
1.1       kristaps   55: \&.SH Macro lines change control state.
1.106     kristaps   56: Text lines are interpreted within the current state.
1.32      kristaps   57: .Ed
1.103     kristaps   58: .Pp
1.111     schwarze   59: Many aspects of the basic syntax of the
1.103     kristaps   60: .Nm
1.111     schwarze   61: language are based on the
                     62: .Xr roff 7
                     63: language; see the
                     64: .Em LANGUAGE SYNTAX
1.106     kristaps   65: and
1.111     schwarze   66: .Em MACRO SYNTAX
                     67: sections in the
                     68: .Xr roff 7
                     69: manual for details, in particular regarding
                     70: comments, escape sequences, whitespace, and quoting.
1.140     schwarze   71: .Pp
1.16      kristaps   72: Each
1.32      kristaps   73: .Nm
1.140     schwarze   74: document starts with the
1.39      kristaps   75: .Sx \&TH
1.140     schwarze   76: macro specifying the document's name and section, followed by the
                     77: .Sx NAME
                     78: section formatted as follows:
1.32      kristaps   79: .Bd -literal -offset indent
1.140     schwarze   80: \&.TH PROGNAME 1 1979-01-10
1.22      kristaps   81: \&.SH NAME
1.124     schwarze   82: \efBprogname\efR \e(en one line about what it does
1.32      kristaps   83: .Ed
1.110     schwarze   84: .Sh MACRO OVERVIEW
                     85: This overview is sorted such that macros of similar purpose are listed
1.140     schwarze   86: together.
                     87: Deprecated and non-portable macros are not included in the overview,
                     88: but can be found in the alphabetical reference below.
1.110     schwarze   89: .Ss Page header and footer meta-data
1.140     schwarze   90: .Bl -column "RS, RE" description
                     91: .It Sx TH Ta set the title: Ar name section date Op Ar source Op Ar volume
1.110     schwarze   92: .It Sx AT Ta display AT&T UNIX version in the page footer (<= 1 argument)
                     93: .It Sx UC Ta display BSD version in the page footer (<= 1 argument)
                     94: .El
                     95: .Ss Sections and paragraphs
1.140     schwarze   96: .Bl -column "RS, RE" description
1.110     schwarze   97: .It Sx SH Ta section header (one line)
                     98: .It Sx SS Ta subsection header (one line)
1.140     schwarze   99: .It Sx PP Ta start an undecorated paragraph (no arguments)
1.110     schwarze  100: .It Sx RS , RE Ta reset the left margin: Op Ar width
                    101: .It Sx IP Ta indented paragraph: Op Ar head Op Ar width
                    102: .It Sx TP Ta tagged paragraph: Op Ar width
1.118     schwarze  103: .It Sx PD Ta set vertical paragraph distance: Op Ar height
1.110     schwarze  104: .It Sx in Ta additional indent: Op Ar width
                    105: .El
                    106: .Ss Physical markup
1.140     schwarze  107: .Bl -column "RS, RE" description
1.110     schwarze  108: .It Sx B Ta boldface font
                    109: .It Sx I Ta italic font
                    110: .It Sx SB Ta small boldface font
                    111: .It Sx SM Ta small roman font
                    112: .It Sx BI Ta alternate between boldface and italic fonts
                    113: .It Sx BR Ta alternate between boldface and roman fonts
                    114: .It Sx IB Ta alternate between italic and boldface fonts
                    115: .It Sx IR Ta alternate between italic and roman fonts
                    116: .It Sx RB Ta alternate between roman and boldface fonts
                    117: .It Sx RI Ta alternate between roman and italic fonts
                    118: .El
1.111     schwarze  119: .Sh MACRO REFERENCE
1.22      kristaps  120: This section is a canonical reference to all macros, arranged
1.68      kristaps  121: alphabetically.
                    122: For the scoping of individual macros, see
1.32      kristaps  123: .Sx MACRO SYNTAX .
1.72      joerg     124: .Ss \&AT
                    125: Sets the volume for the footer for compatibility with man pages from
1.123     schwarze  126: .At
1.72      joerg     127: releases.
                    128: The optional arguments specify which release it is from.
1.39      kristaps  129: .Ss \&B
1.22      kristaps  130: Text is rendered in bold face.
1.39      kristaps  131: .Ss \&BI
1.68      kristaps  132: Text is rendered alternately in bold face and italic.
                    133: Thus,
1.32      kristaps  134: .Sq .BI this word and that
1.22      kristaps  135: causes
1.32      kristaps  136: .Sq this
1.22      kristaps  137: and
1.32      kristaps  138: .Sq and
1.55      kristaps  139: to render in bold face, while
1.32      kristaps  140: .Sq word
1.22      kristaps  141: and
1.32      kristaps  142: .Sq that
1.68      kristaps  143: render in italics.
                    144: Whitespace between arguments is omitted in output.
1.44      kristaps  145: .Pp
1.140     schwarze  146: Example:
1.46      kristaps  147: .Pp
1.93      kristaps  148: .Dl \&.BI bold italic bold italic
1.39      kristaps  149: .Ss \&BR
1.22      kristaps  150: Text is rendered alternately in bold face and roman (the default font).
                    151: Whitespace between arguments is omitted in output.
1.44      kristaps  152: See also
1.140     schwarze  153: .Sx \&BI .
1.39      kristaps  154: .Ss \&DT
1.135     schwarze  155: Restore the default tabulator positions.
                    156: They are at intervals of 0.5 inches.
                    157: This has no effect unless the tabulator positions were changed with the
                    158: .Xr roff 7
                    159: .Ic \&ta
                    160: request.
1.116     schwarze  161: .Ss \&EE
1.140     schwarze  162: This is a non-standard GNU extension.
1.116     schwarze  163: In
                    164: .Xr mandoc 1 ,
1.142   ! schwarze  165: it does the same as the
        !           166: .Xr roff 7
        !           167: .Sx \&fi
        !           168: request (switch to fill mode).
1.116     schwarze  169: .Ss \&EX
1.140     schwarze  170: This is a non-standard GNU extension.
1.116     schwarze  171: In
                    172: .Xr mandoc 1 ,
1.142   ! schwarze  173: it does the same as the
        !           174: .Xr roff 7
        !           175: .Ic \&nf
        !           176: request (switch to no-fill mode).
1.39      kristaps  177: .Ss \&HP
1.23      kristaps  178: Begin a paragraph whose initial output line is left-justified, but
1.27      kristaps  179: subsequent output lines are indented, with the following syntax:
1.44      kristaps  180: .Bd -filled -offset indent
                    181: .Pf \. Sx \&HP
1.130     schwarze  182: .Op Ar width
1.32      kristaps  183: .Ed
1.44      kristaps  184: .Pp
                    185: The
1.130     schwarze  186: .Ar width
1.117     schwarze  187: argument is a
                    188: .Xr roff 7
                    189: scaling width.
1.141     schwarze  190: If specified, it's saved for later paragraph left margins;
                    191: if unspecified, the saved or default width is used.
                    192: .Pp
                    193: This macro is portable, but deprecated
                    194: because it has no good representation in HTML output,
                    195: usually ending up indistinguishable from
                    196: .Sx \&PP .
1.39      kristaps  197: .Ss \&I
1.22      kristaps  198: Text is rendered in italics.
1.39      kristaps  199: .Ss \&IB
1.80      kristaps  200: Text is rendered alternately in italics and bold face.
                    201: Whitespace between arguments is omitted in output.
1.44      kristaps  202: See also
1.140     schwarze  203: .Sx \&BI .
1.39      kristaps  204: .Ss \&IP
1.44      kristaps  205: Begin an indented paragraph with the following syntax:
                    206: .Bd -filled -offset indent
                    207: .Pf \. Sx \&IP
1.130     schwarze  208: .Op Ar head Op Ar width
1.32      kristaps  209: .Ed
1.44      kristaps  210: .Pp
                    211: The
1.130     schwarze  212: .Ar width
1.117     schwarze  213: argument is a
                    214: .Xr roff 7
                    215: scaling width defining the left margin.
1.44      kristaps  216: It's saved for later paragraph left-margins; if unspecified, the saved or
                    217: default width is used.
                    218: .Pp
                    219: The
1.130     schwarze  220: .Ar head
1.68      kristaps  221: argument is used as a leading term, flushed to the left margin.
                    222: This is useful for bulleted paragraphs and so on.
1.39      kristaps  223: .Ss \&IR
1.22      kristaps  224: Text is rendered alternately in italics and roman (the default font).
                    225: Whitespace between arguments is omitted in output.
1.44      kristaps  226: See also
1.140     schwarze  227: .Sx \&BI .
1.39      kristaps  228: .Ss \&LP
1.140     schwarze  229: A synonym for
                    230: .Sx \&PP .
1.136     schwarze  231: .Ss \&ME
1.140     schwarze  232: End a mailto block started with
1.136     schwarze  233: .Sx \&MT .
1.140     schwarze  234: This is a non-standard GNU extension.
1.136     schwarze  235: .Ss \&MT
                    236: Begin a mailto block.
1.140     schwarze  237: This is a non-standard GNU extension.
1.136     schwarze  238: It has the following syntax:
                    239: .Bd -literal -offset indent
                    240: .Pf \. Sx \&MT Ar address
                    241: link description to be shown
                    242: .Pf \. Sx ME
                    243: .Ed
1.113     kristaps  244: .Ss \&OP
                    245: Optional command-line argument.
1.140     schwarze  246: This is a non-standard GNU extension.
1.114     schwarze  247: It has the following syntax:
1.113     kristaps  248: .Bd -filled -offset indent
                    249: .Pf \. Sx \&OP
1.130     schwarze  250: .Ar key Op Ar value
1.113     kristaps  251: .Ed
                    252: .Pp
                    253: The
1.130     schwarze  254: .Ar key
1.113     kristaps  255: is usually a command-line flag and
1.130     schwarze  256: .Ar value
1.113     kristaps  257: its argument.
1.39      kristaps  258: .Ss \&P
1.140     schwarze  259: A synonym for
                    260: .Sx \&PP .
1.118     schwarze  261: .Ss \&PD
                    262: Specify the vertical space to be inserted before each new paragraph.
                    263: .br
                    264: The syntax is as follows:
                    265: .Bd -filled -offset indent
                    266: .Pf \. Sx \&PD
1.130     schwarze  267: .Op Ar height
1.118     schwarze  268: .Ed
                    269: .Pp
                    270: The
1.130     schwarze  271: .Ar height
1.118     schwarze  272: argument is a
                    273: .Xr roff 7
                    274: scaling width.
                    275: It defaults to
                    276: .Cm 1v .
                    277: If the unit is omitted,
                    278: .Cm v
                    279: is assumed.
                    280: .Pp
                    281: This macro affects the spacing before any subsequent instances of
                    282: .Sx \&HP ,
                    283: .Sx \&IP ,
                    284: .Sx \&LP ,
                    285: .Sx \&P ,
                    286: .Sx \&PP ,
                    287: .Sx \&SH ,
                    288: .Sx \&SS ,
1.140     schwarze  289: .Sx \&SY ,
1.44      kristaps  290: and
1.45      kristaps  291: .Sx \&TP .
1.39      kristaps  292: .Ss \&PP
1.140     schwarze  293: Begin an undecorated paragraph.
                    294: The scope of a paragraph is closed by a subsequent paragraph,
                    295: sub-section, section, or end of file.
                    296: The saved paragraph left-margin width is reset to the default.
1.39      kristaps  297: .Ss \&RB
1.22      kristaps  298: Text is rendered alternately in roman (the default font) and bold face.
                    299: Whitespace between arguments is omitted in output.
1.44      kristaps  300: See also
1.140     schwarze  301: .Sx \&BI .
1.39      kristaps  302: .Ss \&RE
1.30      kristaps  303: Explicitly close out the scope of a prior
1.39      kristaps  304: .Sx \&RS .
1.129     schwarze  305: The default left margin is restored to the state before that
1.102     kristaps  306: .Sx \&RS
                    307: invocation.
1.129     schwarze  308: .Pp
                    309: The syntax is as follows:
                    310: .Bd -filled -offset indent
                    311: .Pf \. Sx \&RE
                    312: .Op Ar level
                    313: .Ed
                    314: .Pp
                    315: Without an argument, the most recent
                    316: .Sx \&RS
                    317: block is closed out.
                    318: If
                    319: .Ar level
                    320: is 1, all open
                    321: .Sx \&RS
                    322: blocks are closed out.
                    323: Otherwise,
                    324: .Ar level No \(mi 1
                    325: nested
                    326: .Sx \&RS
                    327: blocks remain open.
1.39      kristaps  328: .Ss \&RI
1.22      kristaps  329: Text is rendered alternately in roman (the default font) and italics.
                    330: Whitespace between arguments is omitted in output.
1.44      kristaps  331: See also
1.140     schwarze  332: .Sx \&BI .
1.39      kristaps  333: .Ss \&RS
1.102     kristaps  334: Temporarily reset the default left margin.
1.44      kristaps  335: This has the following syntax:
                    336: .Bd -filled -offset indent
1.102     kristaps  337: .Pf \. Sx \&RS
1.130     schwarze  338: .Op Ar width
1.32      kristaps  339: .Ed
1.44      kristaps  340: .Pp
                    341: The
1.130     schwarze  342: .Ar width
1.117     schwarze  343: argument is a
                    344: .Xr roff 7
                    345: scaling width.
1.55      kristaps  346: If not specified, the saved or default width is used.
1.102     kristaps  347: .Pp
                    348: See also
                    349: .Sx \&RE .
1.39      kristaps  350: .Ss \&SB
1.22      kristaps  351: Text is rendered in small size (one point smaller than the default font)
                    352: bold face.
1.39      kristaps  353: .Ss \&SH
1.68      kristaps  354: Begin a section.
                    355: The scope of a section is only closed by another section or the end of
                    356: file.
1.78      schwarze  357: The paragraph left-margin width is reset to the default.
1.39      kristaps  358: .Ss \&SM
1.22      kristaps  359: Text is rendered in small size (one point smaller than the default
                    360: font).
1.39      kristaps  361: .Ss \&SS
1.68      kristaps  362: Begin a sub-section.
                    363: The scope of a sub-section is closed by a subsequent sub-section,
                    364: section, or end of file.
1.78      schwarze  365: The paragraph left-margin width is reset to the default.
1.139     schwarze  366: .Ss \&SY
                    367: Begin a synopsis block with the following syntax:
                    368: .Bd -unfilled -offset indent
                    369: .Pf \. Sx \&SY Ar command
                    370: .Ar arguments
                    371: .Pf \. Sx \&YS
                    372: .Ed
                    373: .Pp
                    374: This is a non-standard GNU extension
                    375: and very rarely used even in GNU manual pages.
                    376: Formatting is similar to
                    377: .Sx \&IP .
1.39      kristaps  378: .Ss \&TH
1.140     schwarze  379: Set the name of the manual page for use in the page header
1.128     schwarze  380: and footer with the following syntax:
1.44      kristaps  381: .Bd -filled -offset indent
                    382: .Pf \. Sx \&TH
1.140     schwarze  383: .Ar name section date
1.99      schwarze  384: .Op Ar source Op Ar volume
1.44      kristaps  385: .Ed
1.43      kristaps  386: .Pp
1.99      schwarze  387: Conventionally, the document
1.140     schwarze  388: .Ar name
1.99      schwarze  389: is given in all caps.
1.141     schwarze  390: The
                    391: .Ar section
                    392: is usually a single digit, in a few cases followed by a letter.
1.99      schwarze  393: The recommended
                    394: .Ar date
                    395: format is
                    396: .Sy YYYY-MM-DD
                    397: as specified in the ISO-8601 standard;
                    398: if the argument does not conform, it is printed verbatim.
                    399: If the
                    400: .Ar date
                    401: is empty or not specified, the current date is used.
                    402: The optional
                    403: .Ar source
1.68      kristaps  404: string specifies the organisation providing the utility.
1.128     schwarze  405: When unspecified,
                    406: .Xr mandoc 1
                    407: uses its
                    408: .Fl Ios
                    409: argument.
1.68      kristaps  410: The
1.99      schwarze  411: .Ar volume
1.141     schwarze  412: string replaces the default volume title of the
                    413: .Ar section .
1.43      kristaps  414: .Pp
                    415: Examples:
1.46      kristaps  416: .Pp
1.93      kristaps  417: .Dl \&.TH CVS 5 "1992-02-12" GNU
1.39      kristaps  418: .Ss \&TP
1.25      kristaps  419: Begin a paragraph where the head, if exceeding the indentation width, is
1.141     schwarze  420: followed by a newline; if not, the body follows on the same line after
                    421: advancing to the indentation width.
1.68      kristaps  422: Subsequent output lines are indented.
1.44      kristaps  423: The syntax is as follows:
1.141     schwarze  424: .Bd -unfilled -offset indent
                    425: .Pf \. Sx \&TP Op Ar width
                    426: .Ar head No \e" one line
                    427: .Ar body
1.32      kristaps  428: .Ed
                    429: .Pp
1.44      kristaps  430: The
1.130     schwarze  431: .Ar width
1.117     schwarze  432: argument is a
                    433: .Xr roff 7
                    434: scaling width.
1.44      kristaps  435: If specified, it's saved for later paragraph left-margins; if
1.27      kristaps  436: unspecified, the saved or default width is used.
1.138     schwarze  437: .Ss \&TQ
                    438: Like
                    439: .Sx \&TP ,
                    440: except that no vertical spacing is inserted before the paragraph.
1.140     schwarze  441: This is a non-standard GNU extension
                    442: and very rarely used even in GNU manual pages.
1.72      joerg     443: .Ss \&UC
                    444: Sets the volume for the footer for compatibility with man pages from
1.120     schwarze  445: .Bx
                    446: releases.
1.72      joerg     447: The optional first argument specifies which release it is from.
1.121     schwarze  448: .Ss \&UE
1.140     schwarze  449: End a uniform resource identifier block started with
                    450: .Sx \&UR .
                    451: This is a non-standard GNU extension.
1.121     schwarze  452: .Ss \&UR
                    453: Begin a uniform resource identifier block.
1.140     schwarze  454: This is a non-standard GNU extension.
1.121     schwarze  455: It has the following syntax:
                    456: .Bd -literal -offset indent
                    457: .Pf \. Sx \&UR Ar uri
                    458: link description to be shown
                    459: .Pf \. Sx UE
                    460: .Ed
1.139     schwarze  461: .Ss \&YS
1.140     schwarze  462: End a synopsis block started with
                    463: .Sx \&SY .
1.139     schwarze  464: This is a non-standard GNU extension.
1.79      kristaps  465: .Ss \&in
                    466: Indent relative to the current indentation:
                    467: .Pp
1.130     schwarze  468: .D1 Pf \. Sx \&in Op Ar width
1.79      kristaps  469: .Pp
                    470: If
1.130     schwarze  471: .Ar width
1.79      kristaps  472: is signed, the new offset is relative.
                    473: Otherwise, it is absolute.
                    474: This value is reset upon the next paragraph, section, or sub-section.
1.111     schwarze  475: .Sh MACRO SYNTAX
                    476: The
                    477: .Nm
                    478: macros are classified by scope: line scope or block scope.
                    479: Line macros are only scoped to the current line (and, in some
                    480: situations, the subsequent line).
                    481: Block macros are scoped to the current line and subsequent lines until
                    482: closed by another block macro.
                    483: .Ss Line Macros
                    484: Line macros are generally scoped to the current line, with the body
                    485: consisting of zero or more arguments.
                    486: If a macro is scoped to the next line and the line arguments are empty,
                    487: the next line, which must be text, is used instead.
                    488: Thus:
                    489: .Bd -literal -offset indent
                    490: \&.I
                    491: foo
                    492: .Ed
                    493: .Pp
                    494: is equivalent to
                    495: .Sq \&.I foo .
                    496: If next-line macros are invoked consecutively, only the last is used.
                    497: If a next-line macro is followed by a non-next-line macro, an error is
1.134     schwarze  498: raised.
1.111     schwarze  499: .Pp
                    500: The syntax is as follows:
                    501: .Bd -literal -offset indent
                    502: \&.YO \(lBbody...\(rB
                    503: \(lBbody...\(rB
                    504: .Ed
                    505: .Bl -column "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX" -offset indent
                    506: .It Em Macro Ta Em Arguments Ta Em Scope     Ta Em Notes
                    507: .It Sx \&AT  Ta    <=1       Ta    current   Ta    \&
                    508: .It Sx \&B   Ta    n         Ta    next-line Ta    \&
                    509: .It Sx \&BI  Ta    n         Ta    current   Ta    \&
                    510: .It Sx \&BR  Ta    n         Ta    current   Ta    \&
                    511: .It Sx \&DT  Ta    0         Ta    current   Ta    \&
1.140     schwarze  512: .It Sx \&EE  Ta    0         Ta    current   Ta    GNU
                    513: .It Sx \&EX  Ta    0         Ta    current   Ta    GNU
1.111     schwarze  514: .It Sx \&I   Ta    n         Ta    next-line Ta    \&
                    515: .It Sx \&IB  Ta    n         Ta    current   Ta    \&
                    516: .It Sx \&IR  Ta    n         Ta    current   Ta    \&
1.140     schwarze  517: .It Sx \&OP  Ta    >=1       Ta    current   Ta    GNU
1.121     schwarze  518: .It Sx \&PD  Ta    1         Ta    current   Ta    \&
1.111     schwarze  519: .It Sx \&RB  Ta    n         Ta    current   Ta    \&
                    520: .It Sx \&RI  Ta    n         Ta    current   Ta    \&
                    521: .It Sx \&SB  Ta    n         Ta    next-line Ta    \&
                    522: .It Sx \&SM  Ta    n         Ta    next-line Ta    \&
                    523: .It Sx \&TH  Ta    >1, <6    Ta    current   Ta    \&
                    524: .It Sx \&UC  Ta    <=1       Ta    current   Ta    \&
1.140     schwarze  525: .It Sx \&in  Ta    1         Ta    current   Ta    Xr roff 7
1.111     schwarze  526: .El
                    527: .Ss Block Macros
                    528: Block macros comprise a head and body.
                    529: As with in-line macros, the head is scoped to the current line and, in
                    530: one circumstance, the next line (the next-line stipulations as in
                    531: .Sx Line Macros
                    532: apply here as well).
                    533: .Pp
                    534: The syntax is as follows:
                    535: .Bd -literal -offset indent
                    536: \&.YO \(lBhead...\(rB
                    537: \(lBhead...\(rB
                    538: \(lBbody...\(rB
                    539: .Ed
                    540: .Pp
                    541: The closure of body scope may be to the section, where a macro is closed
                    542: by
                    543: .Sx \&SH ;
                    544: sub-section, closed by a section or
                    545: .Sx \&SS ;
1.140     schwarze  546: or paragraph, closed by a section, sub-section,
1.111     schwarze  547: .Sx \&HP ,
                    548: .Sx \&IP ,
                    549: .Sx \&LP ,
                    550: .Sx \&P ,
                    551: .Sx \&PP ,
1.140     schwarze  552: .Sx \&RE ,
                    553: .Sx \&SY ,
1.111     schwarze  554: or
                    555: .Sx \&TP .
                    556: No closure refers to an explicit block closing macro.
                    557: .Pp
                    558: As a rule, block macros may not be nested; thus, calling a block macro
                    559: while another block macro scope is open, and the open scope is not
                    560: implicitly closed, is syntactically incorrect.
                    561: .Bl -column "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX" -offset indent
                    562: .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope  Ta Em Notes
                    563: .It Sx \&HP  Ta    <2        Ta    current    Ta    paragraph   Ta    \&
                    564: .It Sx \&IP  Ta    <3        Ta    current    Ta    paragraph   Ta    \&
                    565: .It Sx \&LP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
1.140     schwarze  566: .It Sx \&ME  Ta    0         Ta    none       Ta    none        Ta    GNU
                    567: .It Sx \&MT  Ta    1         Ta    current    Ta    to \&ME     Ta    GNU
1.111     schwarze  568: .It Sx \&P   Ta    0         Ta    current    Ta    paragraph   Ta    \&
                    569: .It Sx \&PP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
1.140     schwarze  570: .It Sx \&RE  Ta    <=1       Ta    current    Ta    none        Ta    \&
                    571: .It Sx \&RS  Ta    1         Ta    current    Ta    to \&RE     Ta    \&
1.111     schwarze  572: .It Sx \&SH  Ta    >0        Ta    next-line  Ta    section     Ta    \&
                    573: .It Sx \&SS  Ta    >0        Ta    next-line  Ta    sub-section Ta    \&
1.140     schwarze  574: .It Sx \&SY  Ta    1         Ta    current    Ta    to \&YS     Ta    GNU
1.111     schwarze  575: .It Sx \&TP  Ta    n         Ta    next-line  Ta    paragraph   Ta    \&
1.140     schwarze  576: .It Sx \&TQ  Ta    n         Ta    next-line  Ta    paragraph   Ta    GNU
                    577: .It Sx \&UE  Ta    0         Ta    current    Ta    none        Ta    GNU
                    578: .It Sx \&UR  Ta    1         Ta    current    Ta    part        Ta    GNU
                    579: .It Sx \&YS  Ta    0         Ta    none       Ta    none        Ta    GNU
1.111     schwarze  580: .El
                    581: .Pp
                    582: If a block macro is next-line scoped, it may only be followed by in-line
                    583: macros for decorating text.
                    584: .Ss Font handling
                    585: In
                    586: .Nm
                    587: documents, both
                    588: .Sx Physical markup
                    589: macros and
                    590: .Xr roff 7
                    591: .Ql \ef
                    592: font escape sequences can be used to choose fonts.
                    593: In text lines, the effect of manual font selection by escape sequences
                    594: only lasts until the next macro invocation; in macro lines, it only lasts
                    595: until the end of the macro scope.
                    596: Note that macros like
                    597: .Sx \&BR
                    598: open and close a font scope for each argument.
1.1       kristaps  599: .Sh SEE ALSO
1.89      schwarze  600: .Xr man 1 ,
1.32      kristaps  601: .Xr mandoc 1 ,
1.98      kristaps  602: .Xr eqn 7 ,
1.89      schwarze  603: .Xr mandoc_char 7 ,
1.94      kristaps  604: .Xr mdoc 7 ,
                    605: .Xr roff 7 ,
                    606: .Xr tbl 7
1.78      schwarze  607: .Sh HISTORY
                    608: The
                    609: .Nm
                    610: language first appeared as a macro package for the roff typesetting
                    611: system in
                    612: .At v7 .
                    613: It was later rewritten by James Clark as a macro package for groff.
1.113     kristaps  614: Eric S. Raymond wrote the extended
                    615: .Nm
                    616: macros for groff in 2007.
1.78      schwarze  617: The stand-alone implementation that is part of the
                    618: .Xr mandoc 1
                    619: utility written by Kristaps Dzonsons appeared in
1.80      kristaps  620: .Ox 4.6 .
1.1       kristaps  621: .Sh AUTHORS
1.78      schwarze  622: This
1.32      kristaps  623: .Nm
1.23      kristaps  624: reference was written by
1.119     schwarze  625: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .

CVSweb