Annotation of mandoc/mdoc.7, Revision 1.297
1.297 ! schwarze 1: .\" $Id: mdoc.7,v 1.189 2025/05/21 16:43:41 schwarze Exp $
1.1 kristaps 2: .\"
1.179 schwarze 3: .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
1.280 schwarze 4: .\" Copyright (c) 2010, 2011, 2013-2020 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.297 ! schwarze 18: .Dd $Mdocdate: May 21 2025 $
1.20 kristaps 19: .Dt MDOC 7
1.1 kristaps 20: .Os
21: .Sh NAME
1.57 kristaps 22: .Nm mdoc
1.211 schwarze 23: .Nd semantic markup language for formatting manual pages
1.1 kristaps 24: .Sh DESCRIPTION
25: The
1.57 kristaps 26: .Nm mdoc
1.211 schwarze 27: language supports authoring of manual pages for the
28: .Xr man 1
29: utility by allowing semantic annotations of words, phrases,
30: page sections and complete manual pages.
31: Such annotations are used by formatting tools to achieve a uniform
32: presentation across all manuals written in
33: .Nm ,
34: and to support hyperlinking if supported by the output medium.
35: .Pp
36: This reference document describes the structure of manual pages
37: and the syntax and usage of the
1.200 kristaps 38: .Nm
1.211 schwarze 39: language.
40: The reference implementation of a parsing and formatting tool is
1.144 schwarze 41: .Xr mandoc 1 ;
42: the
1.57 kristaps 43: .Sx COMPATIBILITY
1.200 kristaps 44: section describes compatibility with other implementations.
1.57 kristaps 45: .Pp
1.211 schwarze 46: In an
1.57 kristaps 47: .Nm
1.211 schwarze 48: document, lines beginning with the control character
1.185 kristaps 49: .Sq \&.
1.211 schwarze 50: are called
51: .Dq macro lines .
52: The first word is the macro name.
53: It consists of two or three letters.
54: Most macro names begin with a capital letter.
55: For a list of available macros, see
56: .Sx MACRO OVERVIEW .
57: The words following the macro name are arguments to the macro, optionally
58: including the names of other, callable macros; see
59: .Sx MACRO SYNTAX
60: for details.
61: .Pp
62: Lines not beginning with the control character are called
63: .Dq text lines .
64: They provide free-form text to be printed; the formatting of the text
65: depends on the respective processing context:
1.57 kristaps 66: .Bd -literal -offset indent
1.13 kristaps 67: \&.Sh Macro lines change control state.
1.185 kristaps 68: Text lines are interpreted within the current state.
1.57 kristaps 69: .Ed
1.211 schwarze 70: .Pp
71: Many aspects of the basic syntax of the
1.57 kristaps 72: .Nm
1.211 schwarze 73: language are based on the
74: .Xr roff 7
75: language; see the
76: .Em LANGUAGE SYNTAX
77: and
78: .Em MACRO SYNTAX
79: sections in the
80: .Xr roff 7
81: manual for details, in particular regarding
82: comments, escape sequences, whitespace, and quoting.
83: However, using
84: .Xr roff 7
85: requests in
1.200 kristaps 86: .Nm
1.211 schwarze 87: documents is discouraged;
88: .Xr mandoc 1
89: supports some of them merely for backward compatibility.
1.43 kristaps 90: .Sh MANUAL STRUCTURE
1.66 kristaps 91: A well-formed
1.57 kristaps 92: .Nm
1.66 kristaps 93: document consists of a document prologue followed by one or more
94: sections.
95: .Pp
1.141 kristaps 96: The prologue, which consists of the
1.274 schwarze 97: .Ic \&Dd ,
98: .Ic \&Dt ,
1.33 kristaps 99: and
1.274 schwarze 100: .Ic \&Os
1.141 kristaps 101: macros in that order, is required for every document.
1.66 kristaps 102: .Pp
1.82 kristaps 103: The first section (sections are denoted by
1.274 schwarze 104: .Ic \&Sh )
1.66 kristaps 105: must be the NAME section, consisting of at least one
1.274 schwarze 106: .Ic \&Nm
1.50 kristaps 107: followed by
1.274 schwarze 108: .Ic \&Nd .
1.66 kristaps 109: .Pp
1.122 kristaps 110: Following that, convention dictates specifying at least the
111: .Em SYNOPSIS
112: and
113: .Em DESCRIPTION
114: sections, although this varies between manual sections.
1.66 kristaps 115: .Pp
116: The following is a well-formed skeleton
117: .Nm
1.188 kristaps 118: file for a utility
119: .Qq progname :
1.57 kristaps 120: .Bd -literal -offset indent
1.43 kristaps 121: \&.Dd $\&Mdocdate$
1.188 kristaps 122: \&.Dt PROGNAME section
1.43 kristaps 123: \&.Os
124: \&.Sh NAME
1.188 kristaps 125: \&.Nm progname
1.194 schwarze 126: \&.Nd one line about what it does
1.203 kristaps 127: \&.\e\(dq .Sh LIBRARY
1.227 schwarze 128: \&.\e\(dq For sections 2, 3, and 9 only.
1.203 kristaps 129: \&.\e\(dq Not used in OpenBSD.
1.58 kristaps 130: \&.Sh SYNOPSIS
1.188 kristaps 131: \&.Nm progname
1.58 kristaps 132: \&.Op Fl options
133: \&.Ar
134: \&.Sh DESCRIPTION
135: The
136: \&.Nm
137: utility processes files ...
1.228 schwarze 138: \&.\e\(dq .Sh CONTEXT
139: \&.\e\(dq For section 9 functions only.
1.203 kristaps 140: \&.\e\(dq .Sh IMPLEMENTATION NOTES
141: \&.\e\(dq Not used in OpenBSD.
142: \&.\e\(dq .Sh RETURN VALUES
1.227 schwarze 143: \&.\e\(dq For sections 2, 3, and 9 function return values only.
1.203 kristaps 144: \&.\e\(dq .Sh ENVIRONMENT
1.227 schwarze 145: \&.\e\(dq For sections 1, 6, 7, and 8 only.
1.203 kristaps 146: \&.\e\(dq .Sh FILES
147: \&.\e\(dq .Sh EXIT STATUS
1.227 schwarze 148: \&.\e\(dq For sections 1, 6, and 8 only.
1.203 kristaps 149: \&.\e\(dq .Sh EXAMPLES
150: \&.\e\(dq .Sh DIAGNOSTICS
1.227 schwarze 151: \&.\e\(dq For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only.
1.203 kristaps 152: \&.\e\(dq .Sh ERRORS
1.227 schwarze 153: \&.\e\(dq For sections 2, 3, 4, and 9 errno settings only.
1.203 kristaps 154: \&.\e\(dq .Sh SEE ALSO
155: \&.\e\(dq .Xr foobar 1
156: \&.\e\(dq .Sh STANDARDS
157: \&.\e\(dq .Sh HISTORY
158: \&.\e\(dq .Sh AUTHORS
159: \&.\e\(dq .Sh CAVEATS
160: \&.\e\(dq .Sh BUGS
161: \&.\e\(dq .Sh SECURITY CONSIDERATIONS
162: \&.\e\(dq Not used in OpenBSD.
1.57 kristaps 163: .Ed
164: .Pp
1.144 schwarze 165: The sections in an
1.66 kristaps 166: .Nm
1.100 kristaps 167: document are conventionally ordered as they appear above.
168: Sections should be composed as follows:
1.73 kristaps 169: .Bl -ohang -offset Ds
170: .It Em NAME
1.144 schwarze 171: The name(s) and a one line description of the documented material.
1.100 kristaps 172: The syntax for this as follows:
1.73 kristaps 173: .Bd -literal -offset indent
1.144 schwarze 174: \&.Nm name0 ,
175: \&.Nm name1 ,
1.73 kristaps 176: \&.Nm name2
1.144 schwarze 177: \&.Nd a one line description
1.73 kristaps 178: .Ed
179: .Pp
1.185 kristaps 180: Multiple
181: .Sq \&Nm
182: names should be separated by commas.
183: .Pp
1.73 kristaps 184: The
1.274 schwarze 185: .Ic \&Nm
1.73 kristaps 186: macro(s) must precede the
1.274 schwarze 187: .Ic \&Nd
1.73 kristaps 188: macro.
1.80 kristaps 189: .Pp
1.82 kristaps 190: See
1.274 schwarze 191: .Ic \&Nm
1.80 kristaps 192: and
1.274 schwarze 193: .Ic \&Nd .
1.73 kristaps 194: .It Em LIBRARY
195: The name of the library containing the documented material, which is
1.108 kristaps 196: assumed to be a function in a section 2, 3, or 9 manual.
1.100 kristaps 197: The syntax for this is as follows:
1.73 kristaps 198: .Bd -literal -offset indent
199: \&.Lb libarm
200: .Ed
201: .Pp
202: See
1.274 schwarze 203: .Ic \&Lb .
1.73 kristaps 204: .It Em SYNOPSIS
205: Documents the utility invocation syntax, function call syntax, or device
1.82 kristaps 206: configuration.
1.73 kristaps 207: .Pp
208: For the first, utilities (sections 1, 6, and 8), this is
209: generally structured as follows:
210: .Bd -literal -offset indent
1.185 kristaps 211: \&.Nm bar
1.73 kristaps 212: \&.Op Fl v
213: \&.Op Fl o Ar file
214: \&.Op Ar
1.185 kristaps 215: \&.Nm foo
1.73 kristaps 216: \&.Op Fl v
217: \&.Op Fl o Ar file
218: \&.Op Ar
219: .Ed
220: .Pp
1.185 kristaps 221: Commands should be ordered alphabetically.
222: .Pp
1.73 kristaps 223: For the second, function calls (sections 2, 3, 9):
224: .Bd -literal -offset indent
1.146 kristaps 225: \&.In header.h
1.73 kristaps 226: \&.Vt extern const char *global;
227: \&.Ft "char *"
228: \&.Fn foo "const char *src"
229: \&.Ft "char *"
230: \&.Fn bar "const char *src"
231: .Ed
232: .Pp
1.185 kristaps 233: Ordering of
1.274 schwarze 234: .Ic \&In ,
235: .Ic \&Vt ,
236: .Ic \&Fn ,
1.185 kristaps 237: and
1.274 schwarze 238: .Ic \&Fo
1.185 kristaps 239: macros should follow C header-file conventions.
240: .Pp
1.73 kristaps 241: And for the third, configurations (section 4):
242: .Bd -literal -offset indent
1.203 kristaps 243: \&.Cd \(dqit* at isa? port 0x2e\(dq
244: \&.Cd \(dqit* at isa? port 0x4e\(dq
1.73 kristaps 245: .Ed
246: .Pp
1.82 kristaps 247: Manuals not in these sections generally don't need a
1.73 kristaps 248: .Em SYNOPSIS .
1.80 kristaps 249: .Pp
1.122 kristaps 250: Some macros are displayed differently in the
251: .Em SYNOPSIS
252: section, particularly
1.274 schwarze 253: .Ic \&Nm ,
254: .Ic \&Cd ,
255: .Ic \&Fd ,
256: .Ic \&Fn ,
257: .Ic \&Fo ,
258: .Ic \&In ,
259: .Ic \&Vt ,
1.122 kristaps 260: and
1.274 schwarze 261: .Ic \&Ft .
1.138 kristaps 262: All of these macros are output on their own line.
1.144 schwarze 263: If two such dissimilar macros are pairwise invoked (except for
1.274 schwarze 264: .Ic \&Ft
1.122 kristaps 265: before
1.274 schwarze 266: .Ic \&Fo
1.122 kristaps 267: or
1.274 schwarze 268: .Ic \&Fn ) ,
1.122 kristaps 269: they are separated by a vertical space, unless in the case of
1.274 schwarze 270: .Ic \&Fo ,
271: .Ic \&Fn ,
1.122 kristaps 272: and
1.274 schwarze 273: .Ic \&Ft ,
1.122 kristaps 274: which are always separated by vertical space.
1.128 schwarze 275: .Pp
276: When text and macros following an
1.274 schwarze 277: .Ic \&Nm
1.128 schwarze 278: macro starting an input line span multiple output lines,
279: all output lines but the first will be indented to align
280: with the text immediately following the
1.274 schwarze 281: .Ic \&Nm
1.128 schwarze 282: macro, up to the next
1.274 schwarze 283: .Ic \&Nm ,
284: .Ic \&Sh ,
1.128 schwarze 285: or
1.274 schwarze 286: .Ic \&Ss
1.128 schwarze 287: macro or the end of an enclosing block, whichever comes first.
1.73 kristaps 288: .It Em DESCRIPTION
1.185 kristaps 289: This begins with an expansion of the brief, one line description in
290: .Em NAME :
291: .Bd -literal -offset indent
292: The
293: \&.Nm
294: utility does this, that, and the other.
295: .Ed
296: .Pp
297: It usually follows with a breakdown of the options (if documenting a
1.73 kristaps 298: command), such as:
299: .Bd -literal -offset indent
1.285 schwarze 300: The options are as follows:
1.73 kristaps 301: \&.Bl \-tag \-width Ds
302: \&.It Fl v
303: Print verbose information.
304: \&.El
305: .Ed
1.257 schwarze 306: .Pp
307: List the options in alphabetical order,
308: uppercase before lowercase for each letter and
309: with no regard to whether an option takes an argument.
310: Put digits in ascending order before all letter options.
1.80 kristaps 311: .Pp
1.73 kristaps 312: Manuals not documenting a command won't include the above fragment.
1.198 schwarze 313: .Pp
314: Since the
315: .Em DESCRIPTION
316: section usually contains most of the text of a manual, longer manuals
317: often use the
1.274 schwarze 318: .Ic \&Ss
1.198 schwarze 319: macro to form subsections.
320: In very long manuals, the
321: .Em DESCRIPTION
322: may be split into multiple sections, each started by an
1.274 schwarze 323: .Ic \&Sh
1.198 schwarze 324: macro followed by a non-standard section name, and each having
325: several subsections, like in the present
326: .Nm
327: manual.
1.228 schwarze 328: .It Em CONTEXT
329: This section lists the contexts in which functions can be called in section 9.
330: The contexts are autoconf, process, or interrupt.
1.73 kristaps 331: .It Em IMPLEMENTATION NOTES
1.100 kristaps 332: Implementation-specific notes should be kept here.
333: This is useful when implementing standard functions that may have side
334: effects or notable algorithmic implications.
1.73 kristaps 335: .It Em RETURN VALUES
1.144 schwarze 336: This section documents the
337: return values of functions in sections 2, 3, and 9.
1.73 kristaps 338: .Pp
339: See
1.274 schwarze 340: .Ic \&Rv .
1.73 kristaps 341: .It Em ENVIRONMENT
1.141 kristaps 342: Lists the environment variables used by the utility,
343: and explains the syntax and semantics of their values.
344: The
345: .Xr environ 7
346: manual provides examples of typical content and formatting.
1.73 kristaps 347: .Pp
348: See
1.274 schwarze 349: .Ic \&Ev .
1.73 kristaps 350: .It Em FILES
1.100 kristaps 351: Documents files used.
1.141 kristaps 352: It's helpful to document both the file name and a short description of how
1.100 kristaps 353: the file is used (created, modified, etc.).
1.73 kristaps 354: .Pp
355: See
1.274 schwarze 356: .Ic \&Pa .
1.99 kristaps 357: .It Em EXIT STATUS
1.144 schwarze 358: This section documents the
359: command exit status for section 1, 6, and 8 utilities.
1.100 kristaps 360: Historically, this information was described in
1.99 kristaps 361: .Em DIAGNOSTICS ,
362: a practise that is now discouraged.
363: .Pp
364: See
1.274 schwarze 365: .Ic \&Ex .
1.73 kristaps 366: .It Em EXAMPLES
1.100 kristaps 367: Example usages.
368: This often contains snippets of well-formed, well-tested invocations.
1.144 schwarze 369: Make sure that examples work properly!
1.73 kristaps 370: .It Em DIAGNOSTICS
1.227 schwarze 371: Documents error messages.
372: In section 4 and 9 manuals, these are usually messages printed by the
373: kernel to the console and to the kernel log.
374: In section 1, 6, 7, and 8, these are usually messages printed by
375: userland programs to the standard error output.
376: .Pp
1.73 kristaps 377: Historically, this section was used in place of
378: .Em EXIT STATUS
379: for manuals in sections 1, 6, and 8; however, this practise is
380: discouraged.
381: .Pp
382: See
1.274 schwarze 383: .Ic \&Bl
1.80 kristaps 384: .Fl diag .
1.73 kristaps 385: .It Em ERRORS
1.227 schwarze 386: Documents
387: .Xr errno 2
388: settings in sections 2, 3, 4, and 9.
1.73 kristaps 389: .Pp
390: See
1.274 schwarze 391: .Ic \&Er .
1.73 kristaps 392: .It Em SEE ALSO
1.100 kristaps 393: References other manuals with related topics.
394: This section should exist for most manuals.
395: Cross-references should conventionally be ordered first by section, then
1.238 schwarze 396: alphabetically (ignoring case).
1.73 kristaps 397: .Pp
1.198 schwarze 398: References to other documentation concerning the topic of the manual page,
399: for example authoritative books or journal articles, may also be
400: provided in this section.
401: .Pp
1.73 kristaps 402: See
1.274 schwarze 403: .Ic \&Rs
1.198 schwarze 404: and
1.274 schwarze 405: .Ic \&Xr .
1.73 kristaps 406: .It Em STANDARDS
1.100 kristaps 407: References any standards implemented or used.
408: If not adhering to any standards, the
1.73 kristaps 409: .Em HISTORY
410: section should be used instead.
411: .Pp
412: See
1.274 schwarze 413: .Ic \&St .
1.73 kristaps 414: .It Em HISTORY
1.198 schwarze 415: A brief history of the subject, including where it was first implemented,
416: and when it was ported to or reimplemented for the operating system at hand.
1.73 kristaps 417: .It Em AUTHORS
1.143 schwarze 418: Credits to the person or persons who wrote the code and/or documentation.
1.141 kristaps 419: Authors should generally be noted by both name and email address.
1.73 kristaps 420: .Pp
421: See
1.274 schwarze 422: .Ic \&An .
1.73 kristaps 423: .It Em CAVEATS
1.141 kristaps 424: Common misuses and misunderstandings should be explained
1.73 kristaps 425: in this section.
426: .It Em BUGS
1.147 kristaps 427: Known bugs, limitations, and work-arounds should be described
1.141 kristaps 428: in this section.
1.73 kristaps 429: .It Em SECURITY CONSIDERATIONS
430: Documents any security precautions that operators should consider.
1.66 kristaps 431: .El
1.211 schwarze 432: .Sh MACRO OVERVIEW
433: This overview is sorted such that macros of similar purpose are listed
434: together, to help find the best macro for any given purpose.
435: Deprecated macros are not included in the overview, but can be found below
436: in the alphabetical
437: .Sx MACRO REFERENCE .
438: .Ss Document preamble and NAME section macros
439: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 440: .It Ic \&Dd Ta document date: Cm $\&Mdocdate$ | Ar month day , year
441: .It Ic \&Dt Ta document title: Ar TITLE section Op Ar arch
1.290 schwarze 442: .It Ic \&Os Ta operating system footer: Op Ar footer text
1.274 schwarze 443: .It Ic \&Nm Ta document name (one argument)
444: .It Ic \&Nd Ta document description (one line)
1.211 schwarze 445: .El
446: .Ss Sections and cross references
447: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 448: .It Ic \&Sh Ta section header (one line)
449: .It Ic \&Ss Ta subsection header (one line)
450: .It Ic \&Sx Ta internal cross reference to a section or subsection
451: .It Ic \&Xr Ta cross reference to another manual page: Ar name section
1.280 schwarze 452: .It Ic \&Tg Ta tag the definition of a Ar term Pq <= 1 arguments
1.274 schwarze 453: .It Ic \&Pp Ta start a text paragraph (no arguments)
1.211 schwarze 454: .El
455: .Ss Displays and lists
456: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 457: .It Ic \&Bd , \&Ed Ta display block:
1.211 schwarze 458: .Fl Ar type
459: .Op Fl offset Ar width
460: .Op Fl compact
1.274 schwarze 461: .It Ic \&D1 Ta indented display (one line)
462: .It Ic \&Dl Ta indented literal display (one line)
1.297 ! schwarze 463: .It Ic \&Ql Ta normal in-line literal display: Ql text
! 464: .It Ic \&Li Ta unquoted in-line literal display: Li text
1.274 schwarze 465: .It Ic \&Bl , \&El Ta list block:
1.211 schwarze 466: .Fl Ar type
467: .Op Fl width Ar val
468: .Op Fl offset Ar val
469: .Op Fl compact
1.274 schwarze 470: .It Ic \&It Ta list item (syntax depends on Fl Ar type )
471: .It Ic \&Ta Ta table cell separator in Ic \&Bl Fl column No lists
472: .It Ic \&Rs , \&%* , \&Re Ta bibliographic block (references)
1.57 kristaps 473: .El
1.211 schwarze 474: .Ss Spacing control
475: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 476: .It Ic \&Pf Ta prefix, no following horizontal space (one argument)
477: .It Ic \&Ns Ta roman font, no preceding horizontal space (no arguments)
478: .It Ic \&Ap Ta apostrophe without surrounding whitespace (no arguments)
479: .It Ic \&Sm Ta switch horizontal spacing mode: Op Cm on | off
480: .It Ic \&Bk , \&Ek Ta keep block: Fl words
1.57 kristaps 481: .El
1.268 schwarze 482: .Ss Semantic markup for command line utilities
1.211 schwarze 483: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 484: .It Ic \&Nm Ta start a SYNOPSIS block with the name of a utility
485: .It Ic \&Fl Ta command line options (flags) (>=0 arguments)
486: .It Ic \&Cm Ta command modifier (>0 arguments)
487: .It Ic \&Ar Ta command arguments (>=0 arguments)
488: .It Ic \&Op , \&Oo , \&Oc Ta optional syntax elements (enclosure)
489: .It Ic \&Ic Ta internal or interactive command (>0 arguments)
490: .It Ic \&Ev Ta environmental variable (>0 arguments)
491: .It Ic \&Pa Ta file system path (>=0 arguments)
1.57 kristaps 492: .El
1.268 schwarze 493: .Ss Semantic markup for function libraries
1.211 schwarze 494: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 495: .It Ic \&Lb Ta function library (one argument)
496: .It Ic \&In Ta include file (one argument)
497: .It Ic \&Fd Ta other preprocessor directive (>0 arguments)
498: .It Ic \&Ft Ta function type (>0 arguments)
499: .It Ic \&Fo , \&Fc Ta function block: Ar funcname
500: .It Ic \&Fn Ta function name: Ar funcname Op Ar argument ...
501: .It Ic \&Fa Ta function argument (>0 arguments)
502: .It Ic \&Vt Ta variable type (>0 arguments)
503: .It Ic \&Va Ta variable name (>0 arguments)
504: .It Ic \&Dv Ta defined variable or preprocessor constant (>0 arguments)
505: .It Ic \&Er Ta error constant (>0 arguments)
506: .It Ic \&Ev Ta environmental variable (>0 arguments)
1.57 kristaps 507: .El
1.268 schwarze 508: .Ss Various semantic markup
1.211 schwarze 509: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 510: .It Ic \&An Ta author name (>0 arguments)
511: .It Ic \&Lk Ta hyperlink: Ar uri Op Ar display_name
512: .It Ic \&Mt Ta Do mailto Dc hyperlink: Ar localpart Ns @ Ns Ar domain
513: .It Ic \&Cd Ta kernel configuration declaration (>0 arguments)
514: .It Ic \&Ad Ta memory address (>0 arguments)
515: .It Ic \&Ms Ta mathematical symbol (>0 arguments)
1.190 schwarze 516: .El
1.211 schwarze 517: .Ss Physical markup
518: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 519: .It Ic \&Em Ta italic font or underline (emphasis) (>0 arguments)
520: .It Ic \&Sy Ta boldface font (symbolic) (>0 arguments)
1.275 schwarze 521: .It Ic \&No Ta return to roman font (normal) (>0 arguments)
1.274 schwarze 522: .It Ic \&Bf , \&Ef Ta font block: Fl Ar type | Cm \&Em | \&Li | \&Sy
1.82 kristaps 523: .El
1.211 schwarze 524: .Ss Physical enclosures
525: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 526: .It Ic \&Dq , \&Do , \&Dc Ta enclose in typographic double quotes: Dq text
527: .It Ic \&Qq , \&Qo , \&Qc Ta enclose in typewriter double quotes: Qq text
528: .It Ic \&Sq , \&So , \&Sc Ta enclose in single quotes: Sq text
529: .It Ic \&Pq , \&Po , \&Pc Ta enclose in parentheses: Pq text
530: .It Ic \&Bq , \&Bo , \&Bc Ta enclose in square brackets: Bq text
531: .It Ic \&Brq , \&Bro , \&Brc Ta enclose in curly braces: Brq text
532: .It Ic \&Aq , \&Ao , \&Ac Ta enclose in angle brackets: Aq text
533: .It Ic \&Eo , \&Ec Ta generic enclosure
1.195 schwarze 534: .El
1.211 schwarze 535: .Ss Text production
536: .Bl -column "Brq, Bro, Brc" description
1.274 schwarze 537: .It Ic \&Ex Fl std Ta standard command exit values: Op Ar utility ...
538: .It Ic \&Rv Fl std Ta standard function return values: Op Ar function ...
539: .It Ic \&St Ta reference to a standards document (one argument)
540: .It Ic \&At Ta At
541: .It Ic \&Bx Ta Bx
542: .It Ic \&Bsx Ta Bsx
543: .It Ic \&Nx Ta Nx
544: .It Ic \&Fx Ta Fx
545: .It Ic \&Ox Ta Ox
546: .It Ic \&Dx Ta Dx
1.195 schwarze 547: .El
1.211 schwarze 548: .Sh MACRO REFERENCE
549: This section is a canonical reference of all macros, arranged
550: alphabetically.
551: For the scoping of individual macros, see
552: .Sx MACRO SYNTAX .
1.274 schwarze 553: .Bl -tag -width 3n
554: .It Ic \&%A Ar first_name ... last_name
1.211 schwarze 555: Author name of an
1.274 schwarze 556: .Ic \&Rs
1.211 schwarze 557: block.
558: Multiple authors should each be accorded their own
1.274 schwarze 559: .Ic \%%A
1.211 schwarze 560: line.
561: Author names should be ordered with full or abbreviated forename(s)
562: first, then full surname.
1.274 schwarze 563: .It Ic \&%B Ar title
1.211 schwarze 564: Book title of an
1.274 schwarze 565: .Ic \&Rs
1.138 kristaps 566: block.
567: This macro may also be used in a non-bibliographic context when
1.63 kristaps 568: referring to book titles.
1.274 schwarze 569: .It Ic \&%C Ar location
1.63 kristaps 570: Publication city or location of an
1.274 schwarze 571: .Ic \&Rs
1.63 kristaps 572: block.
1.274 schwarze 573: .It Ic \&%D Oo Ar month day , Oc Ar year
1.63 kristaps 574: Publication date of an
1.274 schwarze 575: .Ic \&Rs
1.138 kristaps 576: block.
1.274 schwarze 577: Provide the full English name of the
578: .Ar month
579: and all four digits of the
1.181 schwarze 580: .Ar year .
1.274 schwarze 581: .It Ic \&%I Ar name
1.63 kristaps 582: Publisher or issuer name of an
1.274 schwarze 583: .Ic \&Rs
1.63 kristaps 584: block.
1.274 schwarze 585: .It Ic \&%J Ar name
1.63 kristaps 586: Journal name of an
1.274 schwarze 587: .Ic \&Rs
1.63 kristaps 588: block.
1.274 schwarze 589: .It Ic \&%N Ar number
1.63 kristaps 590: Issue number (usually for journals) of an
1.274 schwarze 591: .Ic \&Rs
1.63 kristaps 592: block.
1.274 schwarze 593: .It Ic \&%O Ar line
1.63 kristaps 594: Optional information of an
1.274 schwarze 595: .Ic \&Rs
1.63 kristaps 596: block.
1.274 schwarze 597: .It Ic \&%P Ar number
1.63 kristaps 598: Book or journal page number of an
1.274 schwarze 599: .Ic \&Rs
1.63 kristaps 600: block.
1.277 schwarze 601: Conventionally, the argument starts with
602: .Ql p.\&
603: for a single page or
604: .Ql pp.\&
605: for a range of pages, for example:
606: .Pp
607: .Dl .%P pp. 42\e(en47
1.274 schwarze 608: .It Ic \&%Q Ar name
1.63 kristaps 609: Institutional author (school, government, etc.) of an
1.274 schwarze 610: .Ic \&Rs
1.138 kristaps 611: block.
612: Multiple institutional authors should each be accorded their own
1.274 schwarze 613: .Ic \&%Q
1.63 kristaps 614: line.
1.274 schwarze 615: .It Ic \&%R Ar name
1.63 kristaps 616: Technical report name of an
1.274 schwarze 617: .Ic \&Rs
1.63 kristaps 618: block.
1.274 schwarze 619: .It Ic \&%T Ar title
1.63 kristaps 620: Article title of an
1.274 schwarze 621: .Ic \&Rs
1.138 kristaps 622: block.
623: This macro may also be used in a non-bibliographical context when
624: referring to article titles.
1.274 schwarze 625: .It Ic \&%U Ar protocol Ns :// Ns Ar path
1.70 kristaps 626: URI of reference document.
1.274 schwarze 627: .It Ic \&%V Ar number
1.63 kristaps 628: Volume number of an
1.274 schwarze 629: .Ic \&Rs
1.63 kristaps 630: block.
1.274 schwarze 631: .It Ic \&Ac
1.141 kristaps 632: Close an
1.274 schwarze 633: .Ic \&Ao
1.138 kristaps 634: block.
635: Does not have any tail arguments.
1.287 schwarze 636: .Tg Ad
1.274 schwarze 637: .It Ic \&Ad Ar address
1.141 kristaps 638: Memory address.
639: Do not use this for postal addresses.
1.63 kristaps 640: .Pp
1.64 kristaps 641: Examples:
1.173 kristaps 642: .Dl \&.Ad [0,$]
643: .Dl \&.Ad 0x00000000
1.287 schwarze 644: .Tg An
1.274 schwarze 645: .It Ic \&An Fl split | nosplit | Ar first_name ... last_name
1.100 kristaps 646: Author name.
1.196 schwarze 647: Can be used both for the authors of the program, function, or driver
648: documented in the manual, or for the authors of the manual itself.
1.141 kristaps 649: Requires either the name of an author or one of the following arguments:
1.140 kristaps 650: .Pp
651: .Bl -tag -width "-nosplitX" -offset indent -compact
1.64 kristaps 652: .It Fl split
1.141 kristaps 653: Start a new output line before each subsequent invocation of
1.274 schwarze 654: .Ic \&An .
1.64 kristaps 655: .It Fl nosplit
656: The opposite of
657: .Fl split .
658: .El
659: .Pp
1.141 kristaps 660: The default is
661: .Fl nosplit .
662: The effect of selecting either of the
663: .Fl split
664: modes ends at the beginning of the
665: .Em AUTHORS
666: section.
1.140 kristaps 667: In the
668: .Em AUTHORS
1.141 kristaps 669: section, the default is
670: .Fl nosplit
671: for the first author listing and
1.64 kristaps 672: .Fl split
1.141 kristaps 673: for all other author listings.
1.64 kristaps 674: .Pp
675: Examples:
1.173 kristaps 676: .Dl \&.An -nosplit
1.219 schwarze 677: .Dl \&.An Kristaps Dzonsons \&Aq \&Mt kristaps@bsd.lv
1.274 schwarze 678: .It Ic \&Ao Ar block
1.141 kristaps 679: Begin a block enclosed by angle brackets.
1.100 kristaps 680: Does not have any head arguments.
1.270 schwarze 681: This macro is almost never useful.
682: See
1.274 schwarze 683: .Ic \&Aq
1.270 schwarze 684: for more details.
1.287 schwarze 685: .Tg Ap
1.274 schwarze 686: .It Ic \&Ap
1.138 kristaps 687: Inserts an apostrophe without any surrounding whitespace.
1.124 kristaps 688: This is generally used as a grammatical device when referring to the verb
1.140 kristaps 689: form of a function.
690: .Pp
691: Examples:
1.173 kristaps 692: .Dl \&.Fn execve \&Ap d
1.287 schwarze 693: .Tg Aq
1.274 schwarze 694: .It Ic \&Aq Ar line
695: Enclose the rest of the input line in angle brackets.
1.270 schwarze 696: The only important use case is for email addresses.
697: See
1.274 schwarze 698: .Ic \&Mt
1.270 schwarze 699: for an example.
1.64 kristaps 700: .Pp
1.270 schwarze 701: Occasionally, it is used for names of characters and keys, for example:
702: .Bd -literal -offset indent
703: Press the
704: \&.Aq escape
705: key to ...
706: .Ed
1.64 kristaps 707: .Pp
1.270 schwarze 708: For URIs, use
1.274 schwarze 709: .Ic \&Lk
1.270 schwarze 710: instead, and
1.274 schwarze 711: .Ic \&In
1.270 schwarze 712: for
713: .Dq #include
714: directives.
715: Never wrap
1.274 schwarze 716: .Ic \&Ar
1.270 schwarze 717: in
1.274 schwarze 718: .Ic \&Aq .
1.270 schwarze 719: .Pp
720: Since
1.274 schwarze 721: .Ic \&Aq
1.270 schwarze 722: usually renders with non-ASCII characters in non-ASCII output modes,
723: do not use it where the ASCII characters
724: .Sq <
725: and
726: .Sq >
727: are required as syntax elements.
728: Instead, use these characters directly in such cases, combining them
729: with the macros
1.274 schwarze 730: .Ic \&Pf ,
731: .Ic \&Ns ,
1.64 kristaps 732: or
1.274 schwarze 733: .Ic \&Eo
1.270 schwarze 734: as needed.
1.64 kristaps 735: .Pp
736: See also
1.274 schwarze 737: .Ic \&Ao .
1.287 schwarze 738: .Tg Ar
1.274 schwarze 739: .It Ic \&Ar Op Ar placeholder ...
1.100 kristaps 740: Command arguments.
741: If an argument is not provided, the string
1.141 kristaps 742: .Dq file ...\&
1.66 kristaps 743: is used as a default.
1.64 kristaps 744: .Pp
745: Examples:
1.196 schwarze 746: .Dl ".Fl o Ar file"
747: .Dl ".Ar"
748: .Dl ".Ar arg1 , arg2 ."
749: .Pp
750: The arguments to the
1.274 schwarze 751: .Ic \&Ar
1.196 schwarze 752: macro are names and placeholders for command arguments;
753: for fixed strings to be passed verbatim as arguments, use
1.274 schwarze 754: .Ic \&Fl
1.196 schwarze 755: or
1.274 schwarze 756: .Ic \&Cm .
1.287 schwarze 757: .Tg At
1.274 schwarze 758: .It Ic \&At Op Ar version
1.220 schwarze 759: Formats an
760: .At
761: version.
1.141 kristaps 762: Accepts one optional argument:
1.140 kristaps 763: .Pp
764: .Bl -tag -width "v[1-7] | 32vX" -offset indent -compact
1.64 kristaps 765: .It Cm v[1-7] | 32v
766: A version of
767: .At .
1.192 schwarze 768: .It Cm III
769: .At III .
1.265 schwarze 770: .It Cm V | V.[1-4]
1.141 kristaps 771: A version of
772: .At V .
1.64 kristaps 773: .El
774: .Pp
1.141 kristaps 775: Note that these arguments do not begin with a hyphen.
1.64 kristaps 776: .Pp
777: Examples:
1.173 kristaps 778: .Dl \&.At
1.192 schwarze 779: .Dl \&.At III
1.173 kristaps 780: .Dl \&.At V.1
1.65 kristaps 781: .Pp
782: See also
1.274 schwarze 783: .Ic \&Bsx ,
784: .Ic \&Bx ,
785: .Ic \&Dx ,
786: .Ic \&Fx ,
787: .Ic \&Nx ,
1.65 kristaps 788: and
1.274 schwarze 789: .Ic \&Ox .
790: .It Ic \&Bc
1.141 kristaps 791: Close a
1.274 schwarze 792: .Ic \&Bo
1.138 kristaps 793: block.
794: Does not have any tail arguments.
1.287 schwarze 795: .Tg Bd
1.274 schwarze 796: .It Ic \&Bd Fl Ns Ar type Oo Fl offset Ar width Oc Op Fl compact
1.141 kristaps 797: Begin a display block.
798: Display blocks are used to select a different indentation and
799: justification than the one used by the surrounding text.
1.185 kristaps 800: They may contain both macro lines and text lines.
1.141 kristaps 801: By default, a display block is preceded by a vertical space.
1.64 kristaps 802: .Pp
1.141 kristaps 803: The
804: .Ar type
805: must be one of the following:
806: .Bl -tag -width 13n -offset indent
807: .It Fl centered
1.249 schwarze 808: Produce one output line from each input line, and center-justify each line.
1.141 kristaps 809: Using this display type is not recommended; many
810: .Nm
811: implementations render it poorly.
812: .It Fl filled
1.198 schwarze 813: Change the positions of line breaks to fill each line, and left- and
814: right-justify the resulting block.
1.141 kristaps 815: .It Fl literal
1.198 schwarze 816: Produce one output line from each input line,
817: and do not justify the block at all.
1.169 kristaps 818: Preserve white space as it appears in the input.
1.198 schwarze 819: Always use a constant-width font.
820: Use this for displaying source code.
1.64 kristaps 821: .It Fl ragged
1.198 schwarze 822: Change the positions of line breaks to fill each line, and left-justify
823: the resulting block.
1.64 kristaps 824: .It Fl unfilled
1.198 schwarze 825: The same as
826: .Fl literal ,
827: but using the same font as for normal text, which is a variable width font
828: if supported by the output device.
1.64 kristaps 829: .El
830: .Pp
1.141 kristaps 831: The
832: .Ar type
833: must be provided first.
834: Additional arguments may follow:
835: .Bl -tag -width 13n -offset indent
836: .It Fl offset Ar width
837: Indent the display by the
838: .Ar width ,
839: which may be one of the following:
1.64 kristaps 840: .Bl -item
841: .It
1.141 kristaps 842: One of the pre-defined strings
843: .Cm indent ,
1.198 schwarze 844: the width of a standard indentation (six constant width characters);
1.141 kristaps 845: .Cm indent-two ,
1.64 kristaps 846: twice
1.141 kristaps 847: .Cm indent ;
848: .Cm left ,
1.131 kristaps 849: which has no effect;
1.141 kristaps 850: .Cm right ,
851: which justifies to the right margin; or
852: .Cm center ,
1.249 schwarze 853: which aligns around an imagined center axis.
1.64 kristaps 854: .It
1.141 kristaps 855: A macro invocation, which selects a predefined width
856: associated with that macro.
1.100 kristaps 857: The most popular is the imaginary macro
1.67 kristaps 858: .Ar \&Ds ,
1.64 kristaps 859: which resolves to
1.141 kristaps 860: .Sy 6n .
1.64 kristaps 861: .It
1.215 schwarze 862: A scaling width as described in
863: .Xr roff 7 .
1.64 kristaps 864: .It
1.141 kristaps 865: An arbitrary string, which indents by the length of this string.
1.64 kristaps 866: .El
867: .Pp
1.141 kristaps 868: When the argument is missing,
869: .Fl offset
870: is ignored.
1.64 kristaps 871: .It Fl compact
1.141 kristaps 872: Do not assert vertical space before the display.
1.64 kristaps 873: .El
874: .Pp
875: Examples:
876: .Bd -literal -offset indent
1.141 kristaps 877: \&.Bd \-literal \-offset indent \-compact
1.65 kristaps 878: Hello world.
1.64 kristaps 879: \&.Ed
880: .Ed
1.66 kristaps 881: .Pp
882: See also
1.274 schwarze 883: .Ic \&D1
1.66 kristaps 884: and
1.274 schwarze 885: .Ic \&Dl .
1.287 schwarze 886: .Tg Bf
1.274 schwarze 887: .It Ic \&Bf Fl emphasis | literal | symbolic | Cm \&Em | \&Li | \&Sy
1.129 kristaps 888: Change the font mode for a scoped block of text.
889: The
890: .Fl emphasis
891: and
892: .Cm \&Em
893: argument are equivalent, as are
894: .Fl symbolic
895: and
1.144 schwarze 896: .Cm \&Sy ,
1.129 kristaps 897: and
898: .Fl literal
899: and
900: .Cm \&Li .
901: Without an argument, this macro does nothing.
902: The font mode continues until broken by a new font mode in a nested
903: scope or
1.274 schwarze 904: .Ic \&Ef
1.129 kristaps 905: is encountered.
906: .Pp
907: See also
1.274 schwarze 908: .Ic \&Li ,
909: .Ic \&Ef ,
910: .Ic \&Em ,
1.129 kristaps 911: and
1.274 schwarze 912: .Ic \&Sy .
1.287 schwarze 913: .Tg Bk
1.274 schwarze 914: .It Ic \&Bk Fl words
1.186 schwarze 915: For each macro, keep its output together on the same output line,
916: until the end of the macro or the end of the input line is reached,
917: whichever comes first.
1.185 kristaps 918: Line breaks in text lines are unaffected.
1.131 kristaps 919: .Pp
1.133 kristaps 920: The
921: .Fl words
1.141 kristaps 922: argument is required; additional arguments are ignored.
1.127 schwarze 923: .Pp
1.141 kristaps 924: The following example will not break within each
1.274 schwarze 925: .Ic \&Op
1.133 kristaps 926: macro line:
1.127 schwarze 927: .Bd -literal -offset indent
928: \&.Bk \-words
1.133 kristaps 929: \&.Op Fl f Ar flags
930: \&.Op Fl o Ar output
1.127 schwarze 931: \&.Ek
932: .Ed
1.129 kristaps 933: .Pp
1.133 kristaps 934: Be careful in using over-long lines within a keep block!
935: Doing so will clobber the right margin.
1.287 schwarze 936: .Tg Bl
1.274 schwarze 937: .It Xo
938: .Ic \&Bl
1.141 kristaps 939: .Fl Ns Ar type
1.131 kristaps 940: .Op Fl width Ar val
941: .Op Fl offset Ar val
942: .Op Fl compact
1.274 schwarze 943: .Op Ar col ...
944: .Xc
945: Begin a list.
946: Lists consist of items specified using the
947: .Ic \&It
948: macro, containing a head or a body or both.
1.131 kristaps 949: .Pp
1.141 kristaps 950: The list
951: .Ar type
952: is mandatory and must be specified first.
953: The
954: .Fl width
955: and
956: .Fl offset
1.240 schwarze 957: arguments accept macro names as described for
1.274 schwarze 958: .Ic \&Bd
1.240 schwarze 959: .Fl offset ,
960: scaling widths as described in
961: .Xr roff 7 ,
1.141 kristaps 962: or use the length of the given string.
963: The
964: .Fl offset
965: is a global indentation for the whole list, affecting both item heads
966: and bodies.
967: For those list types supporting it, the
968: .Fl width
969: argument requests an additional indentation of item bodies,
970: to be added to the
971: .Fl offset .
972: Unless the
973: .Fl compact
974: argument is specified, list entries are separated by vertical space.
975: .Pp
1.103 kristaps 976: A list must specify one of the following list types:
977: .Bl -tag -width 12n -offset indent
978: .It Fl bullet
1.141 kristaps 979: No item heads can be specified, but a bullet will be printed at the head
980: of each item.
981: Item bodies start on the same output line as the bullet
982: and are indented according to the
1.104 kristaps 983: .Fl width
1.141 kristaps 984: argument.
1.103 kristaps 985: .It Fl column
986: A columnated list.
1.104 kristaps 987: The
988: .Fl width
1.262 schwarze 989: argument has no effect; instead, the string length of each argument
990: specifies the width of one column.
1.141 kristaps 991: If the first line of the body of a
1.114 kristaps 992: .Fl column
993: list is not an
1.274 schwarze 994: .Ic \&It
1.141 kristaps 995: macro line,
1.274 schwarze 996: .Ic \&It
1.141 kristaps 997: contexts spanning one input line each are implied until an
1.274 schwarze 998: .Ic \&It
1.141 kristaps 999: macro line is encountered, at which point items start being interpreted as
1.114 kristaps 1000: described in the
1.274 schwarze 1001: .Ic \&It
1.114 kristaps 1002: documentation.
1.103 kristaps 1003: .It Fl dash
1.141 kristaps 1004: Like
1005: .Fl bullet ,
1006: except that dashes are used in place of bullets.
1.103 kristaps 1007: .It Fl diag
1008: Like
1009: .Fl inset ,
1.141 kristaps 1010: except that item heads are not parsed for macro invocations.
1.198 schwarze 1011: Most often used in the
1012: .Em DIAGNOSTICS
1013: section with error constants in the item heads.
1.103 kristaps 1014: .It Fl enum
1.141 kristaps 1015: A numbered list.
1.198 schwarze 1016: No item heads can be specified.
1.141 kristaps 1017: Formatted like
1018: .Fl bullet ,
1.291 schwarze 1019: except that ordinal numbers are used in place of bullets,
1.141 kristaps 1020: starting at 1.
1.103 kristaps 1021: .It Fl hang
1022: Like
1023: .Fl tag ,
1.141 kristaps 1024: except that the first lines of item bodies are not indented, but follow
1025: the item heads like in
1026: .Fl inset
1027: lists.
1.103 kristaps 1028: .It Fl hyphen
1029: Synonym for
1030: .Fl dash .
1031: .It Fl inset
1.141 kristaps 1032: Item bodies follow items heads on the same line, using normal inter-word
1033: spacing.
1034: Bodies are not indented, and the
1.104 kristaps 1035: .Fl width
1036: argument is ignored.
1.103 kristaps 1037: .It Fl item
1.141 kristaps 1038: No item heads can be specified, and none are printed.
1039: Bodies are not indented, and the
1.104 kristaps 1040: .Fl width
1041: argument is ignored.
1.103 kristaps 1042: .It Fl ohang
1.141 kristaps 1043: Item bodies start on the line following item heads and are not indented.
1.104 kristaps 1044: The
1045: .Fl width
1046: argument is ignored.
1.103 kristaps 1047: .It Fl tag
1.141 kristaps 1048: Item bodies are indented according to the
1.103 kristaps 1049: .Fl width
1050: argument.
1.141 kristaps 1051: When an item head fits inside the indentation, the item body follows
1052: this head on the same output line.
1053: Otherwise, the body starts on the output line following the head.
1.103 kristaps 1054: .El
1.114 kristaps 1055: .Pp
1.198 schwarze 1056: Lists may be nested within lists and displays.
1057: Nesting of
1058: .Fl column
1059: and
1060: .Fl enum
1061: lists may not be portable.
1062: .Pp
1.114 kristaps 1063: See also
1.274 schwarze 1064: .Ic \&El
1.141 kristaps 1065: and
1.274 schwarze 1066: .Ic \&It .
1067: .It Ic \&Bo Ar block
1.141 kristaps 1068: Begin a block enclosed by square brackets.
1.100 kristaps 1069: Does not have any head arguments.
1.65 kristaps 1070: .Pp
1071: Examples:
1.140 kristaps 1072: .Bd -literal -offset indent -compact
1.65 kristaps 1073: \&.Bo 1 ,
1.91 kristaps 1074: \&.Dv BUFSIZ \&Bc
1.65 kristaps 1075: .Ed
1076: .Pp
1077: See also
1.274 schwarze 1078: .Ic \&Bq .
1.287 schwarze 1079: .Tg Bq
1.274 schwarze 1080: .It Ic \&Bq Ar line
1.82 kristaps 1081: Encloses its arguments in square brackets.
1.65 kristaps 1082: .Pp
1083: Examples:
1.173 kristaps 1084: .Dl \&.Bq 1 , \&Dv BUFSIZ
1.65 kristaps 1085: .Pp
1086: .Em Remarks :
1087: this macro is sometimes abused to emulate optional arguments for
1088: commands; the correct macros to use for this purpose are
1.274 schwarze 1089: .Ic \&Op ,
1090: .Ic \&Oo ,
1.65 kristaps 1091: and
1.274 schwarze 1092: .Ic \&Oc .
1.65 kristaps 1093: .Pp
1094: See also
1.274 schwarze 1095: .Ic \&Bo .
1096: .It Ic \&Brc
1.141 kristaps 1097: Close a
1.274 schwarze 1098: .Ic \&Bro
1.138 kristaps 1099: block.
1100: Does not have any tail arguments.
1.274 schwarze 1101: .It Ic \&Bro Ar block
1.141 kristaps 1102: Begin a block enclosed by curly braces.
1.100 kristaps 1103: Does not have any head arguments.
1.65 kristaps 1104: .Pp
1105: Examples:
1.140 kristaps 1106: .Bd -literal -offset indent -compact
1.65 kristaps 1107: \&.Bro 1 , ... ,
1.91 kristaps 1108: \&.Va n \&Brc
1.65 kristaps 1109: .Ed
1110: .Pp
1111: See also
1.274 schwarze 1112: .Ic \&Brq .
1.287 schwarze 1113: .Tg Brq
1.274 schwarze 1114: .It Ic \&Brq Ar line
1.65 kristaps 1115: Encloses its arguments in curly braces.
1116: .Pp
1117: Examples:
1.173 kristaps 1118: .Dl \&.Brq 1 , ... , \&Va n
1.65 kristaps 1119: .Pp
1120: See also
1.274 schwarze 1121: .Ic \&Bro .
1.287 schwarze 1122: .Tg Bsx
1.274 schwarze 1123: .It Ic \&Bsx Op Ar version
1.220 schwarze 1124: Format the
1125: .Bsx
1126: version provided as an argument, or a default value if
1.65 kristaps 1127: no argument is provided.
1128: .Pp
1129: Examples:
1.173 kristaps 1130: .Dl \&.Bsx 1.0
1131: .Dl \&.Bsx
1.65 kristaps 1132: .Pp
1133: See also
1.274 schwarze 1134: .Ic \&At ,
1135: .Ic \&Bx ,
1136: .Ic \&Dx ,
1137: .Ic \&Fx ,
1138: .Ic \&Nx ,
1.65 kristaps 1139: and
1.274 schwarze 1140: .Ic \&Ox .
1141: .It Ic \&Bt
1.230 schwarze 1142: Supported only for compatibility, do not use this in new manuals.
1.66 kristaps 1143: Prints
1.198 schwarze 1144: .Dq is currently in beta test.
1.287 schwarze 1145: .Tg Bx
1.274 schwarze 1146: .It Ic \&Bx Op Ar version Op Ar variant
1.220 schwarze 1147: Format the
1148: .Bx
1149: version provided as an argument, or a default value if no
1.65 kristaps 1150: argument is provided.
1151: .Pp
1152: Examples:
1.198 schwarze 1153: .Dl \&.Bx 4.3 Tahoe
1.173 kristaps 1154: .Dl \&.Bx 4.4
1155: .Dl \&.Bx
1.65 kristaps 1156: .Pp
1157: See also
1.274 schwarze 1158: .Ic \&At ,
1159: .Ic \&Bsx ,
1160: .Ic \&Dx ,
1161: .Ic \&Fx ,
1162: .Ic \&Nx ,
1.65 kristaps 1163: and
1.274 schwarze 1164: .Ic \&Ox .
1.287 schwarze 1165: .Tg Cd
1.274 schwarze 1166: .It Ic \&Cd Ar line
1.141 kristaps 1167: Kernel configuration declaration.
1.100 kristaps 1168: This denotes strings accepted by
1.66 kristaps 1169: .Xr config 8 .
1.196 schwarze 1170: It is most often used in section 4 manual pages.
1.66 kristaps 1171: .Pp
1172: Examples:
1.173 kristaps 1173: .Dl \&.Cd device le0 at scode?
1.66 kristaps 1174: .Pp
1175: .Em Remarks :
1176: this macro is commonly abused by using quoted literals to retain
1.138 kristaps 1177: whitespace and align consecutive
1.274 schwarze 1178: .Ic \&Cd
1.100 kristaps 1179: declarations.
1180: This practise is discouraged.
1.287 schwarze 1181: .Tg Cm
1.274 schwarze 1182: .It Ic \&Cm Ar keyword ...
1.100 kristaps 1183: Command modifiers.
1.278 schwarze 1184: Typically used for fixed strings passed as arguments to interactive
1185: commands, to commands in interpreted scripts, or to configuration
1186: file directives, unless
1.274 schwarze 1187: .Ic \&Fl
1.196 schwarze 1188: is more appropriate.
1.66 kristaps 1189: .Pp
1190: Examples:
1.196 schwarze 1191: .Dl ".Nm mt Fl f Ar device Cm rewind"
1192: .Dl ".Nm ps Fl o Cm pid , Ns Cm command"
1193: .Dl ".Nm dd Cm if= Ns Ar file1 Cm of= Ns Ar file2"
1.278 schwarze 1194: .Dl ".Ic set Fl o Cm vi"
1195: .Dl ".Ic lookup Cm file bind"
1196: .Dl ".Ic permit Ar identity Op Cm as Ar target"
1.287 schwarze 1197: .Tg D1
1.274 schwarze 1198: .It Ic \&D1 Ar line
1.100 kristaps 1199: One-line indented display.
1200: This is formatted by the default rules and is useful for simple indented
1201: statements.
1202: It is followed by a newline.
1.66 kristaps 1203: .Pp
1204: Examples:
1.173 kristaps 1205: .Dl \&.D1 \&Fl abcdefgh
1.66 kristaps 1206: .Pp
1207: See also
1.274 schwarze 1208: .Ic \&Bd
1.66 kristaps 1209: and
1.274 schwarze 1210: .Ic \&Dl .
1211: .It Ic \&Db
1.242 schwarze 1212: This macro is obsolete.
1213: No replacement is needed.
1214: It is ignored by
1215: .Xr mandoc 1
1216: and groff including its arguments.
1217: It was formerly used to toggle a debugging mode.
1.274 schwarze 1218: .It Ic \&Dc
1.141 kristaps 1219: Close a
1.274 schwarze 1220: .Ic \&Do
1.138 kristaps 1221: block.
1222: Does not have any tail arguments.
1.287 schwarze 1223: .Tg Dd
1.274 schwarze 1224: .It Ic \&Dd Cm $\&Mdocdate$ | Ar month day , year
1.281 schwarze 1225: Document date for display in the page footer,
1226: by convention the date of the last change.
1.100 kristaps 1227: This is the mandatory first macro of any
1.66 kristaps 1228: .Nm
1.100 kristaps 1229: manual.
1.66 kristaps 1230: .Pp
1.82 kristaps 1231: The
1.181 schwarze 1232: .Ar month
1233: is the full English month name, the
1234: .Ar day
1.271 schwarze 1235: is an integer number, and the
1.181 schwarze 1236: .Ar year
1237: is the full four-digit year.
1238: .Pp
1239: Other arguments are not portable; the
1240: .Xr mandoc 1
1241: utility handles them as follows:
1242: .Bl -dash -offset 3n -compact
1243: .It
1244: To have the date automatically filled in by the
1245: .Ox
1246: version of
1.72 kristaps 1247: .Xr cvs 1 ,
1.181 schwarze 1248: the special string
1249: .Dq $\&Mdocdate$
1250: can be given as an argument.
1251: .It
1.233 schwarze 1252: The traditional, purely numeric
1253: .Xr man 7
1254: format
1255: .Ar year Ns \(en Ns Ar month Ns \(en Ns Ar day
1256: is accepted, too.
1.181 schwarze 1257: .It
1258: If a date string cannot be parsed, it is used verbatim.
1259: .It
1260: If no date string is given, the current date is used.
1261: .El
1.66 kristaps 1262: .Pp
1263: Examples:
1.173 kristaps 1264: .Dl \&.Dd $\&Mdocdate$
1.271 schwarze 1265: .Dl \&.Dd $\&Mdocdate: July 2 2018$
1266: .Dl \&.Dd July 2, 2018
1.66 kristaps 1267: .Pp
1268: See also
1.274 schwarze 1269: .Ic \&Dt
1.66 kristaps 1270: and
1.274 schwarze 1271: .Ic \&Os .
1.287 schwarze 1272: .Tg Dl
1.274 schwarze 1273: .It Ic \&Dl Ar line
1.297 ! schwarze 1274: One-line indented literal display.
! 1275: This is formatted using a constant-width font
! 1276: and is useful for commands and invocations.
1.100 kristaps 1277: It is followed by a newline.
1.66 kristaps 1278: .Pp
1279: Examples:
1.173 kristaps 1280: .Dl \&.Dl % mandoc mdoc.7 \e(ba less
1.66 kristaps 1281: .Pp
1282: See also
1.274 schwarze 1283: .Ic \&Ql ,
1284: .Ic \&Bd Fl literal ,
1.66 kristaps 1285: and
1.274 schwarze 1286: .Ic \&D1 .
1287: .It Ic \&Do Ar block
1.141 kristaps 1288: Begin a block enclosed by double quotes.
1.138 kristaps 1289: Does not have any head arguments.
1.66 kristaps 1290: .Pp
1291: Examples:
1.140 kristaps 1292: .Bd -literal -offset indent -compact
1293: \&.Do
1294: April is the cruellest month
1295: \&.Dc
1296: \e(em T.S. Eliot
1297: .Ed
1.66 kristaps 1298: .Pp
1299: See also
1.274 schwarze 1300: .Ic \&Dq .
1.287 schwarze 1301: .Tg Dq
1.274 schwarze 1302: .It Ic \&Dq Ar line
1.138 kristaps 1303: Encloses its arguments in
1304: .Dq typographic
1305: double-quotes.
1.66 kristaps 1306: .Pp
1307: Examples:
1.91 kristaps 1308: .Bd -literal -offset indent -compact
1.66 kristaps 1309: \&.Dq April is the cruellest month
1310: \e(em T.S. Eliot
1311: .Ed
1312: .Pp
1313: See also
1.274 schwarze 1314: .Ic \&Qq ,
1315: .Ic \&Sq ,
1.138 kristaps 1316: and
1.274 schwarze 1317: .Ic \&Do .
1.287 schwarze 1318: .Tg Dt
1.274 schwarze 1319: .It Ic \&Dt Ar TITLE section Op Ar arch
1.233 schwarze 1320: Document title for display in the page header.
1.100 kristaps 1321: This is the mandatory second macro of any
1.66 kristaps 1322: .Nm
1.100 kristaps 1323: file.
1.66 kristaps 1324: .Pp
1325: Its arguments are as follows:
1.233 schwarze 1326: .Bl -tag -width section -offset 2n
1327: .It Ar TITLE
1.111 kristaps 1328: The document's title (name), defaulting to
1.233 schwarze 1329: .Dq UNTITLED
1.111 kristaps 1330: if unspecified.
1.233 schwarze 1331: To achieve a uniform appearance of page header lines,
1332: it should by convention be all caps.
1.141 kristaps 1333: .It Ar section
1.100 kristaps 1334: The manual section.
1335: This may be one of
1.225 schwarze 1336: .Cm 1
1.246 schwarze 1337: .Pq General Commands ,
1.225 schwarze 1338: .Cm 2
1.246 schwarze 1339: .Pq System Calls ,
1.225 schwarze 1340: .Cm 3
1.246 schwarze 1341: .Pq Library Functions ,
1.225 schwarze 1342: .Cm 3p
1.246 schwarze 1343: .Pq Perl Library ,
1.225 schwarze 1344: .Cm 4
1.246 schwarze 1345: .Pq Device Drivers ,
1.225 schwarze 1346: .Cm 5
1.246 schwarze 1347: .Pq File Formats ,
1.225 schwarze 1348: .Cm 6
1.246 schwarze 1349: .Pq Games ,
1.225 schwarze 1350: .Cm 7
1.246 schwarze 1351: .Pq Miscellaneous Information ,
1.225 schwarze 1352: .Cm 8
1.246 schwarze 1353: .Pq System Manager's Manual ,
1354: or
1.225 schwarze 1355: .Cm 9
1.246 schwarze 1356: .Pq Kernel Developer's Manual .
1.111 kristaps 1357: It should correspond to the manual's filename suffix and defaults to
1.233 schwarze 1358: the empty string if unspecified.
1.141 kristaps 1359: .It Ar arch
1.213 schwarze 1360: This specifies the machine architecture a manual page applies to,
1361: where relevant, for example
1362: .Cm alpha ,
1363: .Cm amd64 ,
1364: .Cm i386 ,
1.66 kristaps 1365: or
1.213 schwarze 1366: .Cm sparc64 .
1.243 schwarze 1367: The list of valid architectures varies by operating system.
1.66 kristaps 1368: .El
1369: .Pp
1370: Examples:
1.173 kristaps 1371: .Dl \&.Dt FOO 1
1372: .Dl \&.Dt FOO 9 i386
1.66 kristaps 1373: .Pp
1374: See also
1.274 schwarze 1375: .Ic \&Dd
1.66 kristaps 1376: and
1.274 schwarze 1377: .Ic \&Os .
1.287 schwarze 1378: .Tg Dv
1.274 schwarze 1379: .It Ic \&Dv Ar identifier ...
1.189 kristaps 1380: Defined variables such as preprocessor constants, constant symbols,
1381: enumeration values, and so on.
1.66 kristaps 1382: .Pp
1383: Examples:
1.189 kristaps 1384: .Dl \&.Dv NULL
1.173 kristaps 1385: .Dl \&.Dv BUFSIZ
1386: .Dl \&.Dv STDOUT_FILENO
1.66 kristaps 1387: .Pp
1388: See also
1.274 schwarze 1389: .Ic \&Er
1.189 kristaps 1390: and
1.274 schwarze 1391: .Ic \&Ev
1.222 schwarze 1392: for special-purpose constants,
1.274 schwarze 1393: .Ic \&Va
1.222 schwarze 1394: for variable symbols, and
1.274 schwarze 1395: .Ic \&Fd
1.222 schwarze 1396: for listing preprocessor variable definitions in the
1397: .Em SYNOPSIS .
1.287 schwarze 1398: .Tg Dx
1.274 schwarze 1399: .It Ic \&Dx Op Ar version
1.220 schwarze 1400: Format the
1401: .Dx
1402: version provided as an argument, or a default
1.66 kristaps 1403: value if no argument is provided.
1404: .Pp
1405: Examples:
1.173 kristaps 1406: .Dl \&.Dx 2.4.1
1407: .Dl \&.Dx
1.66 kristaps 1408: .Pp
1409: See also
1.274 schwarze 1410: .Ic \&At ,
1411: .Ic \&Bsx ,
1412: .Ic \&Bx ,
1413: .Ic \&Fx ,
1414: .Ic \&Nx ,
1.66 kristaps 1415: and
1.274 schwarze 1416: .Ic \&Ox .
1417: .It Ic \&Ec Op Ar closing_delimiter
1.131 kristaps 1418: Close a scope started by
1.274 schwarze 1419: .Ic \&Eo .
1.131 kristaps 1420: .Pp
1421: The
1.274 schwarze 1422: .Ar closing_delimiter
1.131 kristaps 1423: argument is used as the enclosure tail, for example, specifying \e(rq
1424: will emulate
1.274 schwarze 1425: .Ic \&Dc .
1426: .It Ic \&Ed
1.131 kristaps 1427: End a display context started by
1.274 schwarze 1428: .Ic \&Bd .
1429: .It Ic \&Ef
1.141 kristaps 1430: End a font mode context started by
1.274 schwarze 1431: .Ic \&Bf .
1432: .It Ic \&Ek
1.141 kristaps 1433: End a keep context started by
1.274 schwarze 1434: .Ic \&Bk .
1435: .It Ic \&El
1.141 kristaps 1436: End a list context started by
1.274 schwarze 1437: .Ic \&Bl .
1.117 kristaps 1438: See also
1.274 schwarze 1439: .Ic \&It .
1.287 schwarze 1440: .Tg Em
1.274 schwarze 1441: .It Ic \&Em Ar word ...
1.235 schwarze 1442: Request an italic font.
1443: If the output device does not provide that, underline.
1444: .Pp
1445: This is most often used for stress emphasis (not to be confused with
1446: importance, see
1.274 schwarze 1447: .Ic \&Sy ) .
1.235 schwarze 1448: In the rare cases where none of the semantic markup macros fit,
1449: it can also be used for technical terms and placeholders, except
1450: that for syntax elements,
1.274 schwarze 1451: .Ic \&Sy
1.235 schwarze 1452: and
1.274 schwarze 1453: .Ic \&Ar
1.235 schwarze 1454: are preferred, respectively.
1.66 kristaps 1455: .Pp
1456: Examples:
1.235 schwarze 1457: .Bd -literal -compact -offset indent
1458: Selected lines are those
1459: \&.Em not
1460: matching any of the specified patterns.
1461: Some of the functions use a
1462: \&.Em hold space
1463: to save the pattern space for subsequent retrieval.
1464: .Ed
1.138 kristaps 1465: .Pp
1466: See also
1.274 schwarze 1467: .Ic \&No ,
1468: .Ic \&Ql ,
1.138 kristaps 1469: and
1.274 schwarze 1470: .Ic \&Sy .
1471: .It Ic \&En Ar word ...
1.231 schwarze 1472: This macro is obsolete.
1473: Use
1.274 schwarze 1474: .Ic \&Eo
1.231 schwarze 1475: or any of the other enclosure macros.
1476: .Pp
1477: It encloses its argument in the delimiters specified by the last
1.274 schwarze 1478: .Ic \&Es
1.231 schwarze 1479: macro.
1.287 schwarze 1480: .Tg Eo
1.274 schwarze 1481: .It Ic \&Eo Op Ar opening_delimiter
1.131 kristaps 1482: An arbitrary enclosure.
1483: The
1.274 schwarze 1484: .Ar opening_delimiter
1.131 kristaps 1485: argument is used as the enclosure head, for example, specifying \e(lq
1486: will emulate
1.274 schwarze 1487: .Ic \&Do .
1.287 schwarze 1488: .Tg Er
1.274 schwarze 1489: .It Ic \&Er Ar identifier ...
1.189 kristaps 1490: Error constants for definitions of the
1491: .Va errno
1492: libc global variable.
1.196 schwarze 1493: This is most often used in section 2 and 3 manual pages.
1.66 kristaps 1494: .Pp
1495: Examples:
1.173 kristaps 1496: .Dl \&.Er EPERM
1497: .Dl \&.Er ENOENT
1.66 kristaps 1498: .Pp
1499: See also
1.274 schwarze 1500: .Ic \&Dv
1.189 kristaps 1501: for general constants.
1.274 schwarze 1502: .It Ic \&Es Ar opening_delimiter closing_delimiter
1.231 schwarze 1503: This macro is obsolete.
1504: Use
1.274 schwarze 1505: .Ic \&Eo
1.231 schwarze 1506: or any of the other enclosure macros.
1507: .Pp
1508: It takes two arguments, defining the delimiters to be used by subsequent
1.274 schwarze 1509: .Ic \&En
1.231 schwarze 1510: macros.
1.287 schwarze 1511: .Tg Ev
1.274 schwarze 1512: .It Ic \&Ev Ar identifier ...
1.66 kristaps 1513: Environmental variables such as those specified in
1514: .Xr environ 7 .
1515: .Pp
1516: Examples:
1.173 kristaps 1517: .Dl \&.Ev DISPLAY
1518: .Dl \&.Ev PATH
1.189 kristaps 1519: .Pp
1520: See also
1.274 schwarze 1521: .Ic \&Dv
1.189 kristaps 1522: for general constants.
1.287 schwarze 1523: .Tg Ex
1.274 schwarze 1524: .It Ic \&Ex Fl std Op Ar utility ...
1.191 kristaps 1525: Insert a standard sentence regarding command exit values of 0 on success
1526: and >0 on failure.
1.196 schwarze 1527: This is most often used in section 1, 6, and 8 manual pages.
1.141 kristaps 1528: .Pp
1.191 kristaps 1529: If
1.66 kristaps 1530: .Ar utility
1.141 kristaps 1531: is not specified, the document's name set by
1.274 schwarze 1532: .Ic \&Nm
1.141 kristaps 1533: is used.
1.191 kristaps 1534: Multiple
1535: .Ar utility
1536: arguments are treated as separate utilities.
1.139 kristaps 1537: .Pp
1538: See also
1.274 schwarze 1539: .Ic \&Rv .
1.287 schwarze 1540: .Tg Fa
1.274 schwarze 1541: .It Ic \&Fa Ar argument ...
1.239 schwarze 1542: Function argument or parameter.
1.232 schwarze 1543: Each argument may be a name and a type (recommended for the
1544: .Em SYNOPSIS
1545: section), a name alone (for function invocations),
1546: or a type alone (for function prototypes).
1547: If both a type and a name are given or if the type consists of multiple
1548: words, all words belonging to the same function argument have to be
1549: given in a single argument to the
1.274 schwarze 1550: .Ic \&Fa
1.232 schwarze 1551: macro.
1552: .Pp
1553: This macro is also used to specify the field name of a structure.
1554: .Pp
1.117 kristaps 1555: Most often, the
1.274 schwarze 1556: .Ic \&Fa
1.117 kristaps 1557: macro is used in the
1558: .Em SYNOPSIS
1.120 kristaps 1559: within
1.274 schwarze 1560: .Ic \&Fo
1.232 schwarze 1561: blocks when documenting multi-line function prototypes.
1.117 kristaps 1562: If invoked with multiple arguments, the arguments are separated by a
1563: comma.
1564: Furthermore, if the following macro is another
1.274 schwarze 1565: .Ic \&Fa ,
1.117 kristaps 1566: the last argument will also have a trailing comma.
1567: .Pp
1568: Examples:
1.173 kristaps 1569: .Dl \&.Fa \(dqconst char *p\(dq
1570: .Dl \&.Fa \(dqint a\(dq \(dqint b\(dq \(dqint c\(dq
1.232 schwarze 1571: .Dl \&.Fa \(dqchar *\(dq size_t
1.120 kristaps 1572: .Pp
1573: See also
1.274 schwarze 1574: .Ic \&Fo .
1575: .It Ic \&Fc
1.141 kristaps 1576: End a function context started by
1.274 schwarze 1577: .Ic \&Fo .
1.287 schwarze 1578: .Tg Fd
1.274 schwarze 1579: .It Ic \&Fd Pf # Ar directive Op Ar argument ...
1.222 schwarze 1580: Preprocessor directive, in particular for listing it in the
1581: .Em SYNOPSIS .
1582: Historically, it was also used to document include files.
1583: The latter usage has been deprecated in favour of
1.274 schwarze 1584: .Ic \&In .
1.222 schwarze 1585: .Pp
1586: Examples:
1587: .Dl \&.Fd #define sa_handler __sigaction_u.__sa_handler
1588: .Dl \&.Fd #define SIO_MAXNFDS
1589: .Dl \&.Fd #ifdef FS_DEBUG
1590: .Dl \&.Ft void
1591: .Dl \&.Fn dbg_open \(dqconst char *\(dq
1592: .Dl \&.Fd #endif
1.117 kristaps 1593: .Pp
1594: See also
1.222 schwarze 1595: .Sx MANUAL STRUCTURE ,
1.274 schwarze 1596: .Ic \&In ,
1.122 kristaps 1597: and
1.274 schwarze 1598: .Ic \&Dv .
1.287 schwarze 1599: .Tg Fl
1.274 schwarze 1600: .It Ic \&Fl Op Ar word ...
1.196 schwarze 1601: Command-line flag or option.
1.100 kristaps 1602: Used when listing arguments to command-line utilities.
1.286 schwarze 1603: For each argument, prints an ASCII hyphen-minus character
1604: .Sq \- ,
1605: immediately followed by the argument.
1606: If no arguments are provided, a hyphen-minus is printed followed by a space.
1607: If the argument is a macro, a hyphen-minus is prefixed
1608: to the subsequent macro output.
1609: .Pp
1610: Examples:
1611: .Dl ".Nm du Op Fl H | L | P"
1612: .Dl ".Nm ls Op Fl 1AaCcdFfgHhikLlmnopqRrSsTtux"
1613: .Dl ".Nm route Cm add Fl inet Ar destination gateway"
1614: .Dl ".Nm locate.updatedb Op Fl \e-fcodes Ns = Ns Ar dbfile"
1615: .Dl ".Nm aucat Fl o Fl"
1616: .Dl ".Nm kill Fl Ar signal_number"
1617: .Pp
1.288 schwarze 1618: For GNU-style long options, escaping the additional hyphen-minus is not
1.286 schwarze 1619: strictly required, but may be safer with future versions of GNU troff; see
1620: .Xr mandoc_char 7
1621: for details.
1.79 kristaps 1622: .Pp
1623: See also
1.274 schwarze 1624: .Ic \&Cm .
1.287 schwarze 1625: .Tg Fn
1.274 schwarze 1626: .It Ic \&Fn Ar funcname Op Ar argument ...
1.119 kristaps 1627: A function name.
1.120 kristaps 1628: .Pp
1.122 kristaps 1629: Function arguments are surrounded in parenthesis and
1.119 kristaps 1630: are delimited by commas.
1631: If no arguments are specified, blank parenthesis are output.
1.196 schwarze 1632: In the
1633: .Em SYNOPSIS
1634: section, this macro starts a new output line,
1635: and a blank line is automatically inserted between function definitions.
1.119 kristaps 1636: .Pp
1637: Examples:
1.203 kristaps 1638: .Dl \&.Fn \(dqint funcname\(dq \(dqint arg0\(dq \(dqint arg1\(dq
1639: .Dl \&.Fn funcname \(dqint arg0\(dq
1.173 kristaps 1640: .Dl \&.Fn funcname arg0
1.276 schwarze 1641: .Bd -literal -offset indent
1.120 kristaps 1642: \&.Ft functype
1643: \&.Fn funcname
1644: .Ed
1.119 kristaps 1645: .Pp
1.163 schwarze 1646: When referring to a function documented in another manual page, use
1.274 schwarze 1647: .Ic \&Xr
1.163 schwarze 1648: instead.
1.119 kristaps 1649: See also
1.196 schwarze 1650: .Sx MANUAL STRUCTURE ,
1.274 schwarze 1651: .Ic \&Fo ,
1.119 kristaps 1652: and
1.274 schwarze 1653: .Ic \&Ft .
1.287 schwarze 1654: .Tg Fo
1.274 schwarze 1655: .It Ic \&Fo Ar funcname
1.120 kristaps 1656: Begin a function block.
1657: This is a multi-line version of
1.274 schwarze 1658: .Ic \&Fn .
1.120 kristaps 1659: .Pp
1660: Invocations usually occur in the following context:
1661: .Bd -ragged -offset indent
1.274 schwarze 1662: .Pf \. Ic \&Ft Ar functype
1.120 kristaps 1663: .br
1.274 schwarze 1664: .Pf \. Ic \&Fo Ar funcname
1.120 kristaps 1665: .br
1.274 schwarze 1666: .Pf \. Ic \&Fa Qq Ar argtype Ar argname
1.120 kristaps 1667: .br
1.183 kristaps 1668: \&.\.\.
1.120 kristaps 1669: .br
1.274 schwarze 1670: .Pf \. Ic \&Fc
1.120 kristaps 1671: .Ed
1672: .Pp
1673: A
1.274 schwarze 1674: .Ic \&Fo
1.120 kristaps 1675: scope is closed by
1.274 schwarze 1676: .Ic \&Fc .
1.120 kristaps 1677: .Pp
1678: See also
1.122 kristaps 1679: .Sx MANUAL STRUCTURE ,
1.274 schwarze 1680: .Ic \&Fa ,
1681: .Ic \&Fc ,
1.120 kristaps 1682: and
1.274 schwarze 1683: .Ic \&Ft .
1684: .It Ic \&Fr Ar number
1.231 schwarze 1685: This macro is obsolete.
1686: No replacement markup is needed.
1.198 schwarze 1687: .Pp
1.231 schwarze 1688: It was used to show numerical function return values in an italic font.
1.287 schwarze 1689: .Tg Ft
1.274 schwarze 1690: .It Ic \&Ft Ar functype
1.120 kristaps 1691: A function type.
1692: .Pp
1.196 schwarze 1693: In the
1694: .Em SYNOPSIS
1695: section, a new output line is started after this macro.
1696: .Pp
1.120 kristaps 1697: Examples:
1.173 kristaps 1698: .Dl \&.Ft int
1.120 kristaps 1699: .Bd -literal -offset indent -compact
1700: \&.Ft functype
1701: \&.Fn funcname
1702: .Ed
1703: .Pp
1704: See also
1.122 kristaps 1705: .Sx MANUAL STRUCTURE ,
1.274 schwarze 1706: .Ic \&Fn ,
1.120 kristaps 1707: and
1.274 schwarze 1708: .Ic \&Fo .
1.287 schwarze 1709: .Tg Fx
1.274 schwarze 1710: .It Ic \&Fx Op Ar version
1.144 schwarze 1711: Format the
1712: .Fx
1713: version provided as an argument, or a default value
1.65 kristaps 1714: if no argument is provided.
1715: .Pp
1716: Examples:
1.173 kristaps 1717: .Dl \&.Fx 7.1
1718: .Dl \&.Fx
1.65 kristaps 1719: .Pp
1720: See also
1.274 schwarze 1721: .Ic \&At ,
1722: .Ic \&Bsx ,
1723: .Ic \&Bx ,
1724: .Ic \&Dx ,
1725: .Ic \&Nx ,
1.65 kristaps 1726: and
1.274 schwarze 1727: .Ic \&Ox .
1728: .It Ic \&Hf Ar filename
1.198 schwarze 1729: This macro is not implemented in
1730: .Xr mandoc 1 .
1731: It was used to include the contents of a (header) file literally.
1.287 schwarze 1732: .Tg Ic
1.274 schwarze 1733: .It Ic \&Ic Ar keyword ...
1.278 schwarze 1734: Internal or interactive command, or configuration instruction
1735: in a configuration file.
1736: See also
1737: .Ic \&Cm .
1.132 kristaps 1738: .Pp
1739: Examples:
1.196 schwarze 1740: .Dl \&.Ic :wq
1.173 kristaps 1741: .Dl \&.Ic hash
1742: .Dl \&.Ic alias
1.132 kristaps 1743: .Pp
1744: Note that using
1.274 schwarze 1745: .Ic \&Ql ,
1746: .Ic \&Dl ,
1.273 schwarze 1747: or
1.274 schwarze 1748: .Ic \&Bd Fl literal
1.273 schwarze 1749: is preferred for displaying code samples; the
1.274 schwarze 1750: .Ic \&Ic
1.273 schwarze 1751: macro is used when referring to an individual command name.
1.287 schwarze 1752: .Tg In
1.274 schwarze 1753: .It Ic \&In Ar filename
1.251 schwarze 1754: The name of an include file.
1755: This macro is most often used in section 2, 3, and 9 manual pages.
1756: .Pp
1.196 schwarze 1757: When invoked as the first macro on an input line in the
1.118 kristaps 1758: .Em SYNOPSIS
1.196 schwarze 1759: section, the argument is displayed in angle brackets
1760: and preceded by
1.251 schwarze 1761: .Qq #include ,
1.196 schwarze 1762: and a blank line is inserted in front if there is a preceding
1763: function declaration.
1.251 schwarze 1764: In other sections, it only encloses its argument in angle brackets
1765: and causes no line break.
1.118 kristaps 1766: .Pp
1.122 kristaps 1767: Examples:
1.196 schwarze 1768: .Dl \&.In sys/types.h
1.122 kristaps 1769: .Pp
1770: See also
1771: .Sx MANUAL STRUCTURE .
1.287 schwarze 1772: .Tg It
1.274 schwarze 1773: .It Ic \&It Op Ar head
1.120 kristaps 1774: A list item.
1775: The syntax of this macro depends on the list type.
1.114 kristaps 1776: .Pp
1777: Lists
1778: of type
1779: .Fl hang ,
1780: .Fl ohang ,
1781: .Fl inset ,
1782: and
1783: .Fl diag
1.120 kristaps 1784: have the following syntax:
1.114 kristaps 1785: .Pp
1.274 schwarze 1786: .D1 Pf \. Ic \&It Ar args
1.114 kristaps 1787: .Pp
1788: Lists of type
1789: .Fl bullet ,
1790: .Fl dash ,
1791: .Fl enum ,
1792: .Fl hyphen
1793: and
1794: .Fl item
1.120 kristaps 1795: have the following syntax:
1.114 kristaps 1796: .Pp
1.274 schwarze 1797: .D1 Pf \. Ic \&It
1.114 kristaps 1798: .Pp
1799: with subsequent lines interpreted within the scope of the
1.274 schwarze 1800: .Ic \&It
1.114 kristaps 1801: until either a closing
1.274 schwarze 1802: .Ic \&El
1.114 kristaps 1803: or another
1.274 schwarze 1804: .Ic \&It .
1.114 kristaps 1805: .Pp
1806: The
1807: .Fl tag
1.120 kristaps 1808: list has the following syntax:
1.114 kristaps 1809: .Pp
1.274 schwarze 1810: .D1 Pf \. Ic \&It Op Cm args
1.114 kristaps 1811: .Pp
1.120 kristaps 1812: Subsequent lines are interpreted as with
1.114 kristaps 1813: .Fl bullet
1814: and family.
1815: The line arguments correspond to the list's left-hand side; body
1816: arguments correspond to the list's contents.
1817: .Pp
1818: The
1819: .Fl column
1820: list is the most complicated.
1.120 kristaps 1821: Its syntax is as follows:
1.114 kristaps 1822: .Pp
1.274 schwarze 1823: .D1 Pf \. Ic \&It Ar cell Op Ic \&Ta Ar cell ...
1824: .D1 Pf \. Ic \&It Ar cell Op <TAB> Ar cell ...
1.114 kristaps 1825: .Pp
1.190 schwarze 1826: The arguments consist of one or more lines of text and macros
1827: representing a complete table line.
1.260 schwarze 1828: Cells within the line are delimited by the special
1.274 schwarze 1829: .Ic \&Ta
1.260 schwarze 1830: block macro or by literal tab characters.
1831: .Pp
1832: Using literal tabs is strongly discouraged because they are very
1833: hard to use correctly and
1834: .Nm
1835: code using them is very hard to read.
1836: In particular, a blank character is syntactically significant
1837: before and after the literal tab character.
1838: If a word precedes or follows the tab without an intervening blank,
1839: that word is never interpreted as a macro call, but always output
1840: literally.
1841: .Pp
1.190 schwarze 1842: The tab cell delimiter may only be used within the
1.274 schwarze 1843: .Ic \&It
1.190 schwarze 1844: line itself; on following lines, only the
1.274 schwarze 1845: .Ic \&Ta
1.267 schwarze 1846: macro can be used to delimit cells, and portability requires that
1.274 schwarze 1847: .Ic \&Ta
1.267 schwarze 1848: is called by other macros: some parsers do not recognize it when
1849: it appears as the first macro on a line.
1.190 schwarze 1850: .Pp
1851: Note that quoted strings may span tab-delimited cells on an
1.274 schwarze 1852: .Ic \&It
1.190 schwarze 1853: line.
1854: For example,
1.114 kristaps 1855: .Pp
1.260 schwarze 1856: .Dl .It \(dqcol1 ,\& <TAB> col2 ,\(dq \&;
1.114 kristaps 1857: .Pp
1.260 schwarze 1858: will preserve the whitespace before both commas,
1859: but not the whitespace before the semicolon.
1.114 kristaps 1860: .Pp
1861: See also
1.274 schwarze 1862: .Ic \&Bl .
1.287 schwarze 1863: .Tg Lb
1.274 schwarze 1864: .It Ic \&Lb Cm lib Ns Ar name
1.109 kristaps 1865: Specify a library.
1866: .Pp
1867: The
1.274 schwarze 1868: .Ar name
1.109 kristaps 1869: parameter may be a system library, such as
1.274 schwarze 1870: .Cm z
1.109 kristaps 1871: or
1.274 schwarze 1872: .Cm pam ,
1.109 kristaps 1873: in which case a small library description is printed next to the linker
1874: invocation; or a custom library, in which case the library name is
1875: printed in quotes.
1876: This is most commonly used in the
1877: .Em SYNOPSIS
1878: section as described in
1879: .Sx MANUAL STRUCTURE .
1880: .Pp
1881: Examples:
1.173 kristaps 1882: .Dl \&.Lb libz
1.221 schwarze 1883: .Dl \&.Lb libmandoc
1.287 schwarze 1884: .Tg Li
1.274 schwarze 1885: .It Ic \&Li Ar word ...
1.297 ! schwarze 1886: Unquoted in-line literal display, always set in a constant-width font.
! 1887: In most cases, use
! 1888: .Ic \&Ql
! 1889: instead because on terminal output devices,
! 1890: .Ic \&Li
! 1891: is usually indistinguishable from normal text.
! 1892: This macro is only useful when enclosing the argument in quotes
! 1893: is explicitly not desired, for example because it already stands out
! 1894: due to being wrapped in another macro, e.g. in an
! 1895: .Ic \&It
! 1896: head.
! 1897: .Pp
! 1898: For longer literal displays, use
! 1899: .Ic \&Dl Pq single line
1.273 schwarze 1900: or
1.274 schwarze 1901: .Ic \&Bd Fl literal Pq multi-line
1.273 schwarze 1902: instead.
1.287 schwarze 1903: .Tg Lk
1.274 schwarze 1904: .It Ic \&Lk Ar uri Op Ar display_name
1.100 kristaps 1905: Format a hyperlink.
1.70 kristaps 1906: .Pp
1907: Examples:
1.282 schwarze 1908: .Dl \&.Lk https://bsd.lv \(dqThe BSD.lv Project\(dq
1909: .Dl \&.Lk https://bsd.lv
1.70 kristaps 1910: .Pp
1911: See also
1.274 schwarze 1912: .Ic \&Mt .
1913: .It Ic \&Lp
1.272 schwarze 1914: Deprecated synonym for
1.274 schwarze 1915: .Ic \&Pp .
1.287 schwarze 1916: .Tg Ms
1.274 schwarze 1917: .It Ic \&Ms Ar name
1.138 kristaps 1918: Display a mathematical symbol.
1919: .Pp
1920: Examples:
1.173 kristaps 1921: .Dl \&.Ms sigma
1922: .Dl \&.Ms aleph
1.287 schwarze 1923: .Tg Mt
1.274 schwarze 1924: .It Ic \&Mt Ar localpart Ns @ Ns Ar domain
1.116 kristaps 1925: Format a
1.138 kristaps 1926: .Dq mailto:
1.116 kristaps 1927: hyperlink.
1928: .Pp
1929: Examples:
1.173 kristaps 1930: .Dl \&.Mt discuss@manpages.bsd.lv
1.219 schwarze 1931: .Dl \&.An Kristaps Dzonsons \&Aq \&Mt kristaps@bsd.lv
1.287 schwarze 1932: .Tg Nd
1.274 schwarze 1933: .It Ic \&Nd Ar line
1.144 schwarze 1934: A one line description of the manual's content.
1.252 schwarze 1935: This is the mandatory last macro of the
1936: .Em NAME
1937: section and not appropriate for other sections.
1.132 kristaps 1938: .Pp
1939: Examples:
1.274 schwarze 1940: .Dl Pf . Ic \&Nd mdoc language reference
1941: .Dl Pf . Ic \&Nd format and display UNIX manuals
1.132 kristaps 1942: .Pp
1943: The
1.274 schwarze 1944: .Ic \&Nd
1.132 kristaps 1945: macro technically accepts child macros and terminates with a subsequent
1.274 schwarze 1946: .Ic \&Sh
1.132 kristaps 1947: invocation.
1948: Do not assume this behaviour: some
1949: .Xr whatis 1
1950: database generators are not smart enough to parse more than the line
1951: arguments and will display macros verbatim.
1952: .Pp
1953: See also
1.274 schwarze 1954: .Ic \&Nm .
1.287 schwarze 1955: .Tg Nm
1.274 schwarze 1956: .It Ic \&Nm Op Ar name
1.128 schwarze 1957: The name of the manual page, or \(em in particular in section 1, 6,
1958: and 8 pages \(em of an additional command or feature documented in
1959: the manual page.
1960: When first invoked, the
1.274 schwarze 1961: .Ic \&Nm
1.128 schwarze 1962: macro expects a single argument, the name of the manual page.
1963: Usually, the first invocation happens in the
1964: .Em NAME
1965: section of the page.
1966: The specified name will be remembered and used whenever the macro is
1967: called again without arguments later in the page.
1968: The
1.274 schwarze 1969: .Ic \&Nm
1.128 schwarze 1970: macro uses
1971: .Sx Block full-implicit
1972: semantics when invoked as the first macro on an input line in the
1973: .Em SYNOPSIS
1974: section; otherwise, it uses ordinary
1975: .Sx In-line
1976: semantics.
1977: .Pp
1978: Examples:
1979: .Bd -literal -offset indent
1980: \&.Sh SYNOPSIS
1981: \&.Nm cat
1982: \&.Op Fl benstuv
1983: \&.Op Ar
1984: .Ed
1985: .Pp
1986: In the
1987: .Em SYNOPSIS
1988: of section 2, 3 and 9 manual pages, use the
1.274 schwarze 1989: .Ic \&Fn
1.128 schwarze 1990: macro rather than
1.274 schwarze 1991: .Ic \&Nm
1.128 schwarze 1992: to mark up the name of the manual page.
1.287 schwarze 1993: .Tg No
1.274 schwarze 1994: .It Ic \&No Ar word ...
1.198 schwarze 1995: Normal text.
1996: Closes the scope of any preceding in-line macro.
1997: When used after physical formatting macros like
1.274 schwarze 1998: .Ic \&Em
1.198 schwarze 1999: or
1.274 schwarze 2000: .Ic \&Sy ,
1.198 schwarze 2001: switches back to the standard font face and weight.
2002: Can also be used to embed plain text strings in macro lines
2003: using semantic annotation macros.
1.132 kristaps 2004: .Pp
2005: Examples:
1.198 schwarze 2006: .Dl ".Em italic , Sy bold , No and roman"
1.276 schwarze 2007: .Bd -literal -offset indent
1.198 schwarze 2008: \&.Sm off
2009: \&.Cm :C No / Ar pattern No / Ar replacement No /
2010: \&.Sm on
2011: .Ed
2012: .Pp
2013: See also
1.274 schwarze 2014: .Ic \&Em ,
2015: .Ic \&Ql ,
1.198 schwarze 2016: and
1.274 schwarze 2017: .Ic \&Sy .
1.287 schwarze 2018: .Tg Ns
1.274 schwarze 2019: .It Ic \&Ns
1.198 schwarze 2020: Suppress a space between the output of the preceding macro
2021: and the following text or macro.
2022: Following invocation, input is interpreted as normal text
2023: just like after an
1.274 schwarze 2024: .Ic \&No
1.198 schwarze 2025: macro.
1.178 kristaps 2026: .Pp
2027: This has no effect when invoked at the start of a macro line.
1.138 kristaps 2028: .Pp
2029: Examples:
1.198 schwarze 2030: .Dl ".Ar name Ns = Ns Ar value"
2031: .Dl ".Cm :M Ns Ar pattern"
2032: .Dl ".Fl o Ns Ar output"
1.138 kristaps 2033: .Pp
2034: See also
1.274 schwarze 2035: .Ic \&No
1.138 kristaps 2036: and
1.274 schwarze 2037: .Ic \&Sm .
1.287 schwarze 2038: .Tg Nx
1.274 schwarze 2039: .It Ic \&Nx Op Ar version
1.144 schwarze 2040: Format the
2041: .Nx
2042: version provided as an argument, or a default value if
1.65 kristaps 2043: no argument is provided.
2044: .Pp
2045: Examples:
1.173 kristaps 2046: .Dl \&.Nx 5.01
2047: .Dl \&.Nx
1.65 kristaps 2048: .Pp
2049: See also
1.274 schwarze 2050: .Ic \&At ,
2051: .Ic \&Bsx ,
2052: .Ic \&Bx ,
2053: .Ic \&Dx ,
2054: .Ic \&Fx ,
1.65 kristaps 2055: and
1.274 schwarze 2056: .Ic \&Ox .
2057: .It Ic \&Oc
1.141 kristaps 2058: Close multi-line
1.274 schwarze 2059: .Ic \&Oo
1.132 kristaps 2060: context.
1.274 schwarze 2061: .It Ic \&Oo Ar block
1.132 kristaps 2062: Multi-line version of
1.274 schwarze 2063: .Ic \&Op .
1.132 kristaps 2064: .Pp
2065: Examples:
1.138 kristaps 2066: .Bd -literal -offset indent -compact
1.132 kristaps 2067: \&.Oo
2068: \&.Op Fl flag Ns Ar value
2069: \&.Oc
2070: .Ed
1.287 schwarze 2071: .Tg Op
1.274 schwarze 2072: .It Ic \&Op Ar line
1.196 schwarze 2073: Optional part of a command line.
1.132 kristaps 2074: Prints the argument(s) in brackets.
1.196 schwarze 2075: This is most often used in the
2076: .Em SYNOPSIS
2077: section of section 1 and 8 manual pages.
1.132 kristaps 2078: .Pp
2079: Examples:
1.173 kristaps 2080: .Dl \&.Op \&Fl a \&Ar b
2081: .Dl \&.Op \&Ar a | b
1.132 kristaps 2082: .Pp
2083: See also
1.274 schwarze 2084: .Ic \&Oo .
1.287 schwarze 2085: .Tg Os
1.290 schwarze 2086: .It Ic \&Os Op Ar footer text
2087: The mandatory third macro of every
1.66 kristaps 2088: .Nm
1.120 kristaps 2089: file.
1.290 schwarze 2090: Usually, do not specify any arguments,
2091: in particular not the operating system name and/or version.
1.66 kristaps 2092: .Pp
1.290 schwarze 2093: If no argument is given,
1.246 schwarze 2094: .Xr mandoc 1
1.290 schwarze 2095: prints its
1.246 schwarze 2096: .Fl Ios
1.290 schwarze 2097: argument in the page footer, or
1.246 schwarze 2098: .Fa sysname
2099: and
2100: .Fa release
2101: as returned by
1.290 schwarze 2102: .Xr uname 3
2103: by default.
1.66 kristaps 2104: .Pp
1.290 schwarze 2105: Manual pages that are part of a portable software project can override
2106: the default by giving the project name and version number as arguments,
2107: but leaving it blank is never a bad choice.
1.66 kristaps 2108: .Pp
2109: See also
1.274 schwarze 2110: .Ic \&Dd
1.66 kristaps 2111: and
1.274 schwarze 2112: .Ic \&Dt .
2113: .It Ic \&Ot Ar functype
1.231 schwarze 2114: This macro is obsolete.
2115: Use
1.274 schwarze 2116: .Ic \&Ft
1.231 schwarze 2117: instead; with
2118: .Xr mandoc 1 ,
2119: both have the same effect.
1.66 kristaps 2120: .Pp
1.198 schwarze 2121: Historical
1.217 schwarze 2122: .Nm
1.198 schwarze 2123: packages described it as
2124: .Dq "old function type (FORTRAN)" .
1.287 schwarze 2125: .Tg Ox
1.274 schwarze 2126: .It Ic \&Ox Op Ar version
1.144 schwarze 2127: Format the
2128: .Ox
2129: version provided as an argument, or a default value
1.65 kristaps 2130: if no argument is provided.
2131: .Pp
2132: Examples:
1.173 kristaps 2133: .Dl \&.Ox 4.5
2134: .Dl \&.Ox
1.65 kristaps 2135: .Pp
2136: See also
1.274 schwarze 2137: .Ic \&At ,
2138: .Ic \&Bsx ,
2139: .Ic \&Bx ,
2140: .Ic \&Dx ,
2141: .Ic \&Fx ,
1.65 kristaps 2142: and
1.274 schwarze 2143: .Ic \&Nx .
1.287 schwarze 2144: .Tg Pa
1.274 schwarze 2145: .It Ic \&Pa Ar name ...
1.196 schwarze 2146: An absolute or relative file system path, or a file or directory name.
2147: If an argument is not provided, the character
2148: .Sq \(ti
1.165 kristaps 2149: is used as a default.
1.132 kristaps 2150: .Pp
2151: Examples:
1.173 kristaps 2152: .Dl \&.Pa /usr/bin/mandoc
2153: .Dl \&.Pa /usr/share/man/man7/mdoc.7
1.132 kristaps 2154: .Pp
2155: See also
1.274 schwarze 2156: .Ic \&Lk .
2157: .It Ic \&Pc
1.132 kristaps 2158: Close parenthesised context opened by
1.274 schwarze 2159: .Ic \&Po .
1.287 schwarze 2160: .Tg Pf
1.274 schwarze 2161: .It Ic \&Pf Ar prefix macro Op Ar argument ...
1.256 schwarze 2162: Removes the space between its argument and the following macro.
1.274 schwarze 2163: It is equivalent to:
1.132 kristaps 2164: .Pp
1.274 schwarze 2165: .D1 Ic \&No Pf \e& Ar prefix Ic \&Ns Ar macro Op Ar argument ...
1.256 schwarze 2166: .Pp
2167: The
2168: .Ar prefix
2169: argument is not parsed for macro names or delimiters,
2170: but used verbatim as if it were escaped.
1.132 kristaps 2171: .Pp
2172: Examples:
1.198 schwarze 2173: .Dl ".Pf $ Ar variable_name"
1.256 schwarze 2174: .Dl ".Pf . Ar macro_name"
1.198 schwarze 2175: .Dl ".Pf 0x Ar hex_digits"
2176: .Pp
2177: See also
1.274 schwarze 2178: .Ic \&Ns
1.198 schwarze 2179: and
1.274 schwarze 2180: .Ic \&Sm .
2181: .It Ic \&Po Ar block
1.132 kristaps 2182: Multi-line version of
1.274 schwarze 2183: .Ic \&Pq .
1.287 schwarze 2184: .Tg Pp
1.274 schwarze 2185: .It Ic \&Pp
1.132 kristaps 2186: Break a paragraph.
2187: This will assert vertical space between prior and subsequent macros
2188: and/or text.
1.198 schwarze 2189: .Pp
2190: Paragraph breaks are not needed before or after
1.274 schwarze 2191: .Ic \&Sh
1.198 schwarze 2192: or
1.274 schwarze 2193: .Ic \&Ss
1.198 schwarze 2194: macros or before displays
1.274 schwarze 2195: .Pq Ic \&Bd Ar line
1.198 schwarze 2196: or lists
1.274 schwarze 2197: .Pq Ic \&Bl
1.198 schwarze 2198: unless the
2199: .Fl compact
2200: flag is given.
1.287 schwarze 2201: .Tg Pq
1.274 schwarze 2202: .It Ic \&Pq Ar line
1.132 kristaps 2203: Parenthesised enclosure.
2204: .Pp
2205: See also
1.274 schwarze 2206: .Ic \&Po .
2207: .It Ic \&Qc
1.138 kristaps 2208: Close quoted context opened by
1.274 schwarze 2209: .Ic \&Qo .
1.287 schwarze 2210: .Tg Ql
1.274 schwarze 2211: .It Ic \&Ql Ar line
1.297 ! schwarze 2212: Normal in-line literal display, always set in constant-width font and
! 2213: additionally enclosed in quotes by many formatters in many cases.
1.273 schwarze 2214: This can be used for complete command invocations and for multi-word
2215: code examples when an indented display is not desired.
1.248 schwarze 2216: .Pp
1.138 kristaps 2217: See also
1.297 ! schwarze 2218: .Ic \&Dl ,
! 2219: .Ic \&Bd
! 2220: .Fl literal ,
1.138 kristaps 2221: and
1.297 ! schwarze 2222: .Ic \&Li .
1.274 schwarze 2223: .It Ic \&Qo Ar block
1.138 kristaps 2224: Multi-line version of
1.274 schwarze 2225: .Ic \&Qq .
1.287 schwarze 2226: .Tg Qq
1.274 schwarze 2227: .It Ic \&Qq Ar line
1.138 kristaps 2228: Encloses its arguments in
1.198 schwarze 2229: .Qq typewriter
1.138 kristaps 2230: double-quotes.
2231: Consider using
1.274 schwarze 2232: .Ic \&Dq .
1.138 kristaps 2233: .Pp
2234: See also
1.274 schwarze 2235: .Ic \&Dq ,
2236: .Ic \&Sq ,
1.138 kristaps 2237: and
1.274 schwarze 2238: .Ic \&Qo .
2239: .It Ic \&Re
1.141 kristaps 2240: Close an
1.274 schwarze 2241: .Ic \&Rs
1.100 kristaps 2242: block.
2243: Does not have any tail arguments.
1.287 schwarze 2244: .Tg Rs
1.274 schwarze 2245: .It Ic \&Rs
1.141 kristaps 2246: Begin a bibliographic
1.63 kristaps 2247: .Pq Dq reference
1.100 kristaps 2248: block.
2249: Does not have any head arguments.
2250: The block macro may only contain
1.274 schwarze 2251: .Ic \&%A ,
2252: .Ic \&%B ,
2253: .Ic \&%C ,
2254: .Ic \&%D ,
2255: .Ic \&%I ,
2256: .Ic \&%J ,
2257: .Ic \&%N ,
2258: .Ic \&%O ,
2259: .Ic \&%P ,
2260: .Ic \&%Q ,
2261: .Ic \&%R ,
2262: .Ic \&%T ,
2263: .Ic \&%U ,
1.63 kristaps 2264: and
1.274 schwarze 2265: .Ic \&%V
1.63 kristaps 2266: child macros (at least one must be specified).
2267: .Pp
1.64 kristaps 2268: Examples:
1.91 kristaps 2269: .Bd -literal -offset indent -compact
1.63 kristaps 2270: \&.Rs
2271: \&.%A J. E. Hopcroft
2272: \&.%A J. D. Ullman
2273: \&.%B Introduction to Automata Theory, Languages, and Computation
2274: \&.%I Addison-Wesley
1.255 schwarze 2275: \&.%C Reading, Massachusetts
1.63 kristaps 2276: \&.%D 1979
2277: \&.Re
2278: .Ed
2279: .Pp
2280: If an
1.274 schwarze 2281: .Ic \&Rs
1.63 kristaps 2282: block is used within a SEE ALSO section, a vertical space is asserted
2283: before the rendered output, else the block continues on the current
2284: line.
1.287 schwarze 2285: .Tg Rv
1.274 schwarze 2286: .It Ic \&Rv Fl std Op Ar function ...
1.193 schwarze 2287: Insert a standard sentence regarding a function call's return value of 0
1.191 kristaps 2288: on success and \-1 on error, with the
2289: .Va errno
2290: libc global variable set on error.
2291: .Pp
1.139 kristaps 2292: If
2293: .Ar function
1.191 kristaps 2294: is not specified, the document's name set by
1.274 schwarze 2295: .Ic \&Nm
1.191 kristaps 2296: is used.
2297: Multiple
2298: .Ar function
2299: arguments are treated as separate functions.
1.139 kristaps 2300: .Pp
2301: See also
1.274 schwarze 2302: .Ic \&Ex .
2303: .It Ic \&Sc
1.138 kristaps 2304: Close single-quoted context opened by
1.274 schwarze 2305: .Ic \&So .
1.287 schwarze 2306: .Tg Sh
1.274 schwarze 2307: .It Ic \&Sh Ar TITLE LINE
1.138 kristaps 2308: Begin a new section.
2309: For a list of conventional manual sections, see
2310: .Sx MANUAL STRUCTURE .
1.296 schwarze 2311: Use the conventional sections where applicable.
2312: For unusually long and complicated manual pages,
2313: adding custom sections is occasionally useful.
2314: .Pp
2315: Avoid using macros inside the
2316: .Ar TITLE LINE
2317: and keep that line unique within the manual page,
2318: such that it can be pointed to with
1.274 schwarze 2319: .Ic \&Sx .
1.138 kristaps 2320: .Pp
2321: See also
1.274 schwarze 2322: .Ic \&Pp ,
2323: .Ic \&Ss ,
1.138 kristaps 2324: and
1.274 schwarze 2325: .Ic \&Sx .
1.287 schwarze 2326: .Tg Sm
1.274 schwarze 2327: .It Ic \&Sm Op Cm on | off
1.134 schwarze 2328: Switches the spacing mode for output generated from macros.
2329: .Pp
2330: By default, spacing is
1.193 schwarze 2331: .Cm on .
1.134 schwarze 2332: When switched
1.193 schwarze 2333: .Cm off ,
1.134 schwarze 2334: no white space is inserted between macro arguments and between the
1.185 kristaps 2335: output generated from adjacent macros, but text lines
1.134 schwarze 2336: still get normal spacing between words and sentences.
1.234 schwarze 2337: .Pp
2338: When called without an argument, the
1.274 schwarze 2339: .Ic \&Sm
1.234 schwarze 2340: macro toggles the spacing mode.
2341: Using this is not recommended because it makes the code harder to read.
1.274 schwarze 2342: .It Ic \&So Ar block
1.138 kristaps 2343: Multi-line version of
1.274 schwarze 2344: .Ic \&Sq .
1.287 schwarze 2345: .Tg Sq
1.274 schwarze 2346: .It Ic \&Sq Ar line
1.138 kristaps 2347: Encloses its arguments in
1.198 schwarze 2348: .Sq typewriter
1.138 kristaps 2349: single-quotes.
2350: .Pp
2351: See also
1.274 schwarze 2352: .Ic \&Dq ,
2353: .Ic \&Qq ,
1.138 kristaps 2354: and
1.274 schwarze 2355: .Ic \&So .
1.287 schwarze 2356: .Tg Ss
1.274 schwarze 2357: .It Ic \&Ss Ar Title line
1.198 schwarze 2358: Begin a new subsection.
1.138 kristaps 2359: Unlike with
1.274 schwarze 2360: .Ic \&Sh ,
1.198 schwarze 2361: there is no convention for the naming of subsections.
2362: Except
2363: .Em DESCRIPTION ,
2364: the conventional sections described in
2365: .Sx MANUAL STRUCTURE
2366: rarely have subsections.
1.138 kristaps 2367: .Pp
1.296 schwarze 2368: Avoid using macros inside the
2369: .Ar Title line
2370: and keep that line unique within the manual page,
2371: such that it can be pointed to with
1.274 schwarze 2372: .Ic \&Sx .
1.138 kristaps 2373: .Pp
2374: See also
1.274 schwarze 2375: .Ic \&Pp ,
2376: .Ic \&Sh ,
1.138 kristaps 2377: and
1.274 schwarze 2378: .Ic \&Sx .
1.287 schwarze 2379: .Tg St
1.274 schwarze 2380: .It Ic \&St Fl Ns Ar abbreviation
1.139 kristaps 2381: Replace an abbreviation for a standard with the full form.
1.226 schwarze 2382: The following standards are recognised.
2383: Where multiple lines are given without a blank line in between,
2384: they all refer to the same standard, and using the first form
2385: is recommended.
2386: .Bl -tag -width 1n
2387: .It C language standards
1.139 kristaps 2388: .Pp
1.226 schwarze 2389: .Bl -tag -width "-p1003.1g-2000" -compact
2390: .It \-ansiC
2391: .St -ansiC
2392: .It \-ansiC-89
2393: .St -ansiC-89
1.139 kristaps 2394: .It \-isoC
2395: .St -isoC
2396: .It \-isoC-90
2397: .St -isoC-90
1.226 schwarze 2398: .br
2399: The original C standard.
2400: .Pp
1.139 kristaps 2401: .It \-isoC-amd1
2402: .St -isoC-amd1
1.226 schwarze 2403: .Pp
1.139 kristaps 2404: .It \-isoC-tcor1
2405: .St -isoC-tcor1
1.226 schwarze 2406: .Pp
1.211 schwarze 2407: .It \-isoC-tcor2
2408: .St -isoC-tcor2
1.226 schwarze 2409: .Pp
1.211 schwarze 2410: .It \-isoC-99
2411: .St -isoC-99
1.226 schwarze 2412: .br
1.295 schwarze 2413: Edition 2 of the C language standard.
1.226 schwarze 2414: .Pp
1.214 kristaps 2415: .It \-isoC-2011
2416: .St -isoC-2011
1.226 schwarze 2417: .br
1.295 schwarze 2418: Edition 3 of the C language standard.
2419: .Pp
2420: .It \-isoC-2023
2421: .St -isoC-2023
2422: .br
2423: Edition 5 of the C language standard.
1.226 schwarze 2424: .El
1.293 schwarze 2425: .It POSIX.1 before XPG4.2
1.226 schwarze 2426: .Pp
2427: .Bl -tag -width "-p1003.1g-2000" -compact
2428: .It \-p1003.1-88
2429: .St -p1003.1-88
2430: .It \-p1003.1
2431: .St -p1003.1
2432: .br
2433: The original POSIX standard, based on ANSI C.
2434: .Pp
2435: .It \-p1003.1-90
2436: .St -p1003.1-90
1.211 schwarze 2437: .It \-iso9945-1-90
2438: .St -iso9945-1-90
1.226 schwarze 2439: .br
2440: The first update of POSIX.1.
2441: .Pp
2442: .It \-p1003.1b-93
2443: .St -p1003.1b-93
2444: .It \-p1003.1b
2445: .St -p1003.1b
2446: .br
2447: Real-time extensions.
2448: .Pp
2449: .It \-p1003.1c-95
2450: .St -p1003.1c-95
2451: .br
2452: POSIX thread interfaces.
2453: .Pp
2454: .It \-p1003.1i-95
2455: .St -p1003.1i-95
2456: .br
2457: Technical Corrigendum.
2458: .Pp
2459: .It \-p1003.1-96
2460: .St -p1003.1-96
1.211 schwarze 2461: .It \-iso9945-1-96
2462: .St -iso9945-1-96
1.226 schwarze 2463: .br
2464: Includes POSIX.1-1990, 1b, 1c, and 1i.
2465: .El
1.293 schwarze 2466: .It X/Open Portability Guide before XPG4.2
1.226 schwarze 2467: .Pp
2468: .Bl -tag -width "-p1003.1g-2000" -compact
2469: .It \-xpg3
2470: .St -xpg3
2471: .br
2472: An XPG4 precursor, published in 1989.
2473: .Pp
2474: .It \-p1003.2
2475: .St -p1003.2
2476: .It \-p1003.2-92
2477: .St -p1003.2-92
1.211 schwarze 2478: .It \-iso9945-2-93
2479: .St -iso9945-2-93
1.226 schwarze 2480: .br
2481: An XCU4 precursor.
2482: .Pp
2483: .It \-p1003.2a-92
2484: .St -p1003.2a-92
2485: .br
2486: Updates to POSIX.2.
2487: .Pp
1.211 schwarze 2488: .It \-xpg4
2489: .St -xpg4
1.226 schwarze 2490: .br
2491: Based on POSIX.1 and POSIX.2, published in 1992.
2492: .El
1.293 schwarze 2493: .It X/Open Portability Guide Issue 4 Version 2 and related standards
1.226 schwarze 2494: .Pp
2495: .Bl -tag -width "-p1003.1g-2000" -compact
1.236 schwarze 2496: .It \-susv1
2497: .St -susv1
1.211 schwarze 2498: .It \-xpg4.2
2499: .St -xpg4.2
1.226 schwarze 2500: .br
1.236 schwarze 2501: This standard was published in 1994.
1.226 schwarze 2502: It was used as the basis for UNIX 95 certification.
1.289 schwarze 2503: The following two refer to parts of it.
1.226 schwarze 2504: .Pp
2505: .It \-xcurses4.2
2506: .St -xcurses4.2
2507: .Pp
2508: .It \-p1003.1g-2000
2509: .St -p1003.1g-2000
2510: .br
2511: Networking APIs, including sockets.
2512: .Pp
2513: .It \-svid4
2514: .St -svid4 ,
2515: .br
2516: Published in 1995.
2517: .El
1.293 schwarze 2518: .It X/Open Portability Guide Issue 5 and related standards
1.226 schwarze 2519: .Pp
2520: .Bl -tag -width "-p1003.1g-2000" -compact
2521: .It \-susv2
2522: .St -susv2
1.293 schwarze 2523: .br
1.226 schwarze 2524: This Standard was published in 1997
1.293 schwarze 2525: and is also called X/Open Portability Guide Issue 5.
1.226 schwarze 2526: It was used as the basis for UNIX 98 certification.
2527: The following refer to parts of it.
2528: .Pp
1.211 schwarze 2529: .It \-xbd5
2530: .St -xbd5
1.226 schwarze 2531: .Pp
2532: .It \-xsh5
2533: .St -xsh5
2534: .Pp
1.211 schwarze 2535: .It \-xcu5
2536: .St -xcu5
1.226 schwarze 2537: .Pp
1.211 schwarze 2538: .It \-xns5
2539: .St -xns5
2540: .It \-xns5.2
2541: .St -xns5.2
1.226 schwarze 2542: .El
1.293 schwarze 2543: .It POSIX Issue 6
1.226 schwarze 2544: .Pp
1.245 schwarze 2545: .Bl -tag -width "-p1003.1-2001" -compact
1.226 schwarze 2546: .It \-p1003.1-2001
2547: .St -p1003.1-2001
1.211 schwarze 2548: .It \-susv3
2549: .St -susv3
1.226 schwarze 2550: .br
2551: This standard is based on C99, SUSv2, POSIX.1-1996, 1d, and 1j.
1.293 schwarze 2552: It is also called X/Open Portability Guide Issue 6.
1.226 schwarze 2553: It is used as the basis for UNIX 03 certification.
2554: .Pp
2555: .It \-p1003.1-2004
2556: .St -p1003.1-2004
2557: .br
2558: The second and last Technical Corrigendum.
2559: .El
1.293 schwarze 2560: .It POSIX Issues 7 and 8
1.226 schwarze 2561: .Pp
2562: .Bl -tag -width "-p1003.1g-2000" -compact
2563: .It \-p1003.1-2008
2564: .St -p1003.1-2008
1.236 schwarze 2565: .It \-susv4
2566: .St -susv4
1.226 schwarze 2567: .br
1.292 schwarze 2568: This standard is based on C99.
2569: It is also called the
2570: Open Group Standard Base Specifications, Issue 7.
2571: .El
2572: .Pp
2573: .Bl -tag -width "-p1003.1g-2000" -compact
2574: .It \-p1003.1-2024
2575: .St -p1003.1-2024
2576: .br
2577: This standard is based on C17.
2578: It is also called the
2579: Open Group Standard Base Specifications, Issue 8.
1.226 schwarze 2580: .El
2581: .It Other standards
2582: .Pp
2583: .Bl -tag -width "-p1003.1g-2000" -compact
2584: .It \-ieee754
2585: .St -ieee754
2586: .br
2587: Floating-point arithmetic.
2588: .Pp
2589: .It \-iso8601
2590: .St -iso8601
2591: .br
2592: Representation of dates and times, published in 1988.
2593: .Pp
2594: .It \-iso8802-3
2595: .St -iso8802-3
2596: .br
2597: Ethernet local area networks.
2598: .Pp
2599: .It \-ieee1275-94
2600: .St -ieee1275-94
2601: .El
1.211 schwarze 2602: .El
1.287 schwarze 2603: .Tg Sx
1.274 schwarze 2604: .It Ic \&Sx Ar Title line
1.211 schwarze 2605: Reference a section or subsection in the same manual page.
2606: The referenced section or subsection name must be identical to the
2607: enclosed argument, including whitespace.
2608: .Pp
2609: Examples:
2610: .Dl \&.Sx MANUAL STRUCTURE
2611: .Pp
2612: See also
1.274 schwarze 2613: .Ic \&Sh
1.211 schwarze 2614: and
1.274 schwarze 2615: .Ic \&Ss .
1.287 schwarze 2616: .Tg Sy
1.274 schwarze 2617: .It Ic \&Sy Ar word ...
1.235 schwarze 2618: Request a boldface font.
2619: .Pp
2620: This is most often used to indicate importance or seriousness (not to be
2621: confused with stress emphasis, see
1.274 schwarze 2622: .Ic \&Em ) .
1.235 schwarze 2623: When none of the semantic macros fit, it is also adequate for syntax
2624: elements that have to be given or that appear verbatim.
2625: .Pp
2626: Examples:
2627: .Bd -literal -compact -offset indent
2628: \&.Sy Warning :
2629: If
2630: \&.Sy s
2631: appears in the owner permissions, set-user-ID mode is set.
2632: This utility replaces the former
2633: \&.Sy dumpdir
2634: program.
2635: .Ed
1.211 schwarze 2636: .Pp
2637: See also
1.274 schwarze 2638: .Ic \&Em ,
2639: .Ic \&No ,
1.211 schwarze 2640: and
1.274 schwarze 2641: .Ic \&Ql .
1.287 schwarze 2642: .Tg Ta
1.274 schwarze 2643: .It Ic \&Ta
1.211 schwarze 2644: Table cell separator in
1.274 schwarze 2645: .Ic \&Bl Fl column
1.211 schwarze 2646: lists; can only be used below
1.274 schwarze 2647: .Ic \&It .
1.287 schwarze 2648: .Tg Tg
1.280 schwarze 2649: .It Ic \&Tg Op Ar term
2650: Announce that the next input line starts a definition of the
2651: .Ar term .
2652: This macro must appear alone on its own input line.
2653: The argument defaults to the first argument of the first macro
2654: on the next line.
2655: The argument may not contain whitespace characters, not even when it is quoted.
2656: This macro is a
2657: .Xr mandoc 1
2658: extension and is typically ignored by other formatters.
2659: .Pp
2660: When viewing terminal output with
2661: .Xr less 1 ,
2662: the interactive
2663: .Ic :t
2664: command can be used to go to the definition of the
2665: .Ar term
2666: as described for the
2667: .Ev MANPAGER
2668: variable in
2669: .Xr man 1 ;
2670: when producing HTML output, a fragment identifier
2671: .Pq Ic id No attribute
2672: is generated, to be used for deep linking to this place of the document.
2673: .Pp
2674: In most cases, adding a
2675: .Ic \&Tg
2676: macro would be redundant because
2677: .Xr mandoc 1
2678: is able to automatically tag most definitions.
2679: This macro is intended for cases where automatic tagging of a
2680: .Ar term
2681: is unsatisfactory, for example if a definition is not tagged
2682: automatically (false negative) or if places are tagged that do
2683: not define the
2684: .Ar term
2685: (false positives).
2686: When there is at least one
2687: .Ic \&Tg
2688: macro for a
2689: .Ar term ,
2690: no other places are automatically marked as definitions of that
2691: .Ar term .
1.274 schwarze 2692: .It Ic \&Tn Ar word ...
1.230 schwarze 2693: Supported only for compatibility, do not use this in new manuals.
2694: Even though the macro name
2695: .Pq Dq tradename
2696: suggests a semantic function, historic usage is inconsistent, mostly
2697: using it as a presentation-level macro to request a small caps font.
1.274 schwarze 2698: .It Ic \&Ud
1.230 schwarze 2699: Supported only for compatibility, do not use this in new manuals.
1.211 schwarze 2700: Prints out
2701: .Dq currently under development.
1.274 schwarze 2702: .It Ic \&Ux
1.230 schwarze 2703: Supported only for compatibility, do not use this in new manuals.
2704: Prints out
2705: .Dq Ux .
1.287 schwarze 2706: .Tg Va
1.274 schwarze 2707: .It Ic \&Va Oo Ar type Oc Ar identifier ...
1.211 schwarze 2708: A variable name.
2709: .Pp
2710: Examples:
2711: .Dl \&.Va foo
2712: .Dl \&.Va const char *bar ;
1.239 schwarze 2713: .Pp
2714: For function arguments and parameters, use
1.274 schwarze 2715: .Ic \&Fa
1.239 schwarze 2716: instead.
2717: For declarations of global variables in the
2718: .Em SYNOPSIS
2719: section, use
1.274 schwarze 2720: .Ic \&Vt .
1.287 schwarze 2721: .Tg Vt
1.274 schwarze 2722: .It Ic \&Vt Ar type Op Ar identifier
1.211 schwarze 2723: A variable type.
1.239 schwarze 2724: .Pp
1.211 schwarze 2725: This is also used for indicating global variables in the
2726: .Em SYNOPSIS
2727: section, in which case a variable name is also specified.
2728: Note that it accepts
2729: .Sx Block partial-implicit
2730: syntax when invoked as the first macro on an input line in the
2731: .Em SYNOPSIS
2732: section, else it accepts ordinary
2733: .Sx In-line
2734: syntax.
2735: In the former case, this macro starts a new output line,
2736: and a blank line is inserted in front if there is a preceding
2737: function definition or include directive.
2738: .Pp
2739: Examples:
2740: .Dl \&.Vt unsigned char
2741: .Dl \&.Vt extern const char * const sys_signame[] \&;
2742: .Pp
1.239 schwarze 2743: For parameters in function prototypes, use
1.274 schwarze 2744: .Ic \&Fa
1.239 schwarze 2745: instead, for function return types
1.274 schwarze 2746: .Ic \&Ft ,
1.239 schwarze 2747: and for variable names outside the
2748: .Em SYNOPSIS
2749: section
1.274 schwarze 2750: .Ic \&Va ,
1.239 schwarze 2751: even when including a type with the name.
1.211 schwarze 2752: See also
1.239 schwarze 2753: .Sx MANUAL STRUCTURE .
1.274 schwarze 2754: .It Ic \&Xc
1.211 schwarze 2755: Close a scope opened by
1.274 schwarze 2756: .Ic \&Xo .
2757: .It Ic \&Xo Ar block
1.211 schwarze 2758: Extend the header of an
1.274 schwarze 2759: .Ic \&It
1.211 schwarze 2760: macro or the body of a partial-implicit block macro
2761: beyond the end of the input line.
2762: This macro originally existed to work around the 9-argument limit
2763: of historic
2764: .Xr roff 7 .
1.287 schwarze 2765: .Tg Xr
1.274 schwarze 2766: .It Ic \&Xr Ar name section
1.211 schwarze 2767: Link to another manual
2768: .Pq Qq cross-reference .
2769: .Pp
1.216 schwarze 2770: Cross reference the
1.211 schwarze 2771: .Ar name
2772: and
2773: .Ar section
1.259 schwarze 2774: number of another man page.
1.211 schwarze 2775: .Pp
2776: Examples:
2777: .Dl \&.Xr mandoc 1
2778: .Dl \&.Xr mandoc 1 \&;
2779: .Dl \&.Xr mandoc 1 \&Ns s behaviour
1.274 schwarze 2780: .El
1.211 schwarze 2781: .Sh MACRO SYNTAX
2782: The syntax of a macro depends on its classification.
2783: In this section,
2784: .Sq \-arg
2785: refers to macro arguments, which may be followed by zero or more
2786: .Sq parm
2787: parameters;
2788: .Sq \&Yo
2789: opens the scope of a macro; and if specified,
2790: .Sq \&Yc
2791: closes it out.
2792: .Pp
2793: The
2794: .Em Callable
2795: column indicates that the macro may also be called by passing its name
2796: as an argument to another macro.
2797: For example,
2798: .Sq \&.Op \&Fl O \&Ar file
2799: produces
2800: .Sq Op Fl O Ar file .
2801: To prevent a macro call and render the macro name literally,
2802: escape it by prepending a zero-width space,
2803: .Sq \e& .
2804: For example,
2805: .Sq \&Op \e&Fl O
2806: produces
2807: .Sq Op \&Fl O .
2808: If a macro is not callable but its name appears as an argument
2809: to another macro, it is interpreted as opaque text.
2810: For example,
2811: .Sq \&.Fl \&Sh
2812: produces
2813: .Sq Fl \&Sh .
2814: .Pp
2815: The
2816: .Em Parsed
2817: column indicates whether the macro may call other macros by receiving
2818: their names as arguments.
2819: If a macro is not parsed but the name of another macro appears
2820: as an argument, it is interpreted as opaque text.
2821: .Pp
2822: The
2823: .Em Scope
2824: column, if applicable, describes closure rules.
2825: .Ss Block full-explicit
2826: Multi-line scope closed by an explicit closing macro.
2827: All macros contains bodies; only
1.284 schwarze 2828: .Ic \&Bf
1.211 schwarze 2829: and
2830: .Pq optionally
1.274 schwarze 2831: .Ic \&Bl
1.211 schwarze 2832: contain a head.
2833: .Bd -literal -offset indent
2834: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
2835: \(lBbody...\(rB
2836: \&.Yc
2837: .Ed
2838: .Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXX" -offset indent
2839: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope
1.274 schwarze 2840: .It Ic \&Bd Ta \&No Ta \&No Ta closed by Ic \&Ed
2841: .It Ic \&Bf Ta \&No Ta \&No Ta closed by Ic \&Ef
2842: .It Ic \&Bk Ta \&No Ta \&No Ta closed by Ic \&Ek
2843: .It Ic \&Bl Ta \&No Ta \&No Ta closed by Ic \&El
2844: .It Ic \&Ed Ta \&No Ta \&No Ta opened by Ic \&Bd
2845: .It Ic \&Ef Ta \&No Ta \&No Ta opened by Ic \&Bf
2846: .It Ic \&Ek Ta \&No Ta \&No Ta opened by Ic \&Bk
2847: .It Ic \&El Ta \&No Ta \&No Ta opened by Ic \&Bl
1.211 schwarze 2848: .El
2849: .Ss Block full-implicit
2850: Multi-line scope closed by end-of-file or implicitly by another macro.
2851: All macros have bodies; some
2852: .Po
1.274 schwarze 2853: .Ic \&It Fl bullet ,
1.211 schwarze 2854: .Fl hyphen ,
2855: .Fl dash ,
2856: .Fl enum ,
2857: .Fl item
2858: .Pc
2859: don't have heads; only one
2860: .Po
1.274 schwarze 2861: .Ic \&It
1.211 schwarze 2862: in
1.274 schwarze 2863: .Ic \&Bl Fl column
1.211 schwarze 2864: .Pc
2865: has multiple heads.
2866: .Bd -literal -offset indent
2867: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
2868: \(lBbody...\(rB
2869: .Ed
2870: .Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXXXXXXXXXX" -offset indent
2871: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope
1.274 schwarze 2872: .It Ic \&It Ta \&No Ta Yes Ta closed by Ic \&It , Ic \&El
2873: .It Ic \&Nd Ta \&No Ta \&No Ta closed by Ic \&Sh
2874: .It Ic \&Nm Ta \&No Ta Yes Ta closed by Ic \&Nm , Ic \&Sh , Ic \&Ss
2875: .It Ic \&Sh Ta \&No Ta Yes Ta closed by Ic \&Sh
2876: .It Ic \&Ss Ta \&No Ta Yes Ta closed by Ic \&Sh , Ic \&Ss
1.211 schwarze 2877: .El
2878: .Pp
2879: Note that the
1.274 schwarze 2880: .Ic \&Nm
1.211 schwarze 2881: macro is a
2882: .Sx Block full-implicit
2883: macro only when invoked as the first macro
2884: in a
2885: .Em SYNOPSIS
2886: section line, else it is
2887: .Sx In-line .
2888: .Ss Block partial-explicit
2889: Like block full-explicit, but also with single-line scope.
2890: Each has at least a body and, in limited circumstances, a head
2891: .Po
1.274 schwarze 2892: .Ic \&Fo ,
2893: .Ic \&Eo
1.211 schwarze 2894: .Pc
2895: and/or tail
1.274 schwarze 2896: .Pq Ic \&Ec .
1.211 schwarze 2897: .Bd -literal -offset indent
2898: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
2899: \(lBbody...\(rB
2900: \&.Yc \(lBtail...\(rB
2901:
2902: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
2903: \(lBbody...\(rB \&Yc \(lBtail...\(rB
2904: .Ed
2905: .Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXXX" -offset indent
2906: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope
1.274 schwarze 2907: .It Ic \&Ac Ta Yes Ta Yes Ta opened by Ic \&Ao
2908: .It Ic \&Ao Ta Yes Ta Yes Ta closed by Ic \&Ac
2909: .It Ic \&Bc Ta Yes Ta Yes Ta closed by Ic \&Bo
2910: .It Ic \&Bo Ta Yes Ta Yes Ta opened by Ic \&Bc
2911: .It Ic \&Brc Ta Yes Ta Yes Ta opened by Ic \&Bro
2912: .It Ic \&Bro Ta Yes Ta Yes Ta closed by Ic \&Brc
2913: .It Ic \&Dc Ta Yes Ta Yes Ta opened by Ic \&Do
2914: .It Ic \&Do Ta Yes Ta Yes Ta closed by Ic \&Dc
2915: .It Ic \&Ec Ta Yes Ta Yes Ta opened by Ic \&Eo
2916: .It Ic \&Eo Ta Yes Ta Yes Ta closed by Ic \&Ec
2917: .It Ic \&Fc Ta Yes Ta Yes Ta opened by Ic \&Fo
2918: .It Ic \&Fo Ta \&No Ta \&No Ta closed by Ic \&Fc
2919: .It Ic \&Oc Ta Yes Ta Yes Ta closed by Ic \&Oo
2920: .It Ic \&Oo Ta Yes Ta Yes Ta opened by Ic \&Oc
2921: .It Ic \&Pc Ta Yes Ta Yes Ta closed by Ic \&Po
2922: .It Ic \&Po Ta Yes Ta Yes Ta opened by Ic \&Pc
2923: .It Ic \&Qc Ta Yes Ta Yes Ta opened by Ic \&Oo
2924: .It Ic \&Qo Ta Yes Ta Yes Ta closed by Ic \&Oc
2925: .It Ic \&Re Ta \&No Ta \&No Ta opened by Ic \&Rs
2926: .It Ic \&Rs Ta \&No Ta \&No Ta closed by Ic \&Re
2927: .It Ic \&Sc Ta Yes Ta Yes Ta opened by Ic \&So
2928: .It Ic \&So Ta Yes Ta Yes Ta closed by Ic \&Sc
2929: .It Ic \&Xc Ta Yes Ta Yes Ta opened by Ic \&Xo
2930: .It Ic \&Xo Ta Yes Ta Yes Ta closed by Ic \&Xc
1.211 schwarze 2931: .El
2932: .Ss Block partial-implicit
2933: Like block full-implicit, but with single-line scope closed by the
2934: end of the line.
2935: .Bd -literal -offset indent
2936: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
2937: .Ed
2938: .Bl -column "MacroX" "CallableX" "ParsedX" -offset indent
2939: .It Em Macro Ta Em Callable Ta Em Parsed
1.274 schwarze 2940: .It Ic \&Aq Ta Yes Ta Yes
2941: .It Ic \&Bq Ta Yes Ta Yes
2942: .It Ic \&Brq Ta Yes Ta Yes
2943: .It Ic \&D1 Ta \&No Ta \&Yes
2944: .It Ic \&Dl Ta \&No Ta Yes
2945: .It Ic \&Dq Ta Yes Ta Yes
2946: .It Ic \&En Ta Yes Ta Yes
2947: .It Ic \&Op Ta Yes Ta Yes
2948: .It Ic \&Pq Ta Yes Ta Yes
2949: .It Ic \&Ql Ta Yes Ta Yes
2950: .It Ic \&Qq Ta Yes Ta Yes
2951: .It Ic \&Sq Ta Yes Ta Yes
2952: .It Ic \&Vt Ta Yes Ta Yes
1.211 schwarze 2953: .El
2954: .Pp
2955: Note that the
1.274 schwarze 2956: .Ic \&Vt
1.211 schwarze 2957: macro is a
2958: .Sx Block partial-implicit
2959: only when invoked as the first macro
2960: in a
2961: .Em SYNOPSIS
2962: section line, else it is
2963: .Sx In-line .
2964: .Ss Special block macro
2965: The
1.274 schwarze 2966: .Ic \&Ta
1.211 schwarze 2967: macro can only be used below
1.274 schwarze 2968: .Ic \&It
1.211 schwarze 2969: in
1.274 schwarze 2970: .Ic \&Bl Fl column
1.211 schwarze 2971: lists.
2972: It delimits blocks representing table cells;
2973: these blocks have bodies, but no heads.
2974: .Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXXX" -offset indent
2975: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope
1.274 schwarze 2976: .It Ic \&Ta Ta Yes Ta Yes Ta closed by Ic \&Ta , Ic \&It
1.211 schwarze 2977: .El
2978: .Ss In-line
2979: Closed by the end of the line, fixed argument lengths,
2980: and/or subsequent macros.
2981: In-line macros have only text children.
2982: If a number (or inequality) of arguments is
2983: .Pq n ,
2984: then the macro accepts an arbitrary number of arguments.
2985: .Bd -literal -offset indent
2986: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lBres...\(rB
2987:
2988: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
2989:
2990: \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
2991: .Ed
2992: .Bl -column "MacroX" "CallableX" "ParsedX" "Arguments" -offset indent
2993: .It Em Macro Ta Em Callable Ta Em Parsed Ta Em Arguments
1.274 schwarze 2994: .It Ic \&%A Ta \&No Ta \&No Ta >0
2995: .It Ic \&%B Ta \&No Ta \&No Ta >0
2996: .It Ic \&%C Ta \&No Ta \&No Ta >0
2997: .It Ic \&%D Ta \&No Ta \&No Ta >0
2998: .It Ic \&%I Ta \&No Ta \&No Ta >0
2999: .It Ic \&%J Ta \&No Ta \&No Ta >0
3000: .It Ic \&%N Ta \&No Ta \&No Ta >0
3001: .It Ic \&%O Ta \&No Ta \&No Ta >0
3002: .It Ic \&%P Ta \&No Ta \&No Ta >0
3003: .It Ic \&%Q Ta \&No Ta \&No Ta >0
3004: .It Ic \&%R Ta \&No Ta \&No Ta >0
3005: .It Ic \&%T Ta \&No Ta \&No Ta >0
3006: .It Ic \&%U Ta \&No Ta \&No Ta >0
3007: .It Ic \&%V Ta \&No Ta \&No Ta >0
3008: .It Ic \&Ad Ta Yes Ta Yes Ta >0
3009: .It Ic \&An Ta Yes Ta Yes Ta >0
3010: .It Ic \&Ap Ta Yes Ta Yes Ta 0
3011: .It Ic \&Ar Ta Yes Ta Yes Ta n
3012: .It Ic \&At Ta Yes Ta Yes Ta 1
3013: .It Ic \&Bsx Ta Yes Ta Yes Ta n
3014: .It Ic \&Bt Ta \&No Ta \&No Ta 0
3015: .It Ic \&Bx Ta Yes Ta Yes Ta n
3016: .It Ic \&Cd Ta Yes Ta Yes Ta >0
3017: .It Ic \&Cm Ta Yes Ta Yes Ta >0
3018: .It Ic \&Db Ta \&No Ta \&No Ta 1
3019: .It Ic \&Dd Ta \&No Ta \&No Ta n
3020: .It Ic \&Dt Ta \&No Ta \&No Ta n
3021: .It Ic \&Dv Ta Yes Ta Yes Ta >0
3022: .It Ic \&Dx Ta Yes Ta Yes Ta n
3023: .It Ic \&Em Ta Yes Ta Yes Ta >0
3024: .It Ic \&Er Ta Yes Ta Yes Ta >0
3025: .It Ic \&Es Ta Yes Ta Yes Ta 2
3026: .It Ic \&Ev Ta Yes Ta Yes Ta >0
3027: .It Ic \&Ex Ta \&No Ta \&No Ta n
3028: .It Ic \&Fa Ta Yes Ta Yes Ta >0
3029: .It Ic \&Fd Ta \&No Ta \&No Ta >0
3030: .It Ic \&Fl Ta Yes Ta Yes Ta n
3031: .It Ic \&Fn Ta Yes Ta Yes Ta >0
3032: .It Ic \&Fr Ta Yes Ta Yes Ta >0
3033: .It Ic \&Ft Ta Yes Ta Yes Ta >0
3034: .It Ic \&Fx Ta Yes Ta Yes Ta n
3035: .It Ic \&Hf Ta \&No Ta \&No Ta n
3036: .It Ic \&Ic Ta Yes Ta Yes Ta >0
1.294 schwarze 3037: .It Ic \&In Ta Yes Ta Yes Ta 1
1.274 schwarze 3038: .It Ic \&Lb Ta \&No Ta \&No Ta 1
3039: .It Ic \&Li Ta Yes Ta Yes Ta >0
3040: .It Ic \&Lk Ta Yes Ta Yes Ta >0
3041: .It Ic \&Lp Ta \&No Ta \&No Ta 0
3042: .It Ic \&Ms Ta Yes Ta Yes Ta >0
3043: .It Ic \&Mt Ta Yes Ta Yes Ta >0
3044: .It Ic \&Nm Ta Yes Ta Yes Ta n
1.275 schwarze 3045: .It Ic \&No Ta Yes Ta Yes Ta >0
1.274 schwarze 3046: .It Ic \&Ns Ta Yes Ta Yes Ta 0
3047: .It Ic \&Nx Ta Yes Ta Yes Ta n
3048: .It Ic \&Os Ta \&No Ta \&No Ta n
3049: .It Ic \&Ot Ta Yes Ta Yes Ta >0
3050: .It Ic \&Ox Ta Yes Ta Yes Ta n
3051: .It Ic \&Pa Ta Yes Ta Yes Ta n
3052: .It Ic \&Pf Ta Yes Ta Yes Ta 1
3053: .It Ic \&Pp Ta \&No Ta \&No Ta 0
3054: .It Ic \&Rv Ta \&No Ta \&No Ta n
3055: .It Ic \&Sm Ta \&No Ta \&No Ta <2
3056: .It Ic \&St Ta \&No Ta Yes Ta 1
3057: .It Ic \&Sx Ta Yes Ta Yes Ta >0
3058: .It Ic \&Sy Ta Yes Ta Yes Ta >0
1.280 schwarze 3059: .It Ic \&Tg Ta \&No Ta \&No Ta <2
1.274 schwarze 3060: .It Ic \&Tn Ta Yes Ta Yes Ta >0
3061: .It Ic \&Ud Ta \&No Ta \&No Ta 0
3062: .It Ic \&Ux Ta Yes Ta Yes Ta n
3063: .It Ic \&Va Ta Yes Ta Yes Ta n
3064: .It Ic \&Vt Ta Yes Ta Yes Ta >0
3065: .It Ic \&Xr Ta Yes Ta Yes Ta 2
1.139 kristaps 3066: .El
1.211 schwarze 3067: .Ss Delimiters
3068: When a macro argument consists of one single input character
3069: considered as a delimiter, the argument gets special handling.
3070: This does not apply when delimiters appear in arguments containing
3071: more than one character.
3072: Consequently, to prevent special handling and just handle it
3073: like any other argument, a delimiter can be escaped by prepending
3074: a zero-width space
3075: .Pq Sq \e& .
3076: In text lines, delimiters never need escaping, but may be used
3077: as normal punctuation.
1.138 kristaps 3078: .Pp
1.211 schwarze 3079: For many macros, when the leading arguments are opening delimiters,
3080: these delimiters are put before the macro scope,
3081: and when the trailing arguments are closing delimiters,
3082: these delimiters are put after the macro scope.
1.261 schwarze 3083: Spacing is suppressed after opening delimiters
3084: and before closing delimiters.
1.211 schwarze 3085: For example,
1.172 kristaps 3086: .Pp
1.211 schwarze 3087: .D1 Pf \. \&Aq "( [ word ] ) ."
1.138 kristaps 3088: .Pp
1.211 schwarze 3089: renders as:
1.138 kristaps 3090: .Pp
1.211 schwarze 3091: .D1 Aq ( [ word ] ) .
1.198 schwarze 3092: .Pp
1.211 schwarze 3093: Opening delimiters are:
1.65 kristaps 3094: .Pp
1.211 schwarze 3095: .Bl -tag -width Ds -offset indent -compact
3096: .It \&(
3097: left parenthesis
3098: .It \&[
3099: left bracket
3100: .El
1.65 kristaps 3101: .Pp
1.211 schwarze 3102: Closing delimiters are:
1.132 kristaps 3103: .Pp
1.211 schwarze 3104: .Bl -tag -width Ds -offset indent -compact
3105: .It \&.
3106: period
3107: .It \&,
3108: comma
3109: .It \&:
3110: colon
3111: .It \&;
3112: semicolon
3113: .It \&)
3114: right parenthesis
3115: .It \&]
3116: right bracket
3117: .It \&?
3118: question mark
3119: .It \&!
3120: exclamation mark
3121: .El
1.83 kristaps 3122: .Pp
1.211 schwarze 3123: Note that even a period preceded by a backslash
3124: .Pq Sq \e.\&
3125: gets this special handling; use
1.277 schwarze 3126: .Sq \e&.\&
1.211 schwarze 3127: to prevent that.
1.83 kristaps 3128: .Pp
1.211 schwarze 3129: Many in-line macros interrupt their scope when they encounter
3130: delimiters, and resume their scope when more arguments follow that
3131: are not delimiters.
3132: For example,
1.83 kristaps 3133: .Pp
1.211 schwarze 3134: .D1 Pf \. \&Fl "a ( b | c \e*(Ba d ) e"
1.84 kristaps 3135: .Pp
1.211 schwarze 3136: renders as:
1.84 kristaps 3137: .Pp
1.211 schwarze 3138: .D1 Fl a ( b | c \*(Ba d ) e
1.84 kristaps 3139: .Pp
1.211 schwarze 3140: This applies to both opening and closing delimiters,
1.261 schwarze 3141: and also to the middle delimiter, which does not suppress spacing:
1.140 kristaps 3142: .Pp
1.211 schwarze 3143: .Bl -tag -width Ds -offset indent -compact
3144: .It \&|
3145: vertical bar
3146: .El
1.140 kristaps 3147: .Pp
1.211 schwarze 3148: As a special case, the predefined string \e*(Ba is handled and rendered
3149: in the same way as a plain
3150: .Sq \&|
3151: character.
3152: Using this predefined string is not recommended in new manuals.
1.279 schwarze 3153: .Pp
3154: Appending a zero-width space
3155: .Pq Sq \e&
3156: to the end of an input line is also useful to prevent the interpretation
3157: of a trailing period, exclamation or question mark as the end of a
3158: sentence, for example when an abbreviation happens to occur
3159: at the end of a text or macro input line.
1.211 schwarze 3160: .Ss Font handling
3161: In
3162: .Nm
3163: documents, usage of semantic markup is recommended in order to have
3164: proper fonts automatically selected; only when no fitting semantic markup
3165: is available, consider falling back to
3166: .Sx Physical markup
3167: macros.
3168: Whenever any
3169: .Nm
3170: macro switches the
3171: .Xr roff 7
3172: font mode, it will automatically restore the previous font when exiting
3173: its scope.
3174: Manually switching the font using the
3175: .Xr roff 7
3176: .Ql \ef
3177: font escape sequences is never required.
1.4 kristaps 3178: .Sh COMPATIBILITY
1.229 schwarze 3179: This section provides an incomplete list of compatibility issues
1.250 schwarze 3180: between mandoc and GNU troff
1.93 kristaps 3181: .Pq Qq groff .
3182: .Pp
1.150 kristaps 3183: The following problematic behaviour is found in groff:
3184: .Pp
1.57 kristaps 3185: .Bl -dash -compact
1.168 kristaps 3186: .It
1.274 schwarze 3187: .Ic \&Pa
1.150 kristaps 3188: does not format its arguments when used in the FILES section under
1.100 kristaps 3189: certain list types.
1.80 kristaps 3190: .It
1.274 schwarze 3191: .Ic \&Ta
1.150 kristaps 3192: can only be called by other macros, but not at the beginning of a line.
1.166 schwarze 3193: .It
1.77 kristaps 3194: .Sq \ef
1.150 kristaps 3195: .Pq font face
3196: and
1.229 schwarze 3197: .Sq \eF
1.150 kristaps 3198: .Pq font family face
1.93 kristaps 3199: .Sx Text Decoration
1.150 kristaps 3200: escapes behave irregularly when specified within line-macro scopes.
1.77 kristaps 3201: .It
1.150 kristaps 3202: Negative scaling units return to prior lines.
3203: Instead, mandoc truncates them to zero.
3204: .El
3205: .Pp
3206: The following features are unimplemented in mandoc:
3207: .Pp
3208: .Bl -dash -compact
1.61 kristaps 3209: .It
1.274 schwarze 3210: .Ic \&Bd Fl file Ar file
1.250 schwarze 3211: is unsupported for security reasons.
3212: .It
1.274 schwarze 3213: .Ic \&Bd
1.250 schwarze 3214: .Fl filled
3215: does not adjust the right margin, but is an alias for
1.274 schwarze 3216: .Ic \&Bd
1.250 schwarze 3217: .Fl ragged .
3218: .It
1.274 schwarze 3219: .Ic \&Bd
1.250 schwarze 3220: .Fl literal
3221: does not use a literal font, but is an alias for
1.274 schwarze 3222: .Ic \&Bd
1.250 schwarze 3223: .Fl unfilled .
1.57 kristaps 3224: .It
1.274 schwarze 3225: .Ic \&Bd
1.225 schwarze 3226: .Fl offset Cm center
1.64 kristaps 3227: and
1.250 schwarze 3228: .Fl offset Cm right
3229: don't work.
1.249 schwarze 3230: Groff does not implement centered and flush-right rendering either,
1.150 kristaps 3231: but produces large indentations.
1.57 kristaps 3232: .El
1.2 kristaps 3233: .Sh SEE ALSO
1.159 schwarze 3234: .Xr man 1 ,
1.57 kristaps 3235: .Xr mandoc 1 ,
1.180 kristaps 3236: .Xr eqn 7 ,
1.174 kristaps 3237: .Xr man 7 ,
1.198 schwarze 3238: .Xr mandoc_char 7 ,
1.174 kristaps 3239: .Xr roff 7 ,
3240: .Xr tbl 7
1.258 schwarze 3241: .Pp
3242: The web page
1.282 schwarze 3243: .Lk https://mandoc.bsd.lv/mdoc/ "extended documentation for the mdoc language"
1.258 schwarze 3244: provides a few tutorial-style pages for beginners, an extensive style
3245: guide for advanced authors, and an alphabetic index helping to choose
3246: the best macros for various kinds of content.
1.282 schwarze 3247: .Pp
3248: The manual page
3249: .Lk https://man.voidlinux.org/groff_mdoc "groff_mdoc(7)"
3250: contained in the
3251: .Dq groff
1.283 schwarze 3252: package documents exactly the same language in a somewhat different style.
1.151 kristaps 3253: .Sh HISTORY
3254: The
3255: .Nm
3256: language first appeared as a troff macro package in
3257: .Bx 4.4 .
3258: It was later significantly updated by Werner Lemberg and Ruslan Ermilov
1.155 kristaps 3259: in groff-1.17.
1.151 kristaps 3260: The standalone implementation that is part of the
3261: .Xr mandoc 1
3262: utility written by Kristaps Dzonsons appeared in
3263: .Ox 4.6 .
1.2 kristaps 3264: .Sh AUTHORS
3265: The
1.57 kristaps 3266: .Nm
1.50 kristaps 3267: reference was written by
1.219 schwarze 3268: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
CVSweb