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