Annotation of mandoc/mdoc.7, Revision 1.131
1.131 ! kristaps 1: .\" $Id: mdoc.7,v 1.130 2010/07/04 22:04:04 schwarze 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.131 ! kristaps 18: .Dd $Mdocdate: July 4 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.
1.131 ! kristaps 1067: Its syntax is as follows:
! 1068: .Bd -ragged -offset indent
! 1069: .Pf \. Sx \&Bd
! 1070: .Fl type
! 1071: .Op Fl offset Ar width
! 1072: .Op Fl compact
! 1073: .Ed
! 1074: .Pp
1.100 kristaps 1075: A display is collection of macros or text which may be collectively
1076: offset or justified in a manner different from that
1077: of the enclosing context.
1078: By default, the block is preceded by a vertical space.
1.64 kristaps 1079: .Pp
1080: Each display is associated with a type, which must be one of the
1081: following arguments:
1082: .Bl -tag -width 12n -offset indent
1083: .It Fl ragged
1084: Only left-justify the block.
1085: .It Fl unfilled
1086: Do not justify the block at all.
1087: .It Fl filled
1088: Left- and right-justify the block.
1089: .It Fl literal
1090: Alias for
1091: .Fl unfilled .
1092: .It Fl centered
1093: Centre-justify each line.
1094: .El
1095: .Pp
1.100 kristaps 1096: The type must be provided first.
1097: Secondary arguments are as follows:
1.64 kristaps 1098: .Bl -tag -width 12n -offset indent
1.131 ! kristaps 1099: .It Fl offset Ar val
1.64 kristaps 1100: Offset by the value of
1.131 ! kristaps 1101: .Ar val ,
1.64 kristaps 1102: which is interpreted as one of the following, specified in order:
1103: .Bl -item
1104: .It
1105: As one of the pre-defined strings
1106: .Ar indent ,
1107: the width of standard indentation;
1108: .Ar indent-two ,
1109: twice
1110: .Ar indent ;
1111: .Ar left ,
1.131 ! kristaps 1112: which has no effect;
1.64 kristaps 1113: .Ar right ,
1114: which justifies to the right margin; and
1115: .Ar center ,
1116: which aligns around an imagined centre axis.
1117: .It
1.100 kristaps 1118: As a precalculated width for a named macro.
1119: The most popular is the imaginary macro
1.67 kristaps 1120: .Ar \&Ds ,
1.64 kristaps 1121: which resolves to
1122: .Ar 6n .
1123: .It
1124: As a scaling unit following the syntax described in
1125: .Sx Scaling Widths .
1126: .It
1127: As the calculated string length of the opaque string.
1128: .El
1129: .Pp
1.126 kristaps 1130: If not provided an argument, it will be ignored.
1.64 kristaps 1131: .It Fl compact
1132: Do not assert a vertical space before the block.
1133: .El
1134: .Pp
1135: Examples:
1136: .Bd -literal -offset indent
1137: \&.Bd \-unfilled \-offset two-indent \-compact
1.65 kristaps 1138: Hello world.
1.64 kristaps 1139: \&.Ed
1140: .Ed
1.66 kristaps 1141: .Pp
1142: See also
1143: .Sx \&D1
1144: and
1145: .Sx \&Dl .
1.63 kristaps 1146: .Ss \&Bf
1.129 kristaps 1147: Change the font mode for a scoped block of text.
1148: Its syntax is as follows:
1149: .Bd -ragged -offset indent
1150: .Pf \. Sx \&Bf
1151: .Oo
1152: .Fl emphasis | literal | symbolic |
1153: .Cm \&Em | \&Li | \&Sy
1154: .Oc
1155: .Ed
1156: .Pp
1157: The
1158: .Fl emphasis
1159: and
1160: .Cm \&Em
1161: argument are equivalent, as are
1162: .Fl symbolic
1163: and
1164: .Cm \&Sy,
1165: and
1166: .Fl literal
1167: and
1168: .Cm \&Li .
1169: Without an argument, this macro does nothing.
1170: The font mode continues until broken by a new font mode in a nested
1171: scope or
1172: .Sx \&Ef
1173: is encountered.
1174: .Pp
1175: See also
1176: .Sx \&Li ,
1177: .Sx \&Ef ,
1178: and
1179: .Sx \&Sy .
1.63 kristaps 1180: .Ss \&Bk
1.127 schwarze 1181: Begins a keep block, containing a collection of macros or text
1182: to be kept together in the output.
1.131 ! kristaps 1183: Its syntax is as follows:
! 1184: .Pp
! 1185: .D1 Pf \. Sx \&Bk Fl words
! 1186: .Pp
1.127 schwarze 1187: Currently, the only argument implemented is
1188: .Fl words ,
1189: requesting to keep together all words of the contained text
1190: on the same output line.
1.131 ! kristaps 1191: Subsequent arguments are ignored.
1.127 schwarze 1192: .Pp
1193: Examples:
1194: .Bd -literal -offset indent
1195: \&.Bk \-words
1196: \&.Op o Ar output_file
1197: \&.Ek
1198: .Ed
1.129 kristaps 1199: .Pp
1200: See also
1201: .Sx \&Ek .
1.63 kristaps 1202: .Ss \&Bl
1.103 kristaps 1203: Begins a list composed of one or more list entries.
1.131 ! kristaps 1204: Its syntax is as follows:
! 1205: .Bd -ragged -offset indent
! 1206: .Pf \. Sx \&Bl
! 1207: .Fl type
! 1208: .Op Fl width Ar val
! 1209: .Op Fl offset Ar val
! 1210: .Op Fl compact
! 1211: .Op HEAD ...
! 1212: .Ed
! 1213: .Pp
1.104 kristaps 1214: A list is associated with a type, which is a required argument.
1215: Other arguments are
1216: .Fl width ,
1217: defined per-type as accepting a literal or
1218: .Sx Scaling Widths
1219: value;
1220: .Fl offset ,
1221: also accepting a literal or
1222: .Sx Scaling Widths
1223: value setting the list's global offset; and
1224: .Fl compact ,
1225: suppressing the default vertical space printed before each list entry.
1.103 kristaps 1226: A list entry is specified by the
1227: .Sx \&It
1228: macro, which consists of a head and optional body (depending on the list
1229: type).
1230: A list must specify one of the following list types:
1231: .Bl -tag -width 12n -offset indent
1232: .It Fl bullet
1233: A list offset by a bullet.
1234: The head of list entries must be empty.
1235: List entry bodies are positioned after the bullet.
1.104 kristaps 1236: The
1237: .Fl width
1238: argument varies the width of list bodies' left-margins.
1.103 kristaps 1239: .It Fl column
1240: A columnated list.
1.104 kristaps 1241: The
1242: .Fl width
1243: argument has no effect.
1.103 kristaps 1244: The number of columns is specified as parameters to the
1245: .Sx \&Bl
1246: macro.
1247: These dictate the width of columns either as
1248: .Sx Scaling Widths
1249: or literal text.
1.114 kristaps 1250: If the initial macro of a
1251: .Fl column
1252: list is not an
1253: .Sx \&It ,
1254: an
1255: .Sx \&It
1256: context spanning each line is implied until an
1257: .Sx \&It
1258: line macro is encountered, at which point list bodies are interpreted as
1259: described in the
1260: .Sx \&It
1261: documentation.
1.103 kristaps 1262: .It Fl dash
1263: A list offset by a dash (hyphen).
1264: The head of list entries must be empty.
1265: List entry bodies are positioned past the dash.
1.104 kristaps 1266: The
1267: .Fl width
1268: argument varies the width of list bodies' left-margins.
1.103 kristaps 1269: .It Fl diag
1270: Like
1271: .Fl inset ,
1272: but with additional formatting to the head.
1.104 kristaps 1273: The
1274: .Fl width
1275: argument varies the width of list bodies' left-margins.
1.103 kristaps 1276: .It Fl enum
1277: An enumerated list offset by the enumeration from 1.
1278: The head of list entries must be empty.
1279: List entry bodies are positioned after the enumeration.
1.104 kristaps 1280: The
1281: .Fl width
1282: argument varies the width of list bodies' left-margins.
1.103 kristaps 1283: .It Fl hang
1284: Like
1285: .Fl tag ,
1286: but instead of list bodies positioned after the head, they trail the
1287: head text.
1.104 kristaps 1288: The
1289: .Fl width
1290: argument varies the width of list bodies' left-margins.
1.103 kristaps 1291: .It Fl hyphen
1292: Synonym for
1293: .Fl dash .
1294: .It Fl inset
1295: List bodies follow the list head.
1.104 kristaps 1296: The
1297: .Fl width
1298: argument is ignored.
1.103 kristaps 1299: .It Fl item
1300: This produces blocks of text.
1301: The head of list entries must be empty.
1.104 kristaps 1302: The
1303: .Fl width
1304: argument is ignored.
1.103 kristaps 1305: .It Fl ohang
1306: List bodies are positioned on the line following the head.
1.104 kristaps 1307: The
1308: .Fl width
1309: argument is ignored.
1.103 kristaps 1310: .It Fl tag
1311: A list offset by list entry heads. List entry bodies are positioned
1312: after the head as specified by the
1313: .Fl width
1314: argument.
1315: .El
1.114 kristaps 1316: .Pp
1317: See also
1318: .Sx \&It .
1.63 kristaps 1319: .Ss \&Bo
1.100 kristaps 1320: Begins a block enclosed by square brackets.
1321: Does not have any head arguments.
1.65 kristaps 1322: .Pp
1323: Examples:
1324: .Bd -literal -offset indent
1325: \&.Bo 1 ,
1.91 kristaps 1326: \&.Dv BUFSIZ \&Bc
1.65 kristaps 1327: .Ed
1328: .Pp
1329: See also
1330: .Sx \&Bq .
1.63 kristaps 1331: .Ss \&Bq
1.82 kristaps 1332: Encloses its arguments in square brackets.
1.65 kristaps 1333: .Pp
1334: Examples:
1.91 kristaps 1335: .D1 \&.Bq 1 , \&Dv BUFSIZ
1.65 kristaps 1336: .Pp
1337: .Em Remarks :
1338: this macro is sometimes abused to emulate optional arguments for
1339: commands; the correct macros to use for this purpose are
1340: .Sx \&Op ,
1341: .Sx \&Oo ,
1342: and
1343: .Sx \&Oc .
1344: .Pp
1345: See also
1346: .Sx \&Bo .
1.63 kristaps 1347: .Ss \&Brc
1.65 kristaps 1348: Closes a
1349: .Sx \&Bro
1350: block. Does not have any tail arguments.
1.63 kristaps 1351: .Ss \&Bro
1.100 kristaps 1352: Begins a block enclosed by curly braces.
1353: Does not have any head arguments.
1.65 kristaps 1354: .Pp
1355: Examples:
1356: .Bd -literal -offset indent
1357: \&.Bro 1 , ... ,
1.91 kristaps 1358: \&.Va n \&Brc
1.65 kristaps 1359: .Ed
1360: .Pp
1361: See also
1362: .Sx \&Brq .
1.63 kristaps 1363: .Ss \&Brq
1.65 kristaps 1364: Encloses its arguments in curly braces.
1365: .Pp
1366: Examples:
1.91 kristaps 1367: .D1 \&.Brq 1 , ... , \&Va n
1.65 kristaps 1368: .Pp
1369: See also
1370: .Sx \&Bro .
1.63 kristaps 1371: .Ss \&Bsx
1.65 kristaps 1372: Format the BSD/OS version provided as an argument, or a default value if
1373: no argument is provided.
1374: .Pp
1375: Examples:
1.91 kristaps 1376: .D1 \&.Bsx 1.0
1377: .D1 \&.Bsx
1.65 kristaps 1378: .Pp
1379: See also
1380: .Sx \&At ,
1381: .Sx \&Bx ,
1.66 kristaps 1382: .Sx \&Dx ,
1.65 kristaps 1383: .Sx \&Fx ,
1384: .Sx \&Nx ,
1385: .Sx \&Ox ,
1386: and
1387: .Sx \&Ux .
1.63 kristaps 1388: .Ss \&Bt
1.66 kristaps 1389: Prints
1390: .Dq is currently in beta test.
1.63 kristaps 1391: .Ss \&Bx
1.65 kristaps 1392: Format the BSD version provided as an argument, or a default value if no
1393: argument is provided.
1394: .Pp
1395: Examples:
1.91 kristaps 1396: .D1 \&.Bx 4.4
1397: .D1 \&.Bx
1.65 kristaps 1398: .Pp
1399: See also
1400: .Sx \&At ,
1401: .Sx \&Bsx ,
1.66 kristaps 1402: .Sx \&Dx ,
1.65 kristaps 1403: .Sx \&Fx ,
1404: .Sx \&Nx ,
1405: .Sx \&Ox ,
1406: and
1407: .Sx \&Ux .
1.63 kristaps 1408: .Ss \&Cd
1.100 kristaps 1409: Configuration declaration.
1410: This denotes strings accepted by
1.66 kristaps 1411: .Xr config 8 .
1412: .Pp
1413: Examples:
1.91 kristaps 1414: .D1 \&.Cd device le0 at scode?
1.66 kristaps 1415: .Pp
1416: .Em Remarks :
1417: this macro is commonly abused by using quoted literals to retain
1418: white-space and align consecutive
1419: .Sx \&Cd
1.100 kristaps 1420: declarations.
1421: This practise is discouraged.
1.63 kristaps 1422: .Ss \&Cm
1.100 kristaps 1423: Command modifiers.
1424: Useful when specifying configuration options or keys.
1.66 kristaps 1425: .Pp
1426: Examples:
1.91 kristaps 1427: .D1 \&.Cm ControlPath
1428: .D1 \&.Cm ControlMaster
1.66 kristaps 1429: .Pp
1430: See also
1431: .Sx \&Fl .
1.63 kristaps 1432: .Ss \&D1
1.100 kristaps 1433: One-line indented display.
1434: This is formatted by the default rules and is useful for simple indented
1435: statements.
1436: It is followed by a newline.
1.66 kristaps 1437: .Pp
1438: Examples:
1.91 kristaps 1439: .D1 \&.D1 \&Fl abcdefgh
1.66 kristaps 1440: .Pp
1441: See also
1442: .Sx \&Bd
1443: and
1444: .Sx \&Dl .
1.63 kristaps 1445: .Ss \&Db
1.117 kristaps 1446: Start a debugging context.
1447: This macro is parsed, but generally ignored.
1.120 kristaps 1448: Its syntax is as follows:
1.117 kristaps 1449: .Pp
1.120 kristaps 1450: .D1 Pf \. Sx \&Db Cm on | off
1.63 kristaps 1451: .Ss \&Dc
1.66 kristaps 1452: Closes a
1453: .Sx \&Do
1454: block. Does not have any tail arguments.
1.63 kristaps 1455: .Ss \&Dd
1.100 kristaps 1456: Document date.
1457: This is the mandatory first macro of any
1.66 kristaps 1458: .Nm
1.100 kristaps 1459: manual.
1.120 kristaps 1460: Its syntax is as follows:
1.66 kristaps 1461: .Pp
1.120 kristaps 1462: .D1 Pf \. Sx \&Dd Cm date
1.66 kristaps 1463: .Pp
1.82 kristaps 1464: The
1.66 kristaps 1465: .Cm date
1466: field may be either
1467: .Ar $\&Mdocdate$ ,
1468: which signifies the current manual revision date dictated by
1.72 kristaps 1469: .Xr cvs 1 ,
1.66 kristaps 1470: or instead a valid canonical date as specified by
1471: .Sx Dates .
1.72 kristaps 1472: If a date does not conform, the current date is used instead.
1.66 kristaps 1473: .Pp
1474: Examples:
1.91 kristaps 1475: .D1 \&.Dd $\&Mdocdate$
1476: .D1 \&.Dd $\&Mdocdate: July 21 2007$
1477: .D1 \&.Dd July 21, 2007
1.66 kristaps 1478: .Pp
1479: See also
1480: .Sx \&Dt
1481: and
1482: .Sx \&Os .
1.63 kristaps 1483: .Ss \&Dl
1.100 kristaps 1484: One-line intended display.
1485: This is formatted as literal text and is useful for commands and
1486: invocations.
1487: It is followed by a newline.
1.66 kristaps 1488: .Pp
1489: Examples:
1.91 kristaps 1490: .D1 \&.Dl % mandoc mdoc.7 | less
1.66 kristaps 1491: .Pp
1492: See also
1493: .Sx \&Bd
1494: and
1495: .Sx \&D1 .
1.63 kristaps 1496: .Ss \&Do
1.66 kristaps 1497: Begins a block enclosed by double quotes. Does not have any head
1498: arguments.
1499: .Pp
1500: Examples:
1.91 kristaps 1501: .D1 \&.D1 \&Do April is the cruellest month \&Dc \e(em T.S. Eliot
1.66 kristaps 1502: .Pp
1503: See also
1504: .Sx \&Dq .
1.63 kristaps 1505: .Ss \&Dq
1.82 kristaps 1506: Encloses its arguments in double quotes.
1.66 kristaps 1507: .Pp
1508: Examples:
1.91 kristaps 1509: .Bd -literal -offset indent -compact
1.66 kristaps 1510: \&.Dq April is the cruellest month
1511: \e(em T.S. Eliot
1512: .Ed
1513: .Pp
1514: See also
1515: .Sx \&Do .
1.63 kristaps 1516: .Ss \&Dt
1.100 kristaps 1517: Document title.
1518: This is the mandatory second macro of any
1.66 kristaps 1519: .Nm
1.100 kristaps 1520: file.
1.120 kristaps 1521: Its syntax is as follows:
1522: .Bd -ragged -offset indent
1523: .Pf \. Sx \&Dt
1524: .Oo
1525: .Cm title
1526: .Oo
1527: .Cm section
1528: .Op Cm volume | arch
1529: .Oc
1530: .Oc
1531: .Ed
1.66 kristaps 1532: .Pp
1533: Its arguments are as follows:
1534: .Bl -tag -width Ds -offset Ds
1535: .It Cm title
1.111 kristaps 1536: The document's title (name), defaulting to
1537: .Qq UNKNOWN
1538: if unspecified.
1539: It should be capitalised.
1.66 kristaps 1540: .It Cm section
1.100 kristaps 1541: The manual section.
1542: This may be one of
1.66 kristaps 1543: .Ar 1
1544: .Pq utilities ,
1545: .Ar 2
1546: .Pq system calls ,
1547: .Ar 3
1548: .Pq libraries ,
1549: .Ar 3p
1550: .Pq Perl libraries ,
1551: .Ar 4
1552: .Pq devices ,
1553: .Ar 5
1554: .Pq file formats ,
1555: .Ar 6
1556: .Pq games ,
1557: .Ar 7
1558: .Pq miscellaneous ,
1559: .Ar 8
1560: .Pq system utilities ,
1561: .Ar 9
1562: .Pq kernel functions ,
1563: .Ar X11
1564: .Pq X Window System ,
1565: .Ar X11R6
1566: .Pq X Window System ,
1567: .Ar unass
1568: .Pq unassociated ,
1569: .Ar local
1570: .Pq local system ,
1571: .Ar draft
1572: .Pq draft manual ,
1573: or
1574: .Ar paper
1575: .Pq paper .
1.111 kristaps 1576: It should correspond to the manual's filename suffix and defaults to
1577: .Qq 1
1578: if unspecified.
1.66 kristaps 1579: .It Cm volume
1580: This overrides the volume inferred from
1581: .Ar section .
1582: This field is optional, and if specified, must be one of
1583: .Ar USD
1584: .Pq users' supplementary documents ,
1585: .Ar PS1
1586: .Pq programmers' supplementary documents ,
1587: .Ar AMD
1588: .Pq administrators' supplementary documents ,
1589: .Ar SMM
1590: .Pq system managers' manuals ,
1591: .Ar URM
1592: .Pq users' reference manuals ,
1593: .Ar PRM
1594: .Pq programmers' reference manuals ,
1595: .Ar KM
1596: .Pq kernel manuals ,
1597: .Ar IND
1598: .Pq master index ,
1599: .Ar MMI
1600: .Pq master index ,
1601: .Ar LOCAL
1602: .Pq local manuals ,
1603: .Ar LOC
1604: .Pq local manuals ,
1605: or
1606: .Ar CON
1607: .Pq contributed manuals .
1608: .It Cm arch
1.100 kristaps 1609: This specifies a specific relevant architecture.
1610: If
1.66 kristaps 1611: .Cm volume
1612: is not provided, it may be used in its place, else it may be used
1.100 kristaps 1613: subsequent that.
1614: It, too, is optional.
1615: It must be one of
1.66 kristaps 1616: .Ar alpha ,
1617: .Ar amd64 ,
1618: .Ar amiga ,
1619: .Ar arc ,
1620: .Ar arm ,
1621: .Ar armish ,
1622: .Ar aviion ,
1623: .Ar hp300 ,
1624: .Ar hppa ,
1625: .Ar hppa64 ,
1626: .Ar i386 ,
1627: .Ar landisk ,
1.86 kristaps 1628: .Ar loongson ,
1.66 kristaps 1629: .Ar luna88k ,
1630: .Ar mac68k ,
1631: .Ar macppc ,
1632: .Ar mvme68k ,
1633: .Ar mvme88k ,
1634: .Ar mvmeppc ,
1635: .Ar pmax ,
1636: .Ar sgi ,
1637: .Ar socppc ,
1638: .Ar sparc ,
1639: .Ar sparc64 ,
1640: .Ar sun3 ,
1641: .Ar vax ,
1642: or
1643: .Ar zaurus .
1644: .El
1645: .Pp
1646: Examples:
1.91 kristaps 1647: .D1 \&.Dt FOO 1
1648: .D1 \&.Dt FOO 4 KM
1649: .D1 \&.Dt FOO 9 i386
1.66 kristaps 1650: .Pp
1651: See also
1652: .Sx \&Dd
1653: and
1654: .Sx \&Os .
1.63 kristaps 1655: .Ss \&Dv
1.66 kristaps 1656: Defined variables such as preprocessor constants.
1657: .Pp
1658: Examples:
1.91 kristaps 1659: .D1 \&.Dv BUFSIZ
1660: .D1 \&.Dv STDOUT_FILENO
1.66 kristaps 1661: .Pp
1662: See also
1663: .Sx \&Er .
1.63 kristaps 1664: .Ss \&Dx
1.71 kristaps 1665: Format the DragonFly BSD version provided as an argument, or a default
1.66 kristaps 1666: value if no argument is provided.
1667: .Pp
1668: Examples:
1.91 kristaps 1669: .D1 \&.Dx 2.4.1
1670: .D1 \&.Dx
1.66 kristaps 1671: .Pp
1672: See also
1673: .Sx \&At ,
1674: .Sx \&Bsx ,
1675: .Sx \&Bx ,
1676: .Sx \&Fx ,
1677: .Sx \&Nx ,
1678: .Sx \&Ox ,
1679: and
1680: .Sx \&Ux .
1.63 kristaps 1681: .Ss \&Ec
1.131 ! kristaps 1682: Close a scope started by
! 1683: .Sx \&Eo .
! 1684: Its syntax is as follows:
! 1685: .Pp
! 1686: .D1 Pf \. Sx \&Ec Op Cm TERM
! 1687: .Pp
! 1688: The
! 1689: .Cm TERM
! 1690: argument is used as the enclosure tail, for example, specifying \e(rq
! 1691: will emulate
! 1692: .Sx \&Dc .
1.63 kristaps 1693: .Ss \&Ed
1.131 ! kristaps 1694: End a display context started by
! 1695: .Sx \&Bd .
1.63 kristaps 1696: .Ss \&Ef
1.129 kristaps 1697: Ends a font mode context started by
1698: .Sx \&Bf .
1.63 kristaps 1699: .Ss \&Ek
1.127 schwarze 1700: Ends a keep context started by
1701: .Sx \&Bk .
1.63 kristaps 1702: .Ss \&El
1.117 kristaps 1703: Ends a list context started by
1704: .Sx \&Bl .
1705: .Pp
1706: See also
1707: .Sx \&Bl
1708: and
1709: .Sx \&It .
1.63 kristaps 1710: .Ss \&Em
1.100 kristaps 1711: Denotes text that should be emphasised.
1712: Note that this is a presentation term and should not be used for
1713: stylistically decorating technical terms.
1.66 kristaps 1714: .Pp
1715: Examples:
1.91 kristaps 1716: .D1 \&.Em Warnings!
1717: .D1 \&.Em Remarks :
1.63 kristaps 1718: .Ss \&En
1719: .Ss \&Eo
1.131 ! kristaps 1720: An arbitrary enclosure.
! 1721: Its syntax is as follows:
! 1722: .Pp
! 1723: .D1 Pf \. Sx \&Eo Op Cm TERM
! 1724: .Pp
! 1725: The
! 1726: .Cm TERM
! 1727: argument is used as the enclosure head, for example, specifying \e(lq
! 1728: will emulate
! 1729: .Sx \&Do .
1.63 kristaps 1730: .Ss \&Er
1.90 kristaps 1731: Display error constants.
1.66 kristaps 1732: .Pp
1733: Examples:
1.91 kristaps 1734: .D1 \&.Er EPERM
1735: .D1 \&.Er ENOENT
1.66 kristaps 1736: .Pp
1737: See also
1738: .Sx \&Dv .
1.63 kristaps 1739: .Ss \&Es
1740: .Ss \&Ev
1.66 kristaps 1741: Environmental variables such as those specified in
1742: .Xr environ 7 .
1743: .Pp
1744: Examples:
1.91 kristaps 1745: .D1 \&.Ev DISPLAY
1746: .D1 \&.Ev PATH
1.63 kristaps 1747: .Ss \&Ex
1.100 kristaps 1748: Inserts text regarding a utility's exit values.
1749: This macro must have first the
1.66 kristaps 1750: .Fl std
1751: argument specified, then an optional
1752: .Ar utility .
1753: If
1754: .Ar utility
1755: is not provided, the document's name as stipulated in
1756: .Sx \&Nm
1757: is provided.
1.63 kristaps 1758: .Ss \&Fa
1.117 kristaps 1759: Function argument.
1.120 kristaps 1760: Its syntax is as follows:
1761: .Bd -ragged -offset indent
1762: .Pf \. Sx \&Fa
1763: .Op Cm argtype
1764: .Cm argname
1765: .Ed
1766: .Pp
1.117 kristaps 1767: This may be invoked for names with or without the corresponding type.
1768: It is also used to specify the field name of a structure.
1769: Most often, the
1770: .Sx \&Fa
1771: macro is used in the
1772: .Em SYNOPSIS
1.120 kristaps 1773: within
1774: .Sx \&Fo
1.117 kristaps 1775: section when documenting multi-line function prototypes.
1776: If invoked with multiple arguments, the arguments are separated by a
1777: comma.
1778: Furthermore, if the following macro is another
1779: .Sx \&Fa ,
1780: the last argument will also have a trailing comma.
1781: .Pp
1782: Examples:
1783: .D1 \&.Fa \(dqconst char *p\(dq
1784: .D1 \&.Fa \(dqint a\(dq \(dqint b\(dq \(dqint c\(dq
1785: .D1 \&.Fa foo
1.120 kristaps 1786: .Pp
1787: See also
1788: .Sx \&Fo .
1.63 kristaps 1789: .Ss \&Fc
1.131 ! kristaps 1790: Ends a function context started by
! 1791: .Sx \&Fo .
1.63 kristaps 1792: .Ss \&Fd
1.117 kristaps 1793: Historically used to document include files.
1794: This usage has been deprecated in favour of
1795: .Sx \&In .
1796: Do not use this macro.
1797: .Pp
1798: See also
1.122 kristaps 1799: .Sx MANUAL STRUCTURE
1800: and
1.117 kristaps 1801: .Sx \&In .
1.63 kristaps 1802: .Ss \&Fl
1.100 kristaps 1803: Command-line flag.
1804: Used when listing arguments to command-line utilities.
1805: Prints a fixed-width hyphen
1.79 kristaps 1806: .Sq \-
1.100 kristaps 1807: directly followed by each argument.
1808: If no arguments are provided, a hyphen is printed followed by a space.
1809: If the argument is a macro, a hyphen is prefixed to the subsequent macro
1810: output.
1.79 kristaps 1811: .Pp
1812: Examples:
1.91 kristaps 1813: .D1 \&.Fl a b c
1814: .D1 \&.Fl \&Pf a b
1815: .D1 \&.Fl
1816: .D1 \&.Op \&Fl o \&Ns \&Ar file
1.79 kristaps 1817: .Pp
1818: See also
1819: .Sx \&Cm .
1.63 kristaps 1820: .Ss \&Fn
1.119 kristaps 1821: A function name.
1.120 kristaps 1822: Its syntax is as follows:
1.119 kristaps 1823: .Bd -ragged -offset indent
1824: .Pf \. Ns Sx \&Fn
1825: .Op Cm functype
1826: .Cm funcname
1827: .Op Oo Cm argtype Oc Cm argname
1828: .Ed
1.120 kristaps 1829: .Pp
1.122 kristaps 1830: Function arguments are surrounded in parenthesis and
1.119 kristaps 1831: are delimited by commas.
1832: If no arguments are specified, blank parenthesis are output.
1833: .Pp
1834: Examples:
1835: .D1 \&.Fn "int funcname" "int arg0" "int arg1"
1836: .D1 \&.Fn funcname "int arg0"
1837: .D1 \&.Fn funcname arg0
1.120 kristaps 1838: .Bd -literal -offset indent -compact
1839: \&.Ft functype
1840: \&.Fn funcname
1841: .Ed
1.119 kristaps 1842: .Pp
1843: See also
1.122 kristaps 1844: .Sx MANUAL STRUCTURE
1.119 kristaps 1845: and
1846: .Sx \&Ft .
1.63 kristaps 1847: .Ss \&Fo
1.120 kristaps 1848: Begin a function block.
1849: This is a multi-line version of
1850: .Sx \&Fn .
1851: Its syntax is as follows:
1852: .Pp
1853: .D1 Pf \. Sx \&Fo Cm funcname
1854: .Pp
1855: Invocations usually occur in the following context:
1856: .Bd -ragged -offset indent
1857: .Pf \. Sx \&Ft Cm functype
1858: .br
1859: .Pf \. Sx \&Fo Cm funcname
1860: .br
1861: .Pf \. Sx \&Fa Oo Cm argtype Oc Cm argname
1862: .br
1863: \.\.\.
1864: .br
1865: .Pf \. Sx \&Fc
1866: .Ed
1867: .Pp
1868: A
1869: .Sx \&Fo
1870: scope is closed by
1871: .Pp
1872: See also
1.122 kristaps 1873: .Sx MANUAL STRUCTURE ,
1.120 kristaps 1874: .Sx \&Fa ,
1875: .Sx \&Fc ,
1876: and
1.63 kristaps 1877: .Ss \&Ft
1.120 kristaps 1878: A function type.
1879: Its syntax is as follows:
1880: .Pp
1881: .D1 Pf \. Sx \&Ft Cm functype
1882: .Pp
1883: Examples:
1884: .D1 \&.Ft int
1885: .Bd -literal -offset indent -compact
1886: \&.Ft functype
1887: \&.Fn funcname
1888: .Ed
1889: .Pp
1890: See also
1.122 kristaps 1891: .Sx MANUAL STRUCTURE ,
1892: .Sx \&Fn ,
1.120 kristaps 1893: and
1.122 kristaps 1894: .Sx \&Fo .
1.63 kristaps 1895: .Ss \&Fx
1.65 kristaps 1896: Format the FreeBSD version provided as an argument, or a default value
1897: if no argument is provided.
1898: .Pp
1899: Examples:
1.91 kristaps 1900: .D1 \&.Fx 7.1
1901: .D1 \&.Fx
1.65 kristaps 1902: .Pp
1903: See also
1904: .Sx \&At ,
1.66 kristaps 1905: .Sx \&Bsx ,
1.65 kristaps 1906: .Sx \&Bx ,
1.66 kristaps 1907: .Sx \&Dx ,
1.65 kristaps 1908: .Sx \&Nx ,
1909: .Sx \&Ox ,
1910: and
1911: .Sx \&Ux .
1.63 kristaps 1912: .Ss \&Hf
1913: .Ss \&Ic
1914: .Ss \&In
1.118 kristaps 1915: An
1916: .Qq include
1917: file.
1918: In the
1919: .Em SYNOPSIS
1920: section (only if invoked as the line macro), the first argument is
1921: preceded by
1922: .Qq #include ,
1.122 kristaps 1923: the arguments is enclosed in angled braces.
1.118 kristaps 1924: .Pp
1.122 kristaps 1925: Examples:
1.118 kristaps 1926: .D1 \&.In sys/types
1.122 kristaps 1927: .Pp
1928: See also
1929: .Sx MANUAL STRUCTURE .
1.63 kristaps 1930: .Ss \&It
1.120 kristaps 1931: A list item.
1932: The syntax of this macro depends on the list type.
1.114 kristaps 1933: .Pp
1934: Lists
1935: of type
1936: .Fl hang ,
1937: .Fl ohang ,
1938: .Fl inset ,
1939: and
1940: .Fl diag
1.120 kristaps 1941: have the following syntax:
1.114 kristaps 1942: .Pp
1.120 kristaps 1943: .D1 Pf \. Sx \&It Cm args
1.114 kristaps 1944: .Pp
1945: Lists of type
1946: .Fl bullet ,
1947: .Fl dash ,
1948: .Fl enum ,
1949: .Fl hyphen
1950: and
1951: .Fl item
1.120 kristaps 1952: have the following syntax:
1.114 kristaps 1953: .Pp
1.120 kristaps 1954: .D1 Pf \. Sx \&It
1.114 kristaps 1955: .Pp
1956: with subsequent lines interpreted within the scope of the
1957: .Sx \&It
1958: until either a closing
1959: .Sx \&El
1960: or another
1961: .Sx \&It .
1962: .Pp
1963: The
1964: .Fl tag
1.120 kristaps 1965: list has the following syntax:
1.114 kristaps 1966: .Pp
1.120 kristaps 1967: .D1 Pf \. Sx \&It Op Cm args
1.114 kristaps 1968: .Pp
1.120 kristaps 1969: Subsequent lines are interpreted as with
1.114 kristaps 1970: .Fl bullet
1971: and family.
1972: The line arguments correspond to the list's left-hand side; body
1973: arguments correspond to the list's contents.
1974: .Pp
1975: The
1976: .Fl column
1977: list is the most complicated.
1.120 kristaps 1978: Its syntax is as follows:
1.114 kristaps 1979: .Pp
1.120 kristaps 1980: .D1 Pf \. Sx \&It Op Cm args
1.114 kristaps 1981: .Pp
1.120 kristaps 1982: The
1.114 kristaps 1983: .Cm args
1984: are phrases, a mix of macros and text corresponding to a line column,
1985: delimited by tabs or the special
1986: .Sq \&Ta
1987: pseudo-macro.
1988: Lines subsequent the
1989: .Sx \&It
1990: are interpreted within the scope of the last phrase.
1991: Calling the pseudo-macro
1992: .Sq \&Ta
1993: will open a new phrase scope (this must occur on a macro line to be
1994: interpreted as a macro). Note that the tab phrase delimiter may only be
1995: used within the
1996: .Sx \&It
1997: line itself.
1998: Subsequent this, only the
1999: .Sq \&Ta
2000: pseudo-macro may be used to delimit phrases.
1.124 kristaps 2001: Furthermore, note that quoted sections propagate over tab-delimited
1.114 kristaps 2002: phrases on an
2003: .Sx \&It ,
2004: for example,
2005: .Pp
1.121 kristaps 2006: .D1 .It \(dqcol1 ; <TAB> col2 ;\(dq \&;
1.114 kristaps 2007: .Pp
2008: will preserve the semicolon whitespace except for the last.
2009: .Pp
2010: See also
2011: .Sx \&Bl .
1.63 kristaps 2012: .Ss \&Lb
1.109 kristaps 2013: Specify a library.
1.120 kristaps 2014: The syntax is as follows:
1.109 kristaps 2015: .Pp
1.120 kristaps 2016: .D1 Pf \. Sx \&Lb Cm library
1.109 kristaps 2017: .Pp
2018: The
2019: .Cm library
2020: parameter may be a system library, such as
2021: .Cm libz
2022: or
2023: .Cm libpam ,
2024: in which case a small library description is printed next to the linker
2025: invocation; or a custom library, in which case the library name is
2026: printed in quotes.
2027: This is most commonly used in the
2028: .Em SYNOPSIS
2029: section as described in
2030: .Sx MANUAL STRUCTURE .
2031: .Pp
2032: Examples:
2033: .D1 \&.Lb libz
2034: .D1 \&.Lb mdoc
1.63 kristaps 2035: .Ss \&Li
1.131 ! kristaps 2036: Denotes text that should be in a literal font mode.
! 2037: Note that this is a presentation term and should not be used for
! 2038: stylistically decorating technical terms.
1.63 kristaps 2039: .Ss \&Lk
1.100 kristaps 2040: Format a hyperlink.
1.120 kristaps 2041: Its syntax is as follows:
1.70 kristaps 2042: .Pp
1.120 kristaps 2043: .D1 Pf \. Sx \&Lk Cm uri Op Cm name
1.70 kristaps 2044: .Pp
2045: Examples:
1.91 kristaps 2046: .D1 \&.Lk http://bsd.lv "The BSD.lv Project"
2047: .D1 \&.Lk http://bsd.lv
1.70 kristaps 2048: .Pp
2049: See also
2050: .Sx \&Mt .
1.63 kristaps 2051: .Ss \&Lp
2052: .Ss \&Ms
2053: .Ss \&Mt
1.116 kristaps 2054: Format a
2055: .Qq mailto:
2056: hyperlink.
1.120 kristaps 2057: Its syntax is as follows:
1.116 kristaps 2058: .Pp
1.120 kristaps 2059: .D1 Pf \. Sx \&Mt Cm address
1.116 kristaps 2060: .Pp
2061: Examples:
2062: .D1 \&.Mt discuss@manpages.bsd.lv
1.63 kristaps 2063: .Ss \&Nd
2064: .Ss \&Nm
1.128 schwarze 2065: The name of the manual page, or \(em in particular in section 1, 6,
2066: and 8 pages \(em of an additional command or feature documented in
2067: the manual page.
2068: When first invoked, the
2069: .Sx \&Nm
2070: macro expects a single argument, the name of the manual page.
2071: Usually, the first invocation happens in the
2072: .Em NAME
2073: section of the page.
2074: The specified name will be remembered and used whenever the macro is
2075: called again without arguments later in the page.
2076: The
2077: .Sx \&Nm
2078: macro uses
2079: .Sx Block full-implicit
2080: semantics when invoked as the first macro on an input line in the
2081: .Em SYNOPSIS
2082: section; otherwise, it uses ordinary
2083: .Sx In-line
2084: semantics.
2085: .Pp
2086: Examples:
2087: .Bd -literal -offset indent
2088: \&.Sh SYNOPSIS
2089: \&.Nm cat
2090: \&.Op Fl benstuv
2091: \&.Op Ar
2092: .Ed
2093: .Pp
2094: In the
2095: .Em SYNOPSIS
2096: of section 2, 3 and 9 manual pages, use the
2097: .Sx \&Fn
2098: macro rather than
2099: .Sx \&Nm
2100: to mark up the name of the manual page.
1.63 kristaps 2101: .Ss \&No
2102: .Ss \&Ns
2103: .Ss \&Nx
1.65 kristaps 2104: Format the NetBSD version provided as an argument, or a default value if
2105: no argument is provided.
2106: .Pp
2107: Examples:
1.91 kristaps 2108: .D1 \&.Nx 5.01
2109: .D1 \&.Nx
1.65 kristaps 2110: .Pp
2111: See also
2112: .Sx \&At ,
1.66 kristaps 2113: .Sx \&Bsx ,
1.65 kristaps 2114: .Sx \&Bx ,
1.66 kristaps 2115: .Sx \&Dx ,
1.65 kristaps 2116: .Sx \&Fx ,
2117: .Sx \&Ox ,
2118: and
2119: .Sx \&Ux .
1.63 kristaps 2120: .Ss \&Oc
2121: .Ss \&Oo
2122: .Ss \&Op
2123: .Ss \&Os
1.100 kristaps 2124: Document operating system version.
2125: This is the mandatory third macro of
1.66 kristaps 2126: any
2127: .Nm
1.120 kristaps 2128: file.
2129: Its syntax is as follows:
1.66 kristaps 2130: .Pp
1.120 kristaps 2131: .D1 Pf \. Sx \&Os Op Cm system
1.66 kristaps 2132: .Pp
2133: The optional
2134: .Cm system
1.100 kristaps 2135: parameter specifies the relevant operating system or environment.
2136: Left unspecified, it defaults to the local operating system version.
2137: This is the suggested form.
1.66 kristaps 2138: .Pp
2139: Examples:
1.91 kristaps 2140: .D1 \&.Os
2141: .D1 \&.Os KTH/CSC/TCS
2142: .D1 \&.Os BSD 4.3
1.66 kristaps 2143: .Pp
2144: See also
2145: .Sx \&Dd
2146: and
2147: .Sx \&Dt .
1.63 kristaps 2148: .Ss \&Ot
1.66 kristaps 2149: Unknown usage.
2150: .Pp
2151: .Em Remarks :
2152: this macro has been deprecated.
1.63 kristaps 2153: .Ss \&Ox
1.65 kristaps 2154: Format the OpenBSD version provided as an argument, or a default value
2155: if no argument is provided.
2156: .Pp
2157: Examples:
1.91 kristaps 2158: .D1 \&.Ox 4.5
2159: .D1 \&.Ox
1.65 kristaps 2160: .Pp
2161: See also
2162: .Sx \&At ,
2163: .Sx \&Bsx ,
2164: .Sx \&Bx ,
1.66 kristaps 2165: .Sx \&Dx ,
1.65 kristaps 2166: .Sx \&Fx ,
2167: .Sx \&Nx ,
2168: and
2169: .Sx \&Ux .
1.63 kristaps 2170: .Ss \&Pa
2171: .Ss \&Pc
2172: .Ss \&Pf
2173: .Ss \&Po
2174: .Ss \&Pp
2175: .Ss \&Pq
2176: .Ss \&Qc
2177: .Ss \&Ql
2178: .Ss \&Qo
2179: .Ss \&Qq
2180: .Ss \&Re
2181: Closes a
2182: .Sx \&Rs
1.100 kristaps 2183: block.
2184: Does not have any tail arguments.
1.63 kristaps 2185: .Ss \&Rs
2186: Begins a bibliographic
2187: .Pq Dq reference
1.100 kristaps 2188: block.
2189: Does not have any head arguments.
2190: The block macro may only contain
1.63 kristaps 2191: .Sx \&%A ,
2192: .Sx \&%B ,
2193: .Sx \&%C ,
2194: .Sx \&%D ,
2195: .Sx \&%I ,
2196: .Sx \&%J ,
2197: .Sx \&%N ,
2198: .Sx \&%O ,
2199: .Sx \&%P ,
2200: .Sx \&%Q ,
2201: .Sx \&%R ,
2202: .Sx \&%T ,
1.120 kristaps 2203: .Sx \&%U ,
1.63 kristaps 2204: and
2205: .Sx \&%V
2206: child macros (at least one must be specified).
2207: .Pp
1.64 kristaps 2208: Examples:
1.91 kristaps 2209: .Bd -literal -offset indent -compact
1.63 kristaps 2210: \&.Rs
2211: \&.%A J. E. Hopcroft
2212: \&.%A J. D. Ullman
2213: \&.%B Introduction to Automata Theory, Languages, and Computation
2214: \&.%I Addison-Wesley
2215: \&.%C Reading, Massachusettes
2216: \&.%D 1979
2217: \&.Re
2218: .Ed
2219: .Pp
2220: If an
2221: .Sx \&Rs
2222: block is used within a SEE ALSO section, a vertical space is asserted
2223: before the rendered output, else the block continues on the current
2224: line.
2225: .Ss \&Rv
2226: .Ss \&Sc
2227: .Ss \&Sh
2228: .Ss \&Sm
2229: .Ss \&So
2230: .Ss \&Sq
2231: .Ss \&Ss
2232: .Ss \&St
2233: .Ss \&Sx
2234: .Ss \&Sy
2235: .Ss \&Tn
2236: .Ss \&Ud
1.110 kristaps 2237: Prints out
2238: .Dq currently under development.
1.63 kristaps 2239: .Ss \&Ux
1.100 kristaps 2240: Format the UNIX name.
2241: Accepts no argument.
1.65 kristaps 2242: .Pp
2243: Examples:
1.91 kristaps 2244: .D1 \&.Ux
1.65 kristaps 2245: .Pp
2246: See also
2247: .Sx \&At ,
1.66 kristaps 2248: .Sx \&Bsx ,
1.65 kristaps 2249: .Sx \&Bx ,
1.66 kristaps 2250: .Sx \&Dx ,
1.65 kristaps 2251: .Sx \&Fx ,
2252: .Sx \&Nx ,
2253: and
2254: .Sx \&Ox .
1.63 kristaps 2255: .Ss \&Va
2256: .Ss \&Vt
1.100 kristaps 2257: A variable type.
1.122 kristaps 2258: This is also used for indicating global variables in the
2259: .Em SYNOPSIS
1.100 kristaps 2260: section, in which case a variable name is also specified.
2261: Note that it accepts
1.83 kristaps 2262: .Sx Block partial-implicit
1.123 kristaps 2263: syntax when invoked as the first macro in the
1.122 kristaps 2264: .Em SYNOPSIS
2265: section, else it accepts ordinary
1.83 kristaps 2266: .Sx In-line
2267: syntax.
2268: .Pp
2269: Note that this should not be confused with
2270: .Sx \&Ft ,
2271: which is used for function return types.
2272: .Pp
2273: Examples:
1.91 kristaps 2274: .D1 \&.Vt unsigned char
1.121 kristaps 2275: .D1 \&.Vt extern const char * const sys_signame[] \&;
1.83 kristaps 2276: .Pp
2277: See also
1.122 kristaps 2278: .Sx MANUAL STRUCTURE
1.83 kristaps 2279: and
2280: .Sx \&Va .
1.84 kristaps 2281: .Ss \&Xc
1.87 kristaps 2282: Close a scope opened by
2283: .Sx \&Xo .
1.84 kristaps 2284: .Ss \&Xo
1.100 kristaps 2285: Open an extension scope.
2286: This macro originally existed to extend the 9-argument limit of troff;
2287: since this limit has been lifted, the macro has been deprecated.
1.84 kristaps 2288: .Ss \&Xr
2289: Link to another manual
2290: .Pq Qq cross-reference .
1.120 kristaps 2291: Its syntax is as follows:
1.84 kristaps 2292: .Pp
1.120 kristaps 2293: .D1 Pf \. Sx \&Xr Cm name section
1.84 kristaps 2294: .Pp
2295: The
2296: .Cm name
2297: and
2298: .Cm section
1.100 kristaps 2299: are the name and section of the linked manual.
2300: If
1.84 kristaps 2301: .Cm section
2302: is followed by non-punctuation, an
2303: .Sx \&Ns
1.100 kristaps 2304: is inserted into the token stream.
2305: This behaviour is for compatibility with
1.84 kristaps 2306: .Xr groff 1 .
2307: .Pp
2308: Examples:
1.91 kristaps 2309: .D1 \&.Xr mandoc 1
1.121 kristaps 2310: .D1 \&.Xr mandoc 1 \&;
1.91 kristaps 2311: .D1 \&.Xr mandoc 1 \&Ns s behaviour
1.84 kristaps 2312: .Ss \&br
2313: .Ss \&sp
1.4 kristaps 2314: .Sh COMPATIBILITY
1.93 kristaps 2315: This section documents compatibility between mandoc and other other
2316: troff implementations, at this time limited to GNU troff
2317: .Pq Qq groff .
1.50 kristaps 2318: The term
1.57 kristaps 2319: .Qq historic groff
1.93 kristaps 2320: refers to groff versions before the
1.57 kristaps 2321: .Pa doc.tmac
1.50 kristaps 2322: file re-write
1.57 kristaps 2323: .Pq somewhere between 1.15 and 1.19 .
2324: .Pp
1.93 kristaps 2325: Heirloom troff, the other significant troff implementation accepting
2326: \-mdoc, is similar to historic groff.
2327: .Pp
1.57 kristaps 2328: .Bl -dash -compact
1.125 kristaps 2329: .It
1.126 kristaps 2330: Old groff fails to assert a newline before
2331: .Sx \&Bd Fl ragged compact .
1.119 kristaps 2332: .It
1.120 kristaps 2333: groff behaves inconsistently when encountering
2334: .Pf non- Sx \&Fa
2335: children of
2336: .Sx \&Fo
2337: regarding spacing between arguments.
2338: In mandoc, this is not the case: each argument is consistently followed
2339: by a single space and the trailing
2340: .Sq \&)
2341: suppresses prior spacing.
2342: .It
2343: groff behaves inconsistently when encountering
2344: .Sx \&Ft
2345: and
2346: .Sx \&Fn
2347: in the
2348: .Em SYNOPSIS :
1.124 kristaps 2349: at times newline(s) are suppressed depending on whether a prior
1.120 kristaps 2350: .Sx \&Fn
2351: has been invoked.
2352: In mandoc, this is not the case.
2353: See
2354: .Sx \&Ft
2355: and
2356: .Sx \&Fn
2357: for the normalised behaviour.
2358: .It
1.119 kristaps 2359: Historic groff does not break before an
2360: .Sx \&Fn
2361: when not invoked as the line macro in the
2362: .Em SYNOPSIS
2363: section.
1.118 kristaps 2364: .It
2365: Historic groff formats the
2366: .Sx \&In
2367: badly: trailing arguments are trashed and
2368: .Em SYNOPSIS
2369: is not specially treated.
1.115 kristaps 2370: .It
2371: groff does not accept the
2372: .Sq \&Ta
2373: pseudo-macro as a line macro.
2374: mandoc does.
1.57 kristaps 2375: .It
1.81 kristaps 2376: The comment syntax
2377: .Sq \e."
2378: is no longer accepted.
2379: .It
1.93 kristaps 2380: In groff, the
1.80 kristaps 2381: .Sx \&Pa
2382: macro does not format its arguments when used in the FILES section under
1.100 kristaps 2383: certain list types.
2384: mandoc does.
1.80 kristaps 2385: .It
1.93 kristaps 2386: Historic groff does not print a dash for empty
1.79 kristaps 2387: .Sx \&Fl
1.100 kristaps 2388: arguments.
2389: mandoc and newer groff implementations do.
1.79 kristaps 2390: .It
1.93 kristaps 2391: groff behaves irregularly when specifying
1.77 kristaps 2392: .Sq \ef
1.93 kristaps 2393: .Sx Text Decoration
1.100 kristaps 2394: within line-macro scopes.
2395: mandoc follows a consistent system.
1.77 kristaps 2396: .It
1.93 kristaps 2397: In mandoc, negative scaling units are truncated to zero; groff would
1.100 kristaps 2398: move to prior lines.
2399: Furthermore, the
1.61 kristaps 2400: .Sq f
2401: scaling unit, while accepted, is rendered as the default unit.
2402: .It
1.48 kristaps 2403: In quoted literals, groff allowed pair-wise double-quotes to produce a
1.100 kristaps 2404: standalone double-quote in formatted output.
2405: This idiosyncratic behaviour is not applicable in mandoc.
1.57 kristaps 2406: .It
1.126 kristaps 2407: Display offsets
1.78 kristaps 2408: .Sx \&Bd
1.126 kristaps 2409: .Fl offset Ar center
1.64 kristaps 2410: and
1.126 kristaps 2411: .Fl offset Ar right
2412: are disregarded in mandoc.
1.131 ! kristaps 2413: Furthermore, troff specifies a
1.64 kristaps 2414: .Fl file Ar file
1.131 ! kristaps 2415: argument that is not supported in mandoc.
1.100 kristaps 2416: Lastly, since text is not right-justified in mandoc (or even groff),
1.64 kristaps 2417: .Fl ragged
2418: and
2419: .Fl filled
2420: are aliases, as are
2421: .Fl literal
2422: and
2423: .Fl unfilled .
1.57 kristaps 2424: .It
1.100 kristaps 2425: Historic groff has many un-callable macros.
2426: Most of these (excluding some block-level macros) are now callable.
1.57 kristaps 2427: .It
1.50 kristaps 2428: The vertical bar
1.57 kristaps 2429: .Sq \(ba
1.28 kristaps 2430: made historic groff
1.57 kristaps 2431: .Qq go orbital
1.93 kristaps 2432: but has been a proper delimiter since then.
1.57 kristaps 2433: .It
1.93 kristaps 2434: .Sx \&It Fl nested
1.28 kristaps 2435: is assumed for all lists (it wasn't in historic groff): any list may be
2436: nested and
1.64 kristaps 2437: .Fl enum
1.4 kristaps 2438: lists will restart the sequence only for the sub-list.
1.57 kristaps 2439: .It
1.4 kristaps 2440: Some manuals use
1.64 kristaps 2441: .Sx \&Li
1.4 kristaps 2442: incorrectly by following it with a reserved character and expecting the
1.100 kristaps 2443: delimiter to render.
2444: This is not supported in mandoc.
1.93 kristaps 2445: .It
2446: In groff, the
2447: .Sx \&Cd ,
2448: .Sx \&Er ,
1.106 kristaps 2449: .Sx \&Ex ,
1.93 kristaps 2450: and
1.106 kristaps 2451: .Sx \&Rv
1.100 kristaps 2452: macros were stipulated only to occur in certain manual sections.
2453: mandoc does not have these restrictions.
1.105 kristaps 2454: .It
2455: Newer groff and mandoc print
2456: .Qq AT&T UNIX
2457: prior to unknown arguments of
2458: .Sx \&At ;
2459: older groff did nothing.
1.57 kristaps 2460: .El
1.2 kristaps 2461: .Sh SEE ALSO
1.57 kristaps 2462: .Xr mandoc 1 ,
2463: .Xr mandoc_char 7
1.2 kristaps 2464: .Sh AUTHORS
2465: The
1.57 kristaps 2466: .Nm
1.50 kristaps 2467: reference was written by
1.94 kristaps 2468: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
1.64 kristaps 2469: .\"
2470: .\" XXX: this really isn't the place for these caveats.
2471: .\" .
2472: .\" .
2473: .\" .Sh CAVEATS
2474: .\" There are many ambiguous parts of mdoc.
2475: .\" .
2476: .\" .Pp
2477: .\" .Bl -dash -compact
2478: .\" .It
2479: .\" .Sq \&Fa
2480: .\" should be
2481: .\" .Sq \&Va
2482: .\" as function arguments are variables.
2483: .\" .It
2484: .\" .Sq \&Ft
2485: .\" should be
2486: .\" .Sq \&Vt
2487: .\" as function return types are still types. Furthermore, the
2488: .\" .Sq \&Ft
2489: .\" should be removed and
2490: .\" .Sq \&Fo ,
2491: .\" which ostensibly follows it, should follow the same convention as
2492: .\" .Sq \&Va .
2493: .\" .It
2494: .\" .Sq \&Va
2495: .\" should formalise that only one or two arguments are acceptable: a
2496: .\" variable name and optional, preceding type.
2497: .\" .It
2498: .\" .Sq \&Fd
2499: .\" is ambiguous. It's commonly used to indicate an include file in the
2500: .\" synopsis section.
2501: .\" .Sq \&In
2502: .\" should be used, instead.
2503: .\" .It
2504: .\" Only the
2505: .\" .Sq \-literal
2506: .\" argument to
2507: .\" .Sq \&Bd
2508: .\" makes sense. The remaining ones should be removed.
2509: .\" .It
2510: .\" The
2511: .\" .Sq \&Xo
2512: .\" and
2513: .\" .Sq \&Xc
2514: .\" macros should be deprecated.
2515: .\" .It
2516: .\" The
2517: .\" .Sq \&Dt
2518: .\" macro lacks clarity. It should be absolutely clear which title will
2519: .\" render when formatting the manual page.
2520: .\" .It
2521: .\" A
2522: .\" .Sq \&Lx
2523: .\" should be provided for Linux (\(`a la
2524: .\" .Sq \&Ox ,
2525: .\" .Sq \&Nx
2526: .\" etc.).
2527: .\" .It
2528: .\" There's no way to refer to references in
2529: .\" .Sq \&Rs/Re
2530: .\" blocks.
2531: .\" .It
2532: .\" The \-split and \-nosplit dictates via
2533: .\" .Sq \&An
2534: .\" are re-set when entering and leaving the AUTHORS section.
2535: .\" .El
2536: .\" .
CVSweb