Annotation of mandoc/mdoc.7, Revision 1.107
1.107 ! kristaps 1: .\" $Id: mdoc.7,v 1.106 2010/05/14 17:31:25 kristaps Exp $
1.1 kristaps 2: .\"
1.94 kristaps 3: .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
1.1 kristaps 4: .\"
5: .\" Permission to use, copy, modify, and distribute this software for any
1.22 kristaps 6: .\" purpose with or without fee is hereby granted, provided that the above
7: .\" copyright notice and this permission notice appear in all copies.
1.1 kristaps 8: .\"
1.22 kristaps 9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.50 kristaps 16: .\"
1.103 kristaps 17: .Dd $Mdocdate: May 14 2010 $
1.20 kristaps 18: .Dt MDOC 7
1.1 kristaps 19: .Os
20: .Sh NAME
1.57 kristaps 21: .Nm mdoc
22: .Nd mdoc language reference
1.1 kristaps 23: .Sh DESCRIPTION
24: The
1.57 kristaps 25: .Nm mdoc
1.50 kristaps 26: language is used to format
1.57 kristaps 27: .Bx
28: .Ux
1.43 kristaps 29: manuals. In this reference document, we describe its syntax, structure,
1.93 kristaps 30: and usage. Our reference implementation is mandoc; the
1.57 kristaps 31: .Sx COMPATIBILITY
1.93 kristaps 32: section describes compatibility with other troff \-mdoc implementations.
1.57 kristaps 33: .Pp
1.13 kristaps 34: An
1.57 kristaps 35: .Nm
1.1 kristaps 36: document follows simple rules: lines beginning with the control
1.50 kristaps 37: character
1.57 kristaps 38: .Sq \.
1.1 kristaps 39: are parsed for macros. Other lines are interpreted within the scope of
1.13 kristaps 40: prior macros:
1.57 kristaps 41: .Bd -literal -offset indent
1.13 kristaps 42: \&.Sh Macro lines change control state.
43: Other lines are interpreted within the current state.
1.57 kristaps 44: .Ed
1.46 kristaps 45: .Sh LANGUAGE SYNTAX
1.57 kristaps 46: .Nm
1.13 kristaps 47: documents may contain only graphable 7-bit ASCII characters, the space
1.43 kristaps 48: character, and, in certain circumstances, the tab character. All
49: manuals must have
1.57 kristaps 50: .Ux
1.50 kristaps 51: line terminators.
1.57 kristaps 52: .Ss Comments
1.43 kristaps 53: Text following a
1.57 kristaps 54: .Sq \e" ,
1.43 kristaps 55: whether in a macro or free-form text line, is ignored to the end of
56: line. A macro line with only a control character and comment escape,
1.57 kristaps 57: .Sq \&.\e" ,
1.58 kristaps 58: is also ignored. Macro lines with only a control charater and optionally
59: whitespace are stripped from input.
1.57 kristaps 60: .Ss Reserved Characters
1.2 kristaps 61: Within a macro line, the following characters are reserved:
1.61 kristaps 62: .Pp
1.57 kristaps 63: .Bl -tag -width Ds -offset indent -compact
64: .It \&.
65: .Pq period
66: .It \&,
67: .Pq comma
68: .It \&:
69: .Pq colon
70: .It \&;
71: .Pq semicolon
72: .It \&(
73: .Pq left-parenthesis
74: .It \&)
75: .Pq right-parenthesis
76: .It \&[
77: .Pq left-bracket
78: .It \&]
79: .Pq right-bracket
80: .It \&?
81: .Pq question
82: .It \&!
83: .Pq exclamation
84: .It \&|
85: .Pq vertical bar
86: .El
87: .Pp
1.5 kristaps 88: Use of reserved characters is described in
1.57 kristaps 89: .Sx MACRO SYNTAX .
1.43 kristaps 90: For general use in macro lines, these characters must either be escaped
91: with a non-breaking space
1.57 kristaps 92: .Pq Sq \e&
1.50 kristaps 93: or, if applicable, an appropriate escape sequence used.
1.57 kristaps 94: .Ss Special Characters
1.43 kristaps 95: Special characters may occur in both macro and free-form lines.
96: Sequences begin with the escape character
1.57 kristaps 97: .Sq \e
1.50 kristaps 98: followed by either an open-parenthesis
1.57 kristaps 99: .Sq \&(
1.1 kristaps 100: for two-character sequences; an open-bracket
1.57 kristaps 101: .Sq \&[
1.1 kristaps 102: for n-character sequences (terminated at a close-bracket
1.57 kristaps 103: .Sq \&] ) ;
1.100 kristaps 104: or a single one-character sequence.
105: See
1.57 kristaps 106: .Xr mandoc_char 7
1.100 kristaps 107: for a complete list.
108: Examples include
1.57 kristaps 109: .Sq \e(em
110: .Pq em-dash
1.50 kristaps 111: and
1.57 kristaps 112: .Sq \ee
113: .Pq back-slash .
114: .Ss Text Decoration
1.54 kristaps 115: Terms may be text-decorated using the
1.57 kristaps 116: .Sq \ef
1.74 kristaps 117: escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
1.82 kristaps 118: (revert to previous mode):
1.75 kristaps 119: .Pp
1.76 kristaps 120: .D1 \efBbold\efR \efIitalic\efP
121: .Pp
122: A numerical representation 3, 2, or 1 (bold, italic, and Roman,
1.100 kristaps 123: respectively) may be used instead.
124: A text decoration is valid within
1.77 kristaps 125: the current font scope only: if a macro opens a font scope alongside
126: its own scope, such as
1.78 kristaps 127: .Sx \&Bf
1.77 kristaps 128: .Cm \&Sy ,
129: in-scope invocations of
130: .Sq \ef
1.100 kristaps 131: are only valid within the font scope of the macro.
132: If
1.77 kristaps 133: .Sq \ef
134: is specified outside of any font scope, such as in unenclosed, free-form
135: text, it will affect the remainder of the document.
1.76 kristaps 136: .Pp
137: Text may also be sized with the
138: .Sq \es
139: escape, whose syntax is one of
140: .Sq \es+-n
141: for one-digit numerals;
142: .Sq \es(+-nn
143: or
144: .Sq \es+-(nn
145: for two-digit numerals; and
146: .Sq \es[+-N] ,
147: .Sq \es+-[N] ,
148: .Sq \es'+-N' ,
149: or
150: .Sq \es+-'N'
151: for arbitrary-digit numerals:
152: .Pp
153: .D1 \es+1bigger\es-1
154: .D1 \es[+10]much bigger\es[-10]
155: .D1 \es+(10much bigger\es-(10
156: .D1 \es+'100'much much bigger\es-'100'
157: .Pp
1.82 kristaps 158: Note these forms are
1.76 kristaps 159: .Em not
1.82 kristaps 160: recommended for
1.57 kristaps 161: .Nm ,
1.74 kristaps 162: which encourages semantic annotation.
1.57 kristaps 163: .Ss Predefined Strings
1.82 kristaps 164: Historically,
1.57 kristaps 165: .Xr groff 1
1.82 kristaps 166: also defined a set of package-specific
1.57 kristaps 167: .Dq predefined strings ,
1.82 kristaps 168: which, like
1.57 kristaps 169: .Sx Special Characters ,
1.54 kristaps 170: demark special output characters and strings by way of input codes.
171: Predefined strings are escaped with the slash-asterisk,
1.57 kristaps 172: .Sq \e* :
1.54 kristaps 173: single-character
1.57 kristaps 174: .Sq \e*X ,
1.54 kristaps 175: two-character
1.57 kristaps 176: .Sq \e*(XX ,
1.54 kristaps 177: and N-character
1.57 kristaps 178: .Sq \e*[N] .
1.54 kristaps 179: See
1.57 kristaps 180: .Xr mandoc_char 7
1.100 kristaps 181: for a complete list.
182: Examples include
1.57 kristaps 183: .Sq \e*(Am
184: .Pq ampersand
1.54 kristaps 185: and
1.57 kristaps 186: .Sq \e*(Ba
187: .Pq vertical bar .
188: .Ss Whitespace
1.98 kristaps 189: Whitespace consists of the space character.
1.96 kristaps 190: In free-form lines, whitespace is preserved within a line; un-escaped
191: trailing spaces are stripped from input (unless in a literal context).
1.97 kristaps 192: Blank free-form lines, which may include whitespace, are only permitted
1.96 kristaps 193: within literal contexts.
1.57 kristaps 194: .Pp
1.100 kristaps 195: In macro lines, whitespace delimits arguments and is discarded.
196: If arguments are quoted, whitespace within the quotes is retained.
1.57 kristaps 197: .Ss Quotation
1.46 kristaps 198: Macro arguments may be quoted with a double-quote to group
1.100 kristaps 199: space-delimited terms or to retain blocks of whitespace.
200: A quoted argument begins with a double-quote preceded by whitespace.
201: The next double-quote not pair-wise adjacent to another double-quote
202: terminates the literal, regardless of surrounding whitespace.
1.57 kristaps 203: .Pp
1.50 kristaps 204: This produces tokens
1.57 kristaps 205: .Sq a" ,
206: .Sq b c ,
207: .Sq de ,
1.47 kristaps 208: and
1.57 kristaps 209: .Sq fg" .
1.47 kristaps 210: Note that any quoted term, be it argument or macro, is indiscriminately
1.100 kristaps 211: considered literal text.
212: Thus, the following produces
1.57 kristaps 213: .Sq \&Em a :
214: .Bd -literal -offset indent
1.47 kristaps 215: \&.Em "Em a"
1.57 kristaps 216: .Ed
217: .Pp
1.46 kristaps 218: In free-form mode, quotes are regarded as opaque text.
1.63 kristaps 219: .Ss Dates
1.66 kristaps 220: There are several macros in
221: .Nm
1.100 kristaps 222: that require a date argument.
223: The canonical form for dates is the American format:
1.66 kristaps 224: .Pp
225: .D1 Cm Month Day , Year
226: .Pp
227: The
228: .Cm Day
1.100 kristaps 229: value is an optionally zero-padded numeral.
230: The
1.66 kristaps 231: .Cm Month
1.100 kristaps 232: value is the full month name.
233: The
1.66 kristaps 234: .Cm Year
235: value is the full four-digit year.
236: .Pp
1.72 kristaps 237: Reduced form dates are broken-down canonical form dates:
1.66 kristaps 238: .Pp
1.72 kristaps 239: .D1 Cm Month , Year
240: .D1 Cm Year
1.66 kristaps 241: .Pp
242: Some examples of valid dates follow:
243: .Pp
244: .D1 "May, 2009" Pq reduced form
245: .D1 "2009" Pq reduced form
246: .D1 "May 20, 2009" Pq canonical form
1.61 kristaps 247: .Ss Scaling Widths
248: Many macros support scaled widths for their arguments, such as
249: stipulating a two-inch list indentation with the following:
250: .Bd -literal -offset indent
251: \&.Bl -tag -width 2i
252: .Ed
253: .Pp
254: The syntax for scaled widths is
1.62 kristaps 255: .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
1.61 kristaps 256: where a decimal must be preceded or proceeded by at least one digit.
1.100 kristaps 257: Negative numbers, while accepted, are truncated to zero.
258: The following scaling units are accepted:
1.61 kristaps 259: .Pp
260: .Bl -tag -width Ds -offset indent -compact
261: .It c
262: centimetre
263: .It i
264: inch
265: .It P
266: pica (~1/6 inch)
267: .It p
268: point (~1/72 inch)
269: .It f
270: synonym for
271: .Sq u
272: .It v
273: default vertical span
274: .It m
275: width of rendered
276: .Sq m
277: .Pq em
278: character
279: .It n
280: width of rendered
281: .Sq n
282: .Pq en
283: character
284: .It u
285: default horizontal span
286: .It M
287: mini-em (~1/100 em)
288: .El
289: .Pp
290: Using anything other than
291: .Sq m ,
292: .Sq n ,
293: .Sq u ,
294: or
295: .Sq v
1.100 kristaps 296: is necessarily non-portable across output media.
297: See
1.61 kristaps 298: .Sx COMPATIBILITY .
1.101 kristaps 299: .Ss Sentence Spacing
300: When composing a manual, make sure that your sentences end at the end of
301: a line.
302: By doing so, front-ends will be able to apply the proper amount of
303: spacing after the end of sentence (unescaped) period, exclamation mark,
1.107 ! kristaps 304: or question mark followed by zero or more non-sentence closing
! 305: delimiters (
! 306: .Ns Sq \&) ,
! 307: .Sq \&] ,
! 308: .Sq \&' ,
! 309: .Sq \&" ) .
1.102 kristaps 310: .Pp
311: The proper spacing is also intelligently preserved if a sentence ends at
1.107 ! kristaps 312: the boundary of a macro line, e.g.,
! 313: .Pp
! 314: .D1 \&Xr mandoc 1 \.
! 315: .D1 \&Fl T \&Ns \&Cm ascii \.
1.43 kristaps 316: .Sh MANUAL STRUCTURE
1.66 kristaps 317: A well-formed
1.57 kristaps 318: .Nm
1.66 kristaps 319: document consists of a document prologue followed by one or more
320: sections.
321: .Pp
322: The prologue, which consists of (in order) the
1.64 kristaps 323: .Sx \&Dd ,
324: .Sx \&Dt ,
1.33 kristaps 325: and
1.66 kristaps 326: .Sx \&Os
327: macros, is required for every document.
328: .Pp
1.82 kristaps 329: The first section (sections are denoted by
1.66 kristaps 330: .Sx \&Sh )
331: must be the NAME section, consisting of at least one
1.64 kristaps 332: .Sx \&Nm
1.50 kristaps 333: followed by
1.66 kristaps 334: .Sx \&Nd .
335: .Pp
336: Following that, convention dictates specifying at least the SYNOPSIS and
337: DESCRIPTION sections, although this varies between manual sections.
338: .Pp
339: The following is a well-formed skeleton
340: .Nm
341: file:
1.57 kristaps 342: .Bd -literal -offset indent
1.43 kristaps 343: \&.Dd $\&Mdocdate$
344: \&.Dt mdoc 7
345: \&.Os
1.58 kristaps 346: \&.
1.43 kristaps 347: \&.Sh NAME
1.58 kristaps 348: \&.Nm foo
349: \&.Nd a description goes here
350: \&.\e\*q The next is for sections 2 & 3 only.
351: \&.\e\*q .Sh LIBRARY
352: \&.
353: \&.Sh SYNOPSIS
354: \&.Nm foo
355: \&.Op Fl options
356: \&.Ar
357: \&.
358: \&.Sh DESCRIPTION
359: The
360: \&.Nm
361: utility processes files ...
1.59 kristaps 362: \&.\e\*q .Sh IMPLEMENTATION NOTES
1.58 kristaps 363: \&.\e\*q The next is for sections 2, 3, & 9 only.
364: \&.\e\*q .Sh RETURN VALUES
365: \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
366: \&.\e\*q .Sh ENVIRONMENT
367: \&.\e\*q .Sh FILES
1.99 kristaps 368: \&.\e\*q The next is for sections 1 & 8 only.
369: \&.\e\*q .Sh EXIT STATUS
1.58 kristaps 370: \&.\e\*q .Sh EXAMPLES
371: \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
372: \&.\e\*q .Sh DIAGNOSTICS
373: \&.\e\*q The next is for sections 2, 3, & 9 only.
374: \&.\e\*q .Sh ERRORS
375: \&.\e\*q .Sh SEE ALSO
376: \&.\e\*q .Xr foobar 1
377: \&.\e\*q .Sh STANDARDS
378: \&.\e\*q .Sh HISTORY
379: \&.\e\*q .Sh AUTHORS
380: \&.\e\*q .Sh CAVEATS
381: \&.\e\*q .Sh BUGS
382: \&.\e\*q .Sh SECURITY CONSIDERATIONS
1.57 kristaps 383: .Ed
384: .Pp
1.66 kristaps 385: The sections in a
386: .Nm
1.100 kristaps 387: document are conventionally ordered as they appear above.
388: Sections should be composed as follows:
1.73 kristaps 389: .Bl -ohang -offset Ds
390: .It Em NAME
1.100 kristaps 391: The name(s) and a short description of the documented material.
392: The syntax for this as follows:
1.73 kristaps 393: .Bd -literal -offset indent
394: \&.Nm name0
395: \&.Nm name1
396: \&.Nm name2
397: \&.Nd a short description
398: .Ed
399: .Pp
400: The
1.66 kristaps 401: .Sx \&Nm
1.73 kristaps 402: macro(s) must precede the
403: .Sx \&Nd
404: macro.
1.80 kristaps 405: .Pp
1.82 kristaps 406: See
1.80 kristaps 407: .Sx \&Nm
408: and
409: .Sx \&Nd .
1.73 kristaps 410: .It Em LIBRARY
411: The name of the library containing the documented material, which is
1.100 kristaps 412: assumed to be a function in a section 2 or 3 manual.
413: The syntax for this is as follows:
1.73 kristaps 414: .Bd -literal -offset indent
415: \&.Lb libarm
416: .Ed
417: .Pp
418: See
1.80 kristaps 419: .Sx \&Lb .
1.73 kristaps 420: .It Em SYNOPSIS
421: Documents the utility invocation syntax, function call syntax, or device
1.82 kristaps 422: configuration.
1.73 kristaps 423: .Pp
424: For the first, utilities (sections 1, 6, and 8), this is
425: generally structured as follows:
426: .Bd -literal -offset indent
427: \&.Nm foo
428: \&.Op Fl v
429: \&.Op Fl o Ar file
430: \&.Op Ar
431: \&.Nm bar
432: \&.Op Fl v
433: \&.Op Fl o Ar file
434: \&.Op Ar
435: .Ed
436: .Pp
437: For the second, function calls (sections 2, 3, 9):
438: .Bd -literal -offset indent
439: \&.Vt extern const char *global;
440: \&.In header.h
441: \&.Ft "char *"
442: \&.Fn foo "const char *src"
443: \&.Ft "char *"
444: \&.Fn bar "const char *src"
445: .Ed
446: .Pp
447: And for the third, configurations (section 4):
448: .Bd -literal -offset indent
449: \&.Cd \*qit* at isa? port 0x2e\*q
450: \&.Cd \*qit* at isa? port 0x4e\*q
451: .Ed
452: .Pp
1.82 kristaps 453: Manuals not in these sections generally don't need a
1.73 kristaps 454: .Em SYNOPSIS .
1.80 kristaps 455: .Pp
1.82 kristaps 456: See
1.80 kristaps 457: .Sx \&Op ,
458: .Sx \&Cd ,
459: .Sx \&Fn ,
460: .Sx \&Ft ,
461: and
462: .Sx \&Vt .
1.73 kristaps 463: .It Em DESCRIPTION
1.82 kristaps 464: This expands upon the brief, one-line description in
1.73 kristaps 465: .Em NAME .
466: It usually contains a break-down of the options (if documenting a
467: command), such as:
468: .Bd -literal -offset indent
469: The arguments are as follows:
470: \&.Bl \-tag \-width Ds
471: \&.It Fl v
472: Print verbose information.
473: \&.El
474: .Ed
1.80 kristaps 475: .Pp
1.73 kristaps 476: Manuals not documenting a command won't include the above fragment.
477: .It Em IMPLEMENTATION NOTES
1.100 kristaps 478: Implementation-specific notes should be kept here.
479: This is useful when implementing standard functions that may have side
480: effects or notable algorithmic implications.
1.73 kristaps 481: .It Em RETURN VALUES
482: This section is the dual of
483: .Em EXIT STATUS ,
1.100 kristaps 484: which is used for commands.
485: It documents the return values of functions in sections 2, 3, and 9.
1.73 kristaps 486: .Pp
487: See
488: .Sx \&Rv .
489: .It Em ENVIRONMENT
490: Documents any usages of environment variables, e.g.,
491: .Xr environ 7 .
492: .Pp
493: See
494: .Sx \&Ev .
495: .It Em FILES
1.100 kristaps 496: Documents files used.
497: It's helpful to document both the file and a short description of how
498: the file is used (created, modified, etc.).
1.73 kristaps 499: .Pp
500: See
501: .Sx \&Pa .
1.99 kristaps 502: .It Em EXIT STATUS
1.100 kristaps 503: Command exit status for section 1, 6, and 8 manuals.
504: This section is the dual of
1.99 kristaps 505: .Em RETURN VALUES ,
1.100 kristaps 506: which is used for functions.
507: Historically, this information was described in
1.99 kristaps 508: .Em DIAGNOSTICS ,
509: a practise that is now discouraged.
510: .Pp
511: See
512: .Sx \&Ex .
1.73 kristaps 513: .It Em EXAMPLES
1.100 kristaps 514: Example usages.
515: This often contains snippets of well-formed, well-tested invocations.
516: Make doubly sure that your examples work properly!
1.73 kristaps 517: .It Em DIAGNOSTICS
1.100 kristaps 518: Documents error conditions.
519: This is most useful in section 4 manuals.
1.73 kristaps 520: Historically, this section was used in place of
521: .Em EXIT STATUS
522: for manuals in sections 1, 6, and 8; however, this practise is
523: discouraged.
524: .Pp
525: See
1.80 kristaps 526: .Sx \&Bl
527: .Fl diag .
1.73 kristaps 528: .It Em ERRORS
529: Documents error handling in sections 2, 3, and 9.
530: .Pp
531: See
532: .Sx \&Er .
533: .It Em SEE ALSO
1.100 kristaps 534: References other manuals with related topics.
535: This section should exist for most manuals.
536: Cross-references should conventionally be ordered first by section, then
537: alphabetically.
1.73 kristaps 538: .Pp
539: See
540: .Sx \&Xr .
541: .It Em STANDARDS
1.100 kristaps 542: References any standards implemented or used.
543: If not adhering to any standards, the
1.73 kristaps 544: .Em HISTORY
545: section should be used instead.
546: .Pp
547: See
548: .Sx \&St .
549: .It Em HISTORY
550: The history of any manual without a
551: .Em STANDARDS
552: section should be described in this section.
553: .It Em AUTHORS
554: Credits to authors, if applicable, should appear in this section.
555: Authors should generally be noted by both name and an e-mail address.
556: .Pp
557: See
558: .Sx \&An .
559: .It Em CAVEATS
560: Explanations of common misuses and misunderstandings should be explained
561: in this section.
562: .It Em BUGS
563: Extant bugs should be described in this section.
564: .It Em SECURITY CONSIDERATIONS
565: Documents any security precautions that operators should consider.
1.66 kristaps 566: .El
1.43 kristaps 567: .Sh MACRO SYNTAX
1.56 kristaps 568: Macros are one to three three characters in length and begin with a
569: control character ,
1.57 kristaps 570: .Sq \&. ,
1.100 kristaps 571: at the beginning of the line.
572: An arbitrary amount of whitespace may sit between the control character
573: and the macro name.
574: Thus, the following are equivalent:
1.64 kristaps 575: .Bd -literal -offset indent
576: \&.Pp
577: \&.\ \ \ \&Pp
578: .Ed
1.57 kristaps 579: .Pp
1.100 kristaps 580: The syntax of a macro depends on its classification.
581: In this section,
1.57 kristaps 582: .Sq \-arg
1.43 kristaps 583: refers to macro arguments, which may be followed by zero or more
1.57 kristaps 584: .Sq parm
1.43 kristaps 585: parameters;
1.57 kristaps 586: .Sq \&Yo
1.43 kristaps 587: opens the scope of a macro; and if specified,
1.57 kristaps 588: .Sq \&Yc
1.43 kristaps 589: closes it out.
1.57 kristaps 590: .Pp
1.43 kristaps 591: The
1.57 kristaps 592: .Em Callable
1.43 kristaps 593: column indicates that the macro may be called subsequent to the initial
1.100 kristaps 594: line-macro.
595: If a macro is not callable, then its invocation after the initial line
596: macro is interpreted as opaque text, such that
1.60 kristaps 597: .Sq \&.Fl \&Sh
1.55 kristaps 598: produces
1.60 kristaps 599: .Sq Fl \&Sh .
1.57 kristaps 600: .Pp
1.55 kristaps 601: The
1.57 kristaps 602: .Em Parsable
1.43 kristaps 603: column indicates whether the macro may be followed by further
1.100 kristaps 604: (ostensibly callable) macros.
605: If a macro is not parsable, subsequent macro invocations on the line
606: will be interpreted as opaque text.
1.57 kristaps 607: .Pp
1.55 kristaps 608: The
1.57 kristaps 609: .Em Scope
1.43 kristaps 610: column, if applicable, describes closure rules.
1.57 kristaps 611: .Ss Block full-explicit
1.100 kristaps 612: Multi-line scope closed by an explicit closing macro.
613: All macros contains bodies; only
1.64 kristaps 614: .Sx \&Bf
1.43 kristaps 615: contains a head.
1.57 kristaps 616: .Bd -literal -offset indent
1.50 kristaps 617: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
618: \(lBbody...\(rB
1.43 kristaps 619: \&.Yc
1.57 kristaps 620: .Ed
621: .Pp
622: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXX"
623: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.64 kristaps 624: .It Sx \&Bd Ta \&No Ta \&No Ta closed by Sx \&Ed
625: .It Sx \&Bf Ta \&No Ta \&No Ta closed by Sx \&Ef
626: .It Sx \&Bk Ta \&No Ta \&No Ta closed by Sx \&Ek
627: .It Sx \&Bl Ta \&No Ta \&No Ta closed by Sx \&El
628: .It Sx \&Ed Ta \&No Ta \&No Ta opened by Sx \&Bd
629: .It Sx \&Ef Ta \&No Ta \&No Ta opened by Sx \&Bf
630: .It Sx \&Ek Ta \&No Ta \&No Ta opened by Sx \&Bk
631: .It Sx \&El Ta \&No Ta \&No Ta opened by Sx \&Bl
1.57 kristaps 632: .El
633: .Ss Block full-implicit
1.43 kristaps 634: Multi-line scope closed by end-of-file or implicitly by another macro.
1.50 kristaps 635: All macros have bodies; some
1.57 kristaps 636: .Po
1.64 kristaps 637: .Sx \&It Fl bullet ,
638: .Fl hyphen ,
639: .Fl dash ,
640: .Fl enum ,
641: .Fl item
1.57 kristaps 642: .Pc
1.64 kristaps 643: don't have heads; only one
644: .Po
645: .Sx \&It Fl column
1.82 kristaps 646: .Pc
1.64 kristaps 647: has multiple heads.
1.57 kristaps 648: .Bd -literal -offset indent
1.50 kristaps 649: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
650: \(lBbody...\(rB
1.57 kristaps 651: .Ed
652: .Pp
653: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXXXXXXXXXX"
654: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.64 kristaps 655: .It Sx \&It Ta \&No Ta Yes Ta closed by Sx \&It , Sx \&El
656: .It Sx \&Nd Ta \&No Ta \&No Ta closed by Sx \&Sh
657: .It Sx \&Sh Ta \&No Ta \&No Ta closed by Sx \&Sh
658: .It Sx \&Ss Ta \&No Ta \&No Ta closed by Sx \&Sh , Sx \&Ss
1.57 kristaps 659: .El
660: .Ss Block partial-explicit
1.100 kristaps 661: Like block full-explicit, but also with single-line scope.
662: Each has at least a body and, in limited circumstances, a head
1.64 kristaps 663: .Po
664: .Sx \&Fo ,
665: .Sx \&Eo
666: .Pc
1.50 kristaps 667: and/or tail
1.64 kristaps 668: .Pq Sx \&Ec .
1.57 kristaps 669: .Bd -literal -offset indent
1.50 kristaps 670: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
671: \(lBbody...\(rB
672: \&.Yc \(lBtail...\(rB
1.2 kristaps 673:
1.43 kristaps 674: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
1.50 kristaps 675: \(lBbody...\(rB \&Yc \(lBtail...\(rB
1.57 kristaps 676: .Ed
677: .Pp
678: .Bl -column "MacroX" "CallableX" "ParsableX" "closed by XXXX" -compact -offset indent
679: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.64 kristaps 680: .It Sx \&Ac Ta Yes Ta Yes Ta opened by Sx \&Ao
1.63 kristaps 681: .It Sx \&Ao Ta Yes Ta Yes Ta closed by Sx \&Ac
1.64 kristaps 682: .It Sx \&Bc Ta Yes Ta Yes Ta closed by Sx \&Bo
683: .It Sx \&Bo Ta Yes Ta Yes Ta opened by Sx \&Bc
684: .It Sx \&Brc Ta Yes Ta Yes Ta opened by Sx \&Bro
685: .It Sx \&Bro Ta Yes Ta Yes Ta closed by Sx \&Brc
686: .It Sx \&Dc Ta Yes Ta Yes Ta opened by Sx \&Do
687: .It Sx \&Do Ta Yes Ta Yes Ta closed by Sx \&Dc
688: .It Sx \&Ec Ta Yes Ta Yes Ta opened by Sx \&Eo
689: .It Sx \&Eo Ta Yes Ta Yes Ta closed by Sx \&Ec
690: .It Sx \&Fc Ta Yes Ta Yes Ta opened by Sx \&Fo
691: .It Sx \&Fo Ta \&No Ta \&No Ta closed by Sx \&Fc
692: .It Sx \&Oc Ta Yes Ta Yes Ta closed by Sx \&Oo
693: .It Sx \&Oo Ta Yes Ta Yes Ta opened by Sx \&Oc
694: .It Sx \&Pc Ta Yes Ta Yes Ta closed by Sx \&Po
695: .It Sx \&Po Ta Yes Ta Yes Ta opened by Sx \&Pc
696: .It Sx \&Qc Ta Yes Ta Yes Ta opened by Sx \&Oo
697: .It Sx \&Qo Ta Yes Ta Yes Ta closed by Sx \&Oc
1.63 kristaps 698: .It Sx \&Re Ta \&No Ta \&No Ta opened by Sx \&Rs
699: .It Sx \&Rs Ta \&No Ta \&No Ta closed by Sx \&Re
1.64 kristaps 700: .It Sx \&Sc Ta Yes Ta Yes Ta opened by Sx \&So
701: .It Sx \&So Ta Yes Ta Yes Ta closed by Sx \&Sc
702: .It Sx \&Xc Ta Yes Ta Yes Ta opened by Sx \&Xo
703: .It Sx \&Xo Ta Yes Ta Yes Ta closed by Sx \&Xc
1.57 kristaps 704: .El
705: .Ss Block partial-implicit
1.50 kristaps 706: Like block full-implicit, but with single-line scope closed by
1.57 kristaps 707: .Sx Reserved Characters
1.43 kristaps 708: or end of line.
1.57 kristaps 709: .Bd -literal -offset indent
1.43 kristaps 710: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
1.57 kristaps 711: .Ed
712: .Pp
713: .Bl -column "MacroX" "CallableX" "ParsableX" -compact -offset indent
714: .It Em Macro Ta Em Callable Ta Em Parsable
1.64 kristaps 715: .It Sx \&Aq Ta Yes Ta Yes
716: .It Sx \&Bq Ta Yes Ta Yes
717: .It Sx \&Brq Ta Yes Ta Yes
718: .It Sx \&D1 Ta \&No Ta \&Yes
719: .It Sx \&Dl Ta \&No Ta Yes
720: .It Sx \&Dq Ta Yes Ta Yes
721: .It Sx \&Op Ta Yes Ta Yes
722: .It Sx \&Pq Ta Yes Ta Yes
723: .It Sx \&Ql Ta Yes Ta Yes
724: .It Sx \&Qq Ta Yes Ta Yes
725: .It Sx \&Sq Ta Yes Ta Yes
1.83 kristaps 726: .It Sx \&Vt Ta Yes Ta Yes
1.57 kristaps 727: .El
1.83 kristaps 728: .Pp
729: Note that the
730: .Sx \&Vt
731: macro is a
732: .Sx Block partial-implicit
733: only when invoked as the first macro
734: in a SYNOPSIS section line, else it is
735: .Sx In-line .
1.57 kristaps 736: .Ss In-line
1.50 kristaps 737: Closed by
1.57 kristaps 738: .Sx Reserved Characters ,
1.100 kristaps 739: end of line, fixed argument lengths, and/or subsequent macros.
740: In-line macros have only text children.
741: If a number (or inequality) of arguments is
1.57 kristaps 742: .Pq n ,
1.3 kristaps 743: then the macro accepts an arbitrary number of arguments.
1.57 kristaps 744: .Bd -literal -offset indent
1.43 kristaps 745: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lbres...\(rb
746:
747: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
748:
749: \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
1.57 kristaps 750: .Ed
751: .Pp
752: .Bl -column "MacroX" "CallableX" "ParsableX" "Arguments" -compact -offset indent
753: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Arguments
1.63 kristaps 754: .It Sx \&%A Ta \&No Ta \&No Ta >0
755: .It Sx \&%B Ta \&No Ta \&No Ta >0
756: .It Sx \&%C Ta \&No Ta \&No Ta >0
757: .It Sx \&%D Ta \&No Ta \&No Ta >0
758: .It Sx \&%I Ta \&No Ta \&No Ta >0
759: .It Sx \&%J Ta \&No Ta \&No Ta >0
760: .It Sx \&%N Ta \&No Ta \&No Ta >0
761: .It Sx \&%O Ta \&No Ta \&No Ta >0
762: .It Sx \&%P Ta \&No Ta \&No Ta >0
1.69 kristaps 763: .It Sx \&%Q Ta \&No Ta \&No Ta >0
1.63 kristaps 764: .It Sx \&%R Ta \&No Ta \&No Ta >0
765: .It Sx \&%T Ta \&No Ta \&No Ta >0
1.69 kristaps 766: .It Sx \&%U Ta \&No Ta \&No Ta >0
1.63 kristaps 767: .It Sx \&%V Ta \&No Ta \&No Ta >0
1.64 kristaps 768: .It Sx \&Ad Ta Yes Ta Yes Ta n
769: .It Sx \&An Ta Yes Ta Yes Ta n
770: .It Sx \&Ap Ta Yes Ta Yes Ta 0
771: .It Sx \&Ar Ta Yes Ta Yes Ta n
772: .It Sx \&At Ta Yes Ta Yes Ta 1
773: .It Sx \&Bsx Ta Yes Ta Yes Ta n
774: .It Sx \&Bt Ta \&No Ta \&No Ta 0
775: .It Sx \&Bx Ta Yes Ta Yes Ta n
776: .It Sx \&Cd Ta Yes Ta Yes Ta >0
777: .It Sx \&Cm Ta Yes Ta Yes Ta n
778: .It Sx \&Db Ta \&No Ta \&No Ta 1
779: .It Sx \&Dd Ta \&No Ta \&No Ta >0
780: .It Sx \&Dt Ta \&No Ta \&No Ta n
781: .It Sx \&Dv Ta Yes Ta Yes Ta n
782: .It Sx \&Dx Ta Yes Ta Yes Ta n
783: .It Sx \&Em Ta Yes Ta Yes Ta >0
784: .It Sx \&En Ta \&No Ta \&No Ta 0
785: .It Sx \&Er Ta Yes Ta Yes Ta >0
786: .It Sx \&Es Ta \&No Ta \&No Ta 0
787: .It Sx \&Ev Ta Yes Ta Yes Ta n
788: .It Sx \&Ex Ta \&No Ta \&No Ta n
789: .It Sx \&Fa Ta Yes Ta Yes Ta n
790: .It Sx \&Fd Ta \&No Ta \&No Ta >0
791: .It Sx \&Fl Ta Yes Ta Yes Ta n
792: .It Sx \&Fn Ta Yes Ta Yes Ta >0
793: .It Sx \&Fr Ta \&No Ta \&No Ta n
794: .It Sx \&Ft Ta Yes Ta Yes Ta n
795: .It Sx \&Fx Ta Yes Ta Yes Ta n
796: .It Sx \&Hf Ta \&No Ta \&No Ta n
797: .It Sx \&Ic Ta Yes Ta Yes Ta >0
798: .It Sx \&In Ta \&No Ta \&No Ta n
799: .It Sx \&Lb Ta \&No Ta \&No Ta 1
800: .It Sx \&Li Ta Yes Ta Yes Ta n
801: .It Sx \&Lk Ta Yes Ta Yes Ta n
802: .It Sx \&Lp Ta \&No Ta \&No Ta 0
803: .It Sx \&Ms Ta Yes Ta Yes Ta >0
804: .It Sx \&Mt Ta Yes Ta Yes Ta >0
805: .It Sx \&Nm Ta Yes Ta Yes Ta n
806: .It Sx \&No Ta Yes Ta Yes Ta 0
807: .It Sx \&Ns Ta Yes Ta Yes Ta 0
808: .It Sx \&Nx Ta Yes Ta Yes Ta n
809: .It Sx \&Os Ta \&No Ta \&No Ta n
810: .It Sx \&Ot Ta \&No Ta \&No Ta n
811: .It Sx \&Ox Ta Yes Ta Yes Ta n
812: .It Sx \&Pa Ta Yes Ta Yes Ta n
1.88 kristaps 813: .It Sx \&Pf Ta Yes Ta Yes Ta 1
1.64 kristaps 814: .It Sx \&Pp Ta \&No Ta \&No Ta 0
815: .It Sx \&Rv Ta \&No Ta \&No Ta n
816: .It Sx \&Sm Ta \&No Ta \&No Ta 1
817: .It Sx \&St Ta \&No Ta Yes Ta 1
818: .It Sx \&Sx Ta Yes Ta Yes Ta >0
819: .It Sx \&Sy Ta Yes Ta Yes Ta >0
820: .It Sx \&Tn Ta Yes Ta Yes Ta >0
821: .It Sx \&Ud Ta \&No Ta \&No Ta 0
822: .It Sx \&Ux Ta Yes Ta Yes Ta n
823: .It Sx \&Va Ta Yes Ta Yes Ta n
824: .It Sx \&Vt Ta Yes Ta Yes Ta >0
1.84 kristaps 825: .It Sx \&Xr Ta Yes Ta Yes Ta >0
1.64 kristaps 826: .It Sx \&br Ta \&No Ta \&No Ta 0
827: .It Sx \&sp Ta \&No Ta \&No Ta 1
1.82 kristaps 828: .El
1.63 kristaps 829: .Sh REFERENCE
830: This section is a canonical reference of all macros, arranged
1.100 kristaps 831: alphabetically.
832: For the scoping of individual macros, see
1.63 kristaps 833: .Sx MACRO SYNTAX .
834: .Ss \&%A
835: Author name of an
836: .Sx \&Rs
837: block. Multiple authors should each be accorded their own
1.64 kristaps 838: .Sx \%%A
1.66 kristaps 839: line. Author names should be ordered with full or abbreviated
840: forename(s) first, then full surname.
1.63 kristaps 841: .Ss \&%B
842: Book title of an
843: .Sx \&Rs
844: block. This macro may also be used in a non-bibliographic context when
845: referring to book titles.
846: .Ss \&%C
847: Publication city or location of an
848: .Sx \&Rs
849: block.
850: .Pp
1.65 kristaps 851: .Em Remarks :
1.63 kristaps 852: this macro is not implemented in
853: .Xr groff 1 .
854: .Ss \&%D
855: Publication date of an
856: .Sx \&Rs
1.72 kristaps 857: block. This should follow the reduced or canonical form syntax
858: described in
1.63 kristaps 859: .Sx Dates .
860: .Ss \&%I
861: Publisher or issuer name of an
862: .Sx \&Rs
863: block.
864: .Ss \&%J
865: Journal name of an
866: .Sx \&Rs
867: block.
868: .Ss \&%N
869: Issue number (usually for journals) of an
870: .Sx \&Rs
871: block.
872: .Ss \&%O
873: Optional information of an
874: .Sx \&Rs
875: block.
876: .Ss \&%P
877: Book or journal page number of an
878: .Sx \&Rs
879: block.
880: .Ss \&%Q
881: Institutional author (school, government, etc.) of an
882: .Sx \&Rs
883: block. Multiple institutional authors should each be accorded their own
1.64 kristaps 884: .Sx \&%Q
1.63 kristaps 885: line.
886: .Ss \&%R
887: Technical report name of an
888: .Sx \&Rs
889: block.
890: .Ss \&%T
891: Article title of an
892: .Sx \&Rs
893: block. This macro may also be used in a non-bibliographical context
894: when referring to article titles.
1.69 kristaps 895: .Ss \&%U
1.70 kristaps 896: URI of reference document.
1.63 kristaps 897: .Ss \&%V
898: Volume number of an
899: .Sx \&Rs
900: block.
901: .Ss \&Ac
902: Closes an
903: .Sx \&Ao
904: block. Does not have any tail arguments.
905: .Ss \&Ad
906: Address construct: usually in the context of an computational address in
907: memory, not a physical (post) address.
908: .Pp
1.64 kristaps 909: Examples:
1.91 kristaps 910: .D1 \&.Ad [0,$]
911: .D1 \&.Ad 0x00000000
1.63 kristaps 912: .Ss \&An
1.100 kristaps 913: Author name.
914: This macro may alternatively accepts the following arguments, although
915: these may not be specified along with a parameter:
1.64 kristaps 916: .Bl -tag -width 12n -offset indent
917: .It Fl split
1.66 kristaps 918: Renders a line break before each author listing.
1.64 kristaps 919: .It Fl nosplit
920: The opposite of
921: .Fl split .
922: .El
923: .Pp
924: In the AUTHORS section, the default is not to split the first author
925: listing, but all subsequent author listings, whether or not they're
1.100 kristaps 926: interspersed by other macros or text, are split.
927: Thus, specifying
1.64 kristaps 928: .Fl split
1.100 kristaps 929: will cause the first listing also to be split.
930: If not in the AUTHORS section, the default is not to split.
1.64 kristaps 931: .Pp
932: Examples:
1.91 kristaps 933: .D1 \&.An -nosplit
934: .D1 \&.An J. D. Ullman .
1.64 kristaps 935: .Pp
936: .Em Remarks :
937: the effects of
938: .Fl split
939: or
940: .Fl nosplit
941: are re-set when entering the AUTHORS section, so if one specifies
942: .Sx \&An Fl nosplit
943: in the general document body, it must be re-specified in the AUTHORS
944: section.
1.63 kristaps 945: .Ss \&Ao
1.100 kristaps 946: Begins a block enclosed by angled brackets.
947: Does not have any head arguments.
1.63 kristaps 948: .Pp
1.64 kristaps 949: Examples:
1.91 kristaps 950: .D1 \&.Fl -key= \&Ns \&Ao \&Ar val \&Ac
1.63 kristaps 951: .Pp
1.64 kristaps 952: See also
953: .Sx \&Aq .
1.63 kristaps 954: .Ss \&Ap
1.100 kristaps 955: Inserts an apostrophe without any surrounding white-space.
956: This is generally used as a grammatic device when referring to the verb
957: form of a function:
1.64 kristaps 958: .Bd -literal -offset indent
959: \&.Fn execve Ap d
960: .Ed
1.63 kristaps 961: .Ss \&Aq
1.82 kristaps 962: Encloses its arguments in angled brackets.
1.64 kristaps 963: .Pp
964: Examples:
1.91 kristaps 965: .D1 \&.Fl -key= \&Ns \&Aq \&Ar val
1.64 kristaps 966: .Pp
967: .Em Remarks :
968: this macro is often abused for rendering URIs, which should instead use
969: .Sx \&Lk
970: or
971: .Sx \&Mt ,
972: or to note pre-processor
973: .Dq Li #include
974: statements, which should use
975: .Sx \&In .
976: .Pp
977: See also
978: .Sx \&Ao .
1.63 kristaps 979: .Ss \&Ar
1.100 kristaps 980: Command arguments.
981: If an argument is not provided, the string
1.64 kristaps 982: .Dq file ...
1.66 kristaps 983: is used as a default.
1.64 kristaps 984: .Pp
985: Examples:
1.91 kristaps 986: .D1 \&.Fl o \&Ns \&Ar file1
987: .D1 \&.Ar
988: .D1 \&.Ar arg1 , arg2 .
1.63 kristaps 989: .Ss \&At
1.100 kristaps 990: Formats an AT&T version.
991: Accepts at most one parameter:
1.64 kristaps 992: .Bl -tag -width 12n -offset indent
993: .It Cm v[1-7] | 32v
994: A version of
995: .At .
996: .It Cm V[.[1-4]]?
997: A system version of
998: .At .
999: .El
1000: .Pp
1001: Note that these parameters do not begin with a hyphen.
1002: .Pp
1003: Examples:
1.91 kristaps 1004: .D1 \&.At
1005: .D1 \&.At V.1
1.65 kristaps 1006: .Pp
1007: See also
1.66 kristaps 1008: .Sx \&Bsx ,
1.65 kristaps 1009: .Sx \&Bx ,
1.66 kristaps 1010: .Sx \&Dx ,
1.65 kristaps 1011: .Sx \&Fx ,
1012: .Sx \&Nx ,
1013: .Sx \&Ox ,
1014: and
1015: .Sx \&Ux .
1.63 kristaps 1016: .Ss \&Bc
1.64 kristaps 1017: Closes a
1018: .Sx \&Bo
1019: block. Does not have any tail arguments.
1.63 kristaps 1020: .Ss \&Bd
1.100 kristaps 1021: Begins a display block.
1022: A display is collection of macros or text which may be collectively
1023: offset or justified in a manner different from that
1024: of the enclosing context.
1025: By default, the block is preceded by a vertical space.
1.64 kristaps 1026: .Pp
1027: Each display is associated with a type, which must be one of the
1028: following arguments:
1029: .Bl -tag -width 12n -offset indent
1030: .It Fl ragged
1031: Only left-justify the block.
1032: .It Fl unfilled
1033: Do not justify the block at all.
1034: .It Fl filled
1035: Left- and right-justify the block.
1036: .It Fl literal
1037: Alias for
1038: .Fl unfilled .
1039: .It Fl centered
1040: Centre-justify each line.
1041: .El
1042: .Pp
1.100 kristaps 1043: The type must be provided first.
1044: Secondary arguments are as follows:
1.64 kristaps 1045: .Bl -tag -width 12n -offset indent
1046: .It Fl offset Ar width
1047: Offset by the value of
1048: .Ar width ,
1049: which is interpreted as one of the following, specified in order:
1050: .Bl -item
1051: .It
1052: As one of the pre-defined strings
1053: .Ar indent ,
1054: the width of standard indentation;
1055: .Ar indent-two ,
1056: twice
1057: .Ar indent ;
1058: .Ar left ,
1059: which has no effect ;
1060: .Ar right ,
1061: which justifies to the right margin; and
1062: .Ar center ,
1063: which aligns around an imagined centre axis.
1064: .It
1.100 kristaps 1065: As a precalculated width for a named macro.
1066: The most popular is the imaginary macro
1.67 kristaps 1067: .Ar \&Ds ,
1.64 kristaps 1068: which resolves to
1069: .Ar 6n .
1070: .It
1071: As a scaling unit following the syntax described in
1072: .Sx Scaling Widths .
1073: .It
1074: As the calculated string length of the opaque string.
1075: .El
1076: .Pp
1077: If unset, it will revert to the value of
1078: .Ar 8n
1079: as described in
1080: .Sx Scaling Widths .
1081: .It Fl compact
1082: Do not assert a vertical space before the block.
1083: .It Fl file Ar file
1084: Prepend the file
1085: .Ar file
1086: before any text or macros within the block.
1087: .El
1088: .Pp
1089: Examples:
1090: .Bd -literal -offset indent
1091: \&.Bd \-unfilled \-offset two-indent \-compact
1.65 kristaps 1092: Hello world.
1.64 kristaps 1093: \&.Ed
1094: .Ed
1.66 kristaps 1095: .Pp
1096: See also
1097: .Sx \&D1
1098: and
1099: .Sx \&Dl .
1.63 kristaps 1100: .Ss \&Bf
1101: .Ss \&Bk
1102: .Ss \&Bl
1.103 kristaps 1103: Begins a list composed of one or more list entries.
1.104 kristaps 1104: A list is associated with a type, which is a required argument.
1105: Other arguments are
1106: .Fl width ,
1107: defined per-type as accepting a literal or
1108: .Sx Scaling Widths
1109: value;
1110: .Fl offset ,
1111: also accepting a literal or
1112: .Sx Scaling Widths
1113: value setting the list's global offset; and
1114: .Fl compact ,
1115: suppressing the default vertical space printed before each list entry.
1.103 kristaps 1116: A list entry is specified by the
1117: .Sx \&It
1118: macro, which consists of a head and optional body (depending on the list
1119: type).
1120: A list must specify one of the following list types:
1121: .Bl -tag -width 12n -offset indent
1122: .It Fl bullet
1123: A list offset by a bullet.
1124: The head of list entries must be empty.
1125: List entry bodies are positioned after the bullet.
1.104 kristaps 1126: The
1127: .Fl width
1128: argument varies the width of list bodies' left-margins.
1.103 kristaps 1129: .It Fl column
1130: A columnated list.
1.104 kristaps 1131: The
1132: .Fl width
1133: argument has no effect.
1.103 kristaps 1134: The number of columns is specified as parameters to the
1135: .Sx \&Bl
1136: macro.
1137: These dictate the width of columns either as
1138: .Sx Scaling Widths
1139: or literal text.
1140: List entry bodies must be left empty.
1141: Column bodies have the following syntax:
1142: .Pp
1143: .D1 .It col1 <TAB> ... coln
1144: .D1 .It col1 Ta ... coln
1145: .D1 .It col1 <TAB> col2 Ta coln
1146: .Pp
1147: where columns may be separated by tabs, the literal string
1148: .Qq Ta ,
1149: or a mixture of both.
1150: These are equivalent except that quoted sections propogate over tabs,
1151: for example,
1152: .Pp
1153: .D1 .It \(dqcol1 ; <TAB> col2 ;\(dq ;
1154: .Pp
1155: will preserve the semicolon whitespace except for the last.
1156: .It Fl dash
1157: A list offset by a dash (hyphen).
1158: The head of list entries must be empty.
1159: List entry bodies are positioned past the dash.
1.104 kristaps 1160: The
1161: .Fl width
1162: argument varies the width of list bodies' left-margins.
1.103 kristaps 1163: .It Fl diag
1164: Like
1165: .Fl inset ,
1166: but with additional formatting to the head.
1.104 kristaps 1167: The
1168: .Fl width
1169: argument varies the width of list bodies' left-margins.
1.103 kristaps 1170: .It Fl enum
1171: An enumerated list offset by the enumeration from 1.
1172: The head of list entries must be empty.
1173: List entry bodies are positioned after the enumeration.
1.104 kristaps 1174: The
1175: .Fl width
1176: argument varies the width of list bodies' left-margins.
1.103 kristaps 1177: .It Fl hang
1178: Like
1179: .Fl tag ,
1180: but instead of list bodies positioned after the head, they trail the
1181: head text.
1.104 kristaps 1182: The
1183: .Fl width
1184: argument varies the width of list bodies' left-margins.
1.103 kristaps 1185: .It Fl hyphen
1186: Synonym for
1187: .Fl dash .
1188: .It Fl inset
1189: List bodies follow the list head.
1.104 kristaps 1190: The
1191: .Fl width
1192: argument is ignored.
1.103 kristaps 1193: .It Fl item
1194: This produces blocks of text.
1195: The head of list entries must be empty.
1.104 kristaps 1196: The
1197: .Fl width
1198: argument is ignored.
1.103 kristaps 1199: .It Fl ohang
1200: List bodies are positioned on the line following the head.
1.104 kristaps 1201: The
1202: .Fl width
1203: argument is ignored.
1.103 kristaps 1204: .It Fl tag
1205: A list offset by list entry heads. List entry bodies are positioned
1206: after the head as specified by the
1207: .Fl width
1208: argument.
1209: .El
1.63 kristaps 1210: .Ss \&Bo
1.100 kristaps 1211: Begins a block enclosed by square brackets.
1212: Does not have any head arguments.
1.65 kristaps 1213: .Pp
1214: Examples:
1215: .Bd -literal -offset indent
1216: \&.Bo 1 ,
1.91 kristaps 1217: \&.Dv BUFSIZ \&Bc
1.65 kristaps 1218: .Ed
1219: .Pp
1220: See also
1221: .Sx \&Bq .
1.63 kristaps 1222: .Ss \&Bq
1.82 kristaps 1223: Encloses its arguments in square brackets.
1.65 kristaps 1224: .Pp
1225: Examples:
1.91 kristaps 1226: .D1 \&.Bq 1 , \&Dv BUFSIZ
1.65 kristaps 1227: .Pp
1228: .Em Remarks :
1229: this macro is sometimes abused to emulate optional arguments for
1230: commands; the correct macros to use for this purpose are
1231: .Sx \&Op ,
1232: .Sx \&Oo ,
1233: and
1234: .Sx \&Oc .
1235: .Pp
1236: See also
1237: .Sx \&Bo .
1.63 kristaps 1238: .Ss \&Brc
1.65 kristaps 1239: Closes a
1240: .Sx \&Bro
1241: block. Does not have any tail arguments.
1.63 kristaps 1242: .Ss \&Bro
1.100 kristaps 1243: Begins a block enclosed by curly braces.
1244: Does not have any head arguments.
1.65 kristaps 1245: .Pp
1246: Examples:
1247: .Bd -literal -offset indent
1248: \&.Bro 1 , ... ,
1.91 kristaps 1249: \&.Va n \&Brc
1.65 kristaps 1250: .Ed
1251: .Pp
1252: See also
1253: .Sx \&Brq .
1.63 kristaps 1254: .Ss \&Brq
1.65 kristaps 1255: Encloses its arguments in curly braces.
1256: .Pp
1257: Examples:
1.91 kristaps 1258: .D1 \&.Brq 1 , ... , \&Va n
1.65 kristaps 1259: .Pp
1260: See also
1261: .Sx \&Bro .
1.63 kristaps 1262: .Ss \&Bsx
1.65 kristaps 1263: Format the BSD/OS version provided as an argument, or a default value if
1264: no argument is provided.
1265: .Pp
1266: Examples:
1.91 kristaps 1267: .D1 \&.Bsx 1.0
1268: .D1 \&.Bsx
1.65 kristaps 1269: .Pp
1270: See also
1271: .Sx \&At ,
1272: .Sx \&Bx ,
1.66 kristaps 1273: .Sx \&Dx ,
1.65 kristaps 1274: .Sx \&Fx ,
1275: .Sx \&Nx ,
1276: .Sx \&Ox ,
1277: and
1278: .Sx \&Ux .
1.63 kristaps 1279: .Ss \&Bt
1.66 kristaps 1280: Prints
1281: .Dq is currently in beta test.
1.63 kristaps 1282: .Ss \&Bx
1.65 kristaps 1283: Format the BSD version provided as an argument, or a default value if no
1284: argument is provided.
1285: .Pp
1286: Examples:
1.91 kristaps 1287: .D1 \&.Bx 4.4
1288: .D1 \&.Bx
1.65 kristaps 1289: .Pp
1290: See also
1291: .Sx \&At ,
1292: .Sx \&Bsx ,
1.66 kristaps 1293: .Sx \&Dx ,
1.65 kristaps 1294: .Sx \&Fx ,
1295: .Sx \&Nx ,
1296: .Sx \&Ox ,
1297: and
1298: .Sx \&Ux .
1.63 kristaps 1299: .Ss \&Cd
1.100 kristaps 1300: Configuration declaration.
1301: This denotes strings accepted by
1.66 kristaps 1302: .Xr config 8 .
1303: .Pp
1304: Examples:
1.91 kristaps 1305: .D1 \&.Cd device le0 at scode?
1.66 kristaps 1306: .Pp
1307: .Em Remarks :
1308: this macro is commonly abused by using quoted literals to retain
1309: white-space and align consecutive
1310: .Sx \&Cd
1.100 kristaps 1311: declarations.
1312: This practise is discouraged.
1.63 kristaps 1313: .Ss \&Cm
1.100 kristaps 1314: Command modifiers.
1315: Useful when specifying configuration options or keys.
1.66 kristaps 1316: .Pp
1317: Examples:
1.91 kristaps 1318: .D1 \&.Cm ControlPath
1319: .D1 \&.Cm ControlMaster
1.66 kristaps 1320: .Pp
1321: See also
1322: .Sx \&Fl .
1.63 kristaps 1323: .Ss \&D1
1.100 kristaps 1324: One-line indented display.
1325: This is formatted by the default rules and is useful for simple indented
1326: statements.
1327: It is followed by a newline.
1.66 kristaps 1328: .Pp
1329: Examples:
1.91 kristaps 1330: .D1 \&.D1 \&Fl abcdefgh
1.66 kristaps 1331: .Pp
1332: See also
1333: .Sx \&Bd
1334: and
1335: .Sx \&Dl .
1.63 kristaps 1336: .Ss \&Db
1337: .Ss \&Dc
1.66 kristaps 1338: Closes a
1339: .Sx \&Do
1340: block. Does not have any tail arguments.
1.63 kristaps 1341: .Ss \&Dd
1.100 kristaps 1342: Document date.
1343: This is the mandatory first macro of any
1.66 kristaps 1344: .Nm
1.100 kristaps 1345: manual.
1346: Its calling syntax is as follows:
1.66 kristaps 1347: .Pp
1348: .D1 \. Ns Sx \&Dd Cm date
1349: .Pp
1.82 kristaps 1350: The
1.66 kristaps 1351: .Cm date
1352: field may be either
1353: .Ar $\&Mdocdate$ ,
1354: which signifies the current manual revision date dictated by
1.72 kristaps 1355: .Xr cvs 1 ,
1.66 kristaps 1356: or instead a valid canonical date as specified by
1357: .Sx Dates .
1.72 kristaps 1358: If a date does not conform, the current date is used instead.
1.66 kristaps 1359: .Pp
1360: Examples:
1.91 kristaps 1361: .D1 \&.Dd $\&Mdocdate$
1362: .D1 \&.Dd $\&Mdocdate: July 21 2007$
1363: .D1 \&.Dd July 21, 2007
1.66 kristaps 1364: .Pp
1365: See also
1366: .Sx \&Dt
1367: and
1368: .Sx \&Os .
1.63 kristaps 1369: .Ss \&Dl
1.100 kristaps 1370: One-line intended display.
1371: This is formatted as literal text and is useful for commands and
1372: invocations.
1373: It is followed by a newline.
1.66 kristaps 1374: .Pp
1375: Examples:
1.91 kristaps 1376: .D1 \&.Dl % mandoc mdoc.7 | less
1.66 kristaps 1377: .Pp
1378: See also
1379: .Sx \&Bd
1380: and
1381: .Sx \&D1 .
1.63 kristaps 1382: .Ss \&Do
1.66 kristaps 1383: Begins a block enclosed by double quotes. Does not have any head
1384: arguments.
1385: .Pp
1386: Examples:
1.91 kristaps 1387: .D1 \&.D1 \&Do April is the cruellest month \&Dc \e(em T.S. Eliot
1.66 kristaps 1388: .Pp
1389: See also
1390: .Sx \&Dq .
1.63 kristaps 1391: .Ss \&Dq
1.82 kristaps 1392: Encloses its arguments in double quotes.
1.66 kristaps 1393: .Pp
1394: Examples:
1.91 kristaps 1395: .Bd -literal -offset indent -compact
1.66 kristaps 1396: \&.Dq April is the cruellest month
1397: \e(em T.S. Eliot
1398: .Ed
1399: .Pp
1400: See also
1401: .Sx \&Do .
1.63 kristaps 1402: .Ss \&Dt
1.100 kristaps 1403: Document title.
1404: This is the mandatory second macro of any
1.66 kristaps 1405: .Nm
1.100 kristaps 1406: file.
1407: Its calling syntax is as follows:
1.66 kristaps 1408: .Pp
1409: .D1 \. Ns Sx \&Dt Cm title section Op Cm volume | arch
1410: .Pp
1411: Its arguments are as follows:
1412: .Bl -tag -width Ds -offset Ds
1413: .It Cm title
1.100 kristaps 1414: The document's title (name).
1415: This should be capitalised and is required.
1.66 kristaps 1416: .It Cm section
1.100 kristaps 1417: The manual section.
1418: This may be one of
1.66 kristaps 1419: .Ar 1
1420: .Pq utilities ,
1421: .Ar 2
1422: .Pq system calls ,
1423: .Ar 3
1424: .Pq libraries ,
1425: .Ar 3p
1426: .Pq Perl libraries ,
1427: .Ar 4
1428: .Pq devices ,
1429: .Ar 5
1430: .Pq file formats ,
1431: .Ar 6
1432: .Pq games ,
1433: .Ar 7
1434: .Pq miscellaneous ,
1435: .Ar 8
1436: .Pq system utilities ,
1437: .Ar 9
1438: .Pq kernel functions ,
1439: .Ar X11
1440: .Pq X Window System ,
1441: .Ar X11R6
1442: .Pq X Window System ,
1443: .Ar unass
1444: .Pq unassociated ,
1445: .Ar local
1446: .Pq local system ,
1447: .Ar draft
1448: .Pq draft manual ,
1449: or
1450: .Ar paper
1451: .Pq paper .
1452: It is also required and should correspond to the manual's filename
1453: suffix.
1454: .It Cm volume
1455: This overrides the volume inferred from
1456: .Ar section .
1457: This field is optional, and if specified, must be one of
1458: .Ar USD
1459: .Pq users' supplementary documents ,
1460: .Ar PS1
1461: .Pq programmers' supplementary documents ,
1462: .Ar AMD
1463: .Pq administrators' supplementary documents ,
1464: .Ar SMM
1465: .Pq system managers' manuals ,
1466: .Ar URM
1467: .Pq users' reference manuals ,
1468: .Ar PRM
1469: .Pq programmers' reference manuals ,
1470: .Ar KM
1471: .Pq kernel manuals ,
1472: .Ar IND
1473: .Pq master index ,
1474: .Ar MMI
1475: .Pq master index ,
1476: .Ar LOCAL
1477: .Pq local manuals ,
1478: .Ar LOC
1479: .Pq local manuals ,
1480: or
1481: .Ar CON
1482: .Pq contributed manuals .
1483: .It Cm arch
1.100 kristaps 1484: This specifies a specific relevant architecture.
1485: If
1.66 kristaps 1486: .Cm volume
1487: is not provided, it may be used in its place, else it may be used
1.100 kristaps 1488: subsequent that.
1489: It, too, is optional.
1490: It must be one of
1.66 kristaps 1491: .Ar alpha ,
1492: .Ar amd64 ,
1493: .Ar amiga ,
1494: .Ar arc ,
1495: .Ar arm ,
1496: .Ar armish ,
1497: .Ar aviion ,
1498: .Ar hp300 ,
1499: .Ar hppa ,
1500: .Ar hppa64 ,
1501: .Ar i386 ,
1502: .Ar landisk ,
1.86 kristaps 1503: .Ar loongson ,
1.66 kristaps 1504: .Ar luna88k ,
1505: .Ar mac68k ,
1506: .Ar macppc ,
1507: .Ar mvme68k ,
1508: .Ar mvme88k ,
1509: .Ar mvmeppc ,
1510: .Ar pmax ,
1511: .Ar sgi ,
1512: .Ar socppc ,
1513: .Ar sparc ,
1514: .Ar sparc64 ,
1515: .Ar sun3 ,
1516: .Ar vax ,
1517: or
1518: .Ar zaurus .
1519: .El
1520: .Pp
1521: Examples:
1.91 kristaps 1522: .D1 \&.Dt FOO 1
1523: .D1 \&.Dt FOO 4 KM
1524: .D1 \&.Dt FOO 9 i386
1525: .D1 \&.Dt FOO 9 KM i386
1.66 kristaps 1526: .Pp
1527: See also
1528: .Sx \&Dd
1529: and
1530: .Sx \&Os .
1.63 kristaps 1531: .Ss \&Dv
1.66 kristaps 1532: Defined variables such as preprocessor constants.
1533: .Pp
1534: Examples:
1.91 kristaps 1535: .D1 \&.Dv BUFSIZ
1536: .D1 \&.Dv STDOUT_FILENO
1.66 kristaps 1537: .Pp
1538: See also
1539: .Sx \&Er .
1.63 kristaps 1540: .Ss \&Dx
1.71 kristaps 1541: Format the DragonFly BSD version provided as an argument, or a default
1.66 kristaps 1542: value if no argument is provided.
1543: .Pp
1544: Examples:
1.91 kristaps 1545: .D1 \&.Dx 2.4.1
1546: .D1 \&.Dx
1.66 kristaps 1547: .Pp
1548: See also
1549: .Sx \&At ,
1550: .Sx \&Bsx ,
1551: .Sx \&Bx ,
1552: .Sx \&Fx ,
1553: .Sx \&Nx ,
1554: .Sx \&Ox ,
1555: and
1556: .Sx \&Ux .
1.63 kristaps 1557: .Ss \&Ec
1558: .Ss \&Ed
1559: .Ss \&Ef
1560: .Ss \&Ek
1561: .Ss \&El
1562: .Ss \&Em
1.100 kristaps 1563: Denotes text that should be emphasised.
1564: Note that this is a presentation term and should not be used for
1565: stylistically decorating technical terms.
1.66 kristaps 1566: .Pp
1567: Examples:
1.91 kristaps 1568: .D1 \&.Em Warnings!
1569: .D1 \&.Em Remarks :
1.63 kristaps 1570: .Ss \&En
1571: .Ss \&Eo
1572: .Ss \&Er
1.90 kristaps 1573: Display error constants.
1.66 kristaps 1574: .Pp
1575: Examples:
1.91 kristaps 1576: .D1 \&.Er EPERM
1577: .D1 \&.Er ENOENT
1.66 kristaps 1578: .Pp
1579: See also
1580: .Sx \&Dv .
1.63 kristaps 1581: .Ss \&Es
1582: .Ss \&Ev
1.66 kristaps 1583: Environmental variables such as those specified in
1584: .Xr environ 7 .
1585: .Pp
1586: Examples:
1.91 kristaps 1587: .D1 \&.Ev DISPLAY
1588: .D1 \&.Ev PATH
1.63 kristaps 1589: .Ss \&Ex
1.100 kristaps 1590: Inserts text regarding a utility's exit values.
1591: This macro must have first the
1.66 kristaps 1592: .Fl std
1593: argument specified, then an optional
1594: .Ar utility .
1595: If
1596: .Ar utility
1597: is not provided, the document's name as stipulated in
1598: .Sx \&Nm
1599: is provided.
1.63 kristaps 1600: .Ss \&Fa
1601: .Ss \&Fc
1602: .Ss \&Fd
1603: .Ss \&Fl
1.100 kristaps 1604: Command-line flag.
1605: Used when listing arguments to command-line utilities.
1606: Prints a fixed-width hyphen
1.79 kristaps 1607: .Sq \-
1.100 kristaps 1608: directly followed by each argument.
1609: If no arguments are provided, a hyphen is printed followed by a space.
1610: If the argument is a macro, a hyphen is prefixed to the subsequent macro
1611: output.
1.79 kristaps 1612: .Pp
1613: Examples:
1.91 kristaps 1614: .D1 \&.Fl a b c
1615: .D1 \&.Fl \&Pf a b
1616: .D1 \&.Fl
1617: .D1 \&.Op \&Fl o \&Ns \&Ar file
1.79 kristaps 1618: .Pp
1619: See also
1620: .Sx \&Cm .
1.63 kristaps 1621: .Ss \&Fn
1622: .Ss \&Fo
1623: .Ss \&Fr
1624: .Ss \&Ft
1625: .Ss \&Fx
1.65 kristaps 1626: Format the FreeBSD version provided as an argument, or a default value
1627: if no argument is provided.
1628: .Pp
1629: Examples:
1.91 kristaps 1630: .D1 \&.Fx 7.1
1631: .D1 \&.Fx
1.65 kristaps 1632: .Pp
1633: See also
1634: .Sx \&At ,
1.66 kristaps 1635: .Sx \&Bsx ,
1.65 kristaps 1636: .Sx \&Bx ,
1.66 kristaps 1637: .Sx \&Dx ,
1.65 kristaps 1638: .Sx \&Nx ,
1639: .Sx \&Ox ,
1640: and
1641: .Sx \&Ux .
1.63 kristaps 1642: .Ss \&Hf
1643: .Ss \&Ic
1644: .Ss \&In
1645: .Ss \&It
1646: .Ss \&Lb
1647: .Ss \&Li
1648: .Ss \&Lk
1.100 kristaps 1649: Format a hyperlink.
1650: The calling syntax is as follows:
1.70 kristaps 1651: .Pp
1652: .D1 \. Ns Sx \&Lk Cm uri Op Cm name
1653: .Pp
1654: Examples:
1.91 kristaps 1655: .D1 \&.Lk http://bsd.lv "The BSD.lv Project"
1656: .D1 \&.Lk http://bsd.lv
1.70 kristaps 1657: .Pp
1658: See also
1659: .Sx \&Mt .
1.63 kristaps 1660: .Ss \&Lp
1661: .Ss \&Ms
1662: .Ss \&Mt
1663: .Ss \&Nd
1664: .Ss \&Nm
1665: .Ss \&No
1666: .Ss \&Ns
1667: .Ss \&Nx
1.65 kristaps 1668: Format the NetBSD version provided as an argument, or a default value if
1669: no argument is provided.
1670: .Pp
1671: Examples:
1.91 kristaps 1672: .D1 \&.Nx 5.01
1673: .D1 \&.Nx
1.65 kristaps 1674: .Pp
1675: See also
1676: .Sx \&At ,
1.66 kristaps 1677: .Sx \&Bsx ,
1.65 kristaps 1678: .Sx \&Bx ,
1.66 kristaps 1679: .Sx \&Dx ,
1.65 kristaps 1680: .Sx \&Fx ,
1681: .Sx \&Ox ,
1682: and
1683: .Sx \&Ux .
1.63 kristaps 1684: .Ss \&Oc
1685: .Ss \&Oo
1686: .Ss \&Op
1687: .Ss \&Os
1.100 kristaps 1688: Document operating system version.
1689: This is the mandatory third macro of
1.66 kristaps 1690: any
1691: .Nm
1692: file. Its calling syntax is as follows:
1693: .Pp
1694: .D1 \. Ns Sx \&Os Op Cm system
1695: .Pp
1696: The optional
1697: .Cm system
1.100 kristaps 1698: parameter specifies the relevant operating system or environment.
1699: Left unspecified, it defaults to the local operating system version.
1700: This is the suggested form.
1.66 kristaps 1701: .Pp
1702: Examples:
1.91 kristaps 1703: .D1 \&.Os
1704: .D1 \&.Os KTH/CSC/TCS
1705: .D1 \&.Os BSD 4.3
1.66 kristaps 1706: .Pp
1707: See also
1708: .Sx \&Dd
1709: and
1710: .Sx \&Dt .
1.63 kristaps 1711: .Ss \&Ot
1.66 kristaps 1712: Unknown usage.
1713: .Pp
1714: .Em Remarks :
1715: this macro has been deprecated.
1.63 kristaps 1716: .Ss \&Ox
1.65 kristaps 1717: Format the OpenBSD version provided as an argument, or a default value
1718: if no argument is provided.
1719: .Pp
1720: Examples:
1.91 kristaps 1721: .D1 \&.Ox 4.5
1722: .D1 \&.Ox
1.65 kristaps 1723: .Pp
1724: See also
1725: .Sx \&At ,
1726: .Sx \&Bsx ,
1727: .Sx \&Bx ,
1.66 kristaps 1728: .Sx \&Dx ,
1.65 kristaps 1729: .Sx \&Fx ,
1730: .Sx \&Nx ,
1731: and
1732: .Sx \&Ux .
1.63 kristaps 1733: .Ss \&Pa
1734: .Ss \&Pc
1735: .Ss \&Pf
1736: .Ss \&Po
1737: .Ss \&Pp
1738: .Ss \&Pq
1739: .Ss \&Qc
1740: .Ss \&Ql
1741: .Ss \&Qo
1742: .Ss \&Qq
1743: .Ss \&Re
1744: Closes a
1745: .Sx \&Rs
1.100 kristaps 1746: block.
1747: Does not have any tail arguments.
1.63 kristaps 1748: .Ss \&Rs
1749: Begins a bibliographic
1750: .Pq Dq reference
1.100 kristaps 1751: block.
1752: Does not have any head arguments.
1753: The block macro may only contain
1.63 kristaps 1754: .Sx \&%A ,
1755: .Sx \&%B ,
1756: .Sx \&%C ,
1757: .Sx \&%D ,
1758: .Sx \&%I ,
1759: .Sx \&%J ,
1760: .Sx \&%N ,
1761: .Sx \&%O ,
1762: .Sx \&%P ,
1763: .Sx \&%Q ,
1764: .Sx \&%R ,
1765: .Sx \&%T ,
1766: and
1767: .Sx \&%V
1768: child macros (at least one must be specified).
1769: .Pp
1.64 kristaps 1770: Examples:
1.91 kristaps 1771: .Bd -literal -offset indent -compact
1.63 kristaps 1772: \&.Rs
1773: \&.%A J. E. Hopcroft
1774: \&.%A J. D. Ullman
1775: \&.%B Introduction to Automata Theory, Languages, and Computation
1776: \&.%I Addison-Wesley
1777: \&.%C Reading, Massachusettes
1778: \&.%D 1979
1779: \&.Re
1780: .Ed
1781: .Pp
1782: If an
1783: .Sx \&Rs
1784: block is used within a SEE ALSO section, a vertical space is asserted
1785: before the rendered output, else the block continues on the current
1786: line.
1787: .Ss \&Rv
1788: .Ss \&Sc
1789: .Ss \&Sh
1790: .Ss \&Sm
1791: .Ss \&So
1792: .Ss \&Sq
1793: .Ss \&Ss
1794: .Ss \&St
1795: .Ss \&Sx
1796: .Ss \&Sy
1797: .Ss \&Tn
1798: .Ss \&Ud
1799: .Ss \&Ux
1.100 kristaps 1800: Format the UNIX name.
1801: Accepts no argument.
1.65 kristaps 1802: .Pp
1803: Examples:
1.91 kristaps 1804: .D1 \&.Ux
1.65 kristaps 1805: .Pp
1806: See also
1807: .Sx \&At ,
1.66 kristaps 1808: .Sx \&Bsx ,
1.65 kristaps 1809: .Sx \&Bx ,
1.66 kristaps 1810: .Sx \&Dx ,
1.65 kristaps 1811: .Sx \&Fx ,
1812: .Sx \&Nx ,
1813: and
1814: .Sx \&Ox .
1.63 kristaps 1815: .Ss \&Va
1816: .Ss \&Vt
1.100 kristaps 1817: A variable type.
1818: This is also used for indicating global variables in the SYNOPSIS
1819: section, in which case a variable name is also specified.
1820: Note that it accepts
1.83 kristaps 1821: .Sx Block partial-implicit
1822: syntax when invoked as the first macro in the SYNOPSIS section, else it
1823: accepts ordinary
1824: .Sx In-line
1825: syntax.
1826: .Pp
1827: Note that this should not be confused with
1828: .Sx \&Ft ,
1829: which is used for function return types.
1830: .Pp
1831: Examples:
1.91 kristaps 1832: .D1 \&.Vt unsigned char
1833: .D1 \&.Vt extern const char * const sys_signame[] ;
1.83 kristaps 1834: .Pp
1835: See also
1836: .Sx \&Ft
1837: and
1838: .Sx \&Va .
1.84 kristaps 1839: .Ss \&Xc
1.87 kristaps 1840: Close a scope opened by
1841: .Sx \&Xo .
1.84 kristaps 1842: .Ss \&Xo
1.100 kristaps 1843: Open an extension scope.
1844: This macro originally existed to extend the 9-argument limit of troff;
1845: since this limit has been lifted, the macro has been deprecated.
1.84 kristaps 1846: .Ss \&Xr
1847: Link to another manual
1848: .Pq Qq cross-reference .
1849: Its calling syntax is
1850: .Pp
1851: .D1 \. Ns Sx \&Xr Cm name section
1852: .Pp
1853: The
1854: .Cm name
1855: and
1856: .Cm section
1.100 kristaps 1857: are the name and section of the linked manual.
1858: If
1.84 kristaps 1859: .Cm section
1860: is followed by non-punctuation, an
1861: .Sx \&Ns
1.100 kristaps 1862: is inserted into the token stream.
1863: This behaviour is for compatibility with
1.84 kristaps 1864: .Xr groff 1 .
1865: .Pp
1866: Examples:
1.91 kristaps 1867: .D1 \&.Xr mandoc 1
1868: .D1 \&.Xr mandoc 1 ;
1869: .D1 \&.Xr mandoc 1 \&Ns s behaviour
1.84 kristaps 1870: .Ss \&br
1871: .Ss \&sp
1.4 kristaps 1872: .Sh COMPATIBILITY
1.93 kristaps 1873: This section documents compatibility between mandoc and other other
1874: troff implementations, at this time limited to GNU troff
1875: .Pq Qq groff .
1.50 kristaps 1876: The term
1.57 kristaps 1877: .Qq historic groff
1.93 kristaps 1878: refers to groff versions before the
1.57 kristaps 1879: .Pa doc.tmac
1.50 kristaps 1880: file re-write
1.57 kristaps 1881: .Pq somewhere between 1.15 and 1.19 .
1882: .Pp
1.93 kristaps 1883: Heirloom troff, the other significant troff implementation accepting
1884: \-mdoc, is similar to historic groff.
1885: .Pp
1.57 kristaps 1886: .Bl -dash -compact
1887: .It
1.81 kristaps 1888: The comment syntax
1889: .Sq \e."
1890: is no longer accepted.
1891: .It
1.93 kristaps 1892: In groff, the
1.80 kristaps 1893: .Sx \&Pa
1894: macro does not format its arguments when used in the FILES section under
1.100 kristaps 1895: certain list types.
1896: mandoc does.
1.80 kristaps 1897: .It
1.93 kristaps 1898: Historic groff does not print a dash for empty
1.79 kristaps 1899: .Sx \&Fl
1.100 kristaps 1900: arguments.
1901: mandoc and newer groff implementations do.
1.79 kristaps 1902: .It
1.93 kristaps 1903: groff behaves irregularly when specifying
1.77 kristaps 1904: .Sq \ef
1.93 kristaps 1905: .Sx Text Decoration
1.100 kristaps 1906: within line-macro scopes.
1907: mandoc follows a consistent system.
1.77 kristaps 1908: .It
1.93 kristaps 1909: In mandoc, negative scaling units are truncated to zero; groff would
1.100 kristaps 1910: move to prior lines.
1911: Furthermore, the
1.61 kristaps 1912: .Sq f
1913: scaling unit, while accepted, is rendered as the default unit.
1914: .It
1.48 kristaps 1915: In quoted literals, groff allowed pair-wise double-quotes to produce a
1.100 kristaps 1916: standalone double-quote in formatted output.
1917: This idiosyncratic behaviour is not applicable in mandoc.
1.57 kristaps 1918: .It
1.64 kristaps 1919: Display types
1.78 kristaps 1920: .Sx \&Bd
1.77 kristaps 1921: .Fl center
1.64 kristaps 1922: and
1923: .Fl right
1924: are aliases for
1.93 kristaps 1925: .Fl left
1926: in manodc. Furthermore, the
1.64 kristaps 1927: .Fl file Ar file
1.100 kristaps 1928: argument is ignored.
1929: Lastly, since text is not right-justified in mandoc (or even groff),
1.64 kristaps 1930: .Fl ragged
1931: and
1932: .Fl filled
1933: are aliases, as are
1934: .Fl literal
1935: and
1936: .Fl unfilled .
1.57 kristaps 1937: .It
1.100 kristaps 1938: Historic groff has many un-callable macros.
1939: Most of these (excluding some block-level macros) are now callable.
1.57 kristaps 1940: .It
1.50 kristaps 1941: The vertical bar
1.57 kristaps 1942: .Sq \(ba
1.28 kristaps 1943: made historic groff
1.57 kristaps 1944: .Qq go orbital
1.93 kristaps 1945: but has been a proper delimiter since then.
1.57 kristaps 1946: .It
1.93 kristaps 1947: .Sx \&It Fl nested
1.28 kristaps 1948: is assumed for all lists (it wasn't in historic groff): any list may be
1949: nested and
1.64 kristaps 1950: .Fl enum
1.4 kristaps 1951: lists will restart the sequence only for the sub-list.
1.57 kristaps 1952: .It
1.4 kristaps 1953: Some manuals use
1.64 kristaps 1954: .Sx \&Li
1.4 kristaps 1955: incorrectly by following it with a reserved character and expecting the
1.100 kristaps 1956: delimiter to render.
1957: This is not supported in mandoc.
1.57 kristaps 1958: .It
1.50 kristaps 1959: In groff, the
1.64 kristaps 1960: .Sx \&Fo
1.100 kristaps 1961: macro only produces the first parameter.
1962: This is not the case in mandoc.
1.93 kristaps 1963: .It
1964: In groff, the
1965: .Sx \&Cd ,
1966: .Sx \&Er ,
1.106 kristaps 1967: .Sx \&Ex ,
1.93 kristaps 1968: and
1.106 kristaps 1969: .Sx \&Rv
1.100 kristaps 1970: macros were stipulated only to occur in certain manual sections.
1971: mandoc does not have these restrictions.
1.105 kristaps 1972: .It
1973: Newer groff and mandoc print
1974: .Qq AT&T UNIX
1975: prior to unknown arguments of
1976: .Sx \&At ;
1977: older groff did nothing.
1.57 kristaps 1978: .El
1.2 kristaps 1979: .Sh SEE ALSO
1.57 kristaps 1980: .Xr mandoc 1 ,
1981: .Xr mandoc_char 7
1.2 kristaps 1982: .Sh AUTHORS
1983: The
1.57 kristaps 1984: .Nm
1.50 kristaps 1985: reference was written by
1.94 kristaps 1986: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
1.64 kristaps 1987: .\"
1988: .\" XXX: this really isn't the place for these caveats.
1989: .\" .
1990: .\" .
1991: .\" .Sh CAVEATS
1992: .\" There are many ambiguous parts of mdoc.
1993: .\" .
1994: .\" .Pp
1995: .\" .Bl -dash -compact
1996: .\" .It
1997: .\" .Sq \&Fa
1998: .\" should be
1999: .\" .Sq \&Va
2000: .\" as function arguments are variables.
2001: .\" .It
2002: .\" .Sq \&Ft
2003: .\" should be
2004: .\" .Sq \&Vt
2005: .\" as function return types are still types. Furthermore, the
2006: .\" .Sq \&Ft
2007: .\" should be removed and
2008: .\" .Sq \&Fo ,
2009: .\" which ostensibly follows it, should follow the same convention as
2010: .\" .Sq \&Va .
2011: .\" .It
2012: .\" .Sq \&Va
2013: .\" should formalise that only one or two arguments are acceptable: a
2014: .\" variable name and optional, preceding type.
2015: .\" .It
2016: .\" .Sq \&Fd
2017: .\" is ambiguous. It's commonly used to indicate an include file in the
2018: .\" synopsis section.
2019: .\" .Sq \&In
2020: .\" should be used, instead.
2021: .\" .It
2022: .\" Only the
2023: .\" .Sq \-literal
2024: .\" argument to
2025: .\" .Sq \&Bd
2026: .\" makes sense. The remaining ones should be removed.
2027: .\" .It
2028: .\" The
2029: .\" .Sq \&Xo
2030: .\" and
2031: .\" .Sq \&Xc
2032: .\" macros should be deprecated.
2033: .\" .It
2034: .\" The
2035: .\" .Sq \&Dt
2036: .\" macro lacks clarity. It should be absolutely clear which title will
2037: .\" render when formatting the manual page.
2038: .\" .It
2039: .\" A
2040: .\" .Sq \&Lx
2041: .\" should be provided for Linux (\(`a la
2042: .\" .Sq \&Ox ,
2043: .\" .Sq \&Nx
2044: .\" etc.).
2045: .\" .It
2046: .\" There's no way to refer to references in
2047: .\" .Sq \&Rs/Re
2048: .\" blocks.
2049: .\" .It
2050: .\" The \-split and \-nosplit dictates via
2051: .\" .Sq \&An
2052: .\" are re-set when entering and leaving the AUTHORS section.
2053: .\" .El
2054: .\" .
CVSweb