Annotation of mandoc/mdoc.7, Revision 1.114
1.114 ! kristaps 1: .\" $Id: mdoc.7,v 1.113 2010/06/02 12:01:00 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.114 ! kristaps 17: .Dd $Mdocdate: June 2 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.
1.114 ! kristaps 1139: If the initial macro of a
! 1140: .Fl column
! 1141: list is not an
! 1142: .Sx \&It ,
! 1143: an
! 1144: .Sx \&It
! 1145: context spanning each line is implied until an
! 1146: .Sx \&It
! 1147: line macro is encountered, at which point list bodies are interpreted as
! 1148: described in the
! 1149: .Sx \&It
! 1150: documentation.
1.103 kristaps 1151: .It Fl dash
1152: A list offset by a dash (hyphen).
1153: The head of list entries must be empty.
1154: List entry bodies are positioned past the dash.
1.104 kristaps 1155: The
1156: .Fl width
1157: argument varies the width of list bodies' left-margins.
1.103 kristaps 1158: .It Fl diag
1159: Like
1160: .Fl inset ,
1161: but with additional formatting to the head.
1.104 kristaps 1162: The
1163: .Fl width
1164: argument varies the width of list bodies' left-margins.
1.103 kristaps 1165: .It Fl enum
1166: An enumerated list offset by the enumeration from 1.
1167: The head of list entries must be empty.
1168: List entry bodies are positioned after the enumeration.
1.104 kristaps 1169: The
1170: .Fl width
1171: argument varies the width of list bodies' left-margins.
1.103 kristaps 1172: .It Fl hang
1173: Like
1174: .Fl tag ,
1175: but instead of list bodies positioned after the head, they trail the
1176: head text.
1.104 kristaps 1177: The
1178: .Fl width
1179: argument varies the width of list bodies' left-margins.
1.103 kristaps 1180: .It Fl hyphen
1181: Synonym for
1182: .Fl dash .
1183: .It Fl inset
1184: List bodies follow the list head.
1.104 kristaps 1185: The
1186: .Fl width
1187: argument is ignored.
1.103 kristaps 1188: .It Fl item
1189: This produces blocks of text.
1190: The head of list entries must be empty.
1.104 kristaps 1191: The
1192: .Fl width
1193: argument is ignored.
1.103 kristaps 1194: .It Fl ohang
1195: List bodies are positioned on the line following the head.
1.104 kristaps 1196: The
1197: .Fl width
1198: argument is ignored.
1.103 kristaps 1199: .It Fl tag
1200: A list offset by list entry heads. List entry bodies are positioned
1201: after the head as specified by the
1202: .Fl width
1203: argument.
1204: .El
1.114 ! kristaps 1205: .Pp
! 1206: See also
! 1207: .Sx \&It .
1.63 kristaps 1208: .Ss \&Bo
1.100 kristaps 1209: Begins a block enclosed by square brackets.
1210: Does not have any head arguments.
1.65 kristaps 1211: .Pp
1212: Examples:
1213: .Bd -literal -offset indent
1214: \&.Bo 1 ,
1.91 kristaps 1215: \&.Dv BUFSIZ \&Bc
1.65 kristaps 1216: .Ed
1217: .Pp
1218: See also
1219: .Sx \&Bq .
1.63 kristaps 1220: .Ss \&Bq
1.82 kristaps 1221: Encloses its arguments in square brackets.
1.65 kristaps 1222: .Pp
1223: Examples:
1.91 kristaps 1224: .D1 \&.Bq 1 , \&Dv BUFSIZ
1.65 kristaps 1225: .Pp
1226: .Em Remarks :
1227: this macro is sometimes abused to emulate optional arguments for
1228: commands; the correct macros to use for this purpose are
1229: .Sx \&Op ,
1230: .Sx \&Oo ,
1231: and
1232: .Sx \&Oc .
1233: .Pp
1234: See also
1235: .Sx \&Bo .
1.63 kristaps 1236: .Ss \&Brc
1.65 kristaps 1237: Closes a
1238: .Sx \&Bro
1239: block. Does not have any tail arguments.
1.63 kristaps 1240: .Ss \&Bro
1.100 kristaps 1241: Begins a block enclosed by curly braces.
1242: Does not have any head arguments.
1.65 kristaps 1243: .Pp
1244: Examples:
1245: .Bd -literal -offset indent
1246: \&.Bro 1 , ... ,
1.91 kristaps 1247: \&.Va n \&Brc
1.65 kristaps 1248: .Ed
1249: .Pp
1250: See also
1251: .Sx \&Brq .
1.63 kristaps 1252: .Ss \&Brq
1.65 kristaps 1253: Encloses its arguments in curly braces.
1254: .Pp
1255: Examples:
1.91 kristaps 1256: .D1 \&.Brq 1 , ... , \&Va n
1.65 kristaps 1257: .Pp
1258: See also
1259: .Sx \&Bro .
1.63 kristaps 1260: .Ss \&Bsx
1.65 kristaps 1261: Format the BSD/OS version provided as an argument, or a default value if
1262: no argument is provided.
1263: .Pp
1264: Examples:
1.91 kristaps 1265: .D1 \&.Bsx 1.0
1266: .D1 \&.Bsx
1.65 kristaps 1267: .Pp
1268: See also
1269: .Sx \&At ,
1270: .Sx \&Bx ,
1.66 kristaps 1271: .Sx \&Dx ,
1.65 kristaps 1272: .Sx \&Fx ,
1273: .Sx \&Nx ,
1274: .Sx \&Ox ,
1275: and
1276: .Sx \&Ux .
1.63 kristaps 1277: .Ss \&Bt
1.66 kristaps 1278: Prints
1279: .Dq is currently in beta test.
1.63 kristaps 1280: .Ss \&Bx
1.65 kristaps 1281: Format the BSD version provided as an argument, or a default value if no
1282: argument is provided.
1283: .Pp
1284: Examples:
1.91 kristaps 1285: .D1 \&.Bx 4.4
1286: .D1 \&.Bx
1.65 kristaps 1287: .Pp
1288: See also
1289: .Sx \&At ,
1290: .Sx \&Bsx ,
1.66 kristaps 1291: .Sx \&Dx ,
1.65 kristaps 1292: .Sx \&Fx ,
1293: .Sx \&Nx ,
1294: .Sx \&Ox ,
1295: and
1296: .Sx \&Ux .
1.63 kristaps 1297: .Ss \&Cd
1.100 kristaps 1298: Configuration declaration.
1299: This denotes strings accepted by
1.66 kristaps 1300: .Xr config 8 .
1301: .Pp
1302: Examples:
1.91 kristaps 1303: .D1 \&.Cd device le0 at scode?
1.66 kristaps 1304: .Pp
1305: .Em Remarks :
1306: this macro is commonly abused by using quoted literals to retain
1307: white-space and align consecutive
1308: .Sx \&Cd
1.100 kristaps 1309: declarations.
1310: This practise is discouraged.
1.63 kristaps 1311: .Ss \&Cm
1.100 kristaps 1312: Command modifiers.
1313: Useful when specifying configuration options or keys.
1.66 kristaps 1314: .Pp
1315: Examples:
1.91 kristaps 1316: .D1 \&.Cm ControlPath
1317: .D1 \&.Cm ControlMaster
1.66 kristaps 1318: .Pp
1319: See also
1320: .Sx \&Fl .
1.63 kristaps 1321: .Ss \&D1
1.100 kristaps 1322: One-line indented display.
1323: This is formatted by the default rules and is useful for simple indented
1324: statements.
1325: It is followed by a newline.
1.66 kristaps 1326: .Pp
1327: Examples:
1.91 kristaps 1328: .D1 \&.D1 \&Fl abcdefgh
1.66 kristaps 1329: .Pp
1330: See also
1331: .Sx \&Bd
1332: and
1333: .Sx \&Dl .
1.63 kristaps 1334: .Ss \&Db
1335: .Ss \&Dc
1.66 kristaps 1336: Closes a
1337: .Sx \&Do
1338: block. Does not have any tail arguments.
1.63 kristaps 1339: .Ss \&Dd
1.100 kristaps 1340: Document date.
1341: This is the mandatory first macro of any
1.66 kristaps 1342: .Nm
1.100 kristaps 1343: manual.
1344: Its calling syntax is as follows:
1.66 kristaps 1345: .Pp
1346: .D1 \. Ns Sx \&Dd Cm date
1347: .Pp
1.82 kristaps 1348: The
1.66 kristaps 1349: .Cm date
1350: field may be either
1351: .Ar $\&Mdocdate$ ,
1352: which signifies the current manual revision date dictated by
1.72 kristaps 1353: .Xr cvs 1 ,
1.66 kristaps 1354: or instead a valid canonical date as specified by
1355: .Sx Dates .
1.72 kristaps 1356: If a date does not conform, the current date is used instead.
1.66 kristaps 1357: .Pp
1358: Examples:
1.91 kristaps 1359: .D1 \&.Dd $\&Mdocdate$
1360: .D1 \&.Dd $\&Mdocdate: July 21 2007$
1361: .D1 \&.Dd July 21, 2007
1.66 kristaps 1362: .Pp
1363: See also
1364: .Sx \&Dt
1365: and
1366: .Sx \&Os .
1.63 kristaps 1367: .Ss \&Dl
1.100 kristaps 1368: One-line intended display.
1369: This is formatted as literal text and is useful for commands and
1370: invocations.
1371: It is followed by a newline.
1.66 kristaps 1372: .Pp
1373: Examples:
1.91 kristaps 1374: .D1 \&.Dl % mandoc mdoc.7 | less
1.66 kristaps 1375: .Pp
1376: See also
1377: .Sx \&Bd
1378: and
1379: .Sx \&D1 .
1.63 kristaps 1380: .Ss \&Do
1.66 kristaps 1381: Begins a block enclosed by double quotes. Does not have any head
1382: arguments.
1383: .Pp
1384: Examples:
1.91 kristaps 1385: .D1 \&.D1 \&Do April is the cruellest month \&Dc \e(em T.S. Eliot
1.66 kristaps 1386: .Pp
1387: See also
1388: .Sx \&Dq .
1.63 kristaps 1389: .Ss \&Dq
1.82 kristaps 1390: Encloses its arguments in double quotes.
1.66 kristaps 1391: .Pp
1392: Examples:
1.91 kristaps 1393: .Bd -literal -offset indent -compact
1.66 kristaps 1394: \&.Dq April is the cruellest month
1395: \e(em T.S. Eliot
1396: .Ed
1397: .Pp
1398: See also
1399: .Sx \&Do .
1.63 kristaps 1400: .Ss \&Dt
1.100 kristaps 1401: Document title.
1402: This is the mandatory second macro of any
1.66 kristaps 1403: .Nm
1.100 kristaps 1404: file.
1405: Its calling syntax is as follows:
1.66 kristaps 1406: .Pp
1.111 kristaps 1407: .D1 \. Ns Sx \&Dt Op Cm title Op Cm section Op Cm volume | arch
1.66 kristaps 1408: .Pp
1409: Its arguments are as follows:
1410: .Bl -tag -width Ds -offset Ds
1411: .It Cm title
1.111 kristaps 1412: The document's title (name), defaulting to
1413: .Qq UNKNOWN
1414: if unspecified.
1415: It should be capitalised.
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 .
1.111 kristaps 1452: It should correspond to the manual's filename suffix and defaults to
1453: .Qq 1
1454: if unspecified.
1.66 kristaps 1455: .It Cm volume
1456: This overrides the volume inferred from
1457: .Ar section .
1458: This field is optional, and if specified, must be one of
1459: .Ar USD
1460: .Pq users' supplementary documents ,
1461: .Ar PS1
1462: .Pq programmers' supplementary documents ,
1463: .Ar AMD
1464: .Pq administrators' supplementary documents ,
1465: .Ar SMM
1466: .Pq system managers' manuals ,
1467: .Ar URM
1468: .Pq users' reference manuals ,
1469: .Ar PRM
1470: .Pq programmers' reference manuals ,
1471: .Ar KM
1472: .Pq kernel manuals ,
1473: .Ar IND
1474: .Pq master index ,
1475: .Ar MMI
1476: .Pq master index ,
1477: .Ar LOCAL
1478: .Pq local manuals ,
1479: .Ar LOC
1480: .Pq local manuals ,
1481: or
1482: .Ar CON
1483: .Pq contributed manuals .
1484: .It Cm arch
1.100 kristaps 1485: This specifies a specific relevant architecture.
1486: If
1.66 kristaps 1487: .Cm volume
1488: is not provided, it may be used in its place, else it may be used
1.100 kristaps 1489: subsequent that.
1490: It, too, is optional.
1491: It must be one of
1.66 kristaps 1492: .Ar alpha ,
1493: .Ar amd64 ,
1494: .Ar amiga ,
1495: .Ar arc ,
1496: .Ar arm ,
1497: .Ar armish ,
1498: .Ar aviion ,
1499: .Ar hp300 ,
1500: .Ar hppa ,
1501: .Ar hppa64 ,
1502: .Ar i386 ,
1503: .Ar landisk ,
1.86 kristaps 1504: .Ar loongson ,
1.66 kristaps 1505: .Ar luna88k ,
1506: .Ar mac68k ,
1507: .Ar macppc ,
1508: .Ar mvme68k ,
1509: .Ar mvme88k ,
1510: .Ar mvmeppc ,
1511: .Ar pmax ,
1512: .Ar sgi ,
1513: .Ar socppc ,
1514: .Ar sparc ,
1515: .Ar sparc64 ,
1516: .Ar sun3 ,
1517: .Ar vax ,
1518: or
1519: .Ar zaurus .
1520: .El
1521: .Pp
1522: Examples:
1.91 kristaps 1523: .D1 \&.Dt FOO 1
1524: .D1 \&.Dt FOO 4 KM
1525: .D1 \&.Dt FOO 9 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
1.114 ! kristaps 1646: A list item. The syntax of this macro depends on the list type.
! 1647: .Pp
! 1648: Lists
! 1649: of type
! 1650: .Fl hang ,
! 1651: .Fl ohang ,
! 1652: .Fl inset ,
! 1653: and
! 1654: .Fl diag
! 1655: have the following calling syntax:
! 1656: .Pp
! 1657: .D1 \. Ns Sx \&It Cm args
! 1658: .Pp
! 1659: Lists of type
! 1660: .Fl bullet ,
! 1661: .Fl dash ,
! 1662: .Fl enum ,
! 1663: .Fl hyphen
! 1664: and
! 1665: .Fl item
! 1666: have the following calling syntax:
! 1667: .Pp
! 1668: .D1 \. Ns Sx \&It
! 1669: .Pp
! 1670: with subsequent lines interpreted within the scope of the
! 1671: .Sx \&It
! 1672: until either a closing
! 1673: .Sx \&El
! 1674: or another
! 1675: .Sx \&It .
! 1676: .Pp
! 1677: The
! 1678: .Fl tag
! 1679: list has syntax
! 1680: .Pp
! 1681: .D1 \. Ns Sx \&It Op Cm args
! 1682: .Pp
! 1683: with subsequent lines interpreted as with
! 1684: .Fl bullet
! 1685: and family.
! 1686: The line arguments correspond to the list's left-hand side; body
! 1687: arguments correspond to the list's contents.
! 1688: .Pp
! 1689: The
! 1690: .Fl column
! 1691: list is the most complicated.
! 1692: Its syntax is
! 1693: .Pp
! 1694: .D1 \. Ns Sx \&It Op Cm args
! 1695: .Pp
! 1696: where
! 1697: .Cm args
! 1698: are phrases, a mix of macros and text corresponding to a line column,
! 1699: delimited by tabs or the special
! 1700: .Sq \&Ta
! 1701: pseudo-macro.
! 1702: Lines subsequent the
! 1703: .Sx \&It
! 1704: are interpreted within the scope of the last phrase.
! 1705: Calling the pseudo-macro
! 1706: .Sq \&Ta
! 1707: will open a new phrase scope (this must occur on a macro line to be
! 1708: interpreted as a macro). Note that the tab phrase delimiter may only be
! 1709: used within the
! 1710: .Sx \&It
! 1711: line itself.
! 1712: Subsequent this, only the
! 1713: .Sq \&Ta
! 1714: pseudo-macro may be used to delimit phrases.
! 1715: Furthermore, note that quoted sections propogate over tab-delimited
! 1716: phrases on an
! 1717: .Sx \&It ,
! 1718: for example,
! 1719: .Pp
! 1720: .D1 .It \(dqcol1 ; <TAB> col2 ;\(dq ;
! 1721: .Pp
! 1722: will preserve the semicolon whitespace except for the last.
! 1723: .Pp
! 1724: See also
! 1725: .Sx \&Bl .
1.63 kristaps 1726: .Ss \&Lb
1.109 kristaps 1727: Specify a library.
1728: The calling syntax is as follows:
1729: .Pp
1730: .D1 \. Ns Sx \&Lb Cm library
1731: .Pp
1732: The
1733: .Cm library
1734: parameter may be a system library, such as
1735: .Cm libz
1736: or
1737: .Cm libpam ,
1738: in which case a small library description is printed next to the linker
1739: invocation; or a custom library, in which case the library name is
1740: printed in quotes.
1741: This is most commonly used in the
1742: .Em SYNOPSIS
1743: section as described in
1744: .Sx MANUAL STRUCTURE .
1745: .Pp
1746: Examples:
1747: .D1 \&.Lb libz
1748: .D1 \&.Lb mdoc
1.63 kristaps 1749: .Ss \&Li
1750: .Ss \&Lk
1.100 kristaps 1751: Format a hyperlink.
1752: The calling syntax is as follows:
1.70 kristaps 1753: .Pp
1754: .D1 \. Ns Sx \&Lk Cm uri Op Cm name
1755: .Pp
1756: Examples:
1.91 kristaps 1757: .D1 \&.Lk http://bsd.lv "The BSD.lv Project"
1758: .D1 \&.Lk http://bsd.lv
1.70 kristaps 1759: .Pp
1760: See also
1761: .Sx \&Mt .
1.63 kristaps 1762: .Ss \&Lp
1763: .Ss \&Ms
1764: .Ss \&Mt
1765: .Ss \&Nd
1766: .Ss \&Nm
1767: .Ss \&No
1768: .Ss \&Ns
1769: .Ss \&Nx
1.65 kristaps 1770: Format the NetBSD version provided as an argument, or a default value if
1771: no argument is provided.
1772: .Pp
1773: Examples:
1.91 kristaps 1774: .D1 \&.Nx 5.01
1775: .D1 \&.Nx
1.65 kristaps 1776: .Pp
1777: See also
1778: .Sx \&At ,
1.66 kristaps 1779: .Sx \&Bsx ,
1.65 kristaps 1780: .Sx \&Bx ,
1.66 kristaps 1781: .Sx \&Dx ,
1.65 kristaps 1782: .Sx \&Fx ,
1783: .Sx \&Ox ,
1784: and
1785: .Sx \&Ux .
1.63 kristaps 1786: .Ss \&Oc
1787: .Ss \&Oo
1788: .Ss \&Op
1789: .Ss \&Os
1.100 kristaps 1790: Document operating system version.
1791: This is the mandatory third macro of
1.66 kristaps 1792: any
1793: .Nm
1794: file. Its calling syntax is as follows:
1795: .Pp
1796: .D1 \. Ns Sx \&Os Op Cm system
1797: .Pp
1798: The optional
1799: .Cm system
1.100 kristaps 1800: parameter specifies the relevant operating system or environment.
1801: Left unspecified, it defaults to the local operating system version.
1802: This is the suggested form.
1.66 kristaps 1803: .Pp
1804: Examples:
1.91 kristaps 1805: .D1 \&.Os
1806: .D1 \&.Os KTH/CSC/TCS
1807: .D1 \&.Os BSD 4.3
1.66 kristaps 1808: .Pp
1809: See also
1810: .Sx \&Dd
1811: and
1812: .Sx \&Dt .
1.63 kristaps 1813: .Ss \&Ot
1.66 kristaps 1814: Unknown usage.
1815: .Pp
1816: .Em Remarks :
1817: this macro has been deprecated.
1.63 kristaps 1818: .Ss \&Ox
1.65 kristaps 1819: Format the OpenBSD version provided as an argument, or a default value
1820: if no argument is provided.
1821: .Pp
1822: Examples:
1.91 kristaps 1823: .D1 \&.Ox 4.5
1824: .D1 \&.Ox
1.65 kristaps 1825: .Pp
1826: See also
1827: .Sx \&At ,
1828: .Sx \&Bsx ,
1829: .Sx \&Bx ,
1.66 kristaps 1830: .Sx \&Dx ,
1.65 kristaps 1831: .Sx \&Fx ,
1832: .Sx \&Nx ,
1833: and
1834: .Sx \&Ux .
1.63 kristaps 1835: .Ss \&Pa
1836: .Ss \&Pc
1837: .Ss \&Pf
1838: .Ss \&Po
1839: .Ss \&Pp
1840: .Ss \&Pq
1841: .Ss \&Qc
1842: .Ss \&Ql
1843: .Ss \&Qo
1844: .Ss \&Qq
1845: .Ss \&Re
1846: Closes a
1847: .Sx \&Rs
1.100 kristaps 1848: block.
1849: Does not have any tail arguments.
1.63 kristaps 1850: .Ss \&Rs
1851: Begins a bibliographic
1852: .Pq Dq reference
1.100 kristaps 1853: block.
1854: Does not have any head arguments.
1855: The block macro may only contain
1.63 kristaps 1856: .Sx \&%A ,
1857: .Sx \&%B ,
1858: .Sx \&%C ,
1859: .Sx \&%D ,
1860: .Sx \&%I ,
1861: .Sx \&%J ,
1862: .Sx \&%N ,
1863: .Sx \&%O ,
1864: .Sx \&%P ,
1865: .Sx \&%Q ,
1866: .Sx \&%R ,
1867: .Sx \&%T ,
1868: and
1869: .Sx \&%V
1870: child macros (at least one must be specified).
1871: .Pp
1.64 kristaps 1872: Examples:
1.91 kristaps 1873: .Bd -literal -offset indent -compact
1.63 kristaps 1874: \&.Rs
1875: \&.%A J. E. Hopcroft
1876: \&.%A J. D. Ullman
1877: \&.%B Introduction to Automata Theory, Languages, and Computation
1878: \&.%I Addison-Wesley
1879: \&.%C Reading, Massachusettes
1880: \&.%D 1979
1881: \&.Re
1882: .Ed
1883: .Pp
1884: If an
1885: .Sx \&Rs
1886: block is used within a SEE ALSO section, a vertical space is asserted
1887: before the rendered output, else the block continues on the current
1888: line.
1889: .Ss \&Rv
1890: .Ss \&Sc
1891: .Ss \&Sh
1892: .Ss \&Sm
1893: .Ss \&So
1894: .Ss \&Sq
1895: .Ss \&Ss
1896: .Ss \&St
1897: .Ss \&Sx
1898: .Ss \&Sy
1899: .Ss \&Tn
1900: .Ss \&Ud
1.110 kristaps 1901: Prints out
1902: .Dq currently under development.
1.63 kristaps 1903: .Ss \&Ux
1.100 kristaps 1904: Format the UNIX name.
1905: Accepts no argument.
1.65 kristaps 1906: .Pp
1907: Examples:
1.91 kristaps 1908: .D1 \&.Ux
1.65 kristaps 1909: .Pp
1910: See also
1911: .Sx \&At ,
1.66 kristaps 1912: .Sx \&Bsx ,
1.65 kristaps 1913: .Sx \&Bx ,
1.66 kristaps 1914: .Sx \&Dx ,
1.65 kristaps 1915: .Sx \&Fx ,
1916: .Sx \&Nx ,
1917: and
1918: .Sx \&Ox .
1.63 kristaps 1919: .Ss \&Va
1920: .Ss \&Vt
1.100 kristaps 1921: A variable type.
1922: This is also used for indicating global variables in the SYNOPSIS
1923: section, in which case a variable name is also specified.
1924: Note that it accepts
1.83 kristaps 1925: .Sx Block partial-implicit
1926: syntax when invoked as the first macro in the SYNOPSIS section, else it
1927: accepts ordinary
1928: .Sx In-line
1929: syntax.
1930: .Pp
1931: Note that this should not be confused with
1932: .Sx \&Ft ,
1933: which is used for function return types.
1934: .Pp
1935: Examples:
1.91 kristaps 1936: .D1 \&.Vt unsigned char
1937: .D1 \&.Vt extern const char * const sys_signame[] ;
1.83 kristaps 1938: .Pp
1939: See also
1940: .Sx \&Ft
1941: and
1942: .Sx \&Va .
1.84 kristaps 1943: .Ss \&Xc
1.87 kristaps 1944: Close a scope opened by
1945: .Sx \&Xo .
1.84 kristaps 1946: .Ss \&Xo
1.100 kristaps 1947: Open an extension scope.
1948: This macro originally existed to extend the 9-argument limit of troff;
1949: since this limit has been lifted, the macro has been deprecated.
1.84 kristaps 1950: .Ss \&Xr
1951: Link to another manual
1952: .Pq Qq cross-reference .
1953: Its calling syntax is
1954: .Pp
1955: .D1 \. Ns Sx \&Xr Cm name section
1956: .Pp
1957: The
1958: .Cm name
1959: and
1960: .Cm section
1.100 kristaps 1961: are the name and section of the linked manual.
1962: If
1.84 kristaps 1963: .Cm section
1964: is followed by non-punctuation, an
1965: .Sx \&Ns
1.100 kristaps 1966: is inserted into the token stream.
1967: This behaviour is for compatibility with
1.84 kristaps 1968: .Xr groff 1 .
1969: .Pp
1970: Examples:
1.91 kristaps 1971: .D1 \&.Xr mandoc 1
1972: .D1 \&.Xr mandoc 1 ;
1973: .D1 \&.Xr mandoc 1 \&Ns s behaviour
1.84 kristaps 1974: .Ss \&br
1975: .Ss \&sp
1.4 kristaps 1976: .Sh COMPATIBILITY
1.93 kristaps 1977: This section documents compatibility between mandoc and other other
1978: troff implementations, at this time limited to GNU troff
1979: .Pq Qq groff .
1.50 kristaps 1980: The term
1.57 kristaps 1981: .Qq historic groff
1.93 kristaps 1982: refers to groff versions before the
1.57 kristaps 1983: .Pa doc.tmac
1.50 kristaps 1984: file re-write
1.57 kristaps 1985: .Pq somewhere between 1.15 and 1.19 .
1986: .Pp
1.93 kristaps 1987: Heirloom troff, the other significant troff implementation accepting
1988: \-mdoc, is similar to historic groff.
1989: .Pp
1.57 kristaps 1990: .Bl -dash -compact
1991: .It
1.81 kristaps 1992: The comment syntax
1993: .Sq \e."
1994: is no longer accepted.
1995: .It
1.93 kristaps 1996: In groff, the
1.80 kristaps 1997: .Sx \&Pa
1998: macro does not format its arguments when used in the FILES section under
1.100 kristaps 1999: certain list types.
2000: mandoc does.
1.80 kristaps 2001: .It
1.93 kristaps 2002: Historic groff does not print a dash for empty
1.79 kristaps 2003: .Sx \&Fl
1.100 kristaps 2004: arguments.
2005: mandoc and newer groff implementations do.
1.79 kristaps 2006: .It
1.93 kristaps 2007: groff behaves irregularly when specifying
1.77 kristaps 2008: .Sq \ef
1.93 kristaps 2009: .Sx Text Decoration
1.100 kristaps 2010: within line-macro scopes.
2011: mandoc follows a consistent system.
1.77 kristaps 2012: .It
1.93 kristaps 2013: In mandoc, negative scaling units are truncated to zero; groff would
1.100 kristaps 2014: move to prior lines.
2015: Furthermore, the
1.61 kristaps 2016: .Sq f
2017: scaling unit, while accepted, is rendered as the default unit.
2018: .It
1.48 kristaps 2019: In quoted literals, groff allowed pair-wise double-quotes to produce a
1.100 kristaps 2020: standalone double-quote in formatted output.
2021: This idiosyncratic behaviour is not applicable in mandoc.
1.57 kristaps 2022: .It
1.64 kristaps 2023: Display types
1.78 kristaps 2024: .Sx \&Bd
1.77 kristaps 2025: .Fl center
1.64 kristaps 2026: and
2027: .Fl right
2028: are aliases for
1.93 kristaps 2029: .Fl left
2030: in manodc. Furthermore, the
1.64 kristaps 2031: .Fl file Ar file
1.100 kristaps 2032: argument is ignored.
2033: Lastly, since text is not right-justified in mandoc (or even groff),
1.64 kristaps 2034: .Fl ragged
2035: and
2036: .Fl filled
2037: are aliases, as are
2038: .Fl literal
2039: and
2040: .Fl unfilled .
1.57 kristaps 2041: .It
1.100 kristaps 2042: Historic groff has many un-callable macros.
2043: Most of these (excluding some block-level macros) are now callable.
1.57 kristaps 2044: .It
1.50 kristaps 2045: The vertical bar
1.57 kristaps 2046: .Sq \(ba
1.28 kristaps 2047: made historic groff
1.57 kristaps 2048: .Qq go orbital
1.93 kristaps 2049: but has been a proper delimiter since then.
1.57 kristaps 2050: .It
1.93 kristaps 2051: .Sx \&It Fl nested
1.28 kristaps 2052: is assumed for all lists (it wasn't in historic groff): any list may be
2053: nested and
1.64 kristaps 2054: .Fl enum
1.4 kristaps 2055: lists will restart the sequence only for the sub-list.
1.57 kristaps 2056: .It
1.4 kristaps 2057: Some manuals use
1.64 kristaps 2058: .Sx \&Li
1.4 kristaps 2059: incorrectly by following it with a reserved character and expecting the
1.100 kristaps 2060: delimiter to render.
2061: This is not supported in mandoc.
1.57 kristaps 2062: .It
1.50 kristaps 2063: In groff, the
1.64 kristaps 2064: .Sx \&Fo
1.100 kristaps 2065: macro only produces the first parameter.
2066: This is not the case in mandoc.
1.93 kristaps 2067: .It
2068: In groff, the
2069: .Sx \&Cd ,
2070: .Sx \&Er ,
1.106 kristaps 2071: .Sx \&Ex ,
1.93 kristaps 2072: and
1.106 kristaps 2073: .Sx \&Rv
1.100 kristaps 2074: macros were stipulated only to occur in certain manual sections.
2075: mandoc does not have these restrictions.
1.105 kristaps 2076: .It
2077: Newer groff and mandoc print
2078: .Qq AT&T UNIX
2079: prior to unknown arguments of
2080: .Sx \&At ;
2081: older groff did nothing.
1.57 kristaps 2082: .El
1.2 kristaps 2083: .Sh SEE ALSO
1.57 kristaps 2084: .Xr mandoc 1 ,
2085: .Xr mandoc_char 7
1.2 kristaps 2086: .Sh AUTHORS
2087: The
1.57 kristaps 2088: .Nm
1.50 kristaps 2089: reference was written by
1.94 kristaps 2090: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
1.64 kristaps 2091: .\"
2092: .\" XXX: this really isn't the place for these caveats.
2093: .\" .
2094: .\" .
2095: .\" .Sh CAVEATS
2096: .\" There are many ambiguous parts of mdoc.
2097: .\" .
2098: .\" .Pp
2099: .\" .Bl -dash -compact
2100: .\" .It
2101: .\" .Sq \&Fa
2102: .\" should be
2103: .\" .Sq \&Va
2104: .\" as function arguments are variables.
2105: .\" .It
2106: .\" .Sq \&Ft
2107: .\" should be
2108: .\" .Sq \&Vt
2109: .\" as function return types are still types. Furthermore, the
2110: .\" .Sq \&Ft
2111: .\" should be removed and
2112: .\" .Sq \&Fo ,
2113: .\" which ostensibly follows it, should follow the same convention as
2114: .\" .Sq \&Va .
2115: .\" .It
2116: .\" .Sq \&Va
2117: .\" should formalise that only one or two arguments are acceptable: a
2118: .\" variable name and optional, preceding type.
2119: .\" .It
2120: .\" .Sq \&Fd
2121: .\" is ambiguous. It's commonly used to indicate an include file in the
2122: .\" synopsis section.
2123: .\" .Sq \&In
2124: .\" should be used, instead.
2125: .\" .It
2126: .\" Only the
2127: .\" .Sq \-literal
2128: .\" argument to
2129: .\" .Sq \&Bd
2130: .\" makes sense. The remaining ones should be removed.
2131: .\" .It
2132: .\" The
2133: .\" .Sq \&Xo
2134: .\" and
2135: .\" .Sq \&Xc
2136: .\" macros should be deprecated.
2137: .\" .It
2138: .\" The
2139: .\" .Sq \&Dt
2140: .\" macro lacks clarity. It should be absolutely clear which title will
2141: .\" render when formatting the manual page.
2142: .\" .It
2143: .\" A
2144: .\" .Sq \&Lx
2145: .\" should be provided for Linux (\(`a la
2146: .\" .Sq \&Ox ,
2147: .\" .Sq \&Nx
2148: .\" etc.).
2149: .\" .It
2150: .\" There's no way to refer to references in
2151: .\" .Sq \&Rs/Re
2152: .\" blocks.
2153: .\" .It
2154: .\" The \-split and \-nosplit dictates via
2155: .\" .Sq \&An
2156: .\" are re-set when entering and leaving the AUTHORS section.
2157: .\" .El
2158: .\" .
CVSweb