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