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