Annotation of mandoc/mdoc.7, Revision 1.194
1.194 ! schwarze 1: .\" $Id: mdoc.7,v 1.193 2011/07/31 17:42:50 schwarze Exp $
1.1 kristaps 2: .\"
1.179 schwarze 3: .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
1.130 schwarze 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.193 schwarze 18: .Dd $Mdocdate: July 31 2011 $
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.138 kristaps 30: manuals.
1.144 schwarze 31: This reference document describes its syntax, structure, and
1.138 kristaps 32: usage.
1.144 schwarze 33: The reference implementation is
34: .Xr mandoc 1 ;
35: the
1.57 kristaps 36: .Sx COMPATIBILITY
1.93 kristaps 37: section describes compatibility with other troff \-mdoc implementations.
1.57 kristaps 38: .Pp
1.13 kristaps 39: An
1.57 kristaps 40: .Nm
1.118 kristaps 41: document follows simple rules: lines beginning with the control
1.50 kristaps 42: character
1.185 kristaps 43: .Sq \&.
1.138 kristaps 44: are parsed for macros.
1.185 kristaps 45: Text lines, those not beginning with the control character, are
46: interpreted within the scope of prior macros:
1.57 kristaps 47: .Bd -literal -offset indent
1.13 kristaps 48: \&.Sh Macro lines change control state.
1.185 kristaps 49: Text lines are interpreted within the current state.
1.57 kristaps 50: .Ed
1.46 kristaps 51: .Sh LANGUAGE SYNTAX
1.57 kristaps 52: .Nm
1.13 kristaps 53: documents may contain only graphable 7-bit ASCII characters, the space
1.138 kristaps 54: character, and, in certain circumstances, the tab character.
1.175 kristaps 55: .Pp
1.185 kristaps 56: If the first character of a text line is a space, that line is printed
1.175 kristaps 57: with a leading newline.
1.57 kristaps 58: .Ss Comments
1.43 kristaps 59: Text following a
1.135 kristaps 60: .Sq \e\*q ,
1.185 kristaps 61: whether in a macro or text line, is ignored to the end of
1.138 kristaps 62: line.
63: A macro line with only a control character and comment escape,
1.135 kristaps 64: .Sq \&.\e\*q ,
1.138 kristaps 65: is also ignored.
1.144 schwarze 66: Macro lines with only a control character and optional whitespace are
1.138 kristaps 67: stripped from input.
1.182 kristaps 68: .Ss Reserved Terms
69: Within a macro line, the following terms are reserved:
1.61 kristaps 70: .Pp
1.57 kristaps 71: .Bl -tag -width Ds -offset indent -compact
72: .It \&.
73: .Pq period
1.182 kristaps 74: .It \e.
75: .Pq escaped period
1.57 kristaps 76: .It \&,
77: .Pq comma
78: .It \&:
79: .Pq colon
80: .It \&;
81: .Pq semicolon
82: .It \&(
83: .Pq left-parenthesis
84: .It \&)
85: .Pq right-parenthesis
86: .It \&[
87: .Pq left-bracket
88: .It \&]
89: .Pq right-bracket
90: .It \&?
91: .Pq question
92: .It \&!
93: .Pq exclamation
94: .It \&|
95: .Pq vertical bar
1.182 kristaps 96: .It \e*(Ba
97: .Pq reserved-word vertical bar
1.57 kristaps 98: .El
99: .Pp
1.182 kristaps 100: For general use in macro lines, these can be escaped with a non-breaking
101: space
102: .Pq Sq \e& .
1.185 kristaps 103: In text lines, these may be used as normal punctuation.
1.57 kristaps 104: .Ss Special Characters
1.185 kristaps 105: Special characters may occur in both macro and text lines.
1.43 kristaps 106: Sequences begin with the escape character
1.57 kristaps 107: .Sq \e
1.50 kristaps 108: followed by either an open-parenthesis
1.57 kristaps 109: .Sq \&(
1.1 kristaps 110: for two-character sequences; an open-bracket
1.57 kristaps 111: .Sq \&[
1.1 kristaps 112: for n-character sequences (terminated at a close-bracket
1.57 kristaps 113: .Sq \&] ) ;
1.144 schwarze 114: or a single one character sequence.
1.100 kristaps 115: See
1.57 kristaps 116: .Xr mandoc_char 7
1.100 kristaps 117: for a complete list.
118: Examples include
1.57 kristaps 119: .Sq \e(em
120: .Pq em-dash
1.50 kristaps 121: and
1.57 kristaps 122: .Sq \ee
123: .Pq back-slash .
124: .Ss Text Decoration
1.54 kristaps 125: Terms may be text-decorated using the
1.57 kristaps 126: .Sq \ef
1.144 schwarze 127: escape followed by an indicator: B (bold), I (italic), R (Roman), or P
1.82 kristaps 128: (revert to previous mode):
1.75 kristaps 129: .Pp
1.173 kristaps 130: .Dl \efBbold\efR \efIitalic\efP
1.76 kristaps 131: .Pp
132: A numerical representation 3, 2, or 1 (bold, italic, and Roman,
1.100 kristaps 133: respectively) may be used instead.
1.185 kristaps 134: If a macro opens a font scope after calling
135: .Sq \ef ,
136: such as with
137: .Sx \&Bf ,
138: the
139: .Sq \ef
140: mode will be restored upon exiting the
1.78 kristaps 141: .Sx \&Bf
1.185 kristaps 142: scope.
1.76 kristaps 143: .Pp
1.136 kristaps 144: Note this form is
1.76 kristaps 145: .Em not
1.82 kristaps 146: recommended for
1.57 kristaps 147: .Nm ,
1.74 kristaps 148: which encourages semantic annotation.
1.57 kristaps 149: .Ss Predefined Strings
1.82 kristaps 150: Historically,
1.145 kristaps 151: troff
1.82 kristaps 152: also defined a set of package-specific
1.57 kristaps 153: .Dq predefined strings ,
1.82 kristaps 154: which, like
1.57 kristaps 155: .Sx Special Characters ,
1.124 kristaps 156: mark special output characters and strings by way of input codes.
1.54 kristaps 157: Predefined strings are escaped with the slash-asterisk,
1.57 kristaps 158: .Sq \e* :
1.54 kristaps 159: single-character
1.57 kristaps 160: .Sq \e*X ,
1.54 kristaps 161: two-character
1.57 kristaps 162: .Sq \e*(XX ,
1.54 kristaps 163: and N-character
1.57 kristaps 164: .Sq \e*[N] .
1.54 kristaps 165: See
1.57 kristaps 166: .Xr mandoc_char 7
1.100 kristaps 167: for a complete list.
168: Examples include
1.57 kristaps 169: .Sq \e*(Am
170: .Pq ampersand
1.54 kristaps 171: and
1.57 kristaps 172: .Sq \e*(Ba
173: .Pq vertical bar .
174: .Ss Whitespace
1.98 kristaps 175: Whitespace consists of the space character.
1.185 kristaps 176: In text lines, whitespace is preserved within a line; unescaped
1.96 kristaps 177: trailing spaces are stripped from input (unless in a literal context).
1.185 kristaps 178: Blank text lines, which may include whitespace, are only permitted
1.96 kristaps 179: within literal contexts.
1.57 kristaps 180: .Pp
1.194 ! schwarze 181: In general, trailing whitespace on input lines is discouraged
! 182: for reasons of clarity and portability.
! 183: In the rare case that a blank character is needed at the end of an
! 184: input line, it may be forced by
! 185: .Sq \e\ \e& .
! 186: .Pp
1.100 kristaps 187: In macro lines, whitespace delimits arguments and is discarded.
1.57 kristaps 188: .Ss Quotation
1.194 ! schwarze 189: Macro arguments may be quoted with double-quotes; in this case,
! 190: whitespace within the quotes is retained as part of the argument.
! 191: For example,
! 192: .Pp
! 193: .D1 Pf \. \&Fn strlen "\(dqconst char *s\(dq"
! 194: .Pp
! 195: renders as
! 196: .Sq Fn strlen "const char *s" ,
! 197: while
! 198: .Pp
! 199: .D1 Pf \. \&Fn strlen "const char *s"
! 200: .Pp
! 201: would produce
! 202: .Sq Fn strlen const char *s .
! 203: .Pp
1.100 kristaps 204: A quoted argument begins with a double-quote preceded by whitespace.
1.144 schwarze 205: The next double-quote not pairwise adjacent to another double-quote
1.100 kristaps 206: terminates the literal, regardless of surrounding whitespace.
1.57 kristaps 207: .Pp
1.194 ! schwarze 208: In unquoted arguments, space characters can alternatively be included
! 209: by preceding them with a backslash
! 210: .Pq Sq \e\~ ,
! 211: but quoting is usually better for clarity.
! 212: .Pp
1.141 kristaps 213: Note that any quoted text, even if it would cause a macro invocation
214: when unquoted, is considered literal text.
1.100 kristaps 215: Thus, the following produces
1.141 kristaps 216: .Sq Op "Fl a" :
1.57 kristaps 217: .Bd -literal -offset indent
1.141 kristaps 218: \&.Op "Fl a"
1.57 kristaps 219: .Ed
220: .Pp
1.185 kristaps 221: In text lines, quotes are regarded as opaque text.
1.61 kristaps 222: .Ss Scaling Widths
223: Many macros support scaled widths for their arguments, such as
224: stipulating a two-inch list indentation with the following:
225: .Bd -literal -offset indent
226: \&.Bl -tag -width 2i
227: .Ed
228: .Pp
229: The syntax for scaled widths is
1.62 kristaps 230: .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
1.61 kristaps 231: where a decimal must be preceded or proceeded by at least one digit.
1.100 kristaps 232: Negative numbers, while accepted, are truncated to zero.
233: The following scaling units are accepted:
1.61 kristaps 234: .Pp
235: .Bl -tag -width Ds -offset indent -compact
236: .It c
237: centimetre
238: .It i
239: inch
240: .It P
241: pica (~1/6 inch)
242: .It p
243: point (~1/72 inch)
244: .It f
245: synonym for
246: .Sq u
247: .It v
248: default vertical span
249: .It m
250: width of rendered
251: .Sq m
252: .Pq em
253: character
254: .It n
255: width of rendered
256: .Sq n
257: .Pq en
258: character
259: .It u
260: default horizontal span
261: .It M
262: mini-em (~1/100 em)
263: .El
264: .Pp
265: Using anything other than
266: .Sq m ,
267: .Sq n ,
268: .Sq u ,
269: or
270: .Sq v
1.100 kristaps 271: is necessarily non-portable across output media.
272: See
1.61 kristaps 273: .Sx COMPATIBILITY .
1.101 kristaps 274: .Ss Sentence Spacing
1.144 schwarze 275: When composing a manual, make sure that sentences end at the end of
1.101 kristaps 276: a line.
277: By doing so, front-ends will be able to apply the proper amount of
278: spacing after the end of sentence (unescaped) period, exclamation mark,
1.107 kristaps 279: or question mark followed by zero or more non-sentence closing
1.179 schwarze 280: delimiters
281: .Po
282: .Sq \&) ,
1.107 kristaps 283: .Sq \&] ,
284: .Sq \&' ,
1.179 schwarze 285: .Sq \&"
286: .Pc .
1.102 kristaps 287: .Pp
288: The proper spacing is also intelligently preserved if a sentence ends at
1.144 schwarze 289: the boundary of a macro line.
290: For example:
1.107 kristaps 291: .Pp
1.185 kristaps 292: .Dl \&.Xr mandoc 1 \&.
293: .Dl \&.Fl T \&Ns \&Cm ascii \&.
1.43 kristaps 294: .Sh MANUAL STRUCTURE
1.66 kristaps 295: A well-formed
1.57 kristaps 296: .Nm
1.66 kristaps 297: document consists of a document prologue followed by one or more
298: sections.
299: .Pp
1.141 kristaps 300: The prologue, which consists of the
1.64 kristaps 301: .Sx \&Dd ,
302: .Sx \&Dt ,
1.33 kristaps 303: and
1.66 kristaps 304: .Sx \&Os
1.141 kristaps 305: macros in that order, is required for every document.
1.66 kristaps 306: .Pp
1.82 kristaps 307: The first section (sections are denoted by
1.66 kristaps 308: .Sx \&Sh )
309: must be the NAME section, consisting of at least one
1.64 kristaps 310: .Sx \&Nm
1.50 kristaps 311: followed by
1.66 kristaps 312: .Sx \&Nd .
313: .Pp
1.122 kristaps 314: Following that, convention dictates specifying at least the
315: .Em SYNOPSIS
316: and
317: .Em DESCRIPTION
318: sections, although this varies between manual sections.
1.66 kristaps 319: .Pp
320: The following is a well-formed skeleton
321: .Nm
1.188 kristaps 322: file for a utility
323: .Qq progname :
1.57 kristaps 324: .Bd -literal -offset indent
1.43 kristaps 325: \&.Dd $\&Mdocdate$
1.188 kristaps 326: \&.Dt PROGNAME section
1.43 kristaps 327: \&.Os
328: \&.Sh NAME
1.188 kristaps 329: \&.Nm progname
1.194 ! schwarze 330: \&.Nd one line about what it does
1.58 kristaps 331: \&.\e\*q .Sh LIBRARY
1.156 kristaps 332: \&.\e\*q For sections 2, 3, & 9 only.
333: \&.\e\*q Not used in OpenBSD.
1.58 kristaps 334: \&.Sh SYNOPSIS
1.188 kristaps 335: \&.Nm progname
1.58 kristaps 336: \&.Op Fl options
337: \&.Ar
338: \&.Sh DESCRIPTION
339: The
340: \&.Nm
341: utility processes files ...
1.59 kristaps 342: \&.\e\*q .Sh IMPLEMENTATION NOTES
1.159 schwarze 343: \&.\e\*q Not used in OpenBSD.
1.58 kristaps 344: \&.\e\*q .Sh RETURN VALUES
1.156 kristaps 345: \&.\e\*q For sections 2, 3, & 9 only.
1.58 kristaps 346: \&.\e\*q .Sh ENVIRONMENT
1.156 kristaps 347: \&.\e\*q For sections 1, 6, 7, & 8 only.
1.58 kristaps 348: \&.\e\*q .Sh FILES
1.99 kristaps 349: \&.\e\*q .Sh EXIT STATUS
1.159 schwarze 350: \&.\e\*q For sections 1, 6, & 8 only.
1.58 kristaps 351: \&.\e\*q .Sh EXAMPLES
352: \&.\e\*q .Sh DIAGNOSTICS
1.156 kristaps 353: \&.\e\*q For sections 1, 4, 6, 7, & 8 only.
1.58 kristaps 354: \&.\e\*q .Sh ERRORS
1.156 kristaps 355: \&.\e\*q For sections 2, 3, & 9 only.
1.58 kristaps 356: \&.\e\*q .Sh SEE ALSO
357: \&.\e\*q .Xr foobar 1
358: \&.\e\*q .Sh STANDARDS
359: \&.\e\*q .Sh HISTORY
360: \&.\e\*q .Sh AUTHORS
361: \&.\e\*q .Sh CAVEATS
362: \&.\e\*q .Sh BUGS
363: \&.\e\*q .Sh SECURITY CONSIDERATIONS
1.156 kristaps 364: \&.\e\*q Not used in OpenBSD.
1.57 kristaps 365: .Ed
366: .Pp
1.144 schwarze 367: The sections in an
1.66 kristaps 368: .Nm
1.100 kristaps 369: document are conventionally ordered as they appear above.
370: Sections should be composed as follows:
1.73 kristaps 371: .Bl -ohang -offset Ds
372: .It Em NAME
1.144 schwarze 373: The name(s) and a one line description of the documented material.
1.100 kristaps 374: The syntax for this as follows:
1.73 kristaps 375: .Bd -literal -offset indent
1.144 schwarze 376: \&.Nm name0 ,
377: \&.Nm name1 ,
1.73 kristaps 378: \&.Nm name2
1.144 schwarze 379: \&.Nd a one line description
1.73 kristaps 380: .Ed
381: .Pp
1.185 kristaps 382: Multiple
383: .Sq \&Nm
384: names should be separated by commas.
385: .Pp
1.73 kristaps 386: The
1.66 kristaps 387: .Sx \&Nm
1.73 kristaps 388: macro(s) must precede the
389: .Sx \&Nd
390: macro.
1.80 kristaps 391: .Pp
1.82 kristaps 392: See
1.80 kristaps 393: .Sx \&Nm
394: and
395: .Sx \&Nd .
1.73 kristaps 396: .It Em LIBRARY
397: The name of the library containing the documented material, which is
1.108 kristaps 398: assumed to be a function in a section 2, 3, or 9 manual.
1.100 kristaps 399: The syntax for this is as follows:
1.73 kristaps 400: .Bd -literal -offset indent
401: \&.Lb libarm
402: .Ed
403: .Pp
404: See
1.80 kristaps 405: .Sx \&Lb .
1.73 kristaps 406: .It Em SYNOPSIS
407: Documents the utility invocation syntax, function call syntax, or device
1.82 kristaps 408: configuration.
1.73 kristaps 409: .Pp
410: For the first, utilities (sections 1, 6, and 8), this is
411: generally structured as follows:
412: .Bd -literal -offset indent
1.185 kristaps 413: \&.Nm bar
1.73 kristaps 414: \&.Op Fl v
415: \&.Op Fl o Ar file
416: \&.Op Ar
1.185 kristaps 417: \&.Nm foo
1.73 kristaps 418: \&.Op Fl v
419: \&.Op Fl o Ar file
420: \&.Op Ar
421: .Ed
422: .Pp
1.185 kristaps 423: Commands should be ordered alphabetically.
424: .Pp
1.73 kristaps 425: For the second, function calls (sections 2, 3, 9):
426: .Bd -literal -offset indent
1.146 kristaps 427: \&.In header.h
1.73 kristaps 428: \&.Vt extern const char *global;
429: \&.Ft "char *"
430: \&.Fn foo "const char *src"
431: \&.Ft "char *"
432: \&.Fn bar "const char *src"
433: .Ed
434: .Pp
1.185 kristaps 435: Ordering of
436: .Sx \&In ,
437: .Sx \&Vt ,
438: .Sx \&Fn ,
439: and
440: .Sx \&Fo
441: macros should follow C header-file conventions.
442: .Pp
1.73 kristaps 443: And for the third, configurations (section 4):
444: .Bd -literal -offset indent
445: \&.Cd \*qit* at isa? port 0x2e\*q
446: \&.Cd \*qit* at isa? port 0x4e\*q
447: .Ed
448: .Pp
1.82 kristaps 449: Manuals not in these sections generally don't need a
1.73 kristaps 450: .Em SYNOPSIS .
1.80 kristaps 451: .Pp
1.122 kristaps 452: Some macros are displayed differently in the
453: .Em SYNOPSIS
454: section, particularly
455: .Sx \&Nm ,
1.80 kristaps 456: .Sx \&Cd ,
1.122 kristaps 457: .Sx \&Fd ,
458: .Sx \&Fn ,
459: .Sx \&Fo ,
460: .Sx \&In ,
461: .Sx \&Vt ,
462: and
463: .Sx \&Ft .
1.138 kristaps 464: All of these macros are output on their own line.
1.144 schwarze 465: If two such dissimilar macros are pairwise invoked (except for
1.122 kristaps 466: .Sx \&Ft
467: before
468: .Sx \&Fo
469: or
1.123 kristaps 470: .Sx \&Fn ) ,
1.122 kristaps 471: they are separated by a vertical space, unless in the case of
472: .Sx \&Fo ,
1.80 kristaps 473: .Sx \&Fn ,
1.122 kristaps 474: and
1.80 kristaps 475: .Sx \&Ft ,
1.122 kristaps 476: which are always separated by vertical space.
1.128 schwarze 477: .Pp
478: When text and macros following an
479: .Sx \&Nm
480: macro starting an input line span multiple output lines,
481: all output lines but the first will be indented to align
482: with the text immediately following the
483: .Sx \&Nm
484: macro, up to the next
485: .Sx \&Nm ,
1.141 kristaps 486: .Sx \&Sh ,
1.128 schwarze 487: or
488: .Sx \&Ss
489: macro or the end of an enclosing block, whichever comes first.
1.73 kristaps 490: .It Em DESCRIPTION
1.185 kristaps 491: This begins with an expansion of the brief, one line description in
492: .Em NAME :
493: .Bd -literal -offset indent
494: The
495: \&.Nm
496: utility does this, that, and the other.
497: .Ed
498: .Pp
499: It usually follows with a breakdown of the options (if documenting a
1.73 kristaps 500: command), such as:
501: .Bd -literal -offset indent
502: The arguments are as follows:
503: \&.Bl \-tag \-width Ds
504: \&.It Fl v
505: Print verbose information.
506: \&.El
507: .Ed
1.80 kristaps 508: .Pp
1.73 kristaps 509: Manuals not documenting a command won't include the above fragment.
510: .It Em IMPLEMENTATION NOTES
1.100 kristaps 511: Implementation-specific notes should be kept here.
512: This is useful when implementing standard functions that may have side
513: effects or notable algorithmic implications.
1.73 kristaps 514: .It Em RETURN VALUES
1.144 schwarze 515: This section documents the
516: return values of functions in sections 2, 3, and 9.
1.73 kristaps 517: .Pp
518: See
519: .Sx \&Rv .
520: .It Em ENVIRONMENT
1.141 kristaps 521: Lists the environment variables used by the utility,
522: and explains the syntax and semantics of their values.
523: The
524: .Xr environ 7
525: manual provides examples of typical content and formatting.
1.73 kristaps 526: .Pp
527: See
528: .Sx \&Ev .
529: .It Em FILES
1.100 kristaps 530: Documents files used.
1.141 kristaps 531: It's helpful to document both the file name and a short description of how
1.100 kristaps 532: the file is used (created, modified, etc.).
1.73 kristaps 533: .Pp
534: See
535: .Sx \&Pa .
1.99 kristaps 536: .It Em EXIT STATUS
1.144 schwarze 537: This section documents the
538: command exit status for section 1, 6, and 8 utilities.
1.100 kristaps 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.
1.144 schwarze 548: Make sure that 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
1.143 schwarze 582: A brief history of the subject, including where support first appeared.
1.73 kristaps 583: .It Em AUTHORS
1.143 schwarze 584: Credits to the person or persons who wrote the code and/or documentation.
1.141 kristaps 585: Authors should generally be noted by both name and email address.
1.73 kristaps 586: .Pp
587: See
588: .Sx \&An .
589: .It Em CAVEATS
1.141 kristaps 590: Common misuses and misunderstandings should be explained
1.73 kristaps 591: in this section.
592: .It Em BUGS
1.147 kristaps 593: Known bugs, limitations, and work-arounds should be described
1.141 kristaps 594: in this section.
1.73 kristaps 595: .It Em SECURITY CONSIDERATIONS
596: Documents any security precautions that operators should consider.
1.66 kristaps 597: .El
1.43 kristaps 598: .Sh MACRO SYNTAX
1.56 kristaps 599: Macros are one to three three characters in length and begin with a
1.141 kristaps 600: control character,
1.57 kristaps 601: .Sq \&. ,
1.100 kristaps 602: at the beginning of the line.
603: An arbitrary amount of whitespace may sit between the control character
604: and the macro name.
605: Thus, the following are equivalent:
1.64 kristaps 606: .Bd -literal -offset indent
607: \&.Pp
608: \&.\ \ \ \&Pp
609: .Ed
1.57 kristaps 610: .Pp
1.100 kristaps 611: The syntax of a macro depends on its classification.
612: In this section,
1.57 kristaps 613: .Sq \-arg
1.43 kristaps 614: refers to macro arguments, which may be followed by zero or more
1.57 kristaps 615: .Sq parm
1.43 kristaps 616: parameters;
1.57 kristaps 617: .Sq \&Yo
1.43 kristaps 618: opens the scope of a macro; and if specified,
1.57 kristaps 619: .Sq \&Yc
1.43 kristaps 620: closes it out.
1.57 kristaps 621: .Pp
1.43 kristaps 622: The
1.57 kristaps 623: .Em Callable
1.166 schwarze 624: column indicates that the macro may also be called by passing its name
625: as an argument to another macro.
1.194 ! schwarze 626: For example,
! 627: .Sq \&.Op \&Fl O \&Ar file
! 628: produces
! 629: .Sq Op Fl O Ar file .
! 630: To prevent a macro call and render the macro name literally,
! 631: escape it by prepending a non-breaking space,
! 632: .Sq \e& .
! 633: For example,
! 634: .Sq \&Op \e&Fl O
! 635: produces
! 636: .Sq Op \&Fl O .
1.166 schwarze 637: If a macro is not callable but its name appears as an argument
638: to another macro, it is interpreted as opaque text.
639: For example,
1.60 kristaps 640: .Sq \&.Fl \&Sh
1.55 kristaps 641: produces
1.60 kristaps 642: .Sq Fl \&Sh .
1.57 kristaps 643: .Pp
1.55 kristaps 644: The
1.141 kristaps 645: .Em Parsed
1.166 schwarze 646: column indicates whether the macro may call other macros by receiving
647: their names as arguments.
648: If a macro is not parsed but the name of another macro appears
649: as an argument, it is interpreted as opaque text.
1.57 kristaps 650: .Pp
1.55 kristaps 651: The
1.57 kristaps 652: .Em Scope
1.43 kristaps 653: column, if applicable, describes closure rules.
1.57 kristaps 654: .Ss Block full-explicit
1.100 kristaps 655: Multi-line scope closed by an explicit closing macro.
656: All macros contains bodies; only
1.64 kristaps 657: .Sx \&Bf
1.185 kristaps 658: and
659: .Pq optionally
660: .Sx \&Bl
661: contain a head.
1.57 kristaps 662: .Bd -literal -offset indent
1.50 kristaps 663: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
664: \(lBbody...\(rB
1.43 kristaps 665: \&.Yc
1.57 kristaps 666: .Ed
667: .Pp
1.141 kristaps 668: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsedX" "closed by XXX"
669: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope
1.64 kristaps 670: .It Sx \&Bd Ta \&No Ta \&No Ta closed by Sx \&Ed
671: .It Sx \&Bf Ta \&No Ta \&No Ta closed by Sx \&Ef
672: .It Sx \&Bk Ta \&No Ta \&No Ta closed by Sx \&Ek
673: .It Sx \&Bl Ta \&No Ta \&No Ta closed by Sx \&El
674: .It Sx \&Ed Ta \&No Ta \&No Ta opened by Sx \&Bd
675: .It Sx \&Ef Ta \&No Ta \&No Ta opened by Sx \&Bf
676: .It Sx \&Ek Ta \&No Ta \&No Ta opened by Sx \&Bk
677: .It Sx \&El Ta \&No Ta \&No Ta opened by Sx \&Bl
1.57 kristaps 678: .El
679: .Ss Block full-implicit
1.43 kristaps 680: Multi-line scope closed by end-of-file or implicitly by another macro.
1.50 kristaps 681: All macros have bodies; some
1.57 kristaps 682: .Po
1.64 kristaps 683: .Sx \&It Fl bullet ,
684: .Fl hyphen ,
685: .Fl dash ,
686: .Fl enum ,
687: .Fl item
1.57 kristaps 688: .Pc
1.64 kristaps 689: don't have heads; only one
690: .Po
1.141 kristaps 691: .Sx \&It
692: in
693: .Sx \&Bl Fl column
1.82 kristaps 694: .Pc
1.64 kristaps 695: has multiple heads.
1.57 kristaps 696: .Bd -literal -offset indent
1.50 kristaps 697: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
698: \(lBbody...\(rB
1.57 kristaps 699: .Ed
700: .Pp
1.141 kristaps 701: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsedX" "closed by XXXXXXXXXXX"
702: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope
1.64 kristaps 703: .It Sx \&It Ta \&No Ta Yes Ta closed by Sx \&It , Sx \&El
704: .It Sx \&Nd Ta \&No Ta \&No Ta closed by Sx \&Sh
1.128 schwarze 705: .It Sx \&Nm Ta \&No Ta Yes Ta closed by Sx \&Nm , Sx \&Sh , Sx \&Ss
1.64 kristaps 706: .It Sx \&Sh Ta \&No Ta \&No Ta closed by Sx \&Sh
707: .It Sx \&Ss Ta \&No Ta \&No Ta closed by Sx \&Sh , Sx \&Ss
1.57 kristaps 708: .El
1.128 schwarze 709: .Pp
710: Note that the
711: .Sx \&Nm
712: macro is a
713: .Sx Block full-implicit
714: macro only when invoked as the first macro
715: in a
716: .Em SYNOPSIS
717: section line, else it is
718: .Sx In-line .
1.57 kristaps 719: .Ss Block partial-explicit
1.100 kristaps 720: Like block full-explicit, but also with single-line scope.
721: Each has at least a body and, in limited circumstances, a head
1.64 kristaps 722: .Po
723: .Sx \&Fo ,
724: .Sx \&Eo
725: .Pc
1.50 kristaps 726: and/or tail
1.64 kristaps 727: .Pq Sx \&Ec .
1.57 kristaps 728: .Bd -literal -offset indent
1.50 kristaps 729: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
730: \(lBbody...\(rB
731: \&.Yc \(lBtail...\(rB
1.2 kristaps 732:
1.43 kristaps 733: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
1.50 kristaps 734: \(lBbody...\(rB \&Yc \(lBtail...\(rB
1.57 kristaps 735: .Ed
736: .Pp
1.141 kristaps 737: .Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXXX" -compact -offset indent
738: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope
1.64 kristaps 739: .It Sx \&Ac Ta Yes Ta Yes Ta opened by Sx \&Ao
1.63 kristaps 740: .It Sx \&Ao Ta Yes Ta Yes Ta closed by Sx \&Ac
1.64 kristaps 741: .It Sx \&Bc Ta Yes Ta Yes Ta closed by Sx \&Bo
742: .It Sx \&Bo Ta Yes Ta Yes Ta opened by Sx \&Bc
743: .It Sx \&Brc Ta Yes Ta Yes Ta opened by Sx \&Bro
744: .It Sx \&Bro Ta Yes Ta Yes Ta closed by Sx \&Brc
745: .It Sx \&Dc Ta Yes Ta Yes Ta opened by Sx \&Do
746: .It Sx \&Do Ta Yes Ta Yes Ta closed by Sx \&Dc
747: .It Sx \&Ec Ta Yes Ta Yes Ta opened by Sx \&Eo
748: .It Sx \&Eo Ta Yes Ta Yes Ta closed by Sx \&Ec
749: .It Sx \&Fc Ta Yes Ta Yes Ta opened by Sx \&Fo
750: .It Sx \&Fo Ta \&No Ta \&No Ta closed by Sx \&Fc
751: .It Sx \&Oc Ta Yes Ta Yes Ta closed by Sx \&Oo
752: .It Sx \&Oo Ta Yes Ta Yes Ta opened by Sx \&Oc
753: .It Sx \&Pc Ta Yes Ta Yes Ta closed by Sx \&Po
754: .It Sx \&Po Ta Yes Ta Yes Ta opened by Sx \&Pc
755: .It Sx \&Qc Ta Yes Ta Yes Ta opened by Sx \&Oo
756: .It Sx \&Qo Ta Yes Ta Yes Ta closed by Sx \&Oc
1.63 kristaps 757: .It Sx \&Re Ta \&No Ta \&No Ta opened by Sx \&Rs
758: .It Sx \&Rs Ta \&No Ta \&No Ta closed by Sx \&Re
1.64 kristaps 759: .It Sx \&Sc Ta Yes Ta Yes Ta opened by Sx \&So
760: .It Sx \&So Ta Yes Ta Yes Ta closed by Sx \&Sc
761: .It Sx \&Xc Ta Yes Ta Yes Ta opened by Sx \&Xo
762: .It Sx \&Xo Ta Yes Ta Yes Ta closed by Sx \&Xc
1.57 kristaps 763: .El
764: .Ss Block partial-implicit
1.50 kristaps 765: Like block full-implicit, but with single-line scope closed by
1.182 kristaps 766: .Sx Reserved Terms
1.43 kristaps 767: or end of line.
1.57 kristaps 768: .Bd -literal -offset indent
1.43 kristaps 769: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
1.57 kristaps 770: .Ed
771: .Pp
1.141 kristaps 772: .Bl -column "MacroX" "CallableX" "ParsedX" -compact -offset indent
773: .It Em Macro Ta Em Callable Ta Em Parsed
1.64 kristaps 774: .It Sx \&Aq Ta Yes Ta Yes
775: .It Sx \&Bq Ta Yes Ta Yes
776: .It Sx \&Brq Ta Yes Ta Yes
777: .It Sx \&D1 Ta \&No Ta \&Yes
778: .It Sx \&Dl Ta \&No Ta Yes
779: .It Sx \&Dq Ta Yes Ta Yes
780: .It Sx \&Op Ta Yes Ta Yes
781: .It Sx \&Pq Ta Yes Ta Yes
782: .It Sx \&Ql Ta Yes Ta Yes
783: .It Sx \&Qq Ta Yes Ta Yes
784: .It Sx \&Sq Ta Yes Ta Yes
1.83 kristaps 785: .It Sx \&Vt Ta Yes Ta Yes
1.57 kristaps 786: .El
1.83 kristaps 787: .Pp
788: Note that the
789: .Sx \&Vt
790: macro is a
791: .Sx Block partial-implicit
792: only when invoked as the first macro
1.109 kristaps 793: in a
794: .Em SYNOPSIS
795: section line, else it is
1.83 kristaps 796: .Sx In-line .
1.190 schwarze 797: .Ss Special block macro
798: The
799: .Sx \&Ta
800: macro can only be used below
801: .Sx \&It
802: in
803: .Sx \&Bl Fl column
804: lists.
805: It delimits blocks representing table cells;
806: these blocks have bodies, but no heads.
807: .Pp
808: .Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXXX" -compact -offset indent
809: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope
810: .It Sx \&Ta Ta Yes Ta Yes Ta closed by Sx \&Ta , Sx \&It
811: .El
1.57 kristaps 812: .Ss In-line
1.50 kristaps 813: Closed by
1.182 kristaps 814: .Sx Reserved Terms ,
1.100 kristaps 815: end of line, fixed argument lengths, and/or subsequent macros.
816: In-line macros have only text children.
817: If a number (or inequality) of arguments is
1.57 kristaps 818: .Pq n ,
1.3 kristaps 819: then the macro accepts an arbitrary number of arguments.
1.57 kristaps 820: .Bd -literal -offset indent
1.144 schwarze 821: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lBres...\(rB
1.43 kristaps 822:
823: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
824:
825: \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
1.57 kristaps 826: .Ed
827: .Pp
1.141 kristaps 828: .Bl -column "MacroX" "CallableX" "ParsedX" "Arguments" -compact -offset indent
829: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Arguments
1.63 kristaps 830: .It Sx \&%A Ta \&No Ta \&No Ta >0
831: .It Sx \&%B Ta \&No Ta \&No Ta >0
832: .It Sx \&%C Ta \&No Ta \&No Ta >0
833: .It Sx \&%D Ta \&No Ta \&No Ta >0
834: .It Sx \&%I Ta \&No Ta \&No Ta >0
835: .It Sx \&%J Ta \&No Ta \&No Ta >0
836: .It Sx \&%N Ta \&No Ta \&No Ta >0
837: .It Sx \&%O Ta \&No Ta \&No Ta >0
838: .It Sx \&%P Ta \&No Ta \&No Ta >0
1.69 kristaps 839: .It Sx \&%Q Ta \&No Ta \&No Ta >0
1.63 kristaps 840: .It Sx \&%R Ta \&No Ta \&No Ta >0
841: .It Sx \&%T Ta \&No Ta \&No Ta >0
1.69 kristaps 842: .It Sx \&%U Ta \&No Ta \&No Ta >0
1.63 kristaps 843: .It Sx \&%V Ta \&No Ta \&No Ta >0
1.176 schwarze 844: .It Sx \&Ad Ta Yes Ta Yes Ta >0
845: .It Sx \&An Ta Yes Ta Yes Ta >0
1.64 kristaps 846: .It Sx \&Ap Ta Yes Ta Yes Ta 0
847: .It Sx \&Ar Ta Yes Ta Yes Ta n
848: .It Sx \&At Ta Yes Ta Yes Ta 1
849: .It Sx \&Bsx Ta Yes Ta Yes Ta n
850: .It Sx \&Bt Ta \&No Ta \&No Ta 0
851: .It Sx \&Bx Ta Yes Ta Yes Ta n
852: .It Sx \&Cd Ta Yes Ta Yes Ta >0
1.176 schwarze 853: .It Sx \&Cm Ta Yes Ta Yes Ta >0
1.64 kristaps 854: .It Sx \&Db Ta \&No Ta \&No Ta 1
1.142 kristaps 855: .It Sx \&Dd Ta \&No Ta \&No Ta n
1.64 kristaps 856: .It Sx \&Dt Ta \&No Ta \&No Ta n
1.176 schwarze 857: .It Sx \&Dv Ta Yes Ta Yes Ta >0
1.64 kristaps 858: .It Sx \&Dx Ta Yes Ta Yes Ta n
859: .It Sx \&Em Ta Yes Ta Yes Ta >0
860: .It Sx \&En Ta \&No Ta \&No Ta 0
861: .It Sx \&Er Ta Yes Ta Yes Ta >0
862: .It Sx \&Es Ta \&No Ta \&No Ta 0
1.176 schwarze 863: .It Sx \&Ev Ta Yes Ta Yes Ta >0
1.64 kristaps 864: .It Sx \&Ex Ta \&No Ta \&No Ta n
1.176 schwarze 865: .It Sx \&Fa Ta Yes Ta Yes Ta >0
1.64 kristaps 866: .It Sx \&Fd Ta \&No Ta \&No Ta >0
867: .It Sx \&Fl Ta Yes Ta Yes Ta n
868: .It Sx \&Fn Ta Yes Ta Yes Ta >0
869: .It Sx \&Fr Ta \&No Ta \&No Ta n
1.176 schwarze 870: .It Sx \&Ft Ta Yes Ta Yes Ta >0
1.64 kristaps 871: .It Sx \&Fx Ta Yes Ta Yes Ta n
872: .It Sx \&Hf Ta \&No Ta \&No Ta n
873: .It Sx \&Ic Ta Yes Ta Yes Ta >0
1.184 kristaps 874: .It Sx \&In Ta \&No Ta \&No Ta 1
1.64 kristaps 875: .It Sx \&Lb Ta \&No Ta \&No Ta 1
1.176 schwarze 876: .It Sx \&Li Ta Yes Ta Yes Ta >0
877: .It Sx \&Lk Ta Yes Ta Yes Ta >0
1.64 kristaps 878: .It Sx \&Lp Ta \&No Ta \&No Ta 0
879: .It Sx \&Ms Ta Yes Ta Yes Ta >0
880: .It Sx \&Mt Ta Yes Ta Yes Ta >0
881: .It Sx \&Nm Ta Yes Ta Yes Ta n
882: .It Sx \&No Ta Yes Ta Yes Ta 0
883: .It Sx \&Ns Ta Yes Ta Yes Ta 0
884: .It Sx \&Nx Ta Yes Ta Yes Ta n
885: .It Sx \&Os Ta \&No Ta \&No Ta n
886: .It Sx \&Ot Ta \&No Ta \&No Ta n
887: .It Sx \&Ox Ta Yes Ta Yes Ta n
888: .It Sx \&Pa Ta Yes Ta Yes Ta n
1.88 kristaps 889: .It Sx \&Pf Ta Yes Ta Yes Ta 1
1.64 kristaps 890: .It Sx \&Pp Ta \&No Ta \&No Ta 0
891: .It Sx \&Rv Ta \&No Ta \&No Ta n
892: .It Sx \&Sm Ta \&No Ta \&No Ta 1
893: .It Sx \&St Ta \&No Ta Yes Ta 1
894: .It Sx \&Sx Ta Yes Ta Yes Ta >0
895: .It Sx \&Sy Ta Yes Ta Yes Ta >0
896: .It Sx \&Tn Ta Yes Ta Yes Ta >0
897: .It Sx \&Ud Ta \&No Ta \&No Ta 0
898: .It Sx \&Ux Ta Yes Ta Yes Ta n
899: .It Sx \&Va Ta Yes Ta Yes Ta n
900: .It Sx \&Vt Ta Yes Ta Yes Ta >0
1.84 kristaps 901: .It Sx \&Xr Ta Yes Ta Yes Ta >0
1.64 kristaps 902: .It Sx \&br Ta \&No Ta \&No Ta 0
903: .It Sx \&sp Ta \&No Ta \&No Ta 1
1.82 kristaps 904: .El
1.63 kristaps 905: .Sh REFERENCE
906: This section is a canonical reference of all macros, arranged
1.100 kristaps 907: alphabetically.
908: For the scoping of individual macros, see
1.63 kristaps 909: .Sx MACRO SYNTAX .
910: .Ss \&%A
911: Author name of an
912: .Sx \&Rs
1.138 kristaps 913: block.
914: Multiple authors should each be accorded their own
1.64 kristaps 915: .Sx \%%A
1.138 kristaps 916: line.
917: Author names should be ordered with full or abbreviated forename(s)
918: first, then full surname.
1.63 kristaps 919: .Ss \&%B
920: Book title of an
921: .Sx \&Rs
1.138 kristaps 922: block.
923: This macro may also be used in a non-bibliographic context when
1.63 kristaps 924: referring to book titles.
925: .Ss \&%C
926: Publication city or location of an
927: .Sx \&Rs
928: block.
929: .Ss \&%D
930: Publication date of an
931: .Sx \&Rs
1.138 kristaps 932: block.
1.181 schwarze 933: Recommended formats of arguments are
934: .Ar month day , year
935: or just
936: .Ar year .
1.63 kristaps 937: .Ss \&%I
938: Publisher or issuer name of an
939: .Sx \&Rs
940: block.
941: .Ss \&%J
942: Journal name of an
943: .Sx \&Rs
944: block.
945: .Ss \&%N
946: Issue number (usually for journals) of an
947: .Sx \&Rs
948: block.
949: .Ss \&%O
950: Optional information of an
951: .Sx \&Rs
952: block.
953: .Ss \&%P
954: Book or journal page number of an
955: .Sx \&Rs
956: block.
957: .Ss \&%Q
958: Institutional author (school, government, etc.) of an
959: .Sx \&Rs
1.138 kristaps 960: block.
961: Multiple institutional authors should each be accorded their own
1.64 kristaps 962: .Sx \&%Q
1.63 kristaps 963: line.
964: .Ss \&%R
965: Technical report name of an
966: .Sx \&Rs
967: block.
968: .Ss \&%T
969: Article title of an
970: .Sx \&Rs
1.138 kristaps 971: block.
972: This macro may also be used in a non-bibliographical context when
973: referring to article titles.
1.69 kristaps 974: .Ss \&%U
1.70 kristaps 975: URI of reference document.
1.63 kristaps 976: .Ss \&%V
977: Volume number of an
978: .Sx \&Rs
979: block.
980: .Ss \&Ac
1.141 kristaps 981: Close an
1.63 kristaps 982: .Sx \&Ao
1.138 kristaps 983: block.
984: Does not have any tail arguments.
1.63 kristaps 985: .Ss \&Ad
1.141 kristaps 986: Memory address.
987: Do not use this for postal addresses.
1.63 kristaps 988: .Pp
1.64 kristaps 989: Examples:
1.173 kristaps 990: .Dl \&.Ad [0,$]
991: .Dl \&.Ad 0x00000000
1.63 kristaps 992: .Ss \&An
1.100 kristaps 993: Author name.
1.141 kristaps 994: Requires either the name of an author or one of the following arguments:
1.140 kristaps 995: .Pp
996: .Bl -tag -width "-nosplitX" -offset indent -compact
1.64 kristaps 997: .It Fl split
1.141 kristaps 998: Start a new output line before each subsequent invocation of
999: .Sx \&An .
1.64 kristaps 1000: .It Fl nosplit
1001: The opposite of
1002: .Fl split .
1003: .El
1004: .Pp
1.141 kristaps 1005: The default is
1006: .Fl nosplit .
1007: The effect of selecting either of the
1008: .Fl split
1009: modes ends at the beginning of the
1010: .Em AUTHORS
1011: section.
1.140 kristaps 1012: In the
1013: .Em AUTHORS
1.141 kristaps 1014: section, the default is
1015: .Fl nosplit
1016: for the first author listing and
1.64 kristaps 1017: .Fl split
1.141 kristaps 1018: for all other author listings.
1.64 kristaps 1019: .Pp
1020: Examples:
1.173 kristaps 1021: .Dl \&.An -nosplit
1022: .Dl \&.An Kristaps Dzonsons \&Aq kristaps@bsd.lv
1.63 kristaps 1023: .Ss \&Ao
1.141 kristaps 1024: Begin a block enclosed by angle brackets.
1.100 kristaps 1025: Does not have any head arguments.
1.63 kristaps 1026: .Pp
1.64 kristaps 1027: Examples:
1.173 kristaps 1028: .Dl \&.Fl -key= \&Ns \&Ao \&Ar val \&Ac
1.63 kristaps 1029: .Pp
1.64 kristaps 1030: See also
1031: .Sx \&Aq .
1.63 kristaps 1032: .Ss \&Ap
1.138 kristaps 1033: Inserts an apostrophe without any surrounding whitespace.
1.124 kristaps 1034: This is generally used as a grammatical device when referring to the verb
1.140 kristaps 1035: form of a function.
1036: .Pp
1037: Examples:
1.173 kristaps 1038: .Dl \&.Fn execve \&Ap d
1.63 kristaps 1039: .Ss \&Aq
1.141 kristaps 1040: Encloses its arguments in angle brackets.
1.64 kristaps 1041: .Pp
1042: Examples:
1.173 kristaps 1043: .Dl \&.Fl -key= \&Ns \&Aq \&Ar val
1.64 kristaps 1044: .Pp
1045: .Em Remarks :
1046: this macro is often abused for rendering URIs, which should instead use
1047: .Sx \&Lk
1048: or
1049: .Sx \&Mt ,
1050: or to note pre-processor
1051: .Dq Li #include
1052: statements, which should use
1053: .Sx \&In .
1054: .Pp
1055: See also
1056: .Sx \&Ao .
1.63 kristaps 1057: .Ss \&Ar
1.100 kristaps 1058: Command arguments.
1059: If an argument is not provided, the string
1.141 kristaps 1060: .Dq file ...\&
1.66 kristaps 1061: is used as a default.
1.64 kristaps 1062: .Pp
1063: Examples:
1.173 kristaps 1064: .Dl \&.Fl o \&Ns \&Ar file1
1065: .Dl \&.Ar
1066: .Dl \&.Ar arg1 , arg2 .
1.63 kristaps 1067: .Ss \&At
1.100 kristaps 1068: Formats an AT&T version.
1.141 kristaps 1069: Accepts one optional argument:
1.140 kristaps 1070: .Pp
1071: .Bl -tag -width "v[1-7] | 32vX" -offset indent -compact
1.64 kristaps 1072: .It Cm v[1-7] | 32v
1073: A version of
1074: .At .
1.192 schwarze 1075: .It Cm III
1076: .At III .
1.64 kristaps 1077: .It Cm V[.[1-4]]?
1.141 kristaps 1078: A version of
1079: .At V .
1.64 kristaps 1080: .El
1081: .Pp
1.141 kristaps 1082: Note that these arguments do not begin with a hyphen.
1.64 kristaps 1083: .Pp
1084: Examples:
1.173 kristaps 1085: .Dl \&.At
1.192 schwarze 1086: .Dl \&.At III
1.173 kristaps 1087: .Dl \&.At V.1
1.65 kristaps 1088: .Pp
1089: See also
1.66 kristaps 1090: .Sx \&Bsx ,
1.65 kristaps 1091: .Sx \&Bx ,
1.66 kristaps 1092: .Sx \&Dx ,
1.65 kristaps 1093: .Sx \&Fx ,
1094: .Sx \&Nx ,
1095: .Sx \&Ox ,
1096: and
1097: .Sx \&Ux .
1.63 kristaps 1098: .Ss \&Bc
1.141 kristaps 1099: Close a
1.64 kristaps 1100: .Sx \&Bo
1.138 kristaps 1101: block.
1102: Does not have any tail arguments.
1.63 kristaps 1103: .Ss \&Bd
1.141 kristaps 1104: Begin a display block.
1.131 kristaps 1105: Its syntax is as follows:
1106: .Bd -ragged -offset indent
1107: .Pf \. Sx \&Bd
1.141 kristaps 1108: .Fl Ns Ar type
1.131 kristaps 1109: .Op Fl offset Ar width
1110: .Op Fl compact
1111: .Ed
1112: .Pp
1.141 kristaps 1113: Display blocks are used to select a different indentation and
1114: justification than the one used by the surrounding text.
1.185 kristaps 1115: They may contain both macro lines and text lines.
1.141 kristaps 1116: By default, a display block is preceded by a vertical space.
1.64 kristaps 1117: .Pp
1.141 kristaps 1118: The
1119: .Ar type
1120: must be one of the following:
1121: .Bl -tag -width 13n -offset indent
1122: .It Fl centered
1123: Centre-justify each line.
1124: Using this display type is not recommended; many
1125: .Nm
1126: implementations render it poorly.
1127: .It Fl filled
1128: Left- and right-justify the block.
1129: .It Fl literal
1130: Do not justify the block at all.
1.169 kristaps 1131: Preserve white space as it appears in the input.
1.64 kristaps 1132: .It Fl ragged
1133: Only left-justify the block.
1134: .It Fl unfilled
1.141 kristaps 1135: An alias for
1136: .Fl literal .
1.64 kristaps 1137: .El
1138: .Pp
1.141 kristaps 1139: The
1140: .Ar type
1141: must be provided first.
1142: Additional arguments may follow:
1143: .Bl -tag -width 13n -offset indent
1144: .It Fl offset Ar width
1145: Indent the display by the
1146: .Ar width ,
1147: which may be one of the following:
1.64 kristaps 1148: .Bl -item
1149: .It
1.141 kristaps 1150: One of the pre-defined strings
1151: .Cm indent ,
1.64 kristaps 1152: the width of standard indentation;
1.141 kristaps 1153: .Cm indent-two ,
1.64 kristaps 1154: twice
1.141 kristaps 1155: .Cm indent ;
1156: .Cm left ,
1.131 kristaps 1157: which has no effect;
1.141 kristaps 1158: .Cm right ,
1159: which justifies to the right margin; or
1160: .Cm center ,
1.64 kristaps 1161: which aligns around an imagined centre axis.
1162: .It
1.141 kristaps 1163: A macro invocation, which selects a predefined width
1164: associated with that macro.
1.100 kristaps 1165: The most popular is the imaginary macro
1.67 kristaps 1166: .Ar \&Ds ,
1.64 kristaps 1167: which resolves to
1.141 kristaps 1168: .Sy 6n .
1.64 kristaps 1169: .It
1.141 kristaps 1170: A width using the syntax described in
1.64 kristaps 1171: .Sx Scaling Widths .
1172: .It
1.141 kristaps 1173: An arbitrary string, which indents by the length of this string.
1.64 kristaps 1174: .El
1175: .Pp
1.141 kristaps 1176: When the argument is missing,
1177: .Fl offset
1178: is ignored.
1.64 kristaps 1179: .It Fl compact
1.141 kristaps 1180: Do not assert vertical space before the display.
1.64 kristaps 1181: .El
1182: .Pp
1183: Examples:
1184: .Bd -literal -offset indent
1.141 kristaps 1185: \&.Bd \-literal \-offset indent \-compact
1.65 kristaps 1186: Hello world.
1.64 kristaps 1187: \&.Ed
1188: .Ed
1.66 kristaps 1189: .Pp
1190: See also
1191: .Sx \&D1
1192: and
1193: .Sx \&Dl .
1.63 kristaps 1194: .Ss \&Bf
1.129 kristaps 1195: Change the font mode for a scoped block of text.
1196: Its syntax is as follows:
1197: .Bd -ragged -offset indent
1198: .Pf \. Sx \&Bf
1199: .Oo
1200: .Fl emphasis | literal | symbolic |
1201: .Cm \&Em | \&Li | \&Sy
1202: .Oc
1203: .Ed
1204: .Pp
1205: The
1206: .Fl emphasis
1207: and
1208: .Cm \&Em
1209: argument are equivalent, as are
1210: .Fl symbolic
1211: and
1.144 schwarze 1212: .Cm \&Sy ,
1.129 kristaps 1213: and
1214: .Fl literal
1215: and
1216: .Cm \&Li .
1217: Without an argument, this macro does nothing.
1218: The font mode continues until broken by a new font mode in a nested
1219: scope or
1220: .Sx \&Ef
1221: is encountered.
1222: .Pp
1223: See also
1224: .Sx \&Li ,
1225: .Sx \&Ef ,
1.141 kristaps 1226: .Sx \&Em ,
1.129 kristaps 1227: and
1228: .Sx \&Sy .
1.63 kristaps 1229: .Ss \&Bk
1.186 schwarze 1230: For each macro, keep its output together on the same output line,
1231: until the end of the macro or the end of the input line is reached,
1232: whichever comes first.
1.185 kristaps 1233: Line breaks in text lines are unaffected.
1.141 kristaps 1234: The syntax is as follows:
1.131 kristaps 1235: .Pp
1236: .D1 Pf \. Sx \&Bk Fl words
1237: .Pp
1.133 kristaps 1238: The
1239: .Fl words
1.141 kristaps 1240: argument is required; additional arguments are ignored.
1.127 schwarze 1241: .Pp
1.141 kristaps 1242: The following example will not break within each
1.133 kristaps 1243: .Sx \&Op
1244: macro line:
1.127 schwarze 1245: .Bd -literal -offset indent
1246: \&.Bk \-words
1.133 kristaps 1247: \&.Op Fl f Ar flags
1248: \&.Op Fl o Ar output
1.127 schwarze 1249: \&.Ek
1250: .Ed
1.129 kristaps 1251: .Pp
1.133 kristaps 1252: Be careful in using over-long lines within a keep block!
1253: Doing so will clobber the right margin.
1.63 kristaps 1254: .Ss \&Bl
1.141 kristaps 1255: Begin a list.
1.171 schwarze 1256: Lists consist of items specified using the
1.141 kristaps 1257: .Sx \&It
1258: macro, containing a head or a body or both.
1259: The list syntax is as follows:
1.131 kristaps 1260: .Bd -ragged -offset indent
1261: .Pf \. Sx \&Bl
1.141 kristaps 1262: .Fl Ns Ar type
1.131 kristaps 1263: .Op Fl width Ar val
1264: .Op Fl offset Ar val
1265: .Op Fl compact
1266: .Op HEAD ...
1267: .Ed
1268: .Pp
1.141 kristaps 1269: The list
1270: .Ar type
1271: is mandatory and must be specified first.
1272: The
1273: .Fl width
1274: and
1275: .Fl offset
1276: arguments accept
1.104 kristaps 1277: .Sx Scaling Widths
1.141 kristaps 1278: or use the length of the given string.
1279: The
1280: .Fl offset
1281: is a global indentation for the whole list, affecting both item heads
1282: and bodies.
1283: For those list types supporting it, the
1284: .Fl width
1285: argument requests an additional indentation of item bodies,
1286: to be added to the
1287: .Fl offset .
1288: Unless the
1289: .Fl compact
1290: argument is specified, list entries are separated by vertical space.
1291: .Pp
1.103 kristaps 1292: A list must specify one of the following list types:
1293: .Bl -tag -width 12n -offset indent
1294: .It Fl bullet
1.141 kristaps 1295: No item heads can be specified, but a bullet will be printed at the head
1296: of each item.
1297: Item bodies start on the same output line as the bullet
1298: and are indented according to the
1.104 kristaps 1299: .Fl width
1.141 kristaps 1300: argument.
1.103 kristaps 1301: .It Fl column
1302: A columnated list.
1.104 kristaps 1303: The
1304: .Fl width
1.141 kristaps 1305: argument has no effect; instead, each argument specifies the width
1306: of one column, using either the
1.103 kristaps 1307: .Sx Scaling Widths
1.141 kristaps 1308: syntax or the string length of the argument.
1309: If the first line of the body of a
1.114 kristaps 1310: .Fl column
1311: list is not an
1312: .Sx \&It
1.141 kristaps 1313: macro line,
1314: .Sx \&It
1315: contexts spanning one input line each are implied until an
1.114 kristaps 1316: .Sx \&It
1.141 kristaps 1317: macro line is encountered, at which point items start being interpreted as
1.114 kristaps 1318: described in the
1319: .Sx \&It
1320: documentation.
1.103 kristaps 1321: .It Fl dash
1.141 kristaps 1322: Like
1323: .Fl bullet ,
1324: except that dashes are used in place of bullets.
1.103 kristaps 1325: .It Fl diag
1326: Like
1327: .Fl inset ,
1.141 kristaps 1328: except that item heads are not parsed for macro invocations.
1329: .\" but with additional formatting to the head.
1.103 kristaps 1330: .It Fl enum
1.141 kristaps 1331: A numbered list.
1332: Formatted like
1333: .Fl bullet ,
1334: except that cardinal numbers are used in place of bullets,
1335: starting at 1.
1.103 kristaps 1336: .It Fl hang
1337: Like
1338: .Fl tag ,
1.141 kristaps 1339: except that the first lines of item bodies are not indented, but follow
1340: the item heads like in
1341: .Fl inset
1342: lists.
1.103 kristaps 1343: .It Fl hyphen
1344: Synonym for
1345: .Fl dash .
1346: .It Fl inset
1.141 kristaps 1347: Item bodies follow items heads on the same line, using normal inter-word
1348: spacing.
1349: Bodies are not indented, and the
1.104 kristaps 1350: .Fl width
1351: argument is ignored.
1.103 kristaps 1352: .It Fl item
1.141 kristaps 1353: No item heads can be specified, and none are printed.
1354: Bodies are not indented, and the
1.104 kristaps 1355: .Fl width
1356: argument is ignored.
1.103 kristaps 1357: .It Fl ohang
1.141 kristaps 1358: Item bodies start on the line following item heads and are not indented.
1.104 kristaps 1359: The
1360: .Fl width
1361: argument is ignored.
1.103 kristaps 1362: .It Fl tag
1.141 kristaps 1363: Item bodies are indented according to the
1.103 kristaps 1364: .Fl width
1365: argument.
1.141 kristaps 1366: When an item head fits inside the indentation, the item body follows
1367: this head on the same output line.
1368: Otherwise, the body starts on the output line following the head.
1.103 kristaps 1369: .El
1.114 kristaps 1370: .Pp
1371: See also
1.141 kristaps 1372: .Sx \&El
1373: and
1.114 kristaps 1374: .Sx \&It .
1.63 kristaps 1375: .Ss \&Bo
1.141 kristaps 1376: Begin a block enclosed by square brackets.
1.100 kristaps 1377: Does not have any head arguments.
1.65 kristaps 1378: .Pp
1379: Examples:
1.140 kristaps 1380: .Bd -literal -offset indent -compact
1.65 kristaps 1381: \&.Bo 1 ,
1.91 kristaps 1382: \&.Dv BUFSIZ \&Bc
1.65 kristaps 1383: .Ed
1384: .Pp
1385: See also
1386: .Sx \&Bq .
1.63 kristaps 1387: .Ss \&Bq
1.82 kristaps 1388: Encloses its arguments in square brackets.
1.65 kristaps 1389: .Pp
1390: Examples:
1.173 kristaps 1391: .Dl \&.Bq 1 , \&Dv BUFSIZ
1.65 kristaps 1392: .Pp
1393: .Em Remarks :
1394: this macro is sometimes abused to emulate optional arguments for
1395: commands; the correct macros to use for this purpose are
1396: .Sx \&Op ,
1397: .Sx \&Oo ,
1398: and
1399: .Sx \&Oc .
1400: .Pp
1401: See also
1402: .Sx \&Bo .
1.63 kristaps 1403: .Ss \&Brc
1.141 kristaps 1404: Close a
1.65 kristaps 1405: .Sx \&Bro
1.138 kristaps 1406: block.
1407: Does not have any tail arguments.
1.63 kristaps 1408: .Ss \&Bro
1.141 kristaps 1409: Begin a block enclosed by curly braces.
1.100 kristaps 1410: Does not have any head arguments.
1.65 kristaps 1411: .Pp
1412: Examples:
1.140 kristaps 1413: .Bd -literal -offset indent -compact
1.65 kristaps 1414: \&.Bro 1 , ... ,
1.91 kristaps 1415: \&.Va n \&Brc
1.65 kristaps 1416: .Ed
1417: .Pp
1418: See also
1419: .Sx \&Brq .
1.63 kristaps 1420: .Ss \&Brq
1.65 kristaps 1421: Encloses its arguments in curly braces.
1422: .Pp
1423: Examples:
1.173 kristaps 1424: .Dl \&.Brq 1 , ... , \&Va n
1.65 kristaps 1425: .Pp
1426: See also
1427: .Sx \&Bro .
1.63 kristaps 1428: .Ss \&Bsx
1.65 kristaps 1429: Format the BSD/OS version provided as an argument, or a default value if
1430: no argument is provided.
1431: .Pp
1432: Examples:
1.173 kristaps 1433: .Dl \&.Bsx 1.0
1434: .Dl \&.Bsx
1.65 kristaps 1435: .Pp
1436: See also
1437: .Sx \&At ,
1438: .Sx \&Bx ,
1.66 kristaps 1439: .Sx \&Dx ,
1.65 kristaps 1440: .Sx \&Fx ,
1441: .Sx \&Nx ,
1442: .Sx \&Ox ,
1443: and
1444: .Sx \&Ux .
1.63 kristaps 1445: .Ss \&Bt
1.66 kristaps 1446: Prints
1.144 schwarze 1447: .Dq is currently in beta test .
1.63 kristaps 1448: .Ss \&Bx
1.65 kristaps 1449: Format the BSD version provided as an argument, or a default value if no
1450: argument is provided.
1451: .Pp
1452: Examples:
1.173 kristaps 1453: .Dl \&.Bx 4.4
1454: .Dl \&.Bx
1.65 kristaps 1455: .Pp
1456: See also
1457: .Sx \&At ,
1458: .Sx \&Bsx ,
1.66 kristaps 1459: .Sx \&Dx ,
1.65 kristaps 1460: .Sx \&Fx ,
1461: .Sx \&Nx ,
1462: .Sx \&Ox ,
1463: and
1464: .Sx \&Ux .
1.63 kristaps 1465: .Ss \&Cd
1.141 kristaps 1466: Kernel configuration declaration.
1.100 kristaps 1467: This denotes strings accepted by
1.66 kristaps 1468: .Xr config 8 .
1469: .Pp
1470: Examples:
1.173 kristaps 1471: .Dl \&.Cd device le0 at scode?
1.66 kristaps 1472: .Pp
1473: .Em Remarks :
1474: this macro is commonly abused by using quoted literals to retain
1.138 kristaps 1475: whitespace and align consecutive
1.66 kristaps 1476: .Sx \&Cd
1.100 kristaps 1477: declarations.
1478: This practise is discouraged.
1.63 kristaps 1479: .Ss \&Cm
1.100 kristaps 1480: Command modifiers.
1481: Useful when specifying configuration options or keys.
1.66 kristaps 1482: .Pp
1483: Examples:
1.173 kristaps 1484: .Dl \&.Cm ControlPath
1485: .Dl \&.Cm ControlMaster
1.66 kristaps 1486: .Pp
1487: See also
1488: .Sx \&Fl .
1.63 kristaps 1489: .Ss \&D1
1.100 kristaps 1490: One-line indented display.
1491: This is formatted by the default rules and is useful for simple indented
1492: statements.
1493: It is followed by a newline.
1.66 kristaps 1494: .Pp
1495: Examples:
1.173 kristaps 1496: .Dl \&.D1 \&Fl abcdefgh
1.66 kristaps 1497: .Pp
1498: See also
1499: .Sx \&Bd
1500: and
1501: .Sx \&Dl .
1.63 kristaps 1502: .Ss \&Db
1.141 kristaps 1503: Switch debugging mode.
1.120 kristaps 1504: Its syntax is as follows:
1.117 kristaps 1505: .Pp
1.120 kristaps 1506: .D1 Pf \. Sx \&Db Cm on | off
1.141 kristaps 1507: .Pp
1508: This macro is ignored by
1509: .Xr mandoc 1 .
1.63 kristaps 1510: .Ss \&Dc
1.141 kristaps 1511: Close a
1.66 kristaps 1512: .Sx \&Do
1.138 kristaps 1513: block.
1514: Does not have any tail arguments.
1.63 kristaps 1515: .Ss \&Dd
1.100 kristaps 1516: Document date.
1517: This is the mandatory first macro of any
1.66 kristaps 1518: .Nm
1.100 kristaps 1519: manual.
1.120 kristaps 1520: Its syntax is as follows:
1.66 kristaps 1521: .Pp
1.181 schwarze 1522: .D1 Pf \. Sx \&Dd Ar month day , year
1.66 kristaps 1523: .Pp
1.82 kristaps 1524: The
1.181 schwarze 1525: .Ar month
1526: is the full English month name, the
1527: .Ar day
1528: is an optionally zero-padded numeral, and the
1529: .Ar year
1530: is the full four-digit year.
1531: .Pp
1532: Other arguments are not portable; the
1533: .Xr mandoc 1
1534: utility handles them as follows:
1535: .Bl -dash -offset 3n -compact
1536: .It
1537: To have the date automatically filled in by the
1538: .Ox
1539: version of
1.72 kristaps 1540: .Xr cvs 1 ,
1.181 schwarze 1541: the special string
1542: .Dq $\&Mdocdate$
1543: can be given as an argument.
1544: .It
1545: A few alternative date formats are accepted as well
1546: and converted to the standard form.
1547: .It
1548: If a date string cannot be parsed, it is used verbatim.
1549: .It
1550: If no date string is given, the current date is used.
1551: .El
1.66 kristaps 1552: .Pp
1553: Examples:
1.173 kristaps 1554: .Dl \&.Dd $\&Mdocdate$
1555: .Dl \&.Dd $\&Mdocdate: July 21 2007$
1556: .Dl \&.Dd July 21, 2007
1.66 kristaps 1557: .Pp
1558: See also
1559: .Sx \&Dt
1560: and
1561: .Sx \&Os .
1.63 kristaps 1562: .Ss \&Dl
1.100 kristaps 1563: One-line intended display.
1564: This is formatted as literal text and is useful for commands and
1565: invocations.
1566: It is followed by a newline.
1.66 kristaps 1567: .Pp
1568: Examples:
1.173 kristaps 1569: .Dl \&.Dl % mandoc mdoc.7 \e(ba less
1.66 kristaps 1570: .Pp
1571: See also
1572: .Sx \&Bd
1573: and
1574: .Sx \&D1 .
1.63 kristaps 1575: .Ss \&Do
1.141 kristaps 1576: Begin a block enclosed by double quotes.
1.138 kristaps 1577: Does not have any head arguments.
1.66 kristaps 1578: .Pp
1579: Examples:
1.140 kristaps 1580: .Bd -literal -offset indent -compact
1581: \&.Do
1582: April is the cruellest month
1583: \&.Dc
1584: \e(em T.S. Eliot
1585: .Ed
1.66 kristaps 1586: .Pp
1587: See also
1588: .Sx \&Dq .
1.63 kristaps 1589: .Ss \&Dq
1.138 kristaps 1590: Encloses its arguments in
1591: .Dq typographic
1592: double-quotes.
1.66 kristaps 1593: .Pp
1594: Examples:
1.91 kristaps 1595: .Bd -literal -offset indent -compact
1.66 kristaps 1596: \&.Dq April is the cruellest month
1597: \e(em T.S. Eliot
1598: .Ed
1599: .Pp
1600: See also
1.139 kristaps 1601: .Sx \&Qq ,
1602: .Sx \&Sq ,
1.138 kristaps 1603: and
1.66 kristaps 1604: .Sx \&Do .
1.139 kristaps 1605: .Ss \&Dt
1.100 kristaps 1606: Document title.
1607: This is the mandatory second macro of any
1.66 kristaps 1608: .Nm
1.100 kristaps 1609: file.
1.120 kristaps 1610: Its syntax is as follows:
1611: .Bd -ragged -offset indent
1612: .Pf \. Sx \&Dt
1613: .Oo
1.141 kristaps 1614: .Ar title
1.120 kristaps 1615: .Oo
1.141 kristaps 1616: .Ar section
1617: .Op Ar volume | arch
1.120 kristaps 1618: .Oc
1619: .Oc
1620: .Ed
1.66 kristaps 1621: .Pp
1622: Its arguments are as follows:
1623: .Bl -tag -width Ds -offset Ds
1.141 kristaps 1624: .It Ar title
1.111 kristaps 1625: The document's title (name), defaulting to
1.138 kristaps 1626: .Dq UNKNOWN
1.111 kristaps 1627: if unspecified.
1628: It should be capitalised.
1.141 kristaps 1629: .It Ar section
1.100 kristaps 1630: The manual section.
1631: This may be one of
1.66 kristaps 1632: .Ar 1
1633: .Pq utilities ,
1634: .Ar 2
1635: .Pq system calls ,
1636: .Ar 3
1637: .Pq libraries ,
1638: .Ar 3p
1639: .Pq Perl libraries ,
1640: .Ar 4
1641: .Pq devices ,
1642: .Ar 5
1643: .Pq file formats ,
1644: .Ar 6
1645: .Pq games ,
1646: .Ar 7
1647: .Pq miscellaneous ,
1648: .Ar 8
1649: .Pq system utilities ,
1650: .Ar 9
1651: .Pq kernel functions ,
1652: .Ar X11
1653: .Pq X Window System ,
1654: .Ar X11R6
1655: .Pq X Window System ,
1656: .Ar unass
1657: .Pq unassociated ,
1658: .Ar local
1659: .Pq local system ,
1660: .Ar draft
1661: .Pq draft manual ,
1662: or
1663: .Ar paper
1664: .Pq paper .
1.111 kristaps 1665: It should correspond to the manual's filename suffix and defaults to
1.138 kristaps 1666: .Dq 1
1.111 kristaps 1667: if unspecified.
1.141 kristaps 1668: .It Ar volume
1.66 kristaps 1669: This overrides the volume inferred from
1670: .Ar section .
1671: This field is optional, and if specified, must be one of
1672: .Ar USD
1673: .Pq users' supplementary documents ,
1674: .Ar PS1
1675: .Pq programmers' supplementary documents ,
1676: .Ar AMD
1677: .Pq administrators' supplementary documents ,
1678: .Ar SMM
1679: .Pq system managers' manuals ,
1680: .Ar URM
1681: .Pq users' reference manuals ,
1682: .Ar PRM
1683: .Pq programmers' reference manuals ,
1684: .Ar KM
1685: .Pq kernel manuals ,
1686: .Ar IND
1687: .Pq master index ,
1688: .Ar MMI
1689: .Pq master index ,
1690: .Ar LOCAL
1691: .Pq local manuals ,
1692: .Ar LOC
1693: .Pq local manuals ,
1694: or
1695: .Ar CON
1696: .Pq contributed manuals .
1.141 kristaps 1697: .It Ar arch
1.100 kristaps 1698: This specifies a specific relevant architecture.
1699: If
1.141 kristaps 1700: .Ar volume
1.66 kristaps 1701: is not provided, it may be used in its place, else it may be used
1.100 kristaps 1702: subsequent that.
1703: It, too, is optional.
1704: It must be one of
1.66 kristaps 1705: .Ar alpha ,
1706: .Ar amd64 ,
1707: .Ar amiga ,
1708: .Ar arc ,
1709: .Ar arm ,
1710: .Ar armish ,
1711: .Ar aviion ,
1712: .Ar hp300 ,
1713: .Ar hppa ,
1714: .Ar hppa64 ,
1715: .Ar i386 ,
1716: .Ar landisk ,
1.86 kristaps 1717: .Ar loongson ,
1.66 kristaps 1718: .Ar luna88k ,
1719: .Ar mac68k ,
1720: .Ar macppc ,
1.160 kristaps 1721: .Ar mips64 ,
1.66 kristaps 1722: .Ar mvme68k ,
1723: .Ar mvme88k ,
1724: .Ar mvmeppc ,
1725: .Ar pmax ,
1726: .Ar sgi ,
1727: .Ar socppc ,
1728: .Ar sparc ,
1729: .Ar sparc64 ,
1730: .Ar sun3 ,
1731: .Ar vax ,
1732: or
1733: .Ar zaurus .
1734: .El
1735: .Pp
1736: Examples:
1.173 kristaps 1737: .Dl \&.Dt FOO 1
1738: .Dl \&.Dt FOO 4 KM
1739: .Dl \&.Dt FOO 9 i386
1.66 kristaps 1740: .Pp
1741: See also
1742: .Sx \&Dd
1743: and
1744: .Sx \&Os .
1.63 kristaps 1745: .Ss \&Dv
1.189 kristaps 1746: Defined variables such as preprocessor constants, constant symbols,
1747: enumeration values, and so on.
1.66 kristaps 1748: .Pp
1749: Examples:
1.189 kristaps 1750: .Dl \&.Dv NULL
1.173 kristaps 1751: .Dl \&.Dv BUFSIZ
1752: .Dl \&.Dv STDOUT_FILENO
1.66 kristaps 1753: .Pp
1754: See also
1.189 kristaps 1755: .Sx \&Er
1756: and
1757: .Sx \&Ev
1758: for special-purpose constants and
1759: .Sx \&Va
1760: for variable symbols.
1.63 kristaps 1761: .Ss \&Dx
1.71 kristaps 1762: Format the DragonFly BSD version provided as an argument, or a default
1.66 kristaps 1763: value if no argument is provided.
1764: .Pp
1765: Examples:
1.173 kristaps 1766: .Dl \&.Dx 2.4.1
1767: .Dl \&.Dx
1.66 kristaps 1768: .Pp
1769: See also
1770: .Sx \&At ,
1771: .Sx \&Bsx ,
1772: .Sx \&Bx ,
1773: .Sx \&Fx ,
1774: .Sx \&Nx ,
1775: .Sx \&Ox ,
1776: and
1777: .Sx \&Ux .
1.63 kristaps 1778: .Ss \&Ec
1.131 kristaps 1779: Close a scope started by
1780: .Sx \&Eo .
1781: Its syntax is as follows:
1782: .Pp
1.141 kristaps 1783: .D1 Pf \. Sx \&Ec Op Ar TERM
1.131 kristaps 1784: .Pp
1785: The
1.141 kristaps 1786: .Ar TERM
1.131 kristaps 1787: argument is used as the enclosure tail, for example, specifying \e(rq
1788: will emulate
1789: .Sx \&Dc .
1.63 kristaps 1790: .Ss \&Ed
1.131 kristaps 1791: End a display context started by
1792: .Sx \&Bd .
1.63 kristaps 1793: .Ss \&Ef
1.141 kristaps 1794: End a font mode context started by
1.129 kristaps 1795: .Sx \&Bf .
1.63 kristaps 1796: .Ss \&Ek
1.141 kristaps 1797: End a keep context started by
1.127 schwarze 1798: .Sx \&Bk .
1.63 kristaps 1799: .Ss \&El
1.141 kristaps 1800: End a list context started by
1.117 kristaps 1801: .Sx \&Bl .
1802: .Pp
1803: See also
1804: .Sx \&Bl
1805: and
1806: .Sx \&It .
1.63 kristaps 1807: .Ss \&Em
1.100 kristaps 1808: Denotes text that should be emphasised.
1809: Note that this is a presentation term and should not be used for
1810: stylistically decorating technical terms.
1.66 kristaps 1811: .Pp
1812: Examples:
1.173 kristaps 1813: .Dl \&.Em Warnings!
1814: .Dl \&.Em Remarks :
1.138 kristaps 1815: .Pp
1816: See also
1817: .Sx \&Bf ,
1818: .Sx \&Sy ,
1819: and
1820: .Sx \&Li .
1.63 kristaps 1821: .Ss \&En
1.141 kristaps 1822: This macro is obsolete and not implemented in
1823: .Xr mandoc 1 .
1.63 kristaps 1824: .Ss \&Eo
1.131 kristaps 1825: An arbitrary enclosure.
1826: Its syntax is as follows:
1827: .Pp
1.141 kristaps 1828: .D1 Pf \. Sx \&Eo Op Ar TERM
1.131 kristaps 1829: .Pp
1830: The
1.141 kristaps 1831: .Ar TERM
1.131 kristaps 1832: argument is used as the enclosure head, for example, specifying \e(lq
1833: will emulate
1834: .Sx \&Do .
1.63 kristaps 1835: .Ss \&Er
1.189 kristaps 1836: Error constants for definitions of the
1837: .Va errno
1838: libc global variable.
1.66 kristaps 1839: .Pp
1840: Examples:
1.173 kristaps 1841: .Dl \&.Er EPERM
1842: .Dl \&.Er ENOENT
1.66 kristaps 1843: .Pp
1844: See also
1.189 kristaps 1845: .Sx \&Dv
1846: for general constants.
1.63 kristaps 1847: .Ss \&Es
1.132 kristaps 1848: This macro is obsolete and not implemented.
1.63 kristaps 1849: .Ss \&Ev
1.66 kristaps 1850: Environmental variables such as those specified in
1851: .Xr environ 7 .
1852: .Pp
1853: Examples:
1.173 kristaps 1854: .Dl \&.Ev DISPLAY
1855: .Dl \&.Ev PATH
1.189 kristaps 1856: .Pp
1857: See also
1858: .Sx \&Dv
1859: for general constants.
1.63 kristaps 1860: .Ss \&Ex
1.191 kristaps 1861: Insert a standard sentence regarding command exit values of 0 on success
1862: and >0 on failure.
1.141 kristaps 1863: Its syntax is as follows:
1864: .Pp
1.193 schwarze 1865: .D1 Pf \. Sx \&Ex Fl std Op Ar utility ...
1.141 kristaps 1866: .Pp
1.191 kristaps 1867: If
1.66 kristaps 1868: .Ar utility
1.141 kristaps 1869: is not specified, the document's name set by
1.66 kristaps 1870: .Sx \&Nm
1.141 kristaps 1871: is used.
1.191 kristaps 1872: Multiple
1873: .Ar utility
1874: arguments are treated as separate utilities.
1.139 kristaps 1875: .Pp
1876: See also
1877: .Sx \&Rv .
1.63 kristaps 1878: .Ss \&Fa
1.117 kristaps 1879: Function argument.
1.120 kristaps 1880: Its syntax is as follows:
1881: .Bd -ragged -offset indent
1882: .Pf \. Sx \&Fa
1883: .Op Cm argtype
1884: .Cm argname
1885: .Ed
1886: .Pp
1.117 kristaps 1887: This may be invoked for names with or without the corresponding type.
1888: It is also used to specify the field name of a structure.
1889: Most often, the
1890: .Sx \&Fa
1891: macro is used in the
1892: .Em SYNOPSIS
1.120 kristaps 1893: within
1894: .Sx \&Fo
1.117 kristaps 1895: section when documenting multi-line function prototypes.
1896: If invoked with multiple arguments, the arguments are separated by a
1897: comma.
1898: Furthermore, if the following macro is another
1899: .Sx \&Fa ,
1900: the last argument will also have a trailing comma.
1901: .Pp
1902: Examples:
1.173 kristaps 1903: .Dl \&.Fa \(dqconst char *p\(dq
1904: .Dl \&.Fa \(dqint a\(dq \(dqint b\(dq \(dqint c\(dq
1905: .Dl \&.Fa foo
1.120 kristaps 1906: .Pp
1907: See also
1908: .Sx \&Fo .
1.63 kristaps 1909: .Ss \&Fc
1.141 kristaps 1910: End a function context started by
1.131 kristaps 1911: .Sx \&Fo .
1.63 kristaps 1912: .Ss \&Fd
1.117 kristaps 1913: Historically used to document include files.
1914: This usage has been deprecated in favour of
1915: .Sx \&In .
1916: Do not use this macro.
1917: .Pp
1918: See also
1.122 kristaps 1919: .Sx MANUAL STRUCTURE
1920: and
1.117 kristaps 1921: .Sx \&In .
1.63 kristaps 1922: .Ss \&Fl
1.100 kristaps 1923: Command-line flag.
1924: Used when listing arguments to command-line utilities.
1925: Prints a fixed-width hyphen
1.79 kristaps 1926: .Sq \-
1.100 kristaps 1927: directly followed by each argument.
1928: If no arguments are provided, a hyphen is printed followed by a space.
1929: If the argument is a macro, a hyphen is prefixed to the subsequent macro
1930: output.
1.79 kristaps 1931: .Pp
1932: Examples:
1.173 kristaps 1933: .Dl \&.Fl a b c
1934: .Dl \&.Fl \&Pf a b
1935: .Dl \&.Fl
1936: .Dl \&.Op \&Fl o \&Ns \&Ar file
1.79 kristaps 1937: .Pp
1938: See also
1939: .Sx \&Cm .
1.63 kristaps 1940: .Ss \&Fn
1.119 kristaps 1941: A function name.
1.120 kristaps 1942: Its syntax is as follows:
1.119 kristaps 1943: .Bd -ragged -offset indent
1944: .Pf \. Ns Sx \&Fn
1.185 kristaps 1945: .Op Ar functype
1946: .Ar funcname
1947: .Op Oo Ar argtype Oc Ar argname
1.119 kristaps 1948: .Ed
1.120 kristaps 1949: .Pp
1.122 kristaps 1950: Function arguments are surrounded in parenthesis and
1.119 kristaps 1951: are delimited by commas.
1952: If no arguments are specified, blank parenthesis are output.
1953: .Pp
1954: Examples:
1.183 kristaps 1955: .Dl \&.Fn \*qint funcname\*q \*qint arg0\*q \*qint arg1\*q
1956: .Dl \&.Fn funcname \*qint arg0\*q
1.173 kristaps 1957: .Dl \&.Fn funcname arg0
1.120 kristaps 1958: .Bd -literal -offset indent -compact
1959: \&.Ft functype
1960: \&.Fn funcname
1961: .Ed
1.119 kristaps 1962: .Pp
1.163 schwarze 1963: When referring to a function documented in another manual page, use
1.162 schwarze 1964: .Sx \&Xr
1.163 schwarze 1965: instead.
1.119 kristaps 1966: See also
1.122 kristaps 1967: .Sx MANUAL STRUCTURE
1.119 kristaps 1968: and
1969: .Sx \&Ft .
1.63 kristaps 1970: .Ss \&Fo
1.120 kristaps 1971: Begin a function block.
1972: This is a multi-line version of
1973: .Sx \&Fn .
1974: Its syntax is as follows:
1975: .Pp
1.185 kristaps 1976: .D1 Pf \. Sx \&Fo Ar funcname
1.120 kristaps 1977: .Pp
1978: Invocations usually occur in the following context:
1979: .Bd -ragged -offset indent
1.185 kristaps 1980: .Pf \. Sx \&Ft Ar functype
1.120 kristaps 1981: .br
1.185 kristaps 1982: .Pf \. Sx \&Fo Ar funcname
1.120 kristaps 1983: .br
1.185 kristaps 1984: .Pf \. Sx \&Fa Oo Ar argtype Oc Ar argname
1.120 kristaps 1985: .br
1.183 kristaps 1986: \&.\.\.
1.120 kristaps 1987: .br
1988: .Pf \. Sx \&Fc
1989: .Ed
1990: .Pp
1991: A
1992: .Sx \&Fo
1993: scope is closed by
1994: .Pp
1995: See also
1.122 kristaps 1996: .Sx MANUAL STRUCTURE ,
1.120 kristaps 1997: .Sx \&Fa ,
1998: .Sx \&Fc ,
1999: and
1.139 kristaps 2000: .Sx \&Ft .
1.190 schwarze 2001: .Ss \&Fr
2002: This macro is obsolete and not implemented.
1.63 kristaps 2003: .Ss \&Ft
1.120 kristaps 2004: A function type.
2005: Its syntax is as follows:
2006: .Pp
1.185 kristaps 2007: .D1 Pf \. Sx \&Ft Ar functype
1.120 kristaps 2008: .Pp
2009: Examples:
1.173 kristaps 2010: .Dl \&.Ft int
1.120 kristaps 2011: .Bd -literal -offset indent -compact
2012: \&.Ft functype
2013: \&.Fn funcname
2014: .Ed
2015: .Pp
2016: See also
1.122 kristaps 2017: .Sx MANUAL STRUCTURE ,
2018: .Sx \&Fn ,
1.120 kristaps 2019: and
1.122 kristaps 2020: .Sx \&Fo .
1.63 kristaps 2021: .Ss \&Fx
1.144 schwarze 2022: Format the
2023: .Fx
2024: version provided as an argument, or a default value
1.65 kristaps 2025: if no argument is provided.
2026: .Pp
2027: Examples:
1.173 kristaps 2028: .Dl \&.Fx 7.1
2029: .Dl \&.Fx
1.65 kristaps 2030: .Pp
2031: See also
2032: .Sx \&At ,
1.66 kristaps 2033: .Sx \&Bsx ,
1.65 kristaps 2034: .Sx \&Bx ,
1.66 kristaps 2035: .Sx \&Dx ,
1.65 kristaps 2036: .Sx \&Nx ,
2037: .Sx \&Ox ,
2038: and
2039: .Sx \&Ux .
1.63 kristaps 2040: .Ss \&Hf
1.132 kristaps 2041: This macro is obsolete and not implemented.
1.63 kristaps 2042: .Ss \&Ic
1.132 kristaps 2043: Designate an internal or interactive command.
2044: This is similar to
2045: .Sx \&Cm
2046: but used for instructions rather than values.
2047: .Pp
2048: Examples:
1.173 kristaps 2049: .Dl \&.Ic hash
2050: .Dl \&.Ic alias
1.132 kristaps 2051: .Pp
2052: Note that using
1.144 schwarze 2053: .Sx \&Bd Fl literal
1.132 kristaps 2054: or
2055: .Sx \&D1
2056: is preferred for displaying code; the
2057: .Sx \&Ic
2058: macro is used when referring to specific instructions.
1.63 kristaps 2059: .Ss \&In
1.118 kristaps 2060: An
1.138 kristaps 2061: .Dq include
1.118 kristaps 2062: file.
2063: In the
2064: .Em SYNOPSIS
2065: section (only if invoked as the line macro), the first argument is
2066: preceded by
1.138 kristaps 2067: .Dq #include ,
1.141 kristaps 2068: the arguments is enclosed in angle brackets.
1.118 kristaps 2069: .Pp
1.122 kristaps 2070: Examples:
1.173 kristaps 2071: .Dl \&.In sys/types
1.122 kristaps 2072: .Pp
2073: See also
2074: .Sx MANUAL STRUCTURE .
1.63 kristaps 2075: .Ss \&It
1.120 kristaps 2076: A list item.
2077: The syntax of this macro depends on the list type.
1.114 kristaps 2078: .Pp
2079: Lists
2080: of type
2081: .Fl hang ,
2082: .Fl ohang ,
2083: .Fl inset ,
2084: and
2085: .Fl diag
1.120 kristaps 2086: have the following syntax:
1.114 kristaps 2087: .Pp
1.185 kristaps 2088: .D1 Pf \. Sx \&It Ar args
1.114 kristaps 2089: .Pp
2090: Lists of type
2091: .Fl bullet ,
2092: .Fl dash ,
2093: .Fl enum ,
2094: .Fl hyphen
2095: and
2096: .Fl item
1.120 kristaps 2097: have the following syntax:
1.114 kristaps 2098: .Pp
1.120 kristaps 2099: .D1 Pf \. Sx \&It
1.114 kristaps 2100: .Pp
2101: with subsequent lines interpreted within the scope of the
2102: .Sx \&It
2103: until either a closing
2104: .Sx \&El
2105: or another
2106: .Sx \&It .
2107: .Pp
2108: The
2109: .Fl tag
1.120 kristaps 2110: list has the following syntax:
1.114 kristaps 2111: .Pp
1.120 kristaps 2112: .D1 Pf \. Sx \&It Op Cm args
1.114 kristaps 2113: .Pp
1.120 kristaps 2114: Subsequent lines are interpreted as with
1.114 kristaps 2115: .Fl bullet
2116: and family.
2117: The line arguments correspond to the list's left-hand side; body
2118: arguments correspond to the list's contents.
2119: .Pp
2120: The
2121: .Fl column
2122: list is the most complicated.
1.120 kristaps 2123: Its syntax is as follows:
1.114 kristaps 2124: .Pp
1.190 schwarze 2125: .D1 Pf \. Sx \&It Ar cell Op <TAB> Ar cell ...
2126: .D1 Pf \. Sx \&It Ar cell Op Sx \&Ta Ar cell ...
1.114 kristaps 2127: .Pp
1.190 schwarze 2128: The arguments consist of one or more lines of text and macros
2129: representing a complete table line.
2130: Cells within the line are delimited by tabs or by the special
2131: .Sx \&Ta
2132: block macro.
2133: The tab cell delimiter may only be used within the
1.114 kristaps 2134: .Sx \&It
1.190 schwarze 2135: line itself; on following lines, only the
2136: .Sx \&Ta
2137: macro can be used to delimit cells, and
2138: .Sx \&Ta
2139: is only recognized as a macro when called by other macros,
2140: not as the first macro on a line.
2141: .Pp
2142: Note that quoted strings may span tab-delimited cells on an
1.114 kristaps 2143: .Sx \&It
1.190 schwarze 2144: line.
2145: For example,
1.114 kristaps 2146: .Pp
1.173 kristaps 2147: .Dl .It \(dqcol1 ; <TAB> col2 ;\(dq \&;
1.114 kristaps 2148: .Pp
2149: will preserve the semicolon whitespace except for the last.
2150: .Pp
2151: See also
2152: .Sx \&Bl .
1.63 kristaps 2153: .Ss \&Lb
1.109 kristaps 2154: Specify a library.
1.120 kristaps 2155: The syntax is as follows:
1.109 kristaps 2156: .Pp
1.185 kristaps 2157: .D1 Pf \. Sx \&Lb Ar library
1.109 kristaps 2158: .Pp
2159: The
1.185 kristaps 2160: .Ar library
1.109 kristaps 2161: parameter may be a system library, such as
1.193 schwarze 2162: .Cm libz
1.109 kristaps 2163: or
1.193 schwarze 2164: .Cm libpam ,
1.109 kristaps 2165: in which case a small library description is printed next to the linker
2166: invocation; or a custom library, in which case the library name is
2167: printed in quotes.
2168: This is most commonly used in the
2169: .Em SYNOPSIS
2170: section as described in
2171: .Sx MANUAL STRUCTURE .
2172: .Pp
2173: Examples:
1.173 kristaps 2174: .Dl \&.Lb libz
2175: .Dl \&.Lb mdoc
1.63 kristaps 2176: .Ss \&Li
1.131 kristaps 2177: Denotes text that should be in a literal font mode.
2178: Note that this is a presentation term and should not be used for
2179: stylistically decorating technical terms.
1.138 kristaps 2180: .Pp
2181: See also
2182: .Sx \&Bf ,
2183: .Sx \&Sy ,
2184: and
2185: .Sx \&Em .
1.63 kristaps 2186: .Ss \&Lk
1.100 kristaps 2187: Format a hyperlink.
1.120 kristaps 2188: Its syntax is as follows:
1.70 kristaps 2189: .Pp
1.185 kristaps 2190: .D1 Pf \. Sx \&Lk Ar uri Op Ar name
1.70 kristaps 2191: .Pp
2192: Examples:
1.173 kristaps 2193: .Dl \&.Lk http://bsd.lv \*qThe BSD.lv Project\*q
2194: .Dl \&.Lk http://bsd.lv
1.70 kristaps 2195: .Pp
2196: See also
2197: .Sx \&Mt .
1.63 kristaps 2198: .Ss \&Lp
1.132 kristaps 2199: Synonym for
2200: .Sx \&Pp .
1.63 kristaps 2201: .Ss \&Ms
1.138 kristaps 2202: Display a mathematical symbol.
1.140 kristaps 2203: Its syntax is as follows:
2204: .Pp
1.185 kristaps 2205: .D1 Pf \. Sx \&Ms Ar symbol
1.138 kristaps 2206: .Pp
2207: Examples:
1.173 kristaps 2208: .Dl \&.Ms sigma
2209: .Dl \&.Ms aleph
1.63 kristaps 2210: .Ss \&Mt
1.116 kristaps 2211: Format a
1.138 kristaps 2212: .Dq mailto:
1.116 kristaps 2213: hyperlink.
1.120 kristaps 2214: Its syntax is as follows:
1.116 kristaps 2215: .Pp
1.185 kristaps 2216: .D1 Pf \. Sx \&Mt Ar address
1.116 kristaps 2217: .Pp
2218: Examples:
1.173 kristaps 2219: .Dl \&.Mt discuss@manpages.bsd.lv
1.63 kristaps 2220: .Ss \&Nd
1.144 schwarze 2221: A one line description of the manual's content.
1.132 kristaps 2222: This may only be invoked in the
2223: .Em SYNOPSIS
2224: section subsequent the
2225: .Sx \&Nm
2226: macro.
2227: .Pp
2228: Examples:
1.173 kristaps 2229: .Dl \&.Sx \&Nd mdoc language reference
2230: .Dl \&.Sx \&Nd format and display UNIX manuals
1.132 kristaps 2231: .Pp
2232: The
2233: .Sx \&Nd
2234: macro technically accepts child macros and terminates with a subsequent
2235: .Sx \&Sh
2236: invocation.
2237: Do not assume this behaviour: some
2238: .Xr whatis 1
2239: database generators are not smart enough to parse more than the line
2240: arguments and will display macros verbatim.
2241: .Pp
2242: See also
2243: .Sx \&Nm .
1.63 kristaps 2244: .Ss \&Nm
1.128 schwarze 2245: The name of the manual page, or \(em in particular in section 1, 6,
2246: and 8 pages \(em of an additional command or feature documented in
2247: the manual page.
2248: When first invoked, the
2249: .Sx \&Nm
2250: macro expects a single argument, the name of the manual page.
2251: Usually, the first invocation happens in the
2252: .Em NAME
2253: section of the page.
2254: The specified name will be remembered and used whenever the macro is
2255: called again without arguments later in the page.
2256: The
2257: .Sx \&Nm
2258: macro uses
2259: .Sx Block full-implicit
2260: semantics when invoked as the first macro on an input line in the
2261: .Em SYNOPSIS
2262: section; otherwise, it uses ordinary
2263: .Sx In-line
2264: semantics.
2265: .Pp
2266: Examples:
2267: .Bd -literal -offset indent
2268: \&.Sh SYNOPSIS
2269: \&.Nm cat
2270: \&.Op Fl benstuv
2271: \&.Op Ar
2272: .Ed
2273: .Pp
2274: In the
2275: .Em SYNOPSIS
2276: of section 2, 3 and 9 manual pages, use the
2277: .Sx \&Fn
2278: macro rather than
2279: .Sx \&Nm
2280: to mark up the name of the manual page.
1.63 kristaps 2281: .Ss \&No
1.132 kristaps 2282: A
1.138 kristaps 2283: .Dq noop
1.132 kristaps 2284: macro used to terminate prior macro contexts.
2285: .Pp
2286: Examples:
1.173 kristaps 2287: .Dl \&.Sx \&Fl ab \&No cd \&Fl ef
1.63 kristaps 2288: .Ss \&Ns
1.138 kristaps 2289: Suppress a space.
2290: Following invocation, text is interpreted as free-form text until a
2291: macro is encountered.
1.178 kristaps 2292: .Pp
2293: This has no effect when invoked at the start of a macro line.
1.138 kristaps 2294: .Pp
2295: Examples:
1.173 kristaps 2296: .Dl \&.Fl o \&Ns \&Ar output
1.138 kristaps 2297: .Pp
2298: See also
2299: .Sx \&No
2300: and
2301: .Sx \&Sm .
1.63 kristaps 2302: .Ss \&Nx
1.144 schwarze 2303: Format the
2304: .Nx
2305: version provided as an argument, or a default value if
1.65 kristaps 2306: no argument is provided.
2307: .Pp
2308: Examples:
1.173 kristaps 2309: .Dl \&.Nx 5.01
2310: .Dl \&.Nx
1.65 kristaps 2311: .Pp
2312: See also
2313: .Sx \&At ,
1.66 kristaps 2314: .Sx \&Bsx ,
1.65 kristaps 2315: .Sx \&Bx ,
1.66 kristaps 2316: .Sx \&Dx ,
1.65 kristaps 2317: .Sx \&Fx ,
2318: .Sx \&Ox ,
2319: and
2320: .Sx \&Ux .
1.63 kristaps 2321: .Ss \&Oc
1.141 kristaps 2322: Close multi-line
1.132 kristaps 2323: .Sx \&Oo
2324: context.
1.63 kristaps 2325: .Ss \&Oo
1.132 kristaps 2326: Multi-line version of
2327: .Sx \&Op .
2328: .Pp
2329: Examples:
1.138 kristaps 2330: .Bd -literal -offset indent -compact
1.132 kristaps 2331: \&.Oo
2332: \&.Op Fl flag Ns Ar value
2333: \&.Oc
2334: .Ed
1.63 kristaps 2335: .Ss \&Op
1.132 kristaps 2336: Command-line option.
2337: Used when listing options to command-line utilities.
2338: Prints the argument(s) in brackets.
2339: .Pp
2340: Examples:
1.173 kristaps 2341: .Dl \&.Op \&Fl a \&Ar b
2342: .Dl \&.Op \&Ar a | b
1.132 kristaps 2343: .Pp
2344: See also
2345: .Sx \&Oo .
1.63 kristaps 2346: .Ss \&Os
1.100 kristaps 2347: Document operating system version.
2348: This is the mandatory third macro of
1.66 kristaps 2349: any
2350: .Nm
1.120 kristaps 2351: file.
2352: Its syntax is as follows:
1.66 kristaps 2353: .Pp
1.185 kristaps 2354: .D1 Pf \. Sx \&Os Op Ar system Op Ar version
1.66 kristaps 2355: .Pp
2356: The optional
1.185 kristaps 2357: .Ar system
1.100 kristaps 2358: parameter specifies the relevant operating system or environment.
2359: Left unspecified, it defaults to the local operating system version.
2360: This is the suggested form.
1.66 kristaps 2361: .Pp
2362: Examples:
1.173 kristaps 2363: .Dl \&.Os
2364: .Dl \&.Os KTH/CSC/TCS
2365: .Dl \&.Os BSD 4.3
1.66 kristaps 2366: .Pp
2367: See also
2368: .Sx \&Dd
2369: and
2370: .Sx \&Dt .
1.63 kristaps 2371: .Ss \&Ot
1.66 kristaps 2372: Unknown usage.
2373: .Pp
2374: .Em Remarks :
2375: this macro has been deprecated.
1.63 kristaps 2376: .Ss \&Ox
1.144 schwarze 2377: Format the
2378: .Ox
2379: version provided as an argument, or a default value
1.65 kristaps 2380: if no argument is provided.
2381: .Pp
2382: Examples:
1.173 kristaps 2383: .Dl \&.Ox 4.5
2384: .Dl \&.Ox
1.65 kristaps 2385: .Pp
2386: See also
2387: .Sx \&At ,
2388: .Sx \&Bsx ,
2389: .Sx \&Bx ,
1.66 kristaps 2390: .Sx \&Dx ,
1.65 kristaps 2391: .Sx \&Fx ,
2392: .Sx \&Nx ,
2393: and
2394: .Sx \&Ux .
1.63 kristaps 2395: .Ss \&Pa
1.132 kristaps 2396: A file-system path.
1.165 kristaps 2397: If an argument is not provided, the string
2398: .Dq \(ti
2399: is used as a default.
1.132 kristaps 2400: .Pp
2401: Examples:
1.173 kristaps 2402: .Dl \&.Pa /usr/bin/mandoc
2403: .Dl \&.Pa /usr/share/man/man7/mdoc.7
1.132 kristaps 2404: .Pp
2405: See also
2406: .Sx \&Lk .
1.63 kristaps 2407: .Ss \&Pc
1.132 kristaps 2408: Close parenthesised context opened by
2409: .Sx \&Po .
1.63 kristaps 2410: .Ss \&Pf
1.132 kristaps 2411: Removes the space
1.138 kristaps 2412: .Pq Dq prefix
1.132 kristaps 2413: between its arguments.
2414: Its syntax is as follows:
2415: .Pp
1.185 kristaps 2416: .D1 Pf \. \&Pf Ar prefix suffix
1.132 kristaps 2417: .Pp
2418: The
1.185 kristaps 2419: .Ar suffix
1.132 kristaps 2420: argument may be a macro.
2421: .Pp
2422: Examples:
1.185 kristaps 2423: .Dl \&.Pf \e. \&Sx \&Pf \&Ar prefix suffix
1.63 kristaps 2424: .Ss \&Po
1.132 kristaps 2425: Multi-line version of
2426: .Sx \&Pq .
1.63 kristaps 2427: .Ss \&Pp
1.132 kristaps 2428: Break a paragraph.
2429: This will assert vertical space between prior and subsequent macros
2430: and/or text.
1.63 kristaps 2431: .Ss \&Pq
1.132 kristaps 2432: Parenthesised enclosure.
2433: .Pp
2434: See also
2435: .Sx \&Po .
1.63 kristaps 2436: .Ss \&Qc
1.138 kristaps 2437: Close quoted context opened by
2438: .Sx \&Qo .
1.63 kristaps 2439: .Ss \&Ql
1.138 kristaps 2440: Format a single-quoted literal.
2441: See also
2442: .Sx \&Qq
2443: and
2444: .Sx \&Sq .
1.63 kristaps 2445: .Ss \&Qo
1.138 kristaps 2446: Multi-line version of
2447: .Sx \&Qq .
1.63 kristaps 2448: .Ss \&Qq
1.138 kristaps 2449: Encloses its arguments in
2450: .Dq typewriter
2451: double-quotes.
2452: Consider using
2453: .Sx \&Dq .
2454: .Pp
2455: See also
2456: .Sx \&Dq ,
2457: .Sx \&Sq ,
2458: and
2459: .Sx \&Qo .
1.63 kristaps 2460: .Ss \&Re
1.141 kristaps 2461: Close an
1.63 kristaps 2462: .Sx \&Rs
1.100 kristaps 2463: block.
2464: Does not have any tail arguments.
1.63 kristaps 2465: .Ss \&Rs
1.141 kristaps 2466: Begin a bibliographic
1.63 kristaps 2467: .Pq Dq reference
1.100 kristaps 2468: block.
2469: Does not have any head arguments.
2470: The block macro may only contain
1.63 kristaps 2471: .Sx \&%A ,
2472: .Sx \&%B ,
2473: .Sx \&%C ,
2474: .Sx \&%D ,
2475: .Sx \&%I ,
2476: .Sx \&%J ,
2477: .Sx \&%N ,
2478: .Sx \&%O ,
2479: .Sx \&%P ,
2480: .Sx \&%Q ,
2481: .Sx \&%R ,
2482: .Sx \&%T ,
1.120 kristaps 2483: .Sx \&%U ,
1.63 kristaps 2484: and
2485: .Sx \&%V
2486: child macros (at least one must be specified).
2487: .Pp
1.64 kristaps 2488: Examples:
1.91 kristaps 2489: .Bd -literal -offset indent -compact
1.63 kristaps 2490: \&.Rs
2491: \&.%A J. E. Hopcroft
2492: \&.%A J. D. Ullman
2493: \&.%B Introduction to Automata Theory, Languages, and Computation
2494: \&.%I Addison-Wesley
2495: \&.%C Reading, Massachusettes
2496: \&.%D 1979
2497: \&.Re
2498: .Ed
2499: .Pp
2500: If an
2501: .Sx \&Rs
2502: block is used within a SEE ALSO section, a vertical space is asserted
2503: before the rendered output, else the block continues on the current
2504: line.
2505: .Ss \&Rv
1.193 schwarze 2506: Insert a standard sentence regarding a function call's return value of 0
1.191 kristaps 2507: on success and \-1 on error, with the
2508: .Va errno
2509: libc global variable set on error.
2510: Its syntax is as follows:
2511: .Pp
1.193 schwarze 2512: .D1 Pf \. Sx \&Rv Fl std Op Ar function ...
1.191 kristaps 2513: .Pp
1.139 kristaps 2514: If
2515: .Ar function
1.191 kristaps 2516: is not specified, the document's name set by
1.139 kristaps 2517: .Sx \&Nm
1.191 kristaps 2518: is used.
2519: Multiple
2520: .Ar function
2521: arguments are treated as separate functions.
1.139 kristaps 2522: .Pp
2523: See also
2524: .Sx \&Ex .
1.63 kristaps 2525: .Ss \&Sc
1.138 kristaps 2526: Close single-quoted context opened by
2527: .Sx \&So .
1.63 kristaps 2528: .Ss \&Sh
1.138 kristaps 2529: Begin a new section.
2530: For a list of conventional manual sections, see
2531: .Sx MANUAL STRUCTURE .
2532: These sections should be used unless it's absolutely necessary that
2533: custom sections be used.
2534: .Pp
2535: Section names should be unique so that they may be keyed by
2536: .Sx \&Sx .
2537: .Pp
2538: See also
2539: .Sx \&Pp ,
2540: .Sx \&Ss ,
2541: and
2542: .Sx \&Sx .
1.63 kristaps 2543: .Ss \&Sm
1.134 schwarze 2544: Switches the spacing mode for output generated from macros.
2545: Its syntax is as follows:
2546: .Pp
2547: .D1 Pf \. Sx \&Sm Cm on | off
2548: .Pp
2549: By default, spacing is
1.193 schwarze 2550: .Cm on .
1.134 schwarze 2551: When switched
1.193 schwarze 2552: .Cm off ,
1.134 schwarze 2553: no white space is inserted between macro arguments and between the
1.185 kristaps 2554: output generated from adjacent macros, but text lines
1.134 schwarze 2555: still get normal spacing between words and sentences.
1.63 kristaps 2556: .Ss \&So
1.138 kristaps 2557: Multi-line version of
2558: .Sx \&Sq .
1.63 kristaps 2559: .Ss \&Sq
1.138 kristaps 2560: Encloses its arguments in
2561: .Dq typewriter
2562: single-quotes.
2563: .Pp
2564: See also
2565: .Sx \&Dq ,
2566: .Sx \&Qq ,
2567: and
2568: .Sx \&So .
1.63 kristaps 2569: .Ss \&Ss
1.138 kristaps 2570: Begin a new sub-section.
2571: Unlike with
2572: .Sx \&Sh ,
2573: there's no convention for sub-sections.
2574: Conventional sections, as described in
2575: .Sx MANUAL STRUCTURE ,
2576: rarely have sub-sections.
2577: .Pp
2578: Sub-section names should be unique so that they may be keyed by
2579: .Sx \&Sx .
2580: .Pp
2581: See also
2582: .Sx \&Pp ,
2583: .Sx \&Sh ,
2584: and
2585: .Sx \&Sx .
1.63 kristaps 2586: .Ss \&St
1.139 kristaps 2587: Replace an abbreviation for a standard with the full form.
2588: The following standards are recognised:
2589: .Pp
2590: .Bl -tag -width "-p1003.1g-2000X" -compact
2591: .It \-p1003.1-88
2592: .St -p1003.1-88
2593: .It \-p1003.1-90
2594: .St -p1003.1-90
2595: .It \-p1003.1-96
2596: .St -p1003.1-96
2597: .It \-p1003.1-2001
2598: .St -p1003.1-2001
2599: .It \-p1003.1-2004
2600: .St -p1003.1-2004
2601: .It \-p1003.1-2008
2602: .St -p1003.1-2008
2603: .It \-p1003.1
2604: .St -p1003.1
2605: .It \-p1003.1b
2606: .St -p1003.1b
2607: .It \-p1003.1b-93
2608: .St -p1003.1b-93
2609: .It \-p1003.1c-95
2610: .St -p1003.1c-95
2611: .It \-p1003.1g-2000
2612: .St -p1003.1g-2000
2613: .It \-p1003.1i-95
2614: .St -p1003.1i-95
2615: .It \-p1003.2-92
2616: .St -p1003.2-92
2617: .It \-p1003.2a-92
2618: .St -p1003.2a-92
2619: .It \-p1387.2-95
2620: .St -p1387.2-95
2621: .It \-p1003.2
2622: .St -p1003.2
2623: .It \-p1387.2
2624: .St -p1387.2
2625: .It \-isoC
2626: .St -isoC
2627: .It \-isoC-90
2628: .St -isoC-90
2629: .It \-isoC-amd1
2630: .St -isoC-amd1
2631: .It \-isoC-tcor1
2632: .St -isoC-tcor1
2633: .It \-isoC-tcor2
2634: .St -isoC-tcor2
2635: .It \-isoC-99
2636: .St -isoC-99
2637: .It \-iso9945-1-90
2638: .St -iso9945-1-90
2639: .It \-iso9945-1-96
2640: .St -iso9945-1-96
2641: .It \-iso9945-2-93
2642: .St -iso9945-2-93
2643: .It \-ansiC
2644: .St -ansiC
2645: .It \-ansiC-89
2646: .St -ansiC-89
2647: .It \-ansiC-99
2648: .St -ansiC-99
2649: .It \-ieee754
2650: .St -ieee754
2651: .It \-iso8802-3
2652: .St -iso8802-3
2653: .It \-ieee1275-94
2654: .St -ieee1275-94
2655: .It \-xpg3
2656: .St -xpg3
2657: .It \-xpg4
2658: .St -xpg4
2659: .It \-xpg4.2
2660: .St -xpg4.2
2661: .St -xpg4.3
2662: .It \-xbd5
2663: .St -xbd5
2664: .It \-xcu5
2665: .St -xcu5
2666: .It \-xsh5
2667: .St -xsh5
2668: .It \-xns5
2669: .St -xns5
2670: .It \-xns5.2
2671: .St -xns5.2
2672: .It \-xns5.2d2.0
2673: .St -xns5.2d2.0
2674: .It \-xcurses4.2
2675: .St -xcurses4.2
2676: .It \-susv2
2677: .St -susv2
2678: .It \-susv3
2679: .St -susv3
2680: .It \-svid4
2681: .St -svid4
2682: .El
1.63 kristaps 2683: .Ss \&Sx
1.138 kristaps 2684: Reference a section or sub-section.
2685: The referenced section or sub-section name must be identical to the
2686: enclosed argument, including whitespace.
2687: .Pp
2688: Examples:
1.173 kristaps 2689: .Dl \&.Sx MANUAL STRUCTURE
1.172 kristaps 2690: .Pp
2691: See also
2692: .Sx \&Sh
2693: and
2694: .Sx \&Ss .
1.63 kristaps 2695: .Ss \&Sy
1.138 kristaps 2696: Format enclosed arguments in symbolic
2697: .Pq Dq boldface .
2698: Note that this is a presentation term and should not be used for
2699: stylistically decorating technical terms.
2700: .Pp
2701: See also
2702: .Sx \&Bf ,
2703: .Sx \&Li ,
2704: and
2705: .Sx \&Em .
1.190 schwarze 2706: .Ss \&Ta
2707: Table cell separator in
2708: .Sx \&Bl Fl column
2709: lists; can only be used below
2710: .Sx \&It .
1.63 kristaps 2711: .Ss \&Tn
1.138 kristaps 2712: Format a tradename.
2713: .Pp
2714: Examples:
1.173 kristaps 2715: .Dl \&.Tn IBM
1.63 kristaps 2716: .Ss \&Ud
1.110 kristaps 2717: Prints out
1.144 schwarze 2718: .Dq currently under development .
1.63 kristaps 2719: .Ss \&Ux
1.100 kristaps 2720: Format the UNIX name.
2721: Accepts no argument.
1.65 kristaps 2722: .Pp
2723: Examples:
1.173 kristaps 2724: .Dl \&.Ux
1.65 kristaps 2725: .Pp
2726: See also
2727: .Sx \&At ,
1.66 kristaps 2728: .Sx \&Bsx ,
1.65 kristaps 2729: .Sx \&Bx ,
1.66 kristaps 2730: .Sx \&Dx ,
1.65 kristaps 2731: .Sx \&Fx ,
2732: .Sx \&Nx ,
2733: and
2734: .Sx \&Ox .
1.63 kristaps 2735: .Ss \&Va
1.132 kristaps 2736: A variable name.
2737: .Pp
2738: Examples:
1.173 kristaps 2739: .Dl \&.Va foo
2740: .Dl \&.Va const char *bar ;
1.63 kristaps 2741: .Ss \&Vt
1.100 kristaps 2742: A variable type.
1.122 kristaps 2743: This is also used for indicating global variables in the
2744: .Em SYNOPSIS
1.100 kristaps 2745: section, in which case a variable name is also specified.
2746: Note that it accepts
1.83 kristaps 2747: .Sx Block partial-implicit
1.123 kristaps 2748: syntax when invoked as the first macro in the
1.122 kristaps 2749: .Em SYNOPSIS
2750: section, else it accepts ordinary
1.83 kristaps 2751: .Sx In-line
2752: syntax.
2753: .Pp
2754: Note that this should not be confused with
2755: .Sx \&Ft ,
2756: which is used for function return types.
2757: .Pp
2758: Examples:
1.173 kristaps 2759: .Dl \&.Vt unsigned char
2760: .Dl \&.Vt extern const char * const sys_signame[] \&;
1.83 kristaps 2761: .Pp
2762: See also
1.122 kristaps 2763: .Sx MANUAL STRUCTURE
1.83 kristaps 2764: and
2765: .Sx \&Va .
1.84 kristaps 2766: .Ss \&Xc
1.87 kristaps 2767: Close a scope opened by
2768: .Sx \&Xo .
1.84 kristaps 2769: .Ss \&Xo
1.170 schwarze 2770: Extend the header of an
2771: .Sx \&It
2772: macro or the body of a partial-implicit block macro
2773: beyond the end of the input line.
2774: This macro originally existed to work around the 9-argument limit
2775: of historic
2776: .Xr roff 7 .
1.84 kristaps 2777: .Ss \&Xr
2778: Link to another manual
2779: .Pq Qq cross-reference .
1.120 kristaps 2780: Its syntax is as follows:
1.84 kristaps 2781: .Pp
1.185 kristaps 2782: .D1 Pf \. Sx \&Xr Ar name section
1.84 kristaps 2783: .Pp
2784: The
1.185 kristaps 2785: .Ar name
1.84 kristaps 2786: and
1.185 kristaps 2787: .Ar section
1.100 kristaps 2788: are the name and section of the linked manual.
2789: If
1.185 kristaps 2790: .Ar section
1.84 kristaps 2791: is followed by non-punctuation, an
2792: .Sx \&Ns
1.100 kristaps 2793: is inserted into the token stream.
2794: This behaviour is for compatibility with
1.148 kristaps 2795: GNU troff.
1.84 kristaps 2796: .Pp
2797: Examples:
1.173 kristaps 2798: .Dl \&.Xr mandoc 1
2799: .Dl \&.Xr mandoc 1 \&;
2800: .Dl \&.Xr mandoc 1 \&Ns s behaviour
1.84 kristaps 2801: .Ss \&br
1.140 kristaps 2802: Emits a line-break.
2803: This macro should not be used; it is implemented for compatibility with
2804: historical manuals.
2805: .Pp
2806: Consider using
2807: .Sx \&Pp
2808: in the event of natural paragraph breaks.
1.84 kristaps 2809: .Ss \&sp
1.140 kristaps 2810: Emits vertical space.
2811: This macro should not be used; it is implemented for compatibility with
2812: historical manuals.
2813: Its syntax is as follows:
2814: .Pp
1.185 kristaps 2815: .D1 Pf \. Sx \&sp Op Ar height
1.140 kristaps 2816: .Pp
2817: The
1.185 kristaps 2818: .Ar height
1.140 kristaps 2819: argument must be formatted as described in
2820: .Sx Scaling Widths .
2821: If unspecified,
2822: .Sx \&sp
2823: asserts a single vertical space.
1.4 kristaps 2824: .Sh COMPATIBILITY
1.93 kristaps 2825: This section documents compatibility between mandoc and other other
2826: troff implementations, at this time limited to GNU troff
2827: .Pq Qq groff .
1.50 kristaps 2828: The term
1.57 kristaps 2829: .Qq historic groff
1.166 schwarze 2830: refers to groff versions before 1.17,
2831: which featured a significant update of the
1.57 kristaps 2832: .Pa doc.tmac
1.166 schwarze 2833: file.
1.57 kristaps 2834: .Pp
1.93 kristaps 2835: Heirloom troff, the other significant troff implementation accepting
2836: \-mdoc, is similar to historic groff.
2837: .Pp
1.150 kristaps 2838: The following problematic behaviour is found in groff:
2839: .ds hist (Historic groff only.)
2840: .Pp
1.57 kristaps 2841: .Bl -dash -compact
1.168 kristaps 2842: .It
2843: Display macros
1.171 schwarze 2844: .Po
2845: .Sx \&Bd ,
2846: .Sx \&Dl ,
2847: and
2848: .Sx \&D1
2849: .Pc
1.168 kristaps 2850: may not be nested.
2851: \*[hist]
1.147 kristaps 2852: .It
1.150 kristaps 2853: .Sx \&At
2854: with unknown arguments produces no output at all.
2855: \*[hist]
2856: Newer groff and mandoc print
2857: .Qq AT&T UNIX
2858: and the arguments.
1.149 kristaps 2859: .It
1.190 schwarze 2860: .Sx \&Bl Fl column
1.150 kristaps 2861: does not recognize trailing punctuation characters when they immediately
2862: precede tabulator characters, but treats them as normal text and
2863: outputs a space before them.
2864: .It
2865: .Sx \&Bd Fl ragged compact
2866: does not start a new line.
2867: \*[hist]
1.142 kristaps 2868: .It
1.150 kristaps 2869: .Sx \&Dd
1.181 schwarze 2870: with non-standard arguments behaves very strangely.
2871: When there are three arguments, they are printed verbatim.
2872: Any other number of arguments is replaced by the current date,
2873: but without any arguments the string
2874: .Dq Epoch
2875: is printed.
1.125 kristaps 2876: .It
1.150 kristaps 2877: .Sx \&Fl
2878: does not print a dash for an empty argument.
2879: \*[hist]
1.137 kristaps 2880: .It
1.150 kristaps 2881: .Sx \&Fn
2882: does not start a new line unless invoked as the line macro in the
2883: .Em SYNOPSIS
2884: section.
2885: \*[hist]
1.119 kristaps 2886: .It
1.150 kristaps 2887: .Sx \&Fo
2888: with
1.120 kristaps 2889: .Pf non- Sx \&Fa
1.150 kristaps 2890: children causes inconsistent spacing between arguments.
2891: In mandoc, a single space is always inserted between arguments.
1.120 kristaps 2892: .It
2893: .Sx \&Ft
2894: in the
1.150 kristaps 2895: .Em SYNOPSIS
2896: causes inconsistent vertical spacing, depending on whether a prior
1.120 kristaps 2897: .Sx \&Fn
2898: has been invoked.
2899: See
2900: .Sx \&Ft
2901: and
2902: .Sx \&Fn
1.150 kristaps 2903: for the normalised behaviour in mandoc.
1.120 kristaps 2904: .It
1.150 kristaps 2905: .Sx \&In
2906: ignores additional arguments and is not treated specially in the
2907: .Em SYNOPSIS .
2908: \*[hist]
1.118 kristaps 2909: .It
1.150 kristaps 2910: .Sx \&It
2911: sometimes requires a
2912: .Fl nested
2913: flag.
2914: \*[hist]
2915: In new groff and mandoc, any list may be nested by default and
2916: .Fl enum
2917: lists will restart the sequence only for the sub-list.
1.115 kristaps 2918: .It
1.150 kristaps 2919: .Sx \&Li
2920: followed by a reserved character is incorrectly used in some manuals
2921: instead of properly quoting that character, which sometimes works with
2922: historic groff.
1.57 kristaps 2923: .It
1.150 kristaps 2924: .Sx \&Lk
2925: only accepts a single link-name argument; the remainder is misformatted.
1.81 kristaps 2926: .It
1.80 kristaps 2927: .Sx \&Pa
1.150 kristaps 2928: does not format its arguments when used in the FILES section under
1.100 kristaps 2929: certain list types.
1.80 kristaps 2930: .It
1.150 kristaps 2931: .Sx \&Ta
2932: can only be called by other macros, but not at the beginning of a line.
2933: .It
2934: .Sx \&%C
2935: is not implemented.
1.166 schwarze 2936: .It
2937: Historic groff only allows up to eight or nine arguments per macro input
2938: line, depending on the exact situation.
2939: Providing more arguments causes garbled output.
2940: The number of arguments on one input line is not limited with mandoc.
1.150 kristaps 2941: .It
2942: Historic groff has many un-callable macros.
2943: Most of these (excluding some block-level macros) are callable
2944: in new groff and mandoc.
2945: .It
2946: .Sq \(ba
2947: (vertical bar) is not fully supported as a delimiter.
2948: \*[hist]
1.79 kristaps 2949: .It
1.77 kristaps 2950: .Sq \ef
1.150 kristaps 2951: .Pq font face
2952: and
2953: .Sq \ef
2954: .Pq font family face
1.93 kristaps 2955: .Sx Text Decoration
1.150 kristaps 2956: escapes behave irregularly when specified within line-macro scopes.
1.77 kristaps 2957: .It
1.150 kristaps 2958: Negative scaling units return to prior lines.
2959: Instead, mandoc truncates them to zero.
2960: .El
2961: .Pp
2962: The following features are unimplemented in mandoc:
2963: .Pp
2964: .Bl -dash -compact
1.61 kristaps 2965: .It
1.150 kristaps 2966: .Sx \&Bd
2967: .Fl file Ar file .
1.57 kristaps 2968: .It
1.78 kristaps 2969: .Sx \&Bd
1.126 kristaps 2970: .Fl offset Ar center
1.64 kristaps 2971: and
1.150 kristaps 2972: .Fl offset Ar right .
2973: Groff does not implement centered and flush-right rendering either,
2974: but produces large indentations.
2975: .It
2976: The
2977: .Sq \eh
2978: .Pq horizontal position ,
2979: .Sq \ev
2980: .Pq vertical position ,
2981: .Sq \em
2982: .Pq text colour ,
2983: .Sq \eM
2984: .Pq text filling colour ,
1.152 kristaps 2985: .Sq \ez
2986: .Pq zero-length character ,
1.153 kristaps 2987: .Sq \ew
2988: .Pq string length ,
1.154 kristaps 2989: .Sq \ek
2990: .Pq horizontal position marker ,
1.157 kristaps 2991: .Sq \eo
2992: .Pq text overstrike ,
1.64 kristaps 2993: and
1.150 kristaps 2994: .Sq \es
2995: .Pq text size
1.153 kristaps 2996: escape sequences are all discarded in mandoc.
1.57 kristaps 2997: .It
1.150 kristaps 2998: The
2999: .Sq \ef
3000: scaling unit is accepted by mandoc, but rendered as the default unit.
1.57 kristaps 3001: .It
1.150 kristaps 3002: In quoted literals, groff allows pairwise double-quotes to produce a
3003: standalone double-quote in formatted output.
3004: This is not supported by mandoc.
1.57 kristaps 3005: .El
1.2 kristaps 3006: .Sh SEE ALSO
1.159 schwarze 3007: .Xr man 1 ,
1.57 kristaps 3008: .Xr mandoc 1 ,
1.180 kristaps 3009: .Xr eqn 7 ,
1.174 kristaps 3010: .Xr man 7 ,
1.57 kristaps 3011: .Xr mandoc_char 7
1.174 kristaps 3012: .Xr roff 7 ,
3013: .Xr tbl 7
1.151 kristaps 3014: .Sh HISTORY
3015: The
3016: .Nm
3017: language first appeared as a troff macro package in
3018: .Bx 4.4 .
3019: It was later significantly updated by Werner Lemberg and Ruslan Ermilov
1.155 kristaps 3020: in groff-1.17.
1.151 kristaps 3021: The standalone implementation that is part of the
3022: .Xr mandoc 1
3023: utility written by Kristaps Dzonsons appeared in
3024: .Ox 4.6 .
1.2 kristaps 3025: .Sh AUTHORS
3026: The
1.57 kristaps 3027: .Nm
1.50 kristaps 3028: reference was written by
1.94 kristaps 3029: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
CVSweb