Annotation of mandoc/man.7, Revision 1.149
1.149 ! schwarze 1: .\" $Id: man.7,v 1.148 2021/08/05 14:31:14 schwarze Exp $
1.1 kristaps 2: .\"
1.115 schwarze 3: .\" Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
1.145 schwarze 4: .\" Copyright (c) 2011-2015, 2017-2020 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.149 ! schwarze 20: .Dd $Mdocdate: August 5 2021 $
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.143 schwarze 75: .Ic 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
1.143 schwarze 91: .It Ic TH Ta set the title: Ar name section date Op Ar source Op Ar volume
92: .It Ic AT Ta display AT&T UNIX version in the page footer (<= 1 argument)
93: .It Ic UC Ta display BSD version in the page footer (<= 1 argument)
1.110 schwarze 94: .El
95: .Ss Sections and paragraphs
1.140 schwarze 96: .Bl -column "RS, RE" description
1.143 schwarze 97: .It Ic SH Ta section header (one line)
98: .It Ic SS Ta subsection header (one line)
99: .It Ic PP Ta start an undecorated paragraph (no arguments)
100: .It Ic IP Ta indented paragraph: Op Ar head Op Ar width
101: .It Ic TP Ta tagged paragraph: Op Ar width
102: .It Ic PD Ta set vertical paragraph distance: Op Ar height
1.149 ! schwarze 103: .It Ic EX , EE Ta display an example (no arguments)
! 104: .It Ic RS , RE Ta reset the left margin: Op Ar width
1.143 schwarze 105: .It Ic in Ta additional indent: Op Ar width
1.110 schwarze 106: .El
107: .Ss Physical markup
1.140 schwarze 108: .Bl -column "RS, RE" description
1.143 schwarze 109: .It Ic B Ta boldface font
110: .It Ic I Ta italic font
111: .It Ic SB Ta small boldface font
112: .It Ic SM Ta small roman font
113: .It Ic BI Ta alternate between boldface and italic fonts
114: .It Ic BR Ta alternate between boldface and roman fonts
115: .It Ic IB Ta alternate between italic and boldface fonts
116: .It Ic IR Ta alternate between italic and roman fonts
117: .It Ic RB Ta alternate between roman and boldface fonts
118: .It Ic RI Ta alternate between roman and italic fonts
1.110 schwarze 119: .El
1.111 schwarze 120: .Sh MACRO REFERENCE
1.22 kristaps 121: This section is a canonical reference to all macros, arranged
1.68 kristaps 122: alphabetically.
123: For the scoping of individual macros, see
1.32 kristaps 124: .Sx MACRO SYNTAX .
1.143 schwarze 125: .Bl -tag -width 3n
126: .It Ic AT
1.72 joerg 127: Sets the volume for the footer for compatibility with man pages from
1.123 schwarze 128: .At
1.72 joerg 129: releases.
130: The optional arguments specify which release it is from.
1.145 schwarze 131: This macro is an extension that first appeared in
132: .Bx 4.3 .
1.143 schwarze 133: .It Ic B
1.22 kristaps 134: Text is rendered in bold face.
1.143 schwarze 135: .It Ic BI
1.68 kristaps 136: Text is rendered alternately in bold face and italic.
137: Thus,
1.32 kristaps 138: .Sq .BI this word and that
1.22 kristaps 139: causes
1.32 kristaps 140: .Sq this
1.22 kristaps 141: and
1.32 kristaps 142: .Sq and
1.55 kristaps 143: to render in bold face, while
1.32 kristaps 144: .Sq word
1.22 kristaps 145: and
1.32 kristaps 146: .Sq that
1.68 kristaps 147: render in italics.
148: Whitespace between arguments is omitted in output.
1.44 kristaps 149: .Pp
1.140 schwarze 150: Example:
1.46 kristaps 151: .Pp
1.93 kristaps 152: .Dl \&.BI bold italic bold italic
1.143 schwarze 153: .It Ic BR
1.22 kristaps 154: Text is rendered alternately in bold face and roman (the default font).
155: Whitespace between arguments is omitted in output.
1.44 kristaps 156: See also
1.143 schwarze 157: .Ic BI .
158: .It Ic DT
1.135 schwarze 159: Restore the default tabulator positions.
160: They are at intervals of 0.5 inches.
161: This has no effect unless the tabulator positions were changed with the
162: .Xr roff 7
1.143 schwarze 163: .Ic ta
1.135 schwarze 164: request.
1.143 schwarze 165: .It Ic EE
1.149 ! schwarze 166: End an example block started with
! 167: .Ic EX .
! 168: This is a Version 9
1.144 schwarze 169: .At
170: extension later adopted by GNU.
1.116 schwarze 171: In
172: .Xr mandoc 1 ,
1.142 schwarze 173: it does the same as the
174: .Xr roff 7
1.143 schwarze 175: .Ic fi
1.142 schwarze 176: request (switch to fill mode).
1.143 schwarze 177: .It Ic EX
1.149 ! schwarze 178: Begin a block to display an example.
! 179: This is a Version 9
1.144 schwarze 180: .At
181: extension later adopted by GNU.
1.116 schwarze 182: In
183: .Xr mandoc 1 ,
1.142 schwarze 184: it does the same as the
185: .Xr roff 7
1.143 schwarze 186: .Ic nf
1.142 schwarze 187: request (switch to no-fill mode).
1.143 schwarze 188: .It Ic HP
1.23 kristaps 189: Begin a paragraph whose initial output line is left-justified, but
1.27 kristaps 190: subsequent output lines are indented, with the following syntax:
1.143 schwarze 191: .Pp
192: .D1 Pf . Ic HP Op Ar width
1.44 kristaps 193: .Pp
194: The
1.130 schwarze 195: .Ar width
1.117 schwarze 196: argument is a
197: .Xr roff 7
198: scaling width.
1.141 schwarze 199: If specified, it's saved for later paragraph left margins;
200: if unspecified, the saved or default width is used.
201: .Pp
202: This macro is portable, but deprecated
203: because it has no good representation in HTML output,
204: usually ending up indistinguishable from
1.143 schwarze 205: .Ic PP .
206: .It Ic I
1.22 kristaps 207: Text is rendered in italics.
1.143 schwarze 208: .It Ic IB
1.80 kristaps 209: Text is rendered alternately in italics and bold face.
210: Whitespace between arguments is omitted in output.
1.44 kristaps 211: See also
1.143 schwarze 212: .Ic BI .
213: .It Ic IP
1.44 kristaps 214: Begin an indented paragraph with the following syntax:
1.143 schwarze 215: .Pp
216: .D1 Pf . Ic IP Op Ar head Op Ar width
1.44 kristaps 217: .Pp
218: The
1.130 schwarze 219: .Ar width
1.117 schwarze 220: argument is a
221: .Xr roff 7
222: scaling width defining the left margin.
1.44 kristaps 223: It's saved for later paragraph left-margins; if unspecified, the saved or
224: default width is used.
225: .Pp
226: The
1.130 schwarze 227: .Ar head
1.68 kristaps 228: argument is used as a leading term, flushed to the left margin.
229: This is useful for bulleted paragraphs and so on.
1.143 schwarze 230: .It Ic IR
1.22 kristaps 231: Text is rendered alternately in italics and roman (the default font).
232: Whitespace between arguments is omitted in output.
1.44 kristaps 233: See also
1.143 schwarze 234: .Ic BI .
235: .It Ic LP
1.140 schwarze 236: A synonym for
1.143 schwarze 237: .Ic PP .
238: .It Ic ME
1.140 schwarze 239: End a mailto block started with
1.143 schwarze 240: .Ic MT .
1.149 ! schwarze 241: This is a GNU extension.
1.143 schwarze 242: .It Ic MT
1.136 schwarze 243: Begin a mailto block.
1.149 ! schwarze 244: This is a GNU extension.
1.136 schwarze 245: It has the following syntax:
1.143 schwarze 246: .Bd -unfilled -offset indent
247: .Pf . Ic MT Ar address
1.136 schwarze 248: link description to be shown
1.143 schwarze 249: .Pf . Ic ME
1.136 schwarze 250: .Ed
1.143 schwarze 251: .It Ic OP
1.113 kristaps 252: Optional command-line argument.
1.149 ! schwarze 253: This is a rarely used DWB extension.
1.114 schwarze 254: It has the following syntax:
1.143 schwarze 255: .Pp
256: .D1 Pf . Ic OP Ar key Op Ar value
1.113 kristaps 257: .Pp
258: The
1.130 schwarze 259: .Ar key
1.113 kristaps 260: is usually a command-line flag and
1.130 schwarze 261: .Ar value
1.113 kristaps 262: its argument.
1.143 schwarze 263: .It Ic P
1.145 schwarze 264: This synonym for
265: .Ic PP
266: is an
267: .At III
268: extension later adopted by
269: .Bx 4.3 .
1.143 schwarze 270: .It Ic PD
1.118 schwarze 271: Specify the vertical space to be inserted before each new paragraph.
272: .br
273: The syntax is as follows:
1.143 schwarze 274: .Pp
275: .D1 Pf . Ic PD Op Ar height
1.118 schwarze 276: .Pp
277: The
1.130 schwarze 278: .Ar height
1.118 schwarze 279: argument is a
280: .Xr roff 7
281: scaling width.
282: It defaults to
283: .Cm 1v .
284: If the unit is omitted,
285: .Cm v
286: is assumed.
287: .Pp
288: This macro affects the spacing before any subsequent instances of
1.143 schwarze 289: .Ic HP ,
290: .Ic IP ,
291: .Ic LP ,
292: .Ic P ,
293: .Ic PP ,
294: .Ic SH ,
295: .Ic SS ,
296: .Ic SY ,
1.44 kristaps 297: and
1.143 schwarze 298: .Ic TP .
299: .It Ic PP
1.140 schwarze 300: Begin an undecorated paragraph.
301: The scope of a paragraph is closed by a subsequent paragraph,
302: sub-section, section, or end of file.
303: The saved paragraph left-margin width is reset to the default.
1.143 schwarze 304: .It Ic RB
1.22 kristaps 305: Text is rendered alternately in roman (the default font) and bold face.
306: Whitespace between arguments is omitted in output.
1.44 kristaps 307: See also
1.143 schwarze 308: .Ic BI .
309: .It Ic RE
1.30 kristaps 310: Explicitly close out the scope of a prior
1.143 schwarze 311: .Ic RS .
1.129 schwarze 312: The default left margin is restored to the state before that
1.143 schwarze 313: .Ic RS
1.102 kristaps 314: invocation.
1.129 schwarze 315: .Pp
316: The syntax is as follows:
1.143 schwarze 317: .Pp
318: .D1 Pf . Ic RE Op Ar level
1.129 schwarze 319: .Pp
320: Without an argument, the most recent
1.143 schwarze 321: .Ic RS
1.129 schwarze 322: block is closed out.
323: If
324: .Ar level
325: is 1, all open
1.143 schwarze 326: .Ic RS
1.129 schwarze 327: blocks are closed out.
328: Otherwise,
329: .Ar level No \(mi 1
330: nested
1.143 schwarze 331: .Ic RS
1.129 schwarze 332: blocks remain open.
1.143 schwarze 333: .It Ic RI
1.22 kristaps 334: Text is rendered alternately in roman (the default font) and italics.
335: Whitespace between arguments is omitted in output.
1.44 kristaps 336: See also
1.143 schwarze 337: .Ic BI .
338: .It Ic RS
1.102 kristaps 339: Temporarily reset the default left margin.
1.44 kristaps 340: This has the following syntax:
1.143 schwarze 341: .Pp
342: .D1 Pf . Ic RS Op Ar width
1.44 kristaps 343: .Pp
344: The
1.130 schwarze 345: .Ar width
1.117 schwarze 346: argument is a
347: .Xr roff 7
348: scaling width.
1.55 kristaps 349: If not specified, the saved or default width is used.
1.102 kristaps 350: .Pp
351: See also
1.143 schwarze 352: .Ic RE .
353: .It Ic SB
1.22 kristaps 354: Text is rendered in small size (one point smaller than the default font)
355: bold face.
1.145 schwarze 356: This macro is an extension that probably first appeared in SunOS 4.0
357: and was later adopted by GNU and by
358: .Bx 4.4 .
1.143 schwarze 359: .It Ic SH
1.68 kristaps 360: Begin a section.
361: The scope of a section is only closed by another section or the end of
362: file.
1.78 schwarze 363: The paragraph left-margin width is reset to the default.
1.143 schwarze 364: .It Ic SM
1.22 kristaps 365: Text is rendered in small size (one point smaller than the default
366: font).
1.143 schwarze 367: .It Ic SS
1.68 kristaps 368: Begin a sub-section.
369: The scope of a sub-section is closed by a subsequent sub-section,
370: section, or end of file.
1.78 schwarze 371: The paragraph left-margin width is reset to the default.
1.143 schwarze 372: .It Ic SY
1.139 schwarze 373: Begin a synopsis block with the following syntax:
374: .Bd -unfilled -offset indent
1.143 schwarze 375: .Pf . Ic SY Ar command
1.139 schwarze 376: .Ar arguments
1.143 schwarze 377: .Pf . Ic YS
1.139 schwarze 378: .Ed
379: .Pp
1.149 ! schwarze 380: This is a GNU extension and rarely used even in GNU manual pages.
1.139 schwarze 381: Formatting is similar to
1.143 schwarze 382: .Ic IP .
383: .It Ic TH
1.140 schwarze 384: Set the name of the manual page for use in the page header
1.128 schwarze 385: and footer with the following syntax:
1.143 schwarze 386: .Pp
387: .D1 Pf . Ic TH Ar name section date Op Ar source Op Ar volume
1.43 kristaps 388: .Pp
1.99 schwarze 389: Conventionally, the document
1.140 schwarze 390: .Ar name
1.99 schwarze 391: is given in all caps.
1.141 schwarze 392: The
393: .Ar section
394: is usually a single digit, in a few cases followed by a letter.
1.99 schwarze 395: The recommended
396: .Ar date
397: format is
398: .Sy YYYY-MM-DD
399: as specified in the ISO-8601 standard;
400: if the argument does not conform, it is printed verbatim.
401: If the
402: .Ar date
403: is empty or not specified, the current date is used.
404: The optional
405: .Ar source
1.68 kristaps 406: string specifies the organisation providing the utility.
1.128 schwarze 407: When unspecified,
408: .Xr mandoc 1
409: uses its
410: .Fl Ios
411: argument.
1.68 kristaps 412: The
1.99 schwarze 413: .Ar volume
1.141 schwarze 414: string replaces the default volume title of the
415: .Ar section .
1.43 kristaps 416: .Pp
417: Examples:
1.46 kristaps 418: .Pp
1.93 kristaps 419: .Dl \&.TH CVS 5 "1992-02-12" GNU
1.143 schwarze 420: .It Ic TP
1.25 kristaps 421: Begin a paragraph where the head, if exceeding the indentation width, is
1.141 schwarze 422: followed by a newline; if not, the body follows on the same line after
423: advancing to the indentation width.
1.68 kristaps 424: Subsequent output lines are indented.
1.44 kristaps 425: The syntax is as follows:
1.141 schwarze 426: .Bd -unfilled -offset indent
1.143 schwarze 427: .Pf . Ic TP Op Ar width
1.141 schwarze 428: .Ar head No \e" one line
429: .Ar body
1.32 kristaps 430: .Ed
431: .Pp
1.44 kristaps 432: The
1.130 schwarze 433: .Ar width
1.117 schwarze 434: argument is a
435: .Xr roff 7
436: scaling width.
1.44 kristaps 437: If specified, it's saved for later paragraph left-margins; if
1.27 kristaps 438: unspecified, the saved or default width is used.
1.143 schwarze 439: .It Ic TQ
1.138 schwarze 440: Like
1.143 schwarze 441: .Ic TP ,
1.138 schwarze 442: except that no vertical spacing is inserted before the paragraph.
1.149 ! schwarze 443: This is a GNU extension and rarely used even in GNU manual pages.
1.143 schwarze 444: .It Ic UC
1.72 joerg 445: Sets the volume for the footer for compatibility with man pages from
1.120 schwarze 446: .Bx
447: releases.
1.72 joerg 448: The optional first argument specifies which release it is from.
1.145 schwarze 449: This macro is an extension that first appeared in
450: .Bx 3 .
1.143 schwarze 451: .It Ic UE
1.140 schwarze 452: End a uniform resource identifier block started with
1.143 schwarze 453: .Ic UR .
1.149 ! schwarze 454: This is a GNU extension.
1.143 schwarze 455: .It Ic UR
1.121 schwarze 456: Begin a uniform resource identifier block.
1.149 ! schwarze 457: This is a GNU extension.
1.121 schwarze 458: It has the following syntax:
1.143 schwarze 459: .Bd -unfilled -offset indent
460: .Pf . Ic UR Ar uri
1.121 schwarze 461: link description to be shown
1.143 schwarze 462: .Pf . Ic UE
1.121 schwarze 463: .Ed
1.143 schwarze 464: .It Ic YS
1.140 schwarze 465: End a synopsis block started with
1.143 schwarze 466: .Ic SY .
1.149 ! schwarze 467: This is a GNU extension.
1.143 schwarze 468: .It Ic in
1.79 kristaps 469: Indent relative to the current indentation:
470: .Pp
1.143 schwarze 471: .D1 Pf . Ic in Op Ar width
1.79 kristaps 472: .Pp
473: If
1.130 schwarze 474: .Ar width
1.79 kristaps 475: is signed, the new offset is relative.
476: Otherwise, it is absolute.
477: This value is reset upon the next paragraph, section, or sub-section.
1.143 schwarze 478: .El
1.111 schwarze 479: .Sh MACRO SYNTAX
480: The
481: .Nm
482: macros are classified by scope: line scope or block scope.
483: Line macros are only scoped to the current line (and, in some
484: situations, the subsequent line).
485: Block macros are scoped to the current line and subsequent lines until
486: closed by another block macro.
487: .Ss Line Macros
488: Line macros are generally scoped to the current line, with the body
489: consisting of zero or more arguments.
490: If a macro is scoped to the next line and the line arguments are empty,
491: the next line, which must be text, is used instead.
492: Thus:
493: .Bd -literal -offset indent
494: \&.I
495: foo
496: .Ed
497: .Pp
498: is equivalent to
1.143 schwarze 499: .Sq .I foo .
1.111 schwarze 500: If next-line macros are invoked consecutively, only the last is used.
501: If a next-line macro is followed by a non-next-line macro, an error is
1.134 schwarze 502: raised.
1.111 schwarze 503: .Pp
504: The syntax is as follows:
505: .Bd -literal -offset indent
506: \&.YO \(lBbody...\(rB
507: \(lBbody...\(rB
508: .Ed
509: .Bl -column "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX" -offset indent
510: .It Em Macro Ta Em Arguments Ta Em Scope Ta Em Notes
1.143 schwarze 511: .It Ic AT Ta <=1 Ta current Ta \&
512: .It Ic B Ta n Ta next-line Ta \&
513: .It Ic BI Ta n Ta current Ta \&
514: .It Ic BR Ta n Ta current Ta \&
515: .It Ic DT Ta 0 Ta current Ta \&
1.144 schwarze 516: .It Ic EE Ta 0 Ta current Ta Version 9 At
517: .It Ic EX Ta 0 Ta current Ta Version 9 At
1.143 schwarze 518: .It Ic I Ta n Ta next-line Ta \&
519: .It Ic IB Ta n Ta current Ta \&
520: .It Ic IR Ta n Ta current Ta \&
1.148 schwarze 521: .It Ic OP Ta >=1 Ta current Ta DWB
1.143 schwarze 522: .It Ic PD Ta 1 Ta current Ta \&
523: .It Ic RB Ta n Ta current Ta \&
524: .It Ic RI Ta n Ta current Ta \&
525: .It Ic SB Ta n Ta next-line Ta \&
526: .It Ic SM Ta n Ta next-line Ta \&
527: .It Ic TH Ta >1, <6 Ta current Ta \&
528: .It Ic UC Ta <=1 Ta current Ta \&
529: .It Ic in Ta 1 Ta current Ta Xr roff 7
1.111 schwarze 530: .El
531: .Ss Block Macros
532: Block macros comprise a head and body.
533: As with in-line macros, the head is scoped to the current line and, in
534: one circumstance, the next line (the next-line stipulations as in
535: .Sx Line Macros
536: apply here as well).
537: .Pp
538: The syntax is as follows:
539: .Bd -literal -offset indent
540: \&.YO \(lBhead...\(rB
541: \(lBhead...\(rB
542: \(lBbody...\(rB
543: .Ed
544: .Pp
545: The closure of body scope may be to the section, where a macro is closed
546: by
1.143 schwarze 547: .Ic SH ;
1.111 schwarze 548: sub-section, closed by a section or
1.143 schwarze 549: .Ic SS ;
1.140 schwarze 550: or paragraph, closed by a section, sub-section,
1.143 schwarze 551: .Ic HP ,
552: .Ic IP ,
553: .Ic LP ,
554: .Ic P ,
555: .Ic PP ,
556: .Ic RE ,
557: .Ic SY ,
1.111 schwarze 558: or
1.143 schwarze 559: .Ic TP .
1.111 schwarze 560: No closure refers to an explicit block closing macro.
561: .Pp
562: As a rule, block macros may not be nested; thus, calling a block macro
563: while another block macro scope is open, and the open scope is not
564: implicitly closed, is syntactically incorrect.
565: .Bl -column "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX" -offset indent
566: .It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope Ta Em Notes
1.143 schwarze 567: .It Ic HP Ta <2 Ta current Ta paragraph Ta \&
568: .It Ic IP Ta <3 Ta current Ta paragraph Ta \&
569: .It Ic LP Ta 0 Ta current Ta paragraph Ta \&
570: .It Ic ME Ta 0 Ta none Ta none Ta GNU
571: .It Ic MT Ta 1 Ta current Ta to \&ME Ta GNU
572: .It Ic P Ta 0 Ta current Ta paragraph Ta \&
573: .It Ic PP Ta 0 Ta current Ta paragraph Ta \&
574: .It Ic RE Ta <=1 Ta current Ta none Ta \&
575: .It Ic RS Ta 1 Ta current Ta to \&RE Ta \&
576: .It Ic SH Ta >0 Ta next-line Ta section Ta \&
577: .It Ic SS Ta >0 Ta next-line Ta sub-section Ta \&
578: .It Ic SY Ta 1 Ta current Ta to \&YS Ta GNU
579: .It Ic TP Ta n Ta next-line Ta paragraph Ta \&
580: .It Ic TQ Ta n Ta next-line Ta paragraph Ta GNU
581: .It Ic UE Ta 0 Ta current Ta none Ta GNU
582: .It Ic UR Ta 1 Ta current Ta part Ta GNU
583: .It Ic YS Ta 0 Ta none Ta none Ta GNU
1.111 schwarze 584: .El
585: .Pp
586: If a block macro is next-line scoped, it may only be followed by in-line
587: macros for decorating text.
588: .Ss Font handling
589: In
590: .Nm
591: documents, both
592: .Sx Physical markup
593: macros and
594: .Xr roff 7
595: .Ql \ef
596: font escape sequences can be used to choose fonts.
597: In text lines, the effect of manual font selection by escape sequences
598: only lasts until the next macro invocation; in macro lines, it only lasts
599: until the end of the macro scope.
600: Note that macros like
1.143 schwarze 601: .Ic BR
1.111 schwarze 602: open and close a font scope for each argument.
1.1 kristaps 603: .Sh SEE ALSO
1.89 schwarze 604: .Xr man 1 ,
1.32 kristaps 605: .Xr mandoc 1 ,
1.98 kristaps 606: .Xr eqn 7 ,
1.89 schwarze 607: .Xr mandoc_char 7 ,
1.94 kristaps 608: .Xr mdoc 7 ,
609: .Xr roff 7 ,
610: .Xr tbl 7
1.78 schwarze 611: .Sh HISTORY
612: The
613: .Nm
614: language first appeared as a macro package for the roff typesetting
615: system in
616: .At v7 .
1.147 schwarze 617: .Pp
618: The stand-alone implementation that is part of the
619: .Xr mandoc 1
620: utility first appeared in
621: .Ox 4.6 .
622: .Sh AUTHORS
623: .An -nosplit
624: .An Douglas McIlroy Aq Mt m.douglas.mcilroy@dartmouth.edu
625: designed and implemented the original version of these macros,
626: wrote the original version of this manual page,
627: and was the first to use them when he edited volume 1 of the
628: .At v7
629: manual pages.
630: .Pp
1.146 schwarze 631: .An James Clark
1.147 schwarze 632: later rewrote the macros for groff.
1.146 schwarze 633: .An Eric S. Raymond Aq Mt esr@thyrsus.com
634: and
635: .An Werner Lemberg Aq Mt wl@gnu.org
1.147 schwarze 636: added the extended
1.113 kristaps 637: .Nm
1.147 schwarze 638: macros to groff in 2007.
639: .Pp
640: The
1.78 schwarze 641: .Xr mandoc 1
1.147 schwarze 642: program and this
1.32 kristaps 643: .Nm
1.147 schwarze 644: reference were written by
1.119 schwarze 645: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
CVSweb