]> git.cameronkatri.com Git - mandoc.git/blob - mdoc.7
Improve .Nm indentation in the SYNOPSIS;
[mandoc.git] / mdoc.7
1 .\" $Id: mdoc.7,v 1.128 2010/07/01 15:38:56 schwarze Exp $
2 .\"
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd $Mdocdate: July 1 2010 $
18 .Dt MDOC 7
19 .Os
20 .Sh NAME
21 .Nm mdoc
22 .Nd mdoc language reference
23 .Sh DESCRIPTION
24 The
25 .Nm mdoc
26 language is used to format
27 .Bx
28 .Ux
29 manuals. In this reference document, we describe its syntax, structure,
30 and usage. Our reference implementation is mandoc; the
31 .Sx COMPATIBILITY
32 section describes compatibility with other troff \-mdoc implementations.
33 .Pp
34 An
35 .Nm
36 document follows simple rules: lines beginning with the control
37 character
38 .Sq \.
39 are parsed for macros. Other lines are interpreted within the scope of
40 prior macros:
41 .Bd -literal -offset indent
42 \&.Sh Macro lines change control state.
43 Other lines are interpreted within the current state.
44 .Ed
45 .Sh LANGUAGE SYNTAX
46 .Nm
47 documents may contain only graphable 7-bit ASCII characters, the space
48 character, and, in certain circumstances, the tab character. All
49 manuals must have
50 .Ux
51 line terminators.
52 .Ss Comments
53 Text following a
54 .Sq \e" ,
55 whether in a macro or free-form text line, is ignored to the end of
56 line. A macro line with only a control character and comment escape,
57 .Sq \&.\e" ,
58 is also ignored. Macro lines with only a control character and optionally
59 whitespace are stripped from input.
60 .Ss Reserved Characters
61 Within a macro line, the following characters are reserved:
62 .Pp
63 .Bl -tag -width Ds -offset indent -compact
64 .It \&.
65 .Pq period
66 .It \&,
67 .Pq comma
68 .It \&:
69 .Pq colon
70 .It \&;
71 .Pq semicolon
72 .It \&(
73 .Pq left-parenthesis
74 .It \&)
75 .Pq right-parenthesis
76 .It \&[
77 .Pq left-bracket
78 .It \&]
79 .Pq right-bracket
80 .It \&?
81 .Pq question
82 .It \&!
83 .Pq exclamation
84 .It \&|
85 .Pq vertical bar
86 .El
87 .Pp
88 Use of reserved characters is described in
89 .Sx MACRO SYNTAX .
90 For general use in macro lines, these characters must either be escaped
91 with a non-breaking space
92 .Pq Sq \e&
93 or, if applicable, an appropriate escape sequence used.
94 .Ss Special Characters
95 Special characters may occur in both macro and free-form lines.
96 Sequences begin with the escape character
97 .Sq \e
98 followed by either an open-parenthesis
99 .Sq \&(
100 for two-character sequences; an open-bracket
101 .Sq \&[
102 for n-character sequences (terminated at a close-bracket
103 .Sq \&] ) ;
104 or a single one-character sequence.
105 See
106 .Xr mandoc_char 7
107 for a complete list.
108 Examples include
109 .Sq \e(em
110 .Pq em-dash
111 and
112 .Sq \ee
113 .Pq back-slash .
114 .Ss Text Decoration
115 Terms may be text-decorated using the
116 .Sq \ef
117 escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
118 (revert to previous mode):
119 .Pp
120 .D1 \efBbold\efR \efIitalic\efP
121 .Pp
122 A numerical representation 3, 2, or 1 (bold, italic, and Roman,
123 respectively) may be used instead.
124 A text decoration is valid within
125 the current font scope only: if a macro opens a font scope alongside
126 its own scope, such as
127 .Sx \&Bf
128 .Cm \&Sy ,
129 in-scope invocations of
130 .Sq \ef
131 are only valid within the font scope of the macro.
132 If
133 .Sq \ef
134 is specified outside of any font scope, such as in unenclosed, free-form
135 text, it will affect the remainder of the document.
136 .Pp
137 Text may also be sized with the
138 .Sq \es
139 escape, whose syntax is one of
140 .Sq \es+-n
141 for one-digit numerals;
142 .Sq \es(+-nn
143 or
144 .Sq \es+-(nn
145 for two-digit numerals; and
146 .Sq \es[+-N] ,
147 .Sq \es+-[N] ,
148 .Sq \es'+-N' ,
149 or
150 .Sq \es+-'N'
151 for arbitrary-digit numerals:
152 .Pp
153 .D1 \es+1bigger\es-1
154 .D1 \es[+10]much bigger\es[-10]
155 .D1 \es+(10much bigger\es-(10
156 .D1 \es+'100'much much bigger\es-'100'
157 .Pp
158 Note these forms are
159 .Em not
160 recommended for
161 .Nm ,
162 which encourages semantic annotation.
163 .Ss Predefined Strings
164 Historically,
165 .Xr groff 1
166 also defined a set of package-specific
167 .Dq predefined strings ,
168 which, like
169 .Sx Special Characters ,
170 mark special output characters and strings by way of input codes.
171 Predefined strings are escaped with the slash-asterisk,
172 .Sq \e* :
173 single-character
174 .Sq \e*X ,
175 two-character
176 .Sq \e*(XX ,
177 and N-character
178 .Sq \e*[N] .
179 See
180 .Xr mandoc_char 7
181 for a complete list.
182 Examples include
183 .Sq \e*(Am
184 .Pq ampersand
185 and
186 .Sq \e*(Ba
187 .Pq vertical bar .
188 .Ss Whitespace
189 Whitespace consists of the space character.
190 In free-form lines, whitespace is preserved within a line; un-escaped
191 trailing spaces are stripped from input (unless in a literal context).
192 Blank free-form lines, which may include whitespace, are only permitted
193 within literal contexts.
194 .Pp
195 In macro lines, whitespace delimits arguments and is discarded.
196 If arguments are quoted, whitespace within the quotes is retained.
197 .Ss Quotation
198 Macro arguments may be quoted with a double-quote to group
199 space-delimited terms or to retain blocks of whitespace.
200 A quoted argument begins with a double-quote preceded by whitespace.
201 The next double-quote not pair-wise adjacent to another double-quote
202 terminates the literal, regardless of surrounding whitespace.
203 .Pp
204 This produces tokens
205 .Sq a" ,
206 .Sq b c ,
207 .Sq de ,
208 and
209 .Sq fg" .
210 Note that any quoted term, be it argument or macro, is indiscriminately
211 considered literal text.
212 Thus, the following produces
213 .Sq \&Em a :
214 .Bd -literal -offset indent
215 \&.Em "Em a"
216 .Ed
217 .Pp
218 In free-form mode, quotes are regarded as opaque text.
219 .Ss Dates
220 There are several macros in
221 .Nm
222 that require a date argument.
223 The canonical form for dates is the American format:
224 .Pp
225 .D1 Cm Month Day , Year
226 .Pp
227 The
228 .Cm Day
229 value is an optionally zero-padded numeral.
230 The
231 .Cm Month
232 value is the full month name.
233 The
234 .Cm Year
235 value is the full four-digit year.
236 .Pp
237 Reduced form dates are broken-down canonical form dates:
238 .Pp
239 .D1 Cm Month , Year
240 .D1 Cm Year
241 .Pp
242 Some examples of valid dates follow:
243 .Pp
244 .D1 "May, 2009" Pq reduced form
245 .D1 "2009" Pq reduced form
246 .D1 "May 20, 2009" Pq canonical form
247 .Ss Scaling Widths
248 Many macros support scaled widths for their arguments, such as
249 stipulating a two-inch list indentation with the following:
250 .Bd -literal -offset indent
251 \&.Bl -tag -width 2i
252 .Ed
253 .Pp
254 The syntax for scaled widths is
255 .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
256 where a decimal must be preceded or proceeded by at least one digit.
257 Negative numbers, while accepted, are truncated to zero.
258 The following scaling units are accepted:
259 .Pp
260 .Bl -tag -width Ds -offset indent -compact
261 .It c
262 centimetre
263 .It i
264 inch
265 .It P
266 pica (~1/6 inch)
267 .It p
268 point (~1/72 inch)
269 .It f
270 synonym for
271 .Sq u
272 .It v
273 default vertical span
274 .It m
275 width of rendered
276 .Sq m
277 .Pq em
278 character
279 .It n
280 width of rendered
281 .Sq n
282 .Pq en
283 character
284 .It u
285 default horizontal span
286 .It M
287 mini-em (~1/100 em)
288 .El
289 .Pp
290 Using anything other than
291 .Sq m ,
292 .Sq n ,
293 .Sq u ,
294 or
295 .Sq v
296 is necessarily non-portable across output media.
297 See
298 .Sx COMPATIBILITY .
299 .Ss Sentence Spacing
300 When composing a manual, make sure that your sentences end at the end of
301 a line.
302 By doing so, front-ends will be able to apply the proper amount of
303 spacing after the end of sentence (unescaped) period, exclamation mark,
304 or question mark followed by zero or more non-sentence closing
305 delimiters (
306 .Ns Sq \&) ,
307 .Sq \&] ,
308 .Sq \&' ,
309 .Sq \&" ) .
310 .Pp
311 The proper spacing is also intelligently preserved if a sentence ends at
312 the boundary of a macro line, e.g.,
313 .Pp
314 .D1 \&Xr mandoc 1 \.
315 .D1 \&Fl T \&Ns \&Cm ascii \.
316 .Sh MANUAL STRUCTURE
317 A well-formed
318 .Nm
319 document consists of a document prologue followed by one or more
320 sections.
321 .Pp
322 The prologue, which consists of (in order) the
323 .Sx \&Dd ,
324 .Sx \&Dt ,
325 and
326 .Sx \&Os
327 macros, is required for every document.
328 .Pp
329 The first section (sections are denoted by
330 .Sx \&Sh )
331 must be the NAME section, consisting of at least one
332 .Sx \&Nm
333 followed by
334 .Sx \&Nd .
335 .Pp
336 Following that, convention dictates specifying at least the
337 .Em SYNOPSIS
338 and
339 .Em DESCRIPTION
340 sections, although this varies between manual sections.
341 .Pp
342 The following is a well-formed skeleton
343 .Nm
344 file:
345 .Bd -literal -offset indent
346 \&.Dd $\&Mdocdate$
347 \&.Dt mdoc 7
348 \&.Os
349 \&.Sh NAME
350 \&.Nm foo
351 \&.Nd a description goes here
352 \&.\e\*q The next is for sections 2, 3, & 9 only.
353 \&.\e\*q .Sh LIBRARY
354 \&.Sh SYNOPSIS
355 \&.Nm foo
356 \&.Op Fl options
357 \&.Ar
358 \&.Sh DESCRIPTION
359 The
360 \&.Nm
361 utility processes files ...
362 \&.\e\*q .Sh IMPLEMENTATION NOTES
363 \&.\e\*q The next is for sections 2, 3, & 9 only.
364 \&.\e\*q .Sh RETURN VALUES
365 \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
366 \&.\e\*q .Sh ENVIRONMENT
367 \&.\e\*q .Sh FILES
368 \&.\e\*q The next is for sections 1 & 8 only.
369 \&.\e\*q .Sh EXIT STATUS
370 \&.\e\*q .Sh EXAMPLES
371 \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
372 \&.\e\*q .Sh DIAGNOSTICS
373 \&.\e\*q The next is for sections 2, 3, & 9 only.
374 \&.\e\*q .Sh ERRORS
375 \&.\e\*q .Sh SEE ALSO
376 \&.\e\*q .Xr foobar 1
377 \&.\e\*q .Sh STANDARDS
378 \&.\e\*q .Sh HISTORY
379 \&.\e\*q .Sh AUTHORS
380 \&.\e\*q .Sh CAVEATS
381 \&.\e\*q .Sh BUGS
382 \&.\e\*q .Sh SECURITY CONSIDERATIONS
383 .Ed
384 .Pp
385 The sections in a
386 .Nm
387 document are conventionally ordered as they appear above.
388 Sections should be composed as follows:
389 .Bl -ohang -offset Ds
390 .It Em NAME
391 The name(s) and a short description of the documented material.
392 The syntax for this as follows:
393 .Bd -literal -offset indent
394 \&.Nm name0
395 \&.Nm name1
396 \&.Nm name2
397 \&.Nd a short description
398 .Ed
399 .Pp
400 The
401 .Sx \&Nm
402 macro(s) must precede the
403 .Sx \&Nd
404 macro.
405 .Pp
406 See
407 .Sx \&Nm
408 and
409 .Sx \&Nd .
410 .It Em LIBRARY
411 The name of the library containing the documented material, which is
412 assumed to be a function in a section 2, 3, or 9 manual.
413 The syntax for this is as follows:
414 .Bd -literal -offset indent
415 \&.Lb libarm
416 .Ed
417 .Pp
418 See
419 .Sx \&Lb .
420 .It Em SYNOPSIS
421 Documents the utility invocation syntax, function call syntax, or device
422 configuration.
423 .Pp
424 For the first, utilities (sections 1, 6, and 8), this is
425 generally structured as follows:
426 .Bd -literal -offset indent
427 \&.Nm foo
428 \&.Op Fl v
429 \&.Op Fl o Ar file
430 \&.Op Ar
431 \&.Nm bar
432 \&.Op Fl v
433 \&.Op Fl o Ar file
434 \&.Op Ar
435 .Ed
436 .Pp
437 For the second, function calls (sections 2, 3, 9):
438 .Bd -literal -offset indent
439 \&.Vt extern const char *global;
440 \&.In header.h
441 \&.Ft "char *"
442 \&.Fn foo "const char *src"
443 \&.Ft "char *"
444 \&.Fn bar "const char *src"
445 .Ed
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. If two such
469 dissimilar macros are pair-wise 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 \&Sx ,
491 or
492 .Sx \&Ss
493 macro or the end of an enclosing block, whichever comes first.
494 .It Em DESCRIPTION
495 This expands upon the brief, one-line description in
496 .Em NAME .
497 It usually contains a break-down of the options (if documenting a
498 command), such as:
499 .Bd -literal -offset indent
500 The arguments are as follows:
501 \&.Bl \-tag \-width Ds
502 \&.It Fl v
503 Print verbose information.
504 \&.El
505 .Ed
506 .Pp
507 Manuals not documenting a command won't include the above fragment.
508 .It Em IMPLEMENTATION NOTES
509 Implementation-specific notes should be kept here.
510 This is useful when implementing standard functions that may have side
511 effects or notable algorithmic implications.
512 .It Em RETURN VALUES
513 This section is the dual of
514 .Em EXIT STATUS ,
515 which is used for commands.
516 It documents the return values of functions in sections 2, 3, and 9.
517 .Pp
518 See
519 .Sx \&Rv .
520 .It Em ENVIRONMENT
521 Documents any usages of environment variables, e.g.,
522 .Xr environ 7 .
523 .Pp
524 See
525 .Sx \&Ev .
526 .It Em FILES
527 Documents files used.
528 It's helpful to document both the file and a short description of how
529 the file is used (created, modified, etc.).
530 .Pp
531 See
532 .Sx \&Pa .
533 .It Em EXIT STATUS
534 Command exit status for section 1, 6, and 8 manuals.
535 This section is the dual of
536 .Em RETURN VALUES ,
537 which is used for functions.
538 Historically, this information was described in
539 .Em DIAGNOSTICS ,
540 a practise that is now discouraged.
541 .Pp
542 See
543 .Sx \&Ex .
544 .It Em EXAMPLES
545 Example usages.
546 This often contains snippets of well-formed, well-tested invocations.
547 Make doubly sure that your examples work properly!
548 .It Em DIAGNOSTICS
549 Documents error conditions.
550 This is most useful in section 4 manuals.
551 Historically, this section was used in place of
552 .Em EXIT STATUS
553 for manuals in sections 1, 6, and 8; however, this practise is
554 discouraged.
555 .Pp
556 See
557 .Sx \&Bl
558 .Fl diag .
559 .It Em ERRORS
560 Documents error handling in sections 2, 3, and 9.
561 .Pp
562 See
563 .Sx \&Er .
564 .It Em SEE ALSO
565 References other manuals with related topics.
566 This section should exist for most manuals.
567 Cross-references should conventionally be ordered first by section, then
568 alphabetically.
569 .Pp
570 See
571 .Sx \&Xr .
572 .It Em STANDARDS
573 References any standards implemented or used.
574 If not adhering to any standards, the
575 .Em HISTORY
576 section should be used instead.
577 .Pp
578 See
579 .Sx \&St .
580 .It Em HISTORY
581 The history of any manual without a
582 .Em STANDARDS
583 section should be described in this section.
584 .It Em AUTHORS
585 Credits to authors, if applicable, should appear in this section.
586 Authors should generally be noted by both name and an e-mail address.
587 .Pp
588 See
589 .Sx \&An .
590 .It Em CAVEATS
591 Explanations of common misuses and misunderstandings should be explained
592 in this section.
593 .It Em BUGS
594 Extant bugs should be described in this section.
595 .It Em SECURITY CONSIDERATIONS
596 Documents any security precautions that operators should consider.
597 .El
598 .Sh MACRO SYNTAX
599 Macros are one to three three characters in length and begin with a
600 control character ,
601 .Sq \&. ,
602 at the beginning of the line.
603 An arbitrary amount of whitespace may sit between the control character
604 and the macro name.
605 Thus, the following are equivalent:
606 .Bd -literal -offset indent
607 \&.Pp
608 \&.\ \ \ \&Pp
609 .Ed
610 .Pp
611 The syntax of a macro depends on its classification.
612 In this section,
613 .Sq \-arg
614 refers to macro arguments, which may be followed by zero or more
615 .Sq parm
616 parameters;
617 .Sq \&Yo
618 opens the scope of a macro; and if specified,
619 .Sq \&Yc
620 closes it out.
621 .Pp
622 The
623 .Em Callable
624 column indicates that the macro may be called subsequent to the initial
625 line-macro.
626 If a macro is not callable, then its invocation after the initial line
627 macro is interpreted as opaque text, such that
628 .Sq \&.Fl \&Sh
629 produces
630 .Sq Fl \&Sh .
631 .Pp
632 The
633 .Em Parsable
634 column indicates whether the macro may be followed by further
635 (ostensibly callable) macros.
636 If a macro is not parsable, subsequent macro invocations on the line
637 will be interpreted as opaque text.
638 .Pp
639 The
640 .Em Scope
641 column, if applicable, describes closure rules.
642 .Ss Block full-explicit
643 Multi-line scope closed by an explicit closing macro.
644 All macros contains bodies; only
645 .Sx \&Bf
646 contains a head.
647 .Bd -literal -offset indent
648 \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
649 \(lBbody...\(rB
650 \&.Yc
651 .Ed
652 .Pp
653 .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXX"
654 .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
655 .It Sx \&Bd Ta \&No Ta \&No Ta closed by Sx \&Ed
656 .It Sx \&Bf Ta \&No Ta \&No Ta closed by Sx \&Ef
657 .It Sx \&Bk Ta \&No Ta \&No Ta closed by Sx \&Ek
658 .It Sx \&Bl Ta \&No Ta \&No Ta closed by Sx \&El
659 .It Sx \&Ed Ta \&No Ta \&No Ta opened by Sx \&Bd
660 .It Sx \&Ef Ta \&No Ta \&No Ta opened by Sx \&Bf
661 .It Sx \&Ek Ta \&No Ta \&No Ta opened by Sx \&Bk
662 .It Sx \&El Ta \&No Ta \&No Ta opened by Sx \&Bl
663 .El
664 .Ss Block full-implicit
665 Multi-line scope closed by end-of-file or implicitly by another macro.
666 All macros have bodies; some
667 .Po
668 .Sx \&It Fl bullet ,
669 .Fl hyphen ,
670 .Fl dash ,
671 .Fl enum ,
672 .Fl item
673 .Pc
674 don't have heads; only one
675 .Po
676 .Sx \&It Fl column
677 .Pc
678 has multiple heads.
679 .Bd -literal -offset indent
680 \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
681 \(lBbody...\(rB
682 .Ed
683 .Pp
684 .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXXXXXXXXXX"
685 .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
686 .It Sx \&It Ta \&No Ta Yes Ta closed by Sx \&It , Sx \&El
687 .It Sx \&Nd Ta \&No Ta \&No Ta closed by Sx \&Sh
688 .It Sx \&Nm Ta \&No Ta Yes Ta closed by Sx \&Nm , Sx \&Sh , Sx \&Ss
689 .It Sx \&Sh Ta \&No Ta \&No Ta closed by Sx \&Sh
690 .It Sx \&Ss Ta \&No Ta \&No Ta closed by Sx \&Sh , Sx \&Ss
691 .El
692 .Pp
693 Note that the
694 .Sx \&Nm
695 macro is a
696 .Sx Block full-implicit
697 macro only when invoked as the first macro
698 in a
699 .Em SYNOPSIS
700 section line, else it is
701 .Sx In-line .
702 .Ss Block partial-explicit
703 Like block full-explicit, but also with single-line scope.
704 Each has at least a body and, in limited circumstances, a head
705 .Po
706 .Sx \&Fo ,
707 .Sx \&Eo
708 .Pc
709 and/or tail
710 .Pq Sx \&Ec .
711 .Bd -literal -offset indent
712 \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
713 \(lBbody...\(rB
714 \&.Yc \(lBtail...\(rB
715
716 \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
717 \(lBbody...\(rB \&Yc \(lBtail...\(rB
718 .Ed
719 .Pp
720 .Bl -column "MacroX" "CallableX" "ParsableX" "closed by XXXX" -compact -offset indent
721 .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
722 .It Sx \&Ac Ta Yes Ta Yes Ta opened by Sx \&Ao
723 .It Sx \&Ao Ta Yes Ta Yes Ta closed by Sx \&Ac
724 .It Sx \&Bc Ta Yes Ta Yes Ta closed by Sx \&Bo
725 .It Sx \&Bo Ta Yes Ta Yes Ta opened by Sx \&Bc
726 .It Sx \&Brc Ta Yes Ta Yes Ta opened by Sx \&Bro
727 .It Sx \&Bro Ta Yes Ta Yes Ta closed by Sx \&Brc
728 .It Sx \&Dc Ta Yes Ta Yes Ta opened by Sx \&Do
729 .It Sx \&Do Ta Yes Ta Yes Ta closed by Sx \&Dc
730 .It Sx \&Ec Ta Yes Ta Yes Ta opened by Sx \&Eo
731 .It Sx \&Eo Ta Yes Ta Yes Ta closed by Sx \&Ec
732 .It Sx \&Fc Ta Yes Ta Yes Ta opened by Sx \&Fo
733 .It Sx \&Fo Ta \&No Ta \&No Ta closed by Sx \&Fc
734 .It Sx \&Oc Ta Yes Ta Yes Ta closed by Sx \&Oo
735 .It Sx \&Oo Ta Yes Ta Yes Ta opened by Sx \&Oc
736 .It Sx \&Pc Ta Yes Ta Yes Ta closed by Sx \&Po
737 .It Sx \&Po Ta Yes Ta Yes Ta opened by Sx \&Pc
738 .It Sx \&Qc Ta Yes Ta Yes Ta opened by Sx \&Oo
739 .It Sx \&Qo Ta Yes Ta Yes Ta closed by Sx \&Oc
740 .It Sx \&Re Ta \&No Ta \&No Ta opened by Sx \&Rs
741 .It Sx \&Rs Ta \&No Ta \&No Ta closed by Sx \&Re
742 .It Sx \&Sc Ta Yes Ta Yes Ta opened by Sx \&So
743 .It Sx \&So Ta Yes Ta Yes Ta closed by Sx \&Sc
744 .It Sx \&Xc Ta Yes Ta Yes Ta opened by Sx \&Xo
745 .It Sx \&Xo Ta Yes Ta Yes Ta closed by Sx \&Xc
746 .El
747 .Ss Block partial-implicit
748 Like block full-implicit, but with single-line scope closed by
749 .Sx Reserved Characters
750 or end of line.
751 .Bd -literal -offset indent
752 \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
753 .Ed
754 .Pp
755 .Bl -column "MacroX" "CallableX" "ParsableX" -compact -offset indent
756 .It Em Macro Ta Em Callable Ta Em Parsable
757 .It Sx \&Aq Ta Yes Ta Yes
758 .It Sx \&Bq Ta Yes Ta Yes
759 .It Sx \&Brq Ta Yes Ta Yes
760 .It Sx \&D1 Ta \&No Ta \&Yes
761 .It Sx \&Dl Ta \&No Ta Yes
762 .It Sx \&Dq Ta Yes Ta Yes
763 .It Sx \&Op Ta Yes Ta Yes
764 .It Sx \&Pq Ta Yes Ta Yes
765 .It Sx \&Ql Ta Yes Ta Yes
766 .It Sx \&Qq Ta Yes Ta Yes
767 .It Sx \&Sq Ta Yes Ta Yes
768 .It Sx \&Vt Ta Yes Ta Yes
769 .El
770 .Pp
771 Note that the
772 .Sx \&Vt
773 macro is a
774 .Sx Block partial-implicit
775 only when invoked as the first macro
776 in a
777 .Em SYNOPSIS
778 section line, else it is
779 .Sx In-line .
780 .Ss In-line
781 Closed by
782 .Sx Reserved Characters ,
783 end of line, fixed argument lengths, and/or subsequent macros.
784 In-line macros have only text children.
785 If a number (or inequality) of arguments is
786 .Pq n ,
787 then the macro accepts an arbitrary number of arguments.
788 .Bd -literal -offset indent
789 \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lbres...\(rb
790
791 \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
792
793 \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
794 .Ed
795 .Pp
796 .Bl -column "MacroX" "CallableX" "ParsableX" "Arguments" -compact -offset indent
797 .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Arguments
798 .It Sx \&%A Ta \&No Ta \&No Ta >0
799 .It Sx \&%B Ta \&No Ta \&No Ta >0
800 .It Sx \&%C Ta \&No Ta \&No Ta >0
801 .It Sx \&%D Ta \&No Ta \&No Ta >0
802 .It Sx \&%I Ta \&No Ta \&No Ta >0
803 .It Sx \&%J Ta \&No Ta \&No Ta >0
804 .It Sx \&%N Ta \&No Ta \&No Ta >0
805 .It Sx \&%O Ta \&No Ta \&No Ta >0
806 .It Sx \&%P Ta \&No Ta \&No Ta >0
807 .It Sx \&%Q Ta \&No Ta \&No Ta >0
808 .It Sx \&%R Ta \&No Ta \&No Ta >0
809 .It Sx \&%T Ta \&No Ta \&No Ta >0
810 .It Sx \&%U Ta \&No Ta \&No Ta >0
811 .It Sx \&%V Ta \&No Ta \&No Ta >0
812 .It Sx \&Ad Ta Yes Ta Yes Ta n
813 .It Sx \&An Ta Yes Ta Yes Ta n
814 .It Sx \&Ap Ta Yes Ta Yes Ta 0
815 .It Sx \&Ar Ta Yes Ta Yes Ta n
816 .It Sx \&At Ta Yes Ta Yes Ta 1
817 .It Sx \&Bsx Ta Yes Ta Yes Ta n
818 .It Sx \&Bt Ta \&No Ta \&No Ta 0
819 .It Sx \&Bx Ta Yes Ta Yes Ta n
820 .It Sx \&Cd Ta Yes Ta Yes Ta >0
821 .It Sx \&Cm Ta Yes Ta Yes Ta n
822 .It Sx \&Db Ta \&No Ta \&No Ta 1
823 .It Sx \&Dd Ta \&No Ta \&No Ta >0
824 .It Sx \&Dt Ta \&No Ta \&No Ta n
825 .It Sx \&Dv Ta Yes Ta Yes Ta n
826 .It Sx \&Dx Ta Yes Ta Yes Ta n
827 .It Sx \&Em Ta Yes Ta Yes Ta >0
828 .It Sx \&En Ta \&No Ta \&No Ta 0
829 .It Sx \&Er Ta Yes Ta Yes Ta >0
830 .It Sx \&Es Ta \&No Ta \&No Ta 0
831 .It Sx \&Ev Ta Yes Ta Yes Ta n
832 .It Sx \&Ex Ta \&No Ta \&No Ta n
833 .It Sx \&Fa Ta Yes Ta Yes Ta n
834 .It Sx \&Fd Ta \&No Ta \&No Ta >0
835 .It Sx \&Fl Ta Yes Ta Yes Ta n
836 .It Sx \&Fn Ta Yes Ta Yes Ta >0
837 .It Sx \&Fr Ta \&No Ta \&No Ta n
838 .It Sx \&Ft Ta Yes Ta Yes Ta n
839 .It Sx \&Fx Ta Yes Ta Yes Ta n
840 .It Sx \&Hf Ta \&No Ta \&No Ta n
841 .It Sx \&Ic Ta Yes Ta Yes Ta >0
842 .It Sx \&In Ta \&No Ta \&No Ta n
843 .It Sx \&Lb Ta \&No Ta \&No Ta 1
844 .It Sx \&Li Ta Yes Ta Yes Ta n
845 .It Sx \&Lk Ta Yes Ta Yes Ta n
846 .It Sx \&Lp Ta \&No Ta \&No Ta 0
847 .It Sx \&Ms Ta Yes Ta Yes Ta >0
848 .It Sx \&Mt Ta Yes Ta Yes Ta >0
849 .It Sx \&Nm Ta Yes Ta Yes Ta n
850 .It Sx \&No Ta Yes Ta Yes Ta 0
851 .It Sx \&Ns Ta Yes Ta Yes Ta 0
852 .It Sx \&Nx Ta Yes Ta Yes Ta n
853 .It Sx \&Os Ta \&No Ta \&No Ta n
854 .It Sx \&Ot Ta \&No Ta \&No Ta n
855 .It Sx \&Ox Ta Yes Ta Yes Ta n
856 .It Sx \&Pa Ta Yes Ta Yes Ta n
857 .It Sx \&Pf Ta Yes Ta Yes Ta 1
858 .It Sx \&Pp Ta \&No Ta \&No Ta 0
859 .It Sx \&Rv Ta \&No Ta \&No Ta n
860 .It Sx \&Sm Ta \&No Ta \&No Ta 1
861 .It Sx \&St Ta \&No Ta Yes Ta 1
862 .It Sx \&Sx Ta Yes Ta Yes Ta >0
863 .It Sx \&Sy Ta Yes Ta Yes Ta >0
864 .It Sx \&Tn Ta Yes Ta Yes Ta >0
865 .It Sx \&Ud Ta \&No Ta \&No Ta 0
866 .It Sx \&Ux Ta Yes Ta Yes Ta n
867 .It Sx \&Va Ta Yes Ta Yes Ta n
868 .It Sx \&Vt Ta Yes Ta Yes Ta >0
869 .It Sx \&Xr Ta Yes Ta Yes Ta >0
870 .It Sx \&br Ta \&No Ta \&No Ta 0
871 .It Sx \&sp Ta \&No Ta \&No Ta 1
872 .El
873 .Sh REFERENCE
874 This section is a canonical reference of all macros, arranged
875 alphabetically.
876 For the scoping of individual macros, see
877 .Sx MACRO SYNTAX .
878 .Ss \&%A
879 Author name of an
880 .Sx \&Rs
881 block. Multiple authors should each be accorded their own
882 .Sx \%%A
883 line. Author names should be ordered with full or abbreviated
884 forename(s) first, then full surname.
885 .Ss \&%B
886 Book title of an
887 .Sx \&Rs
888 block. This macro may also be used in a non-bibliographic context when
889 referring to book titles.
890 .Ss \&%C
891 Publication city or location of an
892 .Sx \&Rs
893 block.
894 .Pp
895 .Em Remarks :
896 this macro is not implemented in
897 .Xr groff 1 .
898 .Ss \&%D
899 Publication date of an
900 .Sx \&Rs
901 block. This should follow the reduced or canonical form syntax
902 described in
903 .Sx Dates .
904 .Ss \&%I
905 Publisher or issuer name of an
906 .Sx \&Rs
907 block.
908 .Ss \&%J
909 Journal name of an
910 .Sx \&Rs
911 block.
912 .Ss \&%N
913 Issue number (usually for journals) of an
914 .Sx \&Rs
915 block.
916 .Ss \&%O
917 Optional information of an
918 .Sx \&Rs
919 block.
920 .Ss \&%P
921 Book or journal page number of an
922 .Sx \&Rs
923 block.
924 .Ss \&%Q
925 Institutional author (school, government, etc.) of an
926 .Sx \&Rs
927 block. Multiple institutional authors should each be accorded their own
928 .Sx \&%Q
929 line.
930 .Ss \&%R
931 Technical report name of an
932 .Sx \&Rs
933 block.
934 .Ss \&%T
935 Article title of an
936 .Sx \&Rs
937 block. This macro may also be used in a non-bibliographical context
938 when referring to article titles.
939 .Ss \&%U
940 URI of reference document.
941 .Ss \&%V
942 Volume number of an
943 .Sx \&Rs
944 block.
945 .Ss \&Ac
946 Closes an
947 .Sx \&Ao
948 block. Does not have any tail arguments.
949 .Ss \&Ad
950 Address construct: usually in the context of an computational address in
951 memory, not a physical (post) address.
952 .Pp
953 Examples:
954 .D1 \&.Ad [0,$]
955 .D1 \&.Ad 0x00000000
956 .Ss \&An
957 Author name.
958 This macro may alternatively accepts the following arguments, although
959 these may not be specified along with a parameter:
960 .Bl -tag -width 12n -offset indent
961 .It Fl split
962 Renders a line break before each author listing.
963 .It Fl nosplit
964 The opposite of
965 .Fl split .
966 .El
967 .Pp
968 In the AUTHORS section, the default is not to split the first author
969 listing, but all subsequent author listings, whether or not they're
970 interspersed by other macros or text, are split.
971 Thus, specifying
972 .Fl split
973 will cause the first listing also to be split.
974 If not in the AUTHORS section, the default is not to split.
975 .Pp
976 Examples:
977 .D1 \&.An -nosplit
978 .D1 \&.An J. D. Ullman .
979 .Pp
980 .Em Remarks :
981 the effects of
982 .Fl split
983 or
984 .Fl nosplit
985 are re-set when entering the AUTHORS section, so if one specifies
986 .Sx \&An Fl nosplit
987 in the general document body, it must be re-specified in the AUTHORS
988 section.
989 .Ss \&Ao
990 Begins a block enclosed by angled brackets.
991 Does not have any head arguments.
992 .Pp
993 Examples:
994 .D1 \&.Fl -key= \&Ns \&Ao \&Ar val \&Ac
995 .Pp
996 See also
997 .Sx \&Aq .
998 .Ss \&Ap
999 Inserts an apostrophe without any surrounding white-space.
1000 This is generally used as a grammatical device when referring to the verb
1001 form of a function:
1002 .Bd -literal -offset indent
1003 \&.Fn execve Ap d
1004 .Ed
1005 .Ss \&Aq
1006 Encloses its arguments in angled brackets.
1007 .Pp
1008 Examples:
1009 .D1 \&.Fl -key= \&Ns \&Aq \&Ar val
1010 .Pp
1011 .Em Remarks :
1012 this macro is often abused for rendering URIs, which should instead use
1013 .Sx \&Lk
1014 or
1015 .Sx \&Mt ,
1016 or to note pre-processor
1017 .Dq Li #include
1018 statements, which should use
1019 .Sx \&In .
1020 .Pp
1021 See also
1022 .Sx \&Ao .
1023 .Ss \&Ar
1024 Command arguments.
1025 If an argument is not provided, the string
1026 .Dq file ...
1027 is used as a default.
1028 .Pp
1029 Examples:
1030 .D1 \&.Fl o \&Ns \&Ar file1
1031 .D1 \&.Ar
1032 .D1 \&.Ar arg1 , arg2 .
1033 .Ss \&At
1034 Formats an AT&T version.
1035 Accepts at most one parameter:
1036 .Bl -tag -width 12n -offset indent
1037 .It Cm v[1-7] | 32v
1038 A version of
1039 .At .
1040 .It Cm V[.[1-4]]?
1041 A system version of
1042 .At .
1043 .El
1044 .Pp
1045 Note that these parameters do not begin with a hyphen.
1046 .Pp
1047 Examples:
1048 .D1 \&.At
1049 .D1 \&.At V.1
1050 .Pp
1051 See also
1052 .Sx \&Bsx ,
1053 .Sx \&Bx ,
1054 .Sx \&Dx ,
1055 .Sx \&Fx ,
1056 .Sx \&Nx ,
1057 .Sx \&Ox ,
1058 and
1059 .Sx \&Ux .
1060 .Ss \&Bc
1061 Closes a
1062 .Sx \&Bo
1063 block. Does not have any tail arguments.
1064 .Ss \&Bd
1065 Begins a display block.
1066 A display is collection of macros or text which may be collectively
1067 offset or justified in a manner different from that
1068 of the enclosing context.
1069 By default, the block is preceded by a vertical space.
1070 .Pp
1071 Each display is associated with a type, which must be one of the
1072 following arguments:
1073 .Bl -tag -width 12n -offset indent
1074 .It Fl ragged
1075 Only left-justify the block.
1076 .It Fl unfilled
1077 Do not justify the block at all.
1078 .It Fl filled
1079 Left- and right-justify the block.
1080 .It Fl literal
1081 Alias for
1082 .Fl unfilled .
1083 .It Fl centered
1084 Centre-justify each line.
1085 .El
1086 .Pp
1087 The type must be provided first.
1088 Secondary arguments are as follows:
1089 .Bl -tag -width 12n -offset indent
1090 .It Fl offset Ar width
1091 Offset by the value of
1092 .Ar width ,
1093 which is interpreted as one of the following, specified in order:
1094 .Bl -item
1095 .It
1096 As one of the pre-defined strings
1097 .Ar indent ,
1098 the width of standard indentation;
1099 .Ar indent-two ,
1100 twice
1101 .Ar indent ;
1102 .Ar left ,
1103 which has no effect ;
1104 .Ar right ,
1105 which justifies to the right margin; and
1106 .Ar center ,
1107 which aligns around an imagined centre axis.
1108 .It
1109 As a precalculated width for a named macro.
1110 The most popular is the imaginary macro
1111 .Ar \&Ds ,
1112 which resolves to
1113 .Ar 6n .
1114 .It
1115 As a scaling unit following the syntax described in
1116 .Sx Scaling Widths .
1117 .It
1118 As the calculated string length of the opaque string.
1119 .El
1120 .Pp
1121 If not provided an argument, it will be ignored.
1122 .It Fl compact
1123 Do not assert a vertical space before the block.
1124 .It Fl file Ar file
1125 Prepend the file
1126 .Ar file
1127 before any text or macros within the block.
1128 .El
1129 .Pp
1130 Examples:
1131 .Bd -literal -offset indent
1132 \&.Bd \-unfilled \-offset two-indent \-compact
1133 Hello world.
1134 \&.Ed
1135 .Ed
1136 .Pp
1137 See also
1138 .Sx \&D1
1139 and
1140 .Sx \&Dl .
1141 .Ss \&Bf
1142 .Ss \&Bk
1143 Begins a keep block, containing a collection of macros or text
1144 to be kept together in the output.
1145 One argument is required; additional arguments are ignored.
1146 Currently, the only argument implemented is
1147 .Fl words ,
1148 requesting to keep together all words of the contained text
1149 on the same output line.
1150 A
1151 .Fl lines
1152 argument to keep together all lines of the contained text
1153 on the same page has been desired for a long time,
1154 but has never been implemented.
1155 .Pp
1156 Examples:
1157 .Bd -literal -offset indent
1158 \&.Bk \-words
1159 \&.Op o Ar output_file
1160 \&.Ek
1161 .Ed
1162 .Ss \&Bl
1163 Begins a list composed of one or more list entries.
1164 A list is associated with a type, which is a required argument.
1165 Other arguments are
1166 .Fl width ,
1167 defined per-type as accepting a literal or
1168 .Sx Scaling Widths
1169 value;
1170 .Fl offset ,
1171 also accepting a literal or
1172 .Sx Scaling Widths
1173 value setting the list's global offset; and
1174 .Fl compact ,
1175 suppressing the default vertical space printed before each list entry.
1176 A list entry is specified by the
1177 .Sx \&It
1178 macro, which consists of a head and optional body (depending on the list
1179 type).
1180 A list must specify one of the following list types:
1181 .Bl -tag -width 12n -offset indent
1182 .It Fl bullet
1183 A list offset by a bullet.
1184 The head of list entries must be empty.
1185 List entry bodies are positioned after the bullet.
1186 The
1187 .Fl width
1188 argument varies the width of list bodies' left-margins.
1189 .It Fl column
1190 A columnated list.
1191 The
1192 .Fl width
1193 argument has no effect.
1194 The number of columns is specified as parameters to the
1195 .Sx \&Bl
1196 macro.
1197 These dictate the width of columns either as
1198 .Sx Scaling Widths
1199 or literal text.
1200 If the initial macro of a
1201 .Fl column
1202 list is not an
1203 .Sx \&It ,
1204 an
1205 .Sx \&It
1206 context spanning each line is implied until an
1207 .Sx \&It
1208 line macro is encountered, at which point list bodies are interpreted as
1209 described in the
1210 .Sx \&It
1211 documentation.
1212 .It Fl dash
1213 A list offset by a dash (hyphen).
1214 The head of list entries must be empty.
1215 List entry bodies are positioned past the dash.
1216 The
1217 .Fl width
1218 argument varies the width of list bodies' left-margins.
1219 .It Fl diag
1220 Like
1221 .Fl inset ,
1222 but with additional formatting to the head.
1223 The
1224 .Fl width
1225 argument varies the width of list bodies' left-margins.
1226 .It Fl enum
1227 An enumerated list offset by the enumeration from 1.
1228 The head of list entries must be empty.
1229 List entry bodies are positioned after the enumeration.
1230 The
1231 .Fl width
1232 argument varies the width of list bodies' left-margins.
1233 .It Fl hang
1234 Like
1235 .Fl tag ,
1236 but instead of list bodies positioned after the head, they trail the
1237 head text.
1238 The
1239 .Fl width
1240 argument varies the width of list bodies' left-margins.
1241 .It Fl hyphen
1242 Synonym for
1243 .Fl dash .
1244 .It Fl inset
1245 List bodies follow the list head.
1246 The
1247 .Fl width
1248 argument is ignored.
1249 .It Fl item
1250 This produces blocks of text.
1251 The head of list entries must be empty.
1252 The
1253 .Fl width
1254 argument is ignored.
1255 .It Fl ohang
1256 List bodies are positioned on the line following the head.
1257 The
1258 .Fl width
1259 argument is ignored.
1260 .It Fl tag
1261 A list offset by list entry heads. List entry bodies are positioned
1262 after the head as specified by the
1263 .Fl width
1264 argument.
1265 .El
1266 .Pp
1267 See also
1268 .Sx \&It .
1269 .Ss \&Bo
1270 Begins a block enclosed by square brackets.
1271 Does not have any head arguments.
1272 .Pp
1273 Examples:
1274 .Bd -literal -offset indent
1275 \&.Bo 1 ,
1276 \&.Dv BUFSIZ \&Bc
1277 .Ed
1278 .Pp
1279 See also
1280 .Sx \&Bq .
1281 .Ss \&Bq
1282 Encloses its arguments in square brackets.
1283 .Pp
1284 Examples:
1285 .D1 \&.Bq 1 , \&Dv BUFSIZ
1286 .Pp
1287 .Em Remarks :
1288 this macro is sometimes abused to emulate optional arguments for
1289 commands; the correct macros to use for this purpose are
1290 .Sx \&Op ,
1291 .Sx \&Oo ,
1292 and
1293 .Sx \&Oc .
1294 .Pp
1295 See also
1296 .Sx \&Bo .
1297 .Ss \&Brc
1298 Closes a
1299 .Sx \&Bro
1300 block. Does not have any tail arguments.
1301 .Ss \&Bro
1302 Begins a block enclosed by curly braces.
1303 Does not have any head arguments.
1304 .Pp
1305 Examples:
1306 .Bd -literal -offset indent
1307 \&.Bro 1 , ... ,
1308 \&.Va n \&Brc
1309 .Ed
1310 .Pp
1311 See also
1312 .Sx \&Brq .
1313 .Ss \&Brq
1314 Encloses its arguments in curly braces.
1315 .Pp
1316 Examples:
1317 .D1 \&.Brq 1 , ... , \&Va n
1318 .Pp
1319 See also
1320 .Sx \&Bro .
1321 .Ss \&Bsx
1322 Format the BSD/OS version provided as an argument, or a default value if
1323 no argument is provided.
1324 .Pp
1325 Examples:
1326 .D1 \&.Bsx 1.0
1327 .D1 \&.Bsx
1328 .Pp
1329 See also
1330 .Sx \&At ,
1331 .Sx \&Bx ,
1332 .Sx \&Dx ,
1333 .Sx \&Fx ,
1334 .Sx \&Nx ,
1335 .Sx \&Ox ,
1336 and
1337 .Sx \&Ux .
1338 .Ss \&Bt
1339 Prints
1340 .Dq is currently in beta test.
1341 .Ss \&Bx
1342 Format the BSD version provided as an argument, or a default value if no
1343 argument is provided.
1344 .Pp
1345 Examples:
1346 .D1 \&.Bx 4.4
1347 .D1 \&.Bx
1348 .Pp
1349 See also
1350 .Sx \&At ,
1351 .Sx \&Bsx ,
1352 .Sx \&Dx ,
1353 .Sx \&Fx ,
1354 .Sx \&Nx ,
1355 .Sx \&Ox ,
1356 and
1357 .Sx \&Ux .
1358 .Ss \&Cd
1359 Configuration declaration.
1360 This denotes strings accepted by
1361 .Xr config 8 .
1362 .Pp
1363 Examples:
1364 .D1 \&.Cd device le0 at scode?
1365 .Pp
1366 .Em Remarks :
1367 this macro is commonly abused by using quoted literals to retain
1368 white-space and align consecutive
1369 .Sx \&Cd
1370 declarations.
1371 This practise is discouraged.
1372 .Ss \&Cm
1373 Command modifiers.
1374 Useful when specifying configuration options or keys.
1375 .Pp
1376 Examples:
1377 .D1 \&.Cm ControlPath
1378 .D1 \&.Cm ControlMaster
1379 .Pp
1380 See also
1381 .Sx \&Fl .
1382 .Ss \&D1
1383 One-line indented display.
1384 This is formatted by the default rules and is useful for simple indented
1385 statements.
1386 It is followed by a newline.
1387 .Pp
1388 Examples:
1389 .D1 \&.D1 \&Fl abcdefgh
1390 .Pp
1391 See also
1392 .Sx \&Bd
1393 and
1394 .Sx \&Dl .
1395 .Ss \&Db
1396 Start a debugging context.
1397 This macro is parsed, but generally ignored.
1398 Its syntax is as follows:
1399 .Pp
1400 .D1 Pf \. Sx \&Db Cm on | off
1401 .Ss \&Dc
1402 Closes a
1403 .Sx \&Do
1404 block. Does not have any tail arguments.
1405 .Ss \&Dd
1406 Document date.
1407 This is the mandatory first macro of any
1408 .Nm
1409 manual.
1410 Its syntax is as follows:
1411 .Pp
1412 .D1 Pf \. Sx \&Dd Cm date
1413 .Pp
1414 The
1415 .Cm date
1416 field may be either
1417 .Ar $\&Mdocdate$ ,
1418 which signifies the current manual revision date dictated by
1419 .Xr cvs 1 ,
1420 or instead a valid canonical date as specified by
1421 .Sx Dates .
1422 If a date does not conform, the current date is used instead.
1423 .Pp
1424 Examples:
1425 .D1 \&.Dd $\&Mdocdate$
1426 .D1 \&.Dd $\&Mdocdate: July 21 2007$
1427 .D1 \&.Dd July 21, 2007
1428 .Pp
1429 See also
1430 .Sx \&Dt
1431 and
1432 .Sx \&Os .
1433 .Ss \&Dl
1434 One-line intended display.
1435 This is formatted as literal text and is useful for commands and
1436 invocations.
1437 It is followed by a newline.
1438 .Pp
1439 Examples:
1440 .D1 \&.Dl % mandoc mdoc.7 | less
1441 .Pp
1442 See also
1443 .Sx \&Bd
1444 and
1445 .Sx \&D1 .
1446 .Ss \&Do
1447 Begins a block enclosed by double quotes. Does not have any head
1448 arguments.
1449 .Pp
1450 Examples:
1451 .D1 \&.D1 \&Do April is the cruellest month \&Dc \e(em T.S. Eliot
1452 .Pp
1453 See also
1454 .Sx \&Dq .
1455 .Ss \&Dq
1456 Encloses its arguments in double quotes.
1457 .Pp
1458 Examples:
1459 .Bd -literal -offset indent -compact
1460 \&.Dq April is the cruellest month
1461 \e(em T.S. Eliot
1462 .Ed
1463 .Pp
1464 See also
1465 .Sx \&Do .
1466 .Ss \&Dt
1467 Document title.
1468 This is the mandatory second macro of any
1469 .Nm
1470 file.
1471 Its syntax is as follows:
1472 .Bd -ragged -offset indent
1473 .Pf \. Sx \&Dt
1474 .Oo
1475 .Cm title
1476 .Oo
1477 .Cm section
1478 .Op Cm volume | arch
1479 .Oc
1480 .Oc
1481 .Ed
1482 .Pp
1483 Its arguments are as follows:
1484 .Bl -tag -width Ds -offset Ds
1485 .It Cm title
1486 The document's title (name), defaulting to
1487 .Qq UNKNOWN
1488 if unspecified.
1489 It should be capitalised.
1490 .It Cm section
1491 The manual section.
1492 This may be one of
1493 .Ar 1
1494 .Pq utilities ,
1495 .Ar 2
1496 .Pq system calls ,
1497 .Ar 3
1498 .Pq libraries ,
1499 .Ar 3p
1500 .Pq Perl libraries ,
1501 .Ar 4
1502 .Pq devices ,
1503 .Ar 5
1504 .Pq file formats ,
1505 .Ar 6
1506 .Pq games ,
1507 .Ar 7
1508 .Pq miscellaneous ,
1509 .Ar 8
1510 .Pq system utilities ,
1511 .Ar 9
1512 .Pq kernel functions ,
1513 .Ar X11
1514 .Pq X Window System ,
1515 .Ar X11R6
1516 .Pq X Window System ,
1517 .Ar unass
1518 .Pq unassociated ,
1519 .Ar local
1520 .Pq local system ,
1521 .Ar draft
1522 .Pq draft manual ,
1523 or
1524 .Ar paper
1525 .Pq paper .
1526 It should correspond to the manual's filename suffix and defaults to
1527 .Qq 1
1528 if unspecified.
1529 .It Cm volume
1530 This overrides the volume inferred from
1531 .Ar section .
1532 This field is optional, and if specified, must be one of
1533 .Ar USD
1534 .Pq users' supplementary documents ,
1535 .Ar PS1
1536 .Pq programmers' supplementary documents ,
1537 .Ar AMD
1538 .Pq administrators' supplementary documents ,
1539 .Ar SMM
1540 .Pq system managers' manuals ,
1541 .Ar URM
1542 .Pq users' reference manuals ,
1543 .Ar PRM
1544 .Pq programmers' reference manuals ,
1545 .Ar KM
1546 .Pq kernel manuals ,
1547 .Ar IND
1548 .Pq master index ,
1549 .Ar MMI
1550 .Pq master index ,
1551 .Ar LOCAL
1552 .Pq local manuals ,
1553 .Ar LOC
1554 .Pq local manuals ,
1555 or
1556 .Ar CON
1557 .Pq contributed manuals .
1558 .It Cm arch
1559 This specifies a specific relevant architecture.
1560 If
1561 .Cm volume
1562 is not provided, it may be used in its place, else it may be used
1563 subsequent that.
1564 It, too, is optional.
1565 It must be one of
1566 .Ar alpha ,
1567 .Ar amd64 ,
1568 .Ar amiga ,
1569 .Ar arc ,
1570 .Ar arm ,
1571 .Ar armish ,
1572 .Ar aviion ,
1573 .Ar hp300 ,
1574 .Ar hppa ,
1575 .Ar hppa64 ,
1576 .Ar i386 ,
1577 .Ar landisk ,
1578 .Ar loongson ,
1579 .Ar luna88k ,
1580 .Ar mac68k ,
1581 .Ar macppc ,
1582 .Ar mvme68k ,
1583 .Ar mvme88k ,
1584 .Ar mvmeppc ,
1585 .Ar pmax ,
1586 .Ar sgi ,
1587 .Ar socppc ,
1588 .Ar sparc ,
1589 .Ar sparc64 ,
1590 .Ar sun3 ,
1591 .Ar vax ,
1592 or
1593 .Ar zaurus .
1594 .El
1595 .Pp
1596 Examples:
1597 .D1 \&.Dt FOO 1
1598 .D1 \&.Dt FOO 4 KM
1599 .D1 \&.Dt FOO 9 i386
1600 .Pp
1601 See also
1602 .Sx \&Dd
1603 and
1604 .Sx \&Os .
1605 .Ss \&Dv
1606 Defined variables such as preprocessor constants.
1607 .Pp
1608 Examples:
1609 .D1 \&.Dv BUFSIZ
1610 .D1 \&.Dv STDOUT_FILENO
1611 .Pp
1612 See also
1613 .Sx \&Er .
1614 .Ss \&Dx
1615 Format the DragonFly BSD version provided as an argument, or a default
1616 value if no argument is provided.
1617 .Pp
1618 Examples:
1619 .D1 \&.Dx 2.4.1
1620 .D1 \&.Dx
1621 .Pp
1622 See also
1623 .Sx \&At ,
1624 .Sx \&Bsx ,
1625 .Sx \&Bx ,
1626 .Sx \&Fx ,
1627 .Sx \&Nx ,
1628 .Sx \&Ox ,
1629 and
1630 .Sx \&Ux .
1631 .Ss \&Ec
1632 .Ss \&Ed
1633 .Ss \&Ef
1634 .Ss \&Ek
1635 Ends a keep context started by
1636 .Sx \&Bk .
1637 .Ss \&El
1638 Ends a list context started by
1639 .Sx \&Bl .
1640 .Pp
1641 See also
1642 .Sx \&Bl
1643 and
1644 .Sx \&It .
1645 .Ss \&Em
1646 Denotes text that should be emphasised.
1647 Note that this is a presentation term and should not be used for
1648 stylistically decorating technical terms.
1649 .Pp
1650 Examples:
1651 .D1 \&.Em Warnings!
1652 .D1 \&.Em Remarks :
1653 .Ss \&En
1654 .Ss \&Eo
1655 .Ss \&Er
1656 Display error constants.
1657 .Pp
1658 Examples:
1659 .D1 \&.Er EPERM
1660 .D1 \&.Er ENOENT
1661 .Pp
1662 See also
1663 .Sx \&Dv .
1664 .Ss \&Es
1665 .Ss \&Ev
1666 Environmental variables such as those specified in
1667 .Xr environ 7 .
1668 .Pp
1669 Examples:
1670 .D1 \&.Ev DISPLAY
1671 .D1 \&.Ev PATH
1672 .Ss \&Ex
1673 Inserts text regarding a utility's exit values.
1674 This macro must have first the
1675 .Fl std
1676 argument specified, then an optional
1677 .Ar utility .
1678 If
1679 .Ar utility
1680 is not provided, the document's name as stipulated in
1681 .Sx \&Nm
1682 is provided.
1683 .Ss \&Fa
1684 Function argument.
1685 Its syntax is as follows:
1686 .Bd -ragged -offset indent
1687 .Pf \. Sx \&Fa
1688 .Op Cm argtype
1689 .Cm argname
1690 .Ed
1691 .Pp
1692 This may be invoked for names with or without the corresponding type.
1693 It is also used to specify the field name of a structure.
1694 Most often, the
1695 .Sx \&Fa
1696 macro is used in the
1697 .Em SYNOPSIS
1698 within
1699 .Sx \&Fo
1700 section when documenting multi-line function prototypes.
1701 If invoked with multiple arguments, the arguments are separated by a
1702 comma.
1703 Furthermore, if the following macro is another
1704 .Sx \&Fa ,
1705 the last argument will also have a trailing comma.
1706 .Pp
1707 Examples:
1708 .D1 \&.Fa \(dqconst char *p\(dq
1709 .D1 \&.Fa \(dqint a\(dq \(dqint b\(dq \(dqint c\(dq
1710 .D1 \&.Fa foo
1711 .Pp
1712 See also
1713 .Sx \&Fo .
1714 .Ss \&Fc
1715 .Ss \&Fd
1716 Historically used to document include files.
1717 This usage has been deprecated in favour of
1718 .Sx \&In .
1719 Do not use this macro.
1720 .Pp
1721 See also
1722 .Sx MANUAL STRUCTURE
1723 and
1724 .Sx \&In .
1725 .Ss \&Fl
1726 Command-line flag.
1727 Used when listing arguments to command-line utilities.
1728 Prints a fixed-width hyphen
1729 .Sq \-
1730 directly followed by each argument.
1731 If no arguments are provided, a hyphen is printed followed by a space.
1732 If the argument is a macro, a hyphen is prefixed to the subsequent macro
1733 output.
1734 .Pp
1735 Examples:
1736 .D1 \&.Fl a b c
1737 .D1 \&.Fl \&Pf a b
1738 .D1 \&.Fl
1739 .D1 \&.Op \&Fl o \&Ns \&Ar file
1740 .Pp
1741 See also
1742 .Sx \&Cm .
1743 .Ss \&Fn
1744 A function name.
1745 Its syntax is as follows:
1746 .Bd -ragged -offset indent
1747 .Pf \. Ns Sx \&Fn
1748 .Op Cm functype
1749 .Cm funcname
1750 .Op Oo Cm argtype Oc Cm argname
1751 .Ed
1752 .Pp
1753 Function arguments are surrounded in parenthesis and
1754 are delimited by commas.
1755 If no arguments are specified, blank parenthesis are output.
1756 .Pp
1757 Examples:
1758 .D1 \&.Fn "int funcname" "int arg0" "int arg1"
1759 .D1 \&.Fn funcname "int arg0"
1760 .D1 \&.Fn funcname arg0
1761 .Bd -literal -offset indent -compact
1762 \&.Ft functype
1763 \&.Fn funcname
1764 .Ed
1765 .Pp
1766 See also
1767 .Sx MANUAL STRUCTURE
1768 and
1769 .Sx \&Ft .
1770 .Ss \&Fo
1771 Begin a function block.
1772 This is a multi-line version of
1773 .Sx \&Fn .
1774 Its syntax is as follows:
1775 .Pp
1776 .D1 Pf \. Sx \&Fo Cm funcname
1777 .Pp
1778 Invocations usually occur in the following context:
1779 .Bd -ragged -offset indent
1780 .Pf \. Sx \&Ft Cm functype
1781 .br
1782 .Pf \. Sx \&Fo Cm funcname
1783 .br
1784 .Pf \. Sx \&Fa Oo Cm argtype Oc Cm argname
1785 .br
1786 \.\.\.
1787 .br
1788 .Pf \. Sx \&Fc
1789 .Ed
1790 .Pp
1791 A
1792 .Sx \&Fo
1793 scope is closed by
1794 .Pp
1795 See also
1796 .Sx MANUAL STRUCTURE ,
1797 .Sx \&Fa ,
1798 .Sx \&Fc ,
1799 and
1800 .Ss \&Ft
1801 A function type.
1802 Its syntax is as follows:
1803 .Pp
1804 .D1 Pf \. Sx \&Ft Cm functype
1805 .Pp
1806 Examples:
1807 .D1 \&.Ft int
1808 .Bd -literal -offset indent -compact
1809 \&.Ft functype
1810 \&.Fn funcname
1811 .Ed
1812 .Pp
1813 See also
1814 .Sx MANUAL STRUCTURE ,
1815 .Sx \&Fn ,
1816 and
1817 .Sx \&Fo .
1818 .Ss \&Fx
1819 Format the FreeBSD version provided as an argument, or a default value
1820 if no argument is provided.
1821 .Pp
1822 Examples:
1823 .D1 \&.Fx 7.1
1824 .D1 \&.Fx
1825 .Pp
1826 See also
1827 .Sx \&At ,
1828 .Sx \&Bsx ,
1829 .Sx \&Bx ,
1830 .Sx \&Dx ,
1831 .Sx \&Nx ,
1832 .Sx \&Ox ,
1833 and
1834 .Sx \&Ux .
1835 .Ss \&Hf
1836 .Ss \&Ic
1837 .Ss \&In
1838 An
1839 .Qq include
1840 file.
1841 In the
1842 .Em SYNOPSIS
1843 section (only if invoked as the line macro), the first argument is
1844 preceded by
1845 .Qq #include ,
1846 the arguments is enclosed in angled braces.
1847 .Pp
1848 Examples:
1849 .D1 \&.In sys/types
1850 .Pp
1851 See also
1852 .Sx MANUAL STRUCTURE .
1853 .Ss \&It
1854 A list item.
1855 The syntax of this macro depends on the list type.
1856 .Pp
1857 Lists
1858 of type
1859 .Fl hang ,
1860 .Fl ohang ,
1861 .Fl inset ,
1862 and
1863 .Fl diag
1864 have the following syntax:
1865 .Pp
1866 .D1 Pf \. Sx \&It Cm args
1867 .Pp
1868 Lists of type
1869 .Fl bullet ,
1870 .Fl dash ,
1871 .Fl enum ,
1872 .Fl hyphen
1873 and
1874 .Fl item
1875 have the following syntax:
1876 .Pp
1877 .D1 Pf \. Sx \&It
1878 .Pp
1879 with subsequent lines interpreted within the scope of the
1880 .Sx \&It
1881 until either a closing
1882 .Sx \&El
1883 or another
1884 .Sx \&It .
1885 .Pp
1886 The
1887 .Fl tag
1888 list has the following syntax:
1889 .Pp
1890 .D1 Pf \. Sx \&It Op Cm args
1891 .Pp
1892 Subsequent lines are interpreted as with
1893 .Fl bullet
1894 and family.
1895 The line arguments correspond to the list's left-hand side; body
1896 arguments correspond to the list's contents.
1897 .Pp
1898 The
1899 .Fl column
1900 list is the most complicated.
1901 Its syntax is as follows:
1902 .Pp
1903 .D1 Pf \. Sx \&It Op Cm args
1904 .Pp
1905 The
1906 .Cm args
1907 are phrases, a mix of macros and text corresponding to a line column,
1908 delimited by tabs or the special
1909 .Sq \&Ta
1910 pseudo-macro.
1911 Lines subsequent the
1912 .Sx \&It
1913 are interpreted within the scope of the last phrase.
1914 Calling the pseudo-macro
1915 .Sq \&Ta
1916 will open a new phrase scope (this must occur on a macro line to be
1917 interpreted as a macro). Note that the tab phrase delimiter may only be
1918 used within the
1919 .Sx \&It
1920 line itself.
1921 Subsequent this, only the
1922 .Sq \&Ta
1923 pseudo-macro may be used to delimit phrases.
1924 Furthermore, note that quoted sections propagate over tab-delimited
1925 phrases on an
1926 .Sx \&It ,
1927 for example,
1928 .Pp
1929 .D1 .It \(dqcol1 ; <TAB> col2 ;\(dq \&;
1930 .Pp
1931 will preserve the semicolon whitespace except for the last.
1932 .Pp
1933 See also
1934 .Sx \&Bl .
1935 .Ss \&Lb
1936 Specify a library.
1937 The syntax is as follows:
1938 .Pp
1939 .D1 Pf \. Sx \&Lb Cm library
1940 .Pp
1941 The
1942 .Cm library
1943 parameter may be a system library, such as
1944 .Cm libz
1945 or
1946 .Cm libpam ,
1947 in which case a small library description is printed next to the linker
1948 invocation; or a custom library, in which case the library name is
1949 printed in quotes.
1950 This is most commonly used in the
1951 .Em SYNOPSIS
1952 section as described in
1953 .Sx MANUAL STRUCTURE .
1954 .Pp
1955 Examples:
1956 .D1 \&.Lb libz
1957 .D1 \&.Lb mdoc
1958 .Ss \&Li
1959 .Ss \&Lk
1960 Format a hyperlink.
1961 Its syntax is as follows:
1962 .Pp
1963 .D1 Pf \. Sx \&Lk Cm uri Op Cm name
1964 .Pp
1965 Examples:
1966 .D1 \&.Lk http://bsd.lv "The BSD.lv Project"
1967 .D1 \&.Lk http://bsd.lv
1968 .Pp
1969 See also
1970 .Sx \&Mt .
1971 .Ss \&Lp
1972 .Ss \&Ms
1973 .Ss \&Mt
1974 Format a
1975 .Qq mailto:
1976 hyperlink.
1977 Its syntax is as follows:
1978 .Pp
1979 .D1 Pf \. Sx \&Mt Cm address
1980 .Pp
1981 Examples:
1982 .D1 \&.Mt discuss@manpages.bsd.lv
1983 .Ss \&Nd
1984 .Ss \&Nm
1985 The name of the manual page, or \(em in particular in section 1, 6,
1986 and 8 pages \(em of an additional command or feature documented in
1987 the manual page.
1988 When first invoked, the
1989 .Sx \&Nm
1990 macro expects a single argument, the name of the manual page.
1991 Usually, the first invocation happens in the
1992 .Em NAME
1993 section of the page.
1994 The specified name will be remembered and used whenever the macro is
1995 called again without arguments later in the page.
1996 The
1997 .Sx \&Nm
1998 macro uses
1999 .Sx Block full-implicit
2000 semantics when invoked as the first macro on an input line in the
2001 .Em SYNOPSIS
2002 section; otherwise, it uses ordinary
2003 .Sx In-line
2004 semantics.
2005 .Pp
2006 Examples:
2007 .Bd -literal -offset indent
2008 \&.Sh SYNOPSIS
2009 \&.Nm cat
2010 \&.Op Fl benstuv
2011 \&.Op Ar
2012 .Ed
2013 .Pp
2014 In the
2015 .Em SYNOPSIS
2016 of section 2, 3 and 9 manual pages, use the
2017 .Sx \&Fn
2018 macro rather than
2019 .Sx \&Nm
2020 to mark up the name of the manual page.
2021 .Ss \&No
2022 .Ss \&Ns
2023 .Ss \&Nx
2024 Format the NetBSD version provided as an argument, or a default value if
2025 no argument is provided.
2026 .Pp
2027 Examples:
2028 .D1 \&.Nx 5.01
2029 .D1 \&.Nx
2030 .Pp
2031 See also
2032 .Sx \&At ,
2033 .Sx \&Bsx ,
2034 .Sx \&Bx ,
2035 .Sx \&Dx ,
2036 .Sx \&Fx ,
2037 .Sx \&Ox ,
2038 and
2039 .Sx \&Ux .
2040 .Ss \&Oc
2041 .Ss \&Oo
2042 .Ss \&Op
2043 .Ss \&Os
2044 Document operating system version.
2045 This is the mandatory third macro of
2046 any
2047 .Nm
2048 file.
2049 Its syntax is as follows:
2050 .Pp
2051 .D1 Pf \. Sx \&Os Op Cm system
2052 .Pp
2053 The optional
2054 .Cm system
2055 parameter specifies the relevant operating system or environment.
2056 Left unspecified, it defaults to the local operating system version.
2057 This is the suggested form.
2058 .Pp
2059 Examples:
2060 .D1 \&.Os
2061 .D1 \&.Os KTH/CSC/TCS
2062 .D1 \&.Os BSD 4.3
2063 .Pp
2064 See also
2065 .Sx \&Dd
2066 and
2067 .Sx \&Dt .
2068 .Ss \&Ot
2069 Unknown usage.
2070 .Pp
2071 .Em Remarks :
2072 this macro has been deprecated.
2073 .Ss \&Ox
2074 Format the OpenBSD version provided as an argument, or a default value
2075 if no argument is provided.
2076 .Pp
2077 Examples:
2078 .D1 \&.Ox 4.5
2079 .D1 \&.Ox
2080 .Pp
2081 See also
2082 .Sx \&At ,
2083 .Sx \&Bsx ,
2084 .Sx \&Bx ,
2085 .Sx \&Dx ,
2086 .Sx \&Fx ,
2087 .Sx \&Nx ,
2088 and
2089 .Sx \&Ux .
2090 .Ss \&Pa
2091 .Ss \&Pc
2092 .Ss \&Pf
2093 .Ss \&Po
2094 .Ss \&Pp
2095 .Ss \&Pq
2096 .Ss \&Qc
2097 .Ss \&Ql
2098 .Ss \&Qo
2099 .Ss \&Qq
2100 .Ss \&Re
2101 Closes a
2102 .Sx \&Rs
2103 block.
2104 Does not have any tail arguments.
2105 .Ss \&Rs
2106 Begins a bibliographic
2107 .Pq Dq reference
2108 block.
2109 Does not have any head arguments.
2110 The block macro may only contain
2111 .Sx \&%A ,
2112 .Sx \&%B ,
2113 .Sx \&%C ,
2114 .Sx \&%D ,
2115 .Sx \&%I ,
2116 .Sx \&%J ,
2117 .Sx \&%N ,
2118 .Sx \&%O ,
2119 .Sx \&%P ,
2120 .Sx \&%Q ,
2121 .Sx \&%R ,
2122 .Sx \&%T ,
2123 .Sx \&%U ,
2124 and
2125 .Sx \&%V
2126 child macros (at least one must be specified).
2127 .Pp
2128 Examples:
2129 .Bd -literal -offset indent -compact
2130 \&.Rs
2131 \&.%A J. E. Hopcroft
2132 \&.%A J. D. Ullman
2133 \&.%B Introduction to Automata Theory, Languages, and Computation
2134 \&.%I Addison-Wesley
2135 \&.%C Reading, Massachusettes
2136 \&.%D 1979
2137 \&.Re
2138 .Ed
2139 .Pp
2140 If an
2141 .Sx \&Rs
2142 block is used within a SEE ALSO section, a vertical space is asserted
2143 before the rendered output, else the block continues on the current
2144 line.
2145 .Ss \&Rv
2146 .Ss \&Sc
2147 .Ss \&Sh
2148 .Ss \&Sm
2149 .Ss \&So
2150 .Ss \&Sq
2151 .Ss \&Ss
2152 .Ss \&St
2153 .Ss \&Sx
2154 .Ss \&Sy
2155 .Ss \&Tn
2156 .Ss \&Ud
2157 Prints out
2158 .Dq currently under development.
2159 .Ss \&Ux
2160 Format the UNIX name.
2161 Accepts no argument.
2162 .Pp
2163 Examples:
2164 .D1 \&.Ux
2165 .Pp
2166 See also
2167 .Sx \&At ,
2168 .Sx \&Bsx ,
2169 .Sx \&Bx ,
2170 .Sx \&Dx ,
2171 .Sx \&Fx ,
2172 .Sx \&Nx ,
2173 and
2174 .Sx \&Ox .
2175 .Ss \&Va
2176 .Ss \&Vt
2177 A variable type.
2178 This is also used for indicating global variables in the
2179 .Em SYNOPSIS
2180 section, in which case a variable name is also specified.
2181 Note that it accepts
2182 .Sx Block partial-implicit
2183 syntax when invoked as the first macro in the
2184 .Em SYNOPSIS
2185 section, else it accepts ordinary
2186 .Sx In-line
2187 syntax.
2188 .Pp
2189 Note that this should not be confused with
2190 .Sx \&Ft ,
2191 which is used for function return types.
2192 .Pp
2193 Examples:
2194 .D1 \&.Vt unsigned char
2195 .D1 \&.Vt extern const char * const sys_signame[] \&;
2196 .Pp
2197 See also
2198 .Sx MANUAL STRUCTURE
2199 and
2200 .Sx \&Va .
2201 .Ss \&Xc
2202 Close a scope opened by
2203 .Sx \&Xo .
2204 .Ss \&Xo
2205 Open an extension scope.
2206 This macro originally existed to extend the 9-argument limit of troff;
2207 since this limit has been lifted, the macro has been deprecated.
2208 .Ss \&Xr
2209 Link to another manual
2210 .Pq Qq cross-reference .
2211 Its syntax is as follows:
2212 .Pp
2213 .D1 Pf \. Sx \&Xr Cm name section
2214 .Pp
2215 The
2216 .Cm name
2217 and
2218 .Cm section
2219 are the name and section of the linked manual.
2220 If
2221 .Cm section
2222 is followed by non-punctuation, an
2223 .Sx \&Ns
2224 is inserted into the token stream.
2225 This behaviour is for compatibility with
2226 .Xr groff 1 .
2227 .Pp
2228 Examples:
2229 .D1 \&.Xr mandoc 1
2230 .D1 \&.Xr mandoc 1 \&;
2231 .D1 \&.Xr mandoc 1 \&Ns s behaviour
2232 .Ss \&br
2233 .Ss \&sp
2234 .Sh COMPATIBILITY
2235 This section documents compatibility between mandoc and other other
2236 troff implementations, at this time limited to GNU troff
2237 .Pq Qq groff .
2238 The term
2239 .Qq historic groff
2240 refers to groff versions before the
2241 .Pa doc.tmac
2242 file re-write
2243 .Pq somewhere between 1.15 and 1.19 .
2244 .Pp
2245 Heirloom troff, the other significant troff implementation accepting
2246 \-mdoc, is similar to historic groff.
2247 .Pp
2248 .Bl -dash -compact
2249 .It
2250 Old groff fails to assert a newline before
2251 .Sx \&Bd Fl ragged compact .
2252 .It
2253 groff behaves inconsistently when encountering
2254 .Pf non- Sx \&Fa
2255 children of
2256 .Sx \&Fo
2257 regarding spacing between arguments.
2258 In mandoc, this is not the case: each argument is consistently followed
2259 by a single space and the trailing
2260 .Sq \&)
2261 suppresses prior spacing.
2262 .It
2263 groff behaves inconsistently when encountering
2264 .Sx \&Ft
2265 and
2266 .Sx \&Fn
2267 in the
2268 .Em SYNOPSIS :
2269 at times newline(s) are suppressed depending on whether a prior
2270 .Sx \&Fn
2271 has been invoked.
2272 In mandoc, this is not the case.
2273 See
2274 .Sx \&Ft
2275 and
2276 .Sx \&Fn
2277 for the normalised behaviour.
2278 .It
2279 Historic groff does not break before an
2280 .Sx \&Fn
2281 when not invoked as the line macro in the
2282 .Em SYNOPSIS
2283 section.
2284 .It
2285 Historic groff formats the
2286 .Sx \&In
2287 badly: trailing arguments are trashed and
2288 .Em SYNOPSIS
2289 is not specially treated.
2290 .It
2291 groff does not accept the
2292 .Sq \&Ta
2293 pseudo-macro as a line macro.
2294 mandoc does.
2295 .It
2296 The comment syntax
2297 .Sq \e."
2298 is no longer accepted.
2299 .It
2300 In groff, the
2301 .Sx \&Pa
2302 macro does not format its arguments when used in the FILES section under
2303 certain list types.
2304 mandoc does.
2305 .It
2306 Historic groff does not print a dash for empty
2307 .Sx \&Fl
2308 arguments.
2309 mandoc and newer groff implementations do.
2310 .It
2311 groff behaves irregularly when specifying
2312 .Sq \ef
2313 .Sx Text Decoration
2314 within line-macro scopes.
2315 mandoc follows a consistent system.
2316 .It
2317 In mandoc, negative scaling units are truncated to zero; groff would
2318 move to prior lines.
2319 Furthermore, the
2320 .Sq f
2321 scaling unit, while accepted, is rendered as the default unit.
2322 .It
2323 In quoted literals, groff allowed pair-wise double-quotes to produce a
2324 standalone double-quote in formatted output.
2325 This idiosyncratic behaviour is not applicable in mandoc.
2326 .It
2327 Display offsets
2328 .Sx \&Bd
2329 .Fl offset Ar center
2330 and
2331 .Fl offset Ar right
2332 are disregarded in mandoc.
2333 Furthermore, the
2334 .Fl file Ar file
2335 argument is not supported in mandoc.
2336 Lastly, since text is not right-justified in mandoc (or even groff),
2337 .Fl ragged
2338 and
2339 .Fl filled
2340 are aliases, as are
2341 .Fl literal
2342 and
2343 .Fl unfilled .
2344 .It
2345 Historic groff has many un-callable macros.
2346 Most of these (excluding some block-level macros) are now callable.
2347 .It
2348 The vertical bar
2349 .Sq \(ba
2350 made historic groff
2351 .Qq go orbital
2352 but has been a proper delimiter since then.
2353 .It
2354 .Sx \&It Fl nested
2355 is assumed for all lists (it wasn't in historic groff): any list may be
2356 nested and
2357 .Fl enum
2358 lists will restart the sequence only for the sub-list.
2359 .It
2360 Some manuals use
2361 .Sx \&Li
2362 incorrectly by following it with a reserved character and expecting the
2363 delimiter to render.
2364 This is not supported in mandoc.
2365 .It
2366 In groff, the
2367 .Sx \&Cd ,
2368 .Sx \&Er ,
2369 .Sx \&Ex ,
2370 and
2371 .Sx \&Rv
2372 macros were stipulated only to occur in certain manual sections.
2373 mandoc does not have these restrictions.
2374 .It
2375 Newer groff and mandoc print
2376 .Qq AT&T UNIX
2377 prior to unknown arguments of
2378 .Sx \&At ;
2379 older groff did nothing.
2380 .El
2381 .Sh SEE ALSO
2382 .Xr mandoc 1 ,
2383 .Xr mandoc_char 7
2384 .Sh AUTHORS
2385 The
2386 .Nm
2387 reference was written by
2388 .An Kristaps Dzonsons Aq kristaps@bsd.lv .
2389 .\"
2390 .\" XXX: this really isn't the place for these caveats.
2391 .\" .
2392 .\" .
2393 .\" .Sh CAVEATS
2394 .\" There are many ambiguous parts of mdoc.
2395 .\" .
2396 .\" .Pp
2397 .\" .Bl -dash -compact
2398 .\" .It
2399 .\" .Sq \&Fa
2400 .\" should be
2401 .\" .Sq \&Va
2402 .\" as function arguments are variables.
2403 .\" .It
2404 .\" .Sq \&Ft
2405 .\" should be
2406 .\" .Sq \&Vt
2407 .\" as function return types are still types. Furthermore, the
2408 .\" .Sq \&Ft
2409 .\" should be removed and
2410 .\" .Sq \&Fo ,
2411 .\" which ostensibly follows it, should follow the same convention as
2412 .\" .Sq \&Va .
2413 .\" .It
2414 .\" .Sq \&Va
2415 .\" should formalise that only one or two arguments are acceptable: a
2416 .\" variable name and optional, preceding type.
2417 .\" .It
2418 .\" .Sq \&Fd
2419 .\" is ambiguous. It's commonly used to indicate an include file in the
2420 .\" synopsis section.
2421 .\" .Sq \&In
2422 .\" should be used, instead.
2423 .\" .It
2424 .\" Only the
2425 .\" .Sq \-literal
2426 .\" argument to
2427 .\" .Sq \&Bd
2428 .\" makes sense. The remaining ones should be removed.
2429 .\" .It
2430 .\" The
2431 .\" .Sq \&Xo
2432 .\" and
2433 .\" .Sq \&Xc
2434 .\" macros should be deprecated.
2435 .\" .It
2436 .\" The
2437 .\" .Sq \&Dt
2438 .\" macro lacks clarity. It should be absolutely clear which title will
2439 .\" render when formatting the manual page.
2440 .\" .It
2441 .\" A
2442 .\" .Sq \&Lx
2443 .\" should be provided for Linux (\(`a la
2444 .\" .Sq \&Ox ,
2445 .\" .Sq \&Nx
2446 .\" etc.).
2447 .\" .It
2448 .\" There's no way to refer to references in
2449 .\" .Sq \&Rs/Re
2450 .\" blocks.
2451 .\" .It
2452 .\" The \-split and \-nosplit dictates via
2453 .\" .Sq \&An
2454 .\" are re-set when entering and leaving the AUTHORS section.
2455 .\" .El
2456 .\" .