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