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