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