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