Annotation of src/usr.bin/mandoc/mdoc.7, Revision 1.31
1.31 ! schwarze 1: .\" $Id: mdoc.7,v 1.30 2010/05/15 16:48:12 schwarze Exp $
1.1 kristaps 2: .\"
1.26 schwarze 3: .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
1.1 kristaps 4: .\"
5: .\" Permission to use, copy, modify, and distribute this software for any
1.2 schwarze 6: .\" purpose with or without fee is hereby granted, provided that the above
7: .\" copyright notice and this permission notice appear in all copies.
1.1 kristaps 8: .\"
1.2 schwarze 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.
1.9 schwarze 16: .\"
1.30 schwarze 17: .Dd $Mdocdate: May 15 2010 $
1.2 schwarze 18: .Dt MDOC 7
1.1 kristaps 19: .Os
20: .Sh NAME
1.15 schwarze 21: .Nm mdoc
22: .Nd mdoc language reference
1.1 kristaps 23: .Sh DESCRIPTION
24: The
1.15 schwarze 25: .Nm mdoc
1.9 schwarze 26: language is used to format
1.15 schwarze 27: .Bx
28: .Ux
1.8 schwarze 29: manuals. In this reference document, we describe its syntax, structure,
1.26 schwarze 30: and usage. Our reference implementation is mandoc; the
1.15 schwarze 31: .Sx COMPATIBILITY
1.26 schwarze 32: section describes compatibility with other troff \-mdoc implementations.
1.15 schwarze 33: .Pp
1.1 kristaps 34: An
1.15 schwarze 35: .Nm
1.1 kristaps 36: document follows simple rules: lines beginning with the control
1.9 schwarze 37: character
1.15 schwarze 38: .Sq \.
1.1 kristaps 39: are parsed for macros. Other lines are interpreted within the scope of
40: prior macros:
1.15 schwarze 41: .Bd -literal -offset indent
1.1 kristaps 42: \&.Sh Macro lines change control state.
43: Other lines are interpreted within the current state.
1.15 schwarze 44: .Ed
1.9 schwarze 45: .Sh LANGUAGE SYNTAX
1.15 schwarze 46: .Nm
1.1 kristaps 47: documents may contain only graphable 7-bit ASCII characters, the space
1.8 schwarze 48: character, and, in certain circumstances, the tab character. All
49: manuals must have
1.15 schwarze 50: .Ux
1.9 schwarze 51: line terminators.
1.15 schwarze 52: .Ss Comments
1.8 schwarze 53: Text following a
1.15 schwarze 54: .Sq \e" ,
1.8 schwarze 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,
1.15 schwarze 57: .Sq \&.\e" ,
58: is also ignored. Macro lines with only a control charater and optionally
59: whitespace are stripped from input.
60: .Ss Reserved Characters
1.1 kristaps 61: Within a macro line, the following characters are reserved:
1.17 schwarze 62: .Pp
1.15 schwarze 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
1.1 kristaps 88: Use of reserved characters is described in
1.15 schwarze 89: .Sx MACRO SYNTAX .
1.8 schwarze 90: For general use in macro lines, these characters must either be escaped
91: with a non-breaking space
1.15 schwarze 92: .Pq Sq \e&
1.9 schwarze 93: or, if applicable, an appropriate escape sequence used.
1.15 schwarze 94: .Ss Special Characters
1.8 schwarze 95: Special characters may occur in both macro and free-form lines.
96: Sequences begin with the escape character
1.15 schwarze 97: .Sq \e
1.9 schwarze 98: followed by either an open-parenthesis
1.15 schwarze 99: .Sq \&(
1.1 kristaps 100: for two-character sequences; an open-bracket
1.15 schwarze 101: .Sq \&[
1.1 kristaps 102: for n-character sequences (terminated at a close-bracket
1.15 schwarze 103: .Sq \&] ) ;
1.27 schwarze 104: or a single one-character sequence.
105: See
1.15 schwarze 106: .Xr mandoc_char 7
1.27 schwarze 107: for a complete list.
108: Examples include
1.15 schwarze 109: .Sq \e(em
110: .Pq em-dash
1.9 schwarze 111: and
1.15 schwarze 112: .Sq \ee
113: .Pq back-slash .
114: .Ss Text Decoration
1.13 schwarze 115: Terms may be text-decorated using the
1.15 schwarze 116: .Sq \ef
1.20 schwarze 117: escape followed by an indicator: B (bold), I, (italic), R (Roman), or P
1.22 schwarze 118: (revert to previous mode):
1.20 schwarze 119: .Pp
120: .D1 \efBbold\efR \efIitalic\efP
121: .Pp
122: A numerical representation 3, 2, or 1 (bold, italic, and Roman,
1.27 schwarze 123: respectively) may be used instead.
124: A text decoration is valid within
1.20 schwarze 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
1.27 schwarze 131: are only valid within the font scope of the macro.
132: If
1.20 schwarze 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
1.22 schwarze 158: Note these forms are
1.20 schwarze 159: .Em not
1.22 schwarze 160: recommended for
1.15 schwarze 161: .Nm ,
1.20 schwarze 162: which encourages semantic annotation.
1.15 schwarze 163: .Ss Predefined Strings
1.22 schwarze 164: Historically,
1.15 schwarze 165: .Xr groff 1
1.22 schwarze 166: also defined a set of package-specific
1.15 schwarze 167: .Dq predefined strings ,
1.22 schwarze 168: which, like
1.15 schwarze 169: .Sx Special Characters ,
1.13 schwarze 170: demark special output characters and strings by way of input codes.
171: Predefined strings are escaped with the slash-asterisk,
1.15 schwarze 172: .Sq \e* :
1.13 schwarze 173: single-character
1.15 schwarze 174: .Sq \e*X ,
1.13 schwarze 175: two-character
1.15 schwarze 176: .Sq \e*(XX ,
1.13 schwarze 177: and N-character
1.15 schwarze 178: .Sq \e*[N] .
1.13 schwarze 179: See
1.15 schwarze 180: .Xr mandoc_char 7
1.27 schwarze 181: for a complete list.
182: Examples include
1.15 schwarze 183: .Sq \e*(Am
184: .Pq ampersand
1.13 schwarze 185: and
1.15 schwarze 186: .Sq \e*(Ba
187: .Pq vertical bar .
188: .Ss Whitespace
1.26 schwarze 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.
1.15 schwarze 194: .Pp
1.27 schwarze 195: In macro lines, whitespace delimits arguments and is discarded.
196: If arguments are quoted, whitespace within the quotes is retained.
1.15 schwarze 197: .Ss Quotation
1.9 schwarze 198: Macro arguments may be quoted with a double-quote to group
1.27 schwarze 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.
1.15 schwarze 203: .Pp
1.9 schwarze 204: This produces tokens
1.15 schwarze 205: .Sq a" ,
206: .Sq b c ,
207: .Sq de ,
1.9 schwarze 208: and
1.15 schwarze 209: .Sq fg" .
1.9 schwarze 210: Note that any quoted term, be it argument or macro, is indiscriminately
1.27 schwarze 211: considered literal text.
212: Thus, the following produces
1.15 schwarze 213: .Sq \&Em a :
214: .Bd -literal -offset indent
1.9 schwarze 215: \&.Em "Em a"
1.15 schwarze 216: .Ed
217: .Pp
1.9 schwarze 218: In free-form mode, quotes are regarded as opaque text.
1.17 schwarze 219: .Ss Dates
220: There are several macros in
221: .Nm
1.27 schwarze 222: that require a date argument.
223: The canonical form for dates is the American format:
1.17 schwarze 224: .Pp
225: .D1 Cm Month Day , Year
226: .Pp
227: The
228: .Cm Day
1.27 schwarze 229: value is an optionally zero-padded numeral.
230: The
1.17 schwarze 231: .Cm Month
1.27 schwarze 232: value is the full month name.
233: The
1.17 schwarze 234: .Cm Year
235: value is the full four-digit year.
236: .Pp
1.19 schwarze 237: Reduced form dates are broken-down canonical form dates:
1.17 schwarze 238: .Pp
1.19 schwarze 239: .D1 Cm Month , Year
240: .D1 Cm Year
1.17 schwarze 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.
1.27 schwarze 257: Negative numbers, while accepted, are truncated to zero.
258: The following scaling units are accepted:
1.17 schwarze 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
1.27 schwarze 296: is necessarily non-portable across output media.
297: See
1.17 schwarze 298: .Sx COMPATIBILITY .
1.28 schwarze 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,
1.29 schwarze 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 \.
1.8 schwarze 316: .Sh MANUAL STRUCTURE
1.17 schwarze 317: A well-formed
1.15 schwarze 318: .Nm
1.17 schwarze 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
1.22 schwarze 329: The first section (sections are denoted by
1.17 schwarze 330: .Sx \&Sh )
331: must be the NAME section, consisting of at least one
332: .Sx \&Nm
1.9 schwarze 333: followed by
1.17 schwarze 334: .Sx \&Nd .
335: .Pp
336: Following that, convention dictates specifying at least the SYNOPSIS and
337: DESCRIPTION sections, although this varies between manual sections.
338: .Pp
339: The following is a well-formed skeleton
340: .Nm
341: file:
1.15 schwarze 342: .Bd -literal -offset indent
1.8 schwarze 343: \&.Dd $\&Mdocdate$
344: \&.Dt mdoc 7
345: \&.Os
1.15 schwarze 346: \&.
1.8 schwarze 347: \&.Sh NAME
1.15 schwarze 348: \&.Nm foo
349: \&.Nd a description goes here
1.31 ! schwarze 350: \&.\e\*q The next is for sections 2, 3, & 9 only.
1.15 schwarze 351: \&.\e\*q .Sh LIBRARY
352: \&.
353: \&.Sh SYNOPSIS
354: \&.Nm foo
355: \&.Op Fl options
356: \&.Ar
357: \&.
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
1.27 schwarze 368: \&.\e\*q The next is for sections 1 & 8 only.
369: \&.\e\*q .Sh EXIT STATUS
1.15 schwarze 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
1.17 schwarze 385: The sections in a
386: .Nm
1.27 schwarze 387: document are conventionally ordered as they appear above.
388: Sections should be composed as follows:
1.19 schwarze 389: .Bl -ohang -offset Ds
390: .It Em NAME
1.27 schwarze 391: The name(s) and a short description of the documented material.
392: The syntax for this as follows:
1.19 schwarze 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
1.17 schwarze 401: .Sx \&Nm
1.19 schwarze 402: macro(s) must precede the
403: .Sx \&Nd
404: macro.
1.21 schwarze 405: .Pp
1.22 schwarze 406: See
1.21 schwarze 407: .Sx \&Nm
408: and
409: .Sx \&Nd .
1.19 schwarze 410: .It Em LIBRARY
411: The name of the library containing the documented material, which is
1.31 ! schwarze 412: assumed to be a function in a section 2, 3, or 9 manual.
1.27 schwarze 413: The syntax for this is as follows:
1.19 schwarze 414: .Bd -literal -offset indent
415: \&.Lb libarm
416: .Ed
417: .Pp
418: See
1.21 schwarze 419: .Sx \&Lb .
1.19 schwarze 420: .It Em SYNOPSIS
421: Documents the utility invocation syntax, function call syntax, or device
1.22 schwarze 422: configuration.
1.19 schwarze 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
1.22 schwarze 453: Manuals not in these sections generally don't need a
1.19 schwarze 454: .Em SYNOPSIS .
1.21 schwarze 455: .Pp
1.22 schwarze 456: See
1.21 schwarze 457: .Sx \&Op ,
458: .Sx \&Cd ,
459: .Sx \&Fn ,
460: .Sx \&Ft ,
461: and
462: .Sx \&Vt .
1.19 schwarze 463: .It Em DESCRIPTION
1.22 schwarze 464: This expands upon the brief, one-line description in
1.19 schwarze 465: .Em NAME .
466: It usually contains a break-down of the options (if documenting a
467: command), such as:
468: .Bd -literal -offset indent
469: The arguments are as follows:
470: \&.Bl \-tag \-width Ds
471: \&.It Fl v
472: Print verbose information.
473: \&.El
474: .Ed
1.21 schwarze 475: .Pp
1.19 schwarze 476: Manuals not documenting a command won't include the above fragment.
477: .It Em IMPLEMENTATION NOTES
1.27 schwarze 478: Implementation-specific notes should be kept here.
479: This is useful when implementing standard functions that may have side
480: effects or notable algorithmic implications.
1.19 schwarze 481: .It Em RETURN VALUES
482: This section is the dual of
483: .Em EXIT STATUS ,
1.27 schwarze 484: which is used for commands.
485: It documents the return values of functions in sections 2, 3, and 9.
1.19 schwarze 486: .Pp
487: See
488: .Sx \&Rv .
489: .It Em ENVIRONMENT
490: Documents any usages of environment variables, e.g.,
491: .Xr environ 7 .
492: .Pp
493: See
494: .Sx \&Ev .
495: .It Em FILES
1.27 schwarze 496: Documents files used.
497: It's helpful to document both the file and a short description of how
498: the file is used (created, modified, etc.).
1.19 schwarze 499: .Pp
500: See
501: .Sx \&Pa .
1.27 schwarze 502: .It Em EXIT STATUS
503: Command exit status for section 1, 6, and 8 manuals.
504: This section is the dual of
505: .Em RETURN VALUES ,
506: which is used for functions.
507: Historically, this information was described in
508: .Em DIAGNOSTICS ,
509: a practise that is now discouraged.
510: .Pp
511: See
512: .Sx \&Ex .
1.19 schwarze 513: .It Em EXAMPLES
1.27 schwarze 514: Example usages.
515: This often contains snippets of well-formed, well-tested invocations.
516: Make doubly sure that your examples work properly!
1.19 schwarze 517: .It Em DIAGNOSTICS
1.27 schwarze 518: Documents error conditions.
519: This is most useful in section 4 manuals.
1.19 schwarze 520: Historically, this section was used in place of
521: .Em EXIT STATUS
522: for manuals in sections 1, 6, and 8; however, this practise is
523: discouraged.
524: .Pp
525: See
1.21 schwarze 526: .Sx \&Bl
527: .Fl diag .
1.19 schwarze 528: .It Em ERRORS
529: Documents error handling in sections 2, 3, and 9.
530: .Pp
531: See
532: .Sx \&Er .
533: .It Em SEE ALSO
1.27 schwarze 534: References other manuals with related topics.
535: This section should exist for most manuals.
536: Cross-references should conventionally be ordered first by section, then
537: alphabetically.
1.19 schwarze 538: .Pp
539: See
540: .Sx \&Xr .
541: .It Em STANDARDS
1.27 schwarze 542: References any standards implemented or used.
543: If not adhering to any standards, the
1.19 schwarze 544: .Em HISTORY
545: section should be used instead.
546: .Pp
547: See
548: .Sx \&St .
549: .It Em HISTORY
550: The history of any manual without a
551: .Em STANDARDS
552: section should be described in this section.
553: .It Em AUTHORS
554: Credits to authors, if applicable, should appear in this section.
555: Authors should generally be noted by both name and an e-mail address.
556: .Pp
557: See
558: .Sx \&An .
559: .It Em CAVEATS
560: Explanations of common misuses and misunderstandings should be explained
561: in this section.
562: .It Em BUGS
563: Extant bugs should be described in this section.
564: .It Em SECURITY CONSIDERATIONS
565: Documents any security precautions that operators should consider.
1.17 schwarze 566: .El
1.8 schwarze 567: .Sh MACRO SYNTAX
1.14 schwarze 568: Macros are one to three three characters in length and begin with a
569: control character ,
1.15 schwarze 570: .Sq \&. ,
1.27 schwarze 571: at the beginning of the line.
572: An arbitrary amount of whitespace may sit between the control character
573: and the macro name.
574: Thus, the following are equivalent:
1.17 schwarze 575: .Bd -literal -offset indent
576: \&.Pp
577: \&.\ \ \ \&Pp
578: .Ed
1.15 schwarze 579: .Pp
1.27 schwarze 580: The syntax of a macro depends on its classification.
581: In this section,
1.15 schwarze 582: .Sq \-arg
1.8 schwarze 583: refers to macro arguments, which may be followed by zero or more
1.15 schwarze 584: .Sq parm
1.8 schwarze 585: parameters;
1.15 schwarze 586: .Sq \&Yo
1.8 schwarze 587: opens the scope of a macro; and if specified,
1.15 schwarze 588: .Sq \&Yc
1.8 schwarze 589: closes it out.
1.15 schwarze 590: .Pp
1.8 schwarze 591: The
1.15 schwarze 592: .Em Callable
1.8 schwarze 593: column indicates that the macro may be called subsequent to the initial
1.27 schwarze 594: line-macro.
595: If a macro is not callable, then its invocation after the initial line
596: macro is interpreted as opaque text, such that
1.16 schwarze 597: .Sq \&.Fl \&Sh
1.14 schwarze 598: produces
1.16 schwarze 599: .Sq Fl \&Sh .
1.15 schwarze 600: .Pp
1.14 schwarze 601: The
1.15 schwarze 602: .Em Parsable
1.8 schwarze 603: column indicates whether the macro may be followed by further
1.27 schwarze 604: (ostensibly callable) macros.
605: If a macro is not parsable, subsequent macro invocations on the line
606: will be interpreted as opaque text.
1.15 schwarze 607: .Pp
1.14 schwarze 608: The
1.15 schwarze 609: .Em Scope
1.8 schwarze 610: column, if applicable, describes closure rules.
1.15 schwarze 611: .Ss Block full-explicit
1.27 schwarze 612: Multi-line scope closed by an explicit closing macro.
613: All macros contains bodies; only
1.17 schwarze 614: .Sx \&Bf
1.8 schwarze 615: contains a head.
1.15 schwarze 616: .Bd -literal -offset indent
1.9 schwarze 617: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
618: \(lBbody...\(rB
1.1 kristaps 619: \&.Yc
1.15 schwarze 620: .Ed
621: .Pp
622: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXX"
623: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.17 schwarze 624: .It Sx \&Bd Ta \&No Ta \&No Ta closed by Sx \&Ed
625: .It Sx \&Bf Ta \&No Ta \&No Ta closed by Sx \&Ef
626: .It Sx \&Bk Ta \&No Ta \&No Ta closed by Sx \&Ek
627: .It Sx \&Bl Ta \&No Ta \&No Ta closed by Sx \&El
628: .It Sx \&Ed Ta \&No Ta \&No Ta opened by Sx \&Bd
629: .It Sx \&Ef Ta \&No Ta \&No Ta opened by Sx \&Bf
630: .It Sx \&Ek Ta \&No Ta \&No Ta opened by Sx \&Bk
631: .It Sx \&El Ta \&No Ta \&No Ta opened by Sx \&Bl
1.15 schwarze 632: .El
633: .Ss Block full-implicit
1.8 schwarze 634: Multi-line scope closed by end-of-file or implicitly by another macro.
1.9 schwarze 635: All macros have bodies; some
1.15 schwarze 636: .Po
1.17 schwarze 637: .Sx \&It Fl bullet ,
638: .Fl hyphen ,
639: .Fl dash ,
640: .Fl enum ,
641: .Fl item
1.15 schwarze 642: .Pc
1.17 schwarze 643: don't have heads; only one
644: .Po
645: .Sx \&It Fl column
1.22 schwarze 646: .Pc
1.17 schwarze 647: has multiple heads.
1.15 schwarze 648: .Bd -literal -offset indent
1.9 schwarze 649: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
650: \(lBbody...\(rB
1.15 schwarze 651: .Ed
652: .Pp
653: .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXXXXXXXXXX"
654: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.17 schwarze 655: .It Sx \&It Ta \&No Ta Yes Ta closed by Sx \&It , Sx \&El
656: .It Sx \&Nd Ta \&No Ta \&No Ta closed by Sx \&Sh
657: .It Sx \&Sh Ta \&No Ta \&No Ta closed by Sx \&Sh
658: .It Sx \&Ss Ta \&No Ta \&No Ta closed by Sx \&Sh , Sx \&Ss
1.15 schwarze 659: .El
660: .Ss Block partial-explicit
1.27 schwarze 661: Like block full-explicit, but also with single-line scope.
662: Each has at least a body and, in limited circumstances, a head
1.17 schwarze 663: .Po
664: .Sx \&Fo ,
665: .Sx \&Eo
666: .Pc
1.9 schwarze 667: and/or tail
1.17 schwarze 668: .Pq Sx \&Ec .
1.15 schwarze 669: .Bd -literal -offset indent
1.9 schwarze 670: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
671: \(lBbody...\(rB
672: \&.Yc \(lBtail...\(rB
1.8 schwarze 673:
674: \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
1.9 schwarze 675: \(lBbody...\(rB \&Yc \(lBtail...\(rB
1.15 schwarze 676: .Ed
677: .Pp
678: .Bl -column "MacroX" "CallableX" "ParsableX" "closed by XXXX" -compact -offset indent
679: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
1.17 schwarze 680: .It Sx \&Ac Ta Yes Ta Yes Ta opened by Sx \&Ao
681: .It Sx \&Ao Ta Yes Ta Yes Ta closed by Sx \&Ac
682: .It Sx \&Bc Ta Yes Ta Yes Ta closed by Sx \&Bo
683: .It Sx \&Bo Ta Yes Ta Yes Ta opened by Sx \&Bc
684: .It Sx \&Brc Ta Yes Ta Yes Ta opened by Sx \&Bro
685: .It Sx \&Bro Ta Yes Ta Yes Ta closed by Sx \&Brc
686: .It Sx \&Dc Ta Yes Ta Yes Ta opened by Sx \&Do
687: .It Sx \&Do Ta Yes Ta Yes Ta closed by Sx \&Dc
688: .It Sx \&Ec Ta Yes Ta Yes Ta opened by Sx \&Eo
689: .It Sx \&Eo Ta Yes Ta Yes Ta closed by Sx \&Ec
690: .It Sx \&Fc Ta Yes Ta Yes Ta opened by Sx \&Fo
691: .It Sx \&Fo Ta \&No Ta \&No Ta closed by Sx \&Fc
692: .It Sx \&Oc Ta Yes Ta Yes Ta closed by Sx \&Oo
693: .It Sx \&Oo Ta Yes Ta Yes Ta opened by Sx \&Oc
694: .It Sx \&Pc Ta Yes Ta Yes Ta closed by Sx \&Po
695: .It Sx \&Po Ta Yes Ta Yes Ta opened by Sx \&Pc
696: .It Sx \&Qc Ta Yes Ta Yes Ta opened by Sx \&Oo
697: .It Sx \&Qo Ta Yes Ta Yes Ta closed by Sx \&Oc
698: .It Sx \&Re Ta \&No Ta \&No Ta opened by Sx \&Rs
699: .It Sx \&Rs Ta \&No Ta \&No Ta closed by Sx \&Re
700: .It Sx \&Sc Ta Yes Ta Yes Ta opened by Sx \&So
701: .It Sx \&So Ta Yes Ta Yes Ta closed by Sx \&Sc
702: .It Sx \&Xc Ta Yes Ta Yes Ta opened by Sx \&Xo
703: .It Sx \&Xo Ta Yes Ta Yes Ta closed by Sx \&Xc
1.15 schwarze 704: .El
705: .Ss Block partial-implicit
1.9 schwarze 706: Like block full-implicit, but with single-line scope closed by
1.15 schwarze 707: .Sx Reserved Characters
1.8 schwarze 708: or end of line.
1.15 schwarze 709: .Bd -literal -offset indent
1.8 schwarze 710: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
1.15 schwarze 711: .Ed
712: .Pp
713: .Bl -column "MacroX" "CallableX" "ParsableX" -compact -offset indent
714: .It Em Macro Ta Em Callable Ta Em Parsable
1.17 schwarze 715: .It Sx \&Aq Ta Yes Ta Yes
716: .It Sx \&Bq Ta Yes Ta Yes
717: .It Sx \&Brq Ta Yes Ta Yes
718: .It Sx \&D1 Ta \&No Ta \&Yes
719: .It Sx \&Dl Ta \&No Ta Yes
720: .It Sx \&Dq Ta Yes Ta Yes
721: .It Sx \&Op Ta Yes Ta Yes
722: .It Sx \&Pq Ta Yes Ta Yes
723: .It Sx \&Ql Ta Yes Ta Yes
724: .It Sx \&Qq Ta Yes Ta Yes
725: .It Sx \&Sq Ta Yes Ta Yes
1.22 schwarze 726: .It Sx \&Vt Ta Yes Ta Yes
1.15 schwarze 727: .El
1.22 schwarze 728: .Pp
729: Note that the
730: .Sx \&Vt
731: macro is a
732: .Sx Block partial-implicit
733: only when invoked as the first macro
734: in a SYNOPSIS section line, else it is
735: .Sx In-line .
1.15 schwarze 736: .Ss In-line
1.9 schwarze 737: Closed by
1.15 schwarze 738: .Sx Reserved Characters ,
1.27 schwarze 739: end of line, fixed argument lengths, and/or subsequent macros.
740: In-line macros have only text children.
741: If a number (or inequality) of arguments is
1.15 schwarze 742: .Pq n ,
1.1 kristaps 743: then the macro accepts an arbitrary number of arguments.
1.15 schwarze 744: .Bd -literal -offset indent
1.8 schwarze 745: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lbres...\(rb
746:
747: \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
748:
749: \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
1.15 schwarze 750: .Ed
751: .Pp
752: .Bl -column "MacroX" "CallableX" "ParsableX" "Arguments" -compact -offset indent
753: .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Arguments
1.17 schwarze 754: .It Sx \&%A Ta \&No Ta \&No Ta >0
755: .It Sx \&%B Ta \&No Ta \&No Ta >0
756: .It Sx \&%C Ta \&No Ta \&No Ta >0
757: .It Sx \&%D Ta \&No Ta \&No Ta >0
758: .It Sx \&%I Ta \&No Ta \&No Ta >0
759: .It Sx \&%J Ta \&No Ta \&No Ta >0
760: .It Sx \&%N Ta \&No Ta \&No Ta >0
761: .It Sx \&%O Ta \&No Ta \&No Ta >0
762: .It Sx \&%P Ta \&No Ta \&No Ta >0
1.18 schwarze 763: .It Sx \&%Q Ta \&No Ta \&No Ta >0
1.17 schwarze 764: .It Sx \&%R Ta \&No Ta \&No Ta >0
765: .It Sx \&%T Ta \&No Ta \&No Ta >0
1.18 schwarze 766: .It Sx \&%U Ta \&No Ta \&No Ta >0
1.17 schwarze 767: .It Sx \&%V Ta \&No Ta \&No Ta >0
768: .It Sx \&Ad Ta Yes Ta Yes Ta n
769: .It Sx \&An Ta Yes Ta Yes Ta n
770: .It Sx \&Ap Ta Yes Ta Yes Ta 0
771: .It Sx \&Ar Ta Yes Ta Yes Ta n
772: .It Sx \&At Ta Yes Ta Yes Ta 1
773: .It Sx \&Bsx Ta Yes Ta Yes Ta n
774: .It Sx \&Bt Ta \&No Ta \&No Ta 0
775: .It Sx \&Bx Ta Yes Ta Yes Ta n
776: .It Sx \&Cd Ta Yes Ta Yes Ta >0
777: .It Sx \&Cm Ta Yes Ta Yes Ta n
778: .It Sx \&Db Ta \&No Ta \&No Ta 1
779: .It Sx \&Dd Ta \&No Ta \&No Ta >0
780: .It Sx \&Dt Ta \&No Ta \&No Ta n
781: .It Sx \&Dv Ta Yes Ta Yes Ta n
782: .It Sx \&Dx Ta Yes Ta Yes Ta n
783: .It Sx \&Em Ta Yes Ta Yes Ta >0
784: .It Sx \&En Ta \&No Ta \&No Ta 0
785: .It Sx \&Er Ta Yes Ta Yes Ta >0
786: .It Sx \&Es Ta \&No Ta \&No Ta 0
787: .It Sx \&Ev Ta Yes Ta Yes Ta n
788: .It Sx \&Ex Ta \&No Ta \&No Ta n
789: .It Sx \&Fa Ta Yes Ta Yes Ta n
790: .It Sx \&Fd Ta \&No Ta \&No Ta >0
791: .It Sx \&Fl Ta Yes Ta Yes Ta n
792: .It Sx \&Fn Ta Yes Ta Yes Ta >0
793: .It Sx \&Fr Ta \&No Ta \&No Ta n
794: .It Sx \&Ft Ta Yes Ta Yes Ta n
795: .It Sx \&Fx Ta Yes Ta Yes Ta n
796: .It Sx \&Hf Ta \&No Ta \&No Ta n
797: .It Sx \&Ic Ta Yes Ta Yes Ta >0
798: .It Sx \&In Ta \&No Ta \&No Ta n
799: .It Sx \&Lb Ta \&No Ta \&No Ta 1
800: .It Sx \&Li Ta Yes Ta Yes Ta n
801: .It Sx \&Lk Ta Yes Ta Yes Ta n
802: .It Sx \&Lp Ta \&No Ta \&No Ta 0
803: .It Sx \&Ms Ta Yes Ta Yes Ta >0
804: .It Sx \&Mt Ta Yes Ta Yes Ta >0
805: .It Sx \&Nm Ta Yes Ta Yes Ta n
806: .It Sx \&No Ta Yes Ta Yes Ta 0
807: .It Sx \&Ns Ta Yes Ta Yes Ta 0
808: .It Sx \&Nx Ta Yes Ta Yes Ta n
809: .It Sx \&Os Ta \&No Ta \&No Ta n
810: .It Sx \&Ot Ta \&No Ta \&No Ta n
811: .It Sx \&Ox Ta Yes Ta Yes Ta n
812: .It Sx \&Pa Ta Yes Ta Yes Ta n
1.25 schwarze 813: .It Sx \&Pf Ta Yes Ta Yes Ta 1
1.17 schwarze 814: .It Sx \&Pp Ta \&No Ta \&No Ta 0
815: .It Sx \&Rv Ta \&No Ta \&No Ta n
816: .It Sx \&Sm Ta \&No Ta \&No Ta 1
817: .It Sx \&St Ta \&No Ta Yes Ta 1
818: .It Sx \&Sx Ta Yes Ta Yes Ta >0
819: .It Sx \&Sy Ta Yes Ta Yes Ta >0
820: .It Sx \&Tn Ta Yes Ta Yes Ta >0
821: .It Sx \&Ud Ta \&No Ta \&No Ta 0
822: .It Sx \&Ux Ta Yes Ta Yes Ta n
823: .It Sx \&Va Ta Yes Ta Yes Ta n
824: .It Sx \&Vt Ta Yes Ta Yes Ta >0
1.22 schwarze 825: .It Sx \&Xr Ta Yes Ta Yes Ta >0
1.17 schwarze 826: .It Sx \&br Ta \&No Ta \&No Ta 0
827: .It Sx \&sp Ta \&No Ta \&No Ta 1
1.22 schwarze 828: .El
1.17 schwarze 829: .Sh REFERENCE
830: This section is a canonical reference of all macros, arranged
1.27 schwarze 831: alphabetically.
832: For the scoping of individual macros, see
1.17 schwarze 833: .Sx MACRO SYNTAX .
834: .Ss \&%A
835: Author name of an
836: .Sx \&Rs
837: block. Multiple authors should each be accorded their own
838: .Sx \%%A
839: line. Author names should be ordered with full or abbreviated
840: forename(s) first, then full surname.
841: .Ss \&%B
842: Book title of an
843: .Sx \&Rs
844: block. This macro may also be used in a non-bibliographic context when
845: referring to book titles.
846: .Ss \&%C
847: Publication city or location of an
848: .Sx \&Rs
849: block.
850: .Pp
851: .Em Remarks :
852: this macro is not implemented in
853: .Xr groff 1 .
854: .Ss \&%D
855: Publication date of an
856: .Sx \&Rs
1.19 schwarze 857: block. This should follow the reduced or canonical form syntax
858: described in
1.17 schwarze 859: .Sx Dates .
860: .Ss \&%I
861: Publisher or issuer name of an
862: .Sx \&Rs
863: block.
864: .Ss \&%J
865: Journal name of an
866: .Sx \&Rs
867: block.
868: .Ss \&%N
869: Issue number (usually for journals) of an
870: .Sx \&Rs
871: block.
872: .Ss \&%O
873: Optional information of an
874: .Sx \&Rs
875: block.
876: .Ss \&%P
877: Book or journal page number of an
878: .Sx \&Rs
879: block.
880: .Ss \&%Q
881: Institutional author (school, government, etc.) of an
882: .Sx \&Rs
883: block. Multiple institutional authors should each be accorded their own
884: .Sx \&%Q
885: line.
886: .Ss \&%R
887: Technical report name of an
888: .Sx \&Rs
889: block.
890: .Ss \&%T
891: Article title of an
892: .Sx \&Rs
893: block. This macro may also be used in a non-bibliographical context
894: when referring to article titles.
1.18 schwarze 895: .Ss \&%U
896: URI of reference document.
1.17 schwarze 897: .Ss \&%V
898: Volume number of an
899: .Sx \&Rs
900: block.
901: .Ss \&Ac
902: Closes an
903: .Sx \&Ao
904: block. Does not have any tail arguments.
905: .Ss \&Ad
906: Address construct: usually in the context of an computational address in
907: memory, not a physical (post) address.
908: .Pp
909: Examples:
1.25 schwarze 910: .D1 \&.Ad [0,$]
911: .D1 \&.Ad 0x00000000
1.17 schwarze 912: .Ss \&An
1.27 schwarze 913: Author name.
914: This macro may alternatively accepts the following arguments, although
915: these may not be specified along with a parameter:
1.17 schwarze 916: .Bl -tag -width 12n -offset indent
917: .It Fl split
918: Renders a line break before each author listing.
919: .It Fl nosplit
920: The opposite of
921: .Fl split .
922: .El
923: .Pp
924: In the AUTHORS section, the default is not to split the first author
925: listing, but all subsequent author listings, whether or not they're
1.27 schwarze 926: interspersed by other macros or text, are split.
927: Thus, specifying
1.17 schwarze 928: .Fl split
1.27 schwarze 929: will cause the first listing also to be split.
930: If not in the AUTHORS section, the default is not to split.
1.17 schwarze 931: .Pp
932: Examples:
1.25 schwarze 933: .D1 \&.An -nosplit
934: .D1 \&.An J. D. Ullman .
1.17 schwarze 935: .Pp
936: .Em Remarks :
937: the effects of
938: .Fl split
939: or
940: .Fl nosplit
941: are re-set when entering the AUTHORS section, so if one specifies
942: .Sx \&An Fl nosplit
943: in the general document body, it must be re-specified in the AUTHORS
944: section.
945: .Ss \&Ao
1.27 schwarze 946: Begins a block enclosed by angled brackets.
947: Does not have any head arguments.
1.17 schwarze 948: .Pp
949: Examples:
1.25 schwarze 950: .D1 \&.Fl -key= \&Ns \&Ao \&Ar val \&Ac
1.17 schwarze 951: .Pp
952: See also
953: .Sx \&Aq .
954: .Ss \&Ap
1.27 schwarze 955: Inserts an apostrophe without any surrounding white-space.
956: This is generally used as a grammatic device when referring to the verb
957: form of a function:
1.17 schwarze 958: .Bd -literal -offset indent
959: \&.Fn execve Ap d
960: .Ed
961: .Ss \&Aq
1.22 schwarze 962: Encloses its arguments in angled brackets.
1.17 schwarze 963: .Pp
964: Examples:
1.25 schwarze 965: .D1 \&.Fl -key= \&Ns \&Aq \&Ar val
1.17 schwarze 966: .Pp
967: .Em Remarks :
968: this macro is often abused for rendering URIs, which should instead use
969: .Sx \&Lk
970: or
971: .Sx \&Mt ,
972: or to note pre-processor
973: .Dq Li #include
974: statements, which should use
975: .Sx \&In .
976: .Pp
977: See also
978: .Sx \&Ao .
979: .Ss \&Ar
1.27 schwarze 980: Command arguments.
981: If an argument is not provided, the string
1.17 schwarze 982: .Dq file ...
983: is used as a default.
984: .Pp
985: Examples:
1.25 schwarze 986: .D1 \&.Fl o \&Ns \&Ar file1
987: .D1 \&.Ar
988: .D1 \&.Ar arg1 , arg2 .
1.17 schwarze 989: .Ss \&At
1.27 schwarze 990: Formats an AT&T version.
991: Accepts at most one parameter:
1.17 schwarze 992: .Bl -tag -width 12n -offset indent
993: .It Cm v[1-7] | 32v
994: A version of
995: .At .
996: .It Cm V[.[1-4]]?
997: A system version of
998: .At .
999: .El
1000: .Pp
1001: Note that these parameters do not begin with a hyphen.
1002: .Pp
1003: Examples:
1.25 schwarze 1004: .D1 \&.At
1005: .D1 \&.At V.1
1.17 schwarze 1006: .Pp
1007: See also
1008: .Sx \&Bsx ,
1009: .Sx \&Bx ,
1010: .Sx \&Dx ,
1011: .Sx \&Fx ,
1012: .Sx \&Nx ,
1013: .Sx \&Ox ,
1014: and
1015: .Sx \&Ux .
1016: .Ss \&Bc
1017: Closes a
1018: .Sx \&Bo
1019: block. Does not have any tail arguments.
1020: .Ss \&Bd
1.27 schwarze 1021: Begins a display block.
1022: A display is collection of macros or text which may be collectively
1023: offset or justified in a manner different from that
1024: of the enclosing context.
1025: By default, the block is preceded by a vertical space.
1.17 schwarze 1026: .Pp
1027: Each display is associated with a type, which must be one of the
1028: following arguments:
1029: .Bl -tag -width 12n -offset indent
1030: .It Fl ragged
1031: Only left-justify the block.
1032: .It Fl unfilled
1033: Do not justify the block at all.
1034: .It Fl filled
1035: Left- and right-justify the block.
1036: .It Fl literal
1037: Alias for
1038: .Fl unfilled .
1039: .It Fl centered
1040: Centre-justify each line.
1041: .El
1042: .Pp
1.27 schwarze 1043: The type must be provided first.
1044: Secondary arguments are as follows:
1.17 schwarze 1045: .Bl -tag -width 12n -offset indent
1046: .It Fl offset Ar width
1047: Offset by the value of
1048: .Ar width ,
1049: which is interpreted as one of the following, specified in order:
1050: .Bl -item
1051: .It
1052: As one of the pre-defined strings
1053: .Ar indent ,
1054: the width of standard indentation;
1055: .Ar indent-two ,
1056: twice
1057: .Ar indent ;
1058: .Ar left ,
1059: which has no effect ;
1060: .Ar right ,
1061: which justifies to the right margin; and
1062: .Ar center ,
1063: which aligns around an imagined centre axis.
1064: .It
1.27 schwarze 1065: As a precalculated width for a named macro.
1066: The most popular is the imaginary macro
1.18 schwarze 1067: .Ar \&Ds ,
1.17 schwarze 1068: which resolves to
1069: .Ar 6n .
1070: .It
1071: As a scaling unit following the syntax described in
1072: .Sx Scaling Widths .
1073: .It
1074: As the calculated string length of the opaque string.
1075: .El
1076: .Pp
1077: If unset, it will revert to the value of
1078: .Ar 8n
1079: as described in
1080: .Sx Scaling Widths .
1081: .It Fl compact
1082: Do not assert a vertical space before the block.
1083: .It Fl file Ar file
1084: Prepend the file
1085: .Ar file
1086: before any text or macros within the block.
1087: .El
1088: .Pp
1089: Examples:
1090: .Bd -literal -offset indent
1091: \&.Bd \-unfilled \-offset two-indent \-compact
1092: Hello world.
1093: \&.Ed
1094: .Ed
1095: .Pp
1096: See also
1097: .Sx \&D1
1098: and
1099: .Sx \&Dl .
1100: .Ss \&Bf
1101: .Ss \&Bk
1102: .Ss \&Bl
1.21 schwarze 1103: .\" Begins a list composed of one or more list entries. A list entry is
1104: .\" specified by the
1105: .\" .Sx \&It
1106: .\" macro, which consists of a head and optional body. By default, a list
1107: .\" is preceded by a blank line. A list must specify one of the following
1108: .\" list types:
1109: .\" .Bl -tag -width 12n
1110: .\" .It Fl bullet
1111: .\" A list offset by a bullet. The head of list entries must be empty.
1112: .\" List entry bodies are justified after the bullet.
1113: .\" .It Fl column
1114: .\" A columnated list. The number of columns is specified as arguments to
1115: .\" the
1116: .\" .Sx \&Bl
1117: .\" macro (the deprecated form of following the invocation of
1118: .\" .Fl column
1119: .\" is also accepted). Arguments dictate the width of columns specified in
1120: .\" list entries. List entry bodies must be left empty. Columns specified
1121: .\" in the list entry head are justified to their position in the sequence
1122: .\" of columns.
1123: .\" .It Fl dash
1124: .\" A list offset by a dash (hyphen). The head of list entries must be
1125: .\" empty. List entry bodies are justified past the dash.
1126: .\" .It Fl diag
1127: .\" Like
1128: .\" .Fl inset
1129: .\" lists, but with additional formatting to the head.
1130: .\" .It Fl enum
1131: .\" A list offset by a number indicating list entry position. The head of
1132: .\" list entries must be empty. List entry bodies are justified past the
1133: .\" enumeration.
1134: .\" .It Fl hang
1135: .\" Like
1136: .\" .Fl tag ,
1137: .\" but instead of list bodies justifying to the head on the first line,
1138: .\" they trail the head text.
1139: .\" .It Fl hyphen
1140: .\" Synonym for
1141: .\" .Fl dash .
1142: .\" .It Fl inset
1143: .\" Like
1144: .\" .Fl tag ,
1145: .\" but list entry bodies aren't justified.
1146: .\" .It Fl item
1147: .\" An un-justified list. This produces blocks of text.
1148: .\" .It Fl ohang
1149: .\" List bodies are placed on the line following the head.
1150: .\" .It Fl tag
1151: .\" A list offset by list entry heads. List entry bodies are justified
1152: .\" after the head.
1153: .\" .El
1154: .\" .Pp
1155: .\" More...
1156: .\" .
1.17 schwarze 1157: .Ss \&Bo
1.27 schwarze 1158: Begins a block enclosed by square brackets.
1159: Does not have any head arguments.
1.17 schwarze 1160: .Pp
1161: Examples:
1162: .Bd -literal -offset indent
1163: \&.Bo 1 ,
1.25 schwarze 1164: \&.Dv BUFSIZ \&Bc
1.17 schwarze 1165: .Ed
1166: .Pp
1167: See also
1168: .Sx \&Bq .
1169: .Ss \&Bq
1.22 schwarze 1170: Encloses its arguments in square brackets.
1.17 schwarze 1171: .Pp
1172: Examples:
1.25 schwarze 1173: .D1 \&.Bq 1 , \&Dv BUFSIZ
1.17 schwarze 1174: .Pp
1175: .Em Remarks :
1176: this macro is sometimes abused to emulate optional arguments for
1177: commands; the correct macros to use for this purpose are
1178: .Sx \&Op ,
1179: .Sx \&Oo ,
1180: and
1181: .Sx \&Oc .
1182: .Pp
1183: See also
1184: .Sx \&Bo .
1185: .Ss \&Brc
1186: Closes a
1187: .Sx \&Bro
1188: block. Does not have any tail arguments.
1189: .Ss \&Bro
1.27 schwarze 1190: Begins a block enclosed by curly braces.
1191: Does not have any head arguments.
1.17 schwarze 1192: .Pp
1193: Examples:
1194: .Bd -literal -offset indent
1195: \&.Bro 1 , ... ,
1.25 schwarze 1196: \&.Va n \&Brc
1.17 schwarze 1197: .Ed
1198: .Pp
1199: See also
1200: .Sx \&Brq .
1201: .Ss \&Brq
1202: Encloses its arguments in curly braces.
1203: .Pp
1204: Examples:
1.25 schwarze 1205: .D1 \&.Brq 1 , ... , \&Va n
1.17 schwarze 1206: .Pp
1207: See also
1208: .Sx \&Bro .
1209: .Ss \&Bsx
1210: Format the BSD/OS version provided as an argument, or a default value if
1211: no argument is provided.
1212: .Pp
1213: Examples:
1.25 schwarze 1214: .D1 \&.Bsx 1.0
1215: .D1 \&.Bsx
1.17 schwarze 1216: .Pp
1217: See also
1218: .Sx \&At ,
1219: .Sx \&Bx ,
1220: .Sx \&Dx ,
1221: .Sx \&Fx ,
1222: .Sx \&Nx ,
1223: .Sx \&Ox ,
1224: and
1225: .Sx \&Ux .
1226: .Ss \&Bt
1227: Prints
1228: .Dq is currently in beta test.
1229: .Ss \&Bx
1230: Format the BSD version provided as an argument, or a default value if no
1231: argument is provided.
1232: .Pp
1233: Examples:
1.25 schwarze 1234: .D1 \&.Bx 4.4
1235: .D1 \&.Bx
1.17 schwarze 1236: .Pp
1237: See also
1238: .Sx \&At ,
1239: .Sx \&Bsx ,
1240: .Sx \&Dx ,
1241: .Sx \&Fx ,
1242: .Sx \&Nx ,
1243: .Sx \&Ox ,
1244: and
1245: .Sx \&Ux .
1246: .Ss \&Cd
1.27 schwarze 1247: Configuration declaration.
1248: This denotes strings accepted by
1.17 schwarze 1249: .Xr config 8 .
1250: .Pp
1251: Examples:
1.25 schwarze 1252: .D1 \&.Cd device le0 at scode?
1.17 schwarze 1253: .Pp
1254: .Em Remarks :
1255: this macro is commonly abused by using quoted literals to retain
1256: white-space and align consecutive
1257: .Sx \&Cd
1.27 schwarze 1258: declarations.
1259: This practise is discouraged.
1.17 schwarze 1260: .Ss \&Cm
1.27 schwarze 1261: Command modifiers.
1262: Useful when specifying configuration options or keys.
1.17 schwarze 1263: .Pp
1264: Examples:
1.25 schwarze 1265: .D1 \&.Cm ControlPath
1266: .D1 \&.Cm ControlMaster
1.17 schwarze 1267: .Pp
1268: See also
1269: .Sx \&Fl .
1270: .Ss \&D1
1.27 schwarze 1271: One-line indented display.
1272: This is formatted by the default rules and is useful for simple indented
1273: statements.
1274: It is followed by a newline.
1.17 schwarze 1275: .Pp
1276: Examples:
1.25 schwarze 1277: .D1 \&.D1 \&Fl abcdefgh
1.17 schwarze 1278: .Pp
1279: See also
1280: .Sx \&Bd
1281: and
1282: .Sx \&Dl .
1283: .Ss \&Db
1284: .Ss \&Dc
1285: Closes a
1286: .Sx \&Do
1287: block. Does not have any tail arguments.
1288: .Ss \&Dd
1.27 schwarze 1289: Document date.
1290: This is the mandatory first macro of any
1.17 schwarze 1291: .Nm
1.27 schwarze 1292: manual.
1293: Its calling syntax is as follows:
1.17 schwarze 1294: .Pp
1295: .D1 \. Ns Sx \&Dd Cm date
1296: .Pp
1.22 schwarze 1297: The
1.17 schwarze 1298: .Cm date
1299: field may be either
1300: .Ar $\&Mdocdate$ ,
1301: which signifies the current manual revision date dictated by
1.19 schwarze 1302: .Xr cvs 1 ,
1.17 schwarze 1303: or instead a valid canonical date as specified by
1304: .Sx Dates .
1.19 schwarze 1305: If a date does not conform, the current date is used instead.
1.17 schwarze 1306: .Pp
1307: Examples:
1.25 schwarze 1308: .D1 \&.Dd $\&Mdocdate$
1309: .D1 \&.Dd $\&Mdocdate: July 21 2007$
1310: .D1 \&.Dd July 21, 2007
1.17 schwarze 1311: .Pp
1312: See also
1313: .Sx \&Dt
1314: and
1315: .Sx \&Os .
1316: .Ss \&Dl
1.27 schwarze 1317: One-line intended display.
1318: This is formatted as literal text and is useful for commands and
1319: invocations.
1320: It is followed by a newline.
1.17 schwarze 1321: .Pp
1322: Examples:
1.25 schwarze 1323: .D1 \&.Dl % mandoc mdoc.7 | less
1.17 schwarze 1324: .Pp
1325: See also
1326: .Sx \&Bd
1327: and
1328: .Sx \&D1 .
1329: .Ss \&Do
1330: Begins a block enclosed by double quotes. Does not have any head
1331: arguments.
1332: .Pp
1333: Examples:
1.25 schwarze 1334: .D1 \&.D1 \&Do April is the cruellest month \&Dc \e(em T.S. Eliot
1.17 schwarze 1335: .Pp
1336: See also
1337: .Sx \&Dq .
1338: .Ss \&Dq
1.22 schwarze 1339: Encloses its arguments in double quotes.
1.17 schwarze 1340: .Pp
1341: Examples:
1.25 schwarze 1342: .Bd -literal -offset indent -compact
1.17 schwarze 1343: \&.Dq April is the cruellest month
1344: \e(em T.S. Eliot
1345: .Ed
1346: .Pp
1347: See also
1348: .Sx \&Do .
1349: .Ss \&Dt
1.27 schwarze 1350: Document title.
1351: This is the mandatory second macro of any
1.17 schwarze 1352: .Nm
1.27 schwarze 1353: file.
1354: Its calling syntax is as follows:
1.17 schwarze 1355: .Pp
1356: .D1 \. Ns Sx \&Dt Cm title section Op Cm volume | arch
1357: .Pp
1358: Its arguments are as follows:
1359: .Bl -tag -width Ds -offset Ds
1360: .It Cm title
1.27 schwarze 1361: The document's title (name).
1362: This should be capitalised and is required.
1.17 schwarze 1363: .It Cm section
1.27 schwarze 1364: The manual section.
1365: This may be one of
1.17 schwarze 1366: .Ar 1
1367: .Pq utilities ,
1368: .Ar 2
1369: .Pq system calls ,
1370: .Ar 3
1371: .Pq libraries ,
1372: .Ar 3p
1373: .Pq Perl libraries ,
1374: .Ar 4
1375: .Pq devices ,
1376: .Ar 5
1377: .Pq file formats ,
1378: .Ar 6
1379: .Pq games ,
1380: .Ar 7
1381: .Pq miscellaneous ,
1382: .Ar 8
1383: .Pq system utilities ,
1384: .Ar 9
1385: .Pq kernel functions ,
1386: .Ar X11
1387: .Pq X Window System ,
1388: .Ar X11R6
1389: .Pq X Window System ,
1390: .Ar unass
1391: .Pq unassociated ,
1392: .Ar local
1393: .Pq local system ,
1394: .Ar draft
1395: .Pq draft manual ,
1396: or
1397: .Ar paper
1398: .Pq paper .
1399: It is also required and should correspond to the manual's filename
1400: suffix.
1401: .It Cm volume
1402: This overrides the volume inferred from
1403: .Ar section .
1404: This field is optional, and if specified, must be one of
1405: .Ar USD
1406: .Pq users' supplementary documents ,
1407: .Ar PS1
1408: .Pq programmers' supplementary documents ,
1409: .Ar AMD
1410: .Pq administrators' supplementary documents ,
1411: .Ar SMM
1412: .Pq system managers' manuals ,
1413: .Ar URM
1414: .Pq users' reference manuals ,
1415: .Ar PRM
1416: .Pq programmers' reference manuals ,
1417: .Ar KM
1418: .Pq kernel manuals ,
1419: .Ar IND
1420: .Pq master index ,
1421: .Ar MMI
1422: .Pq master index ,
1423: .Ar LOCAL
1424: .Pq local manuals ,
1425: .Ar LOC
1426: .Pq local manuals ,
1427: or
1428: .Ar CON
1429: .Pq contributed manuals .
1430: .It Cm arch
1.27 schwarze 1431: This specifies a specific relevant architecture.
1432: If
1.17 schwarze 1433: .Cm volume
1434: is not provided, it may be used in its place, else it may be used
1.27 schwarze 1435: subsequent that.
1436: It, too, is optional.
1437: It must be one of
1.17 schwarze 1438: .Ar alpha ,
1439: .Ar amd64 ,
1440: .Ar amiga ,
1441: .Ar arc ,
1442: .Ar arm ,
1443: .Ar armish ,
1444: .Ar aviion ,
1445: .Ar hp300 ,
1446: .Ar hppa ,
1447: .Ar hppa64 ,
1448: .Ar i386 ,
1449: .Ar landisk ,
1.23 schwarze 1450: .Ar loongson ,
1.17 schwarze 1451: .Ar luna88k ,
1452: .Ar mac68k ,
1453: .Ar macppc ,
1454: .Ar mvme68k ,
1455: .Ar mvme88k ,
1456: .Ar mvmeppc ,
1457: .Ar pmax ,
1458: .Ar sgi ,
1459: .Ar socppc ,
1460: .Ar sparc ,
1461: .Ar sparc64 ,
1462: .Ar sun3 ,
1463: .Ar vax ,
1464: or
1465: .Ar zaurus .
1466: .El
1467: .Pp
1468: Examples:
1.25 schwarze 1469: .D1 \&.Dt FOO 1
1470: .D1 \&.Dt FOO 4 KM
1471: .D1 \&.Dt FOO 9 i386
1472: .D1 \&.Dt FOO 9 KM i386
1.17 schwarze 1473: .Pp
1474: See also
1475: .Sx \&Dd
1476: and
1477: .Sx \&Os .
1478: .Ss \&Dv
1479: Defined variables such as preprocessor constants.
1480: .Pp
1481: Examples:
1.25 schwarze 1482: .D1 \&.Dv BUFSIZ
1483: .D1 \&.Dv STDOUT_FILENO
1.17 schwarze 1484: .Pp
1485: See also
1486: .Sx \&Er .
1487: .Ss \&Dx
1.19 schwarze 1488: Format the DragonFly BSD version provided as an argument, or a default
1.17 schwarze 1489: value if no argument is provided.
1490: .Pp
1491: Examples:
1.25 schwarze 1492: .D1 \&.Dx 2.4.1
1493: .D1 \&.Dx
1.17 schwarze 1494: .Pp
1495: See also
1496: .Sx \&At ,
1497: .Sx \&Bsx ,
1498: .Sx \&Bx ,
1499: .Sx \&Fx ,
1500: .Sx \&Nx ,
1501: .Sx \&Ox ,
1502: and
1503: .Sx \&Ux .
1504: .Ss \&Ec
1505: .Ss \&Ed
1506: .Ss \&Ef
1507: .Ss \&Ek
1508: .Ss \&El
1509: .Ss \&Em
1.27 schwarze 1510: Denotes text that should be emphasised.
1511: Note that this is a presentation term and should not be used for
1512: stylistically decorating technical terms.
1.17 schwarze 1513: .Pp
1514: Examples:
1.25 schwarze 1515: .D1 \&.Em Warnings!
1516: .D1 \&.Em Remarks :
1.17 schwarze 1517: .Ss \&En
1518: .Ss \&Eo
1519: .Ss \&Er
1.25 schwarze 1520: Display error constants.
1.17 schwarze 1521: .Pp
1522: Examples:
1.25 schwarze 1523: .D1 \&.Er EPERM
1524: .D1 \&.Er ENOENT
1.17 schwarze 1525: .Pp
1526: See also
1527: .Sx \&Dv .
1528: .Ss \&Es
1529: .Ss \&Ev
1530: Environmental variables such as those specified in
1531: .Xr environ 7 .
1532: .Pp
1533: Examples:
1.25 schwarze 1534: .D1 \&.Ev DISPLAY
1535: .D1 \&.Ev PATH
1.17 schwarze 1536: .Ss \&Ex
1.27 schwarze 1537: Inserts text regarding a utility's exit values.
1538: This macro must have first the
1.17 schwarze 1539: .Fl std
1540: argument specified, then an optional
1541: .Ar utility .
1542: If
1543: .Ar utility
1544: is not provided, the document's name as stipulated in
1545: .Sx \&Nm
1546: is provided.
1547: .Ss \&Fa
1548: .Ss \&Fc
1549: .Ss \&Fd
1550: .Ss \&Fl
1.27 schwarze 1551: Command-line flag.
1552: Used when listing arguments to command-line utilities.
1553: Prints a fixed-width hyphen
1.21 schwarze 1554: .Sq \-
1.27 schwarze 1555: directly followed by each argument.
1556: If no arguments are provided, a hyphen is printed followed by a space.
1557: If the argument is a macro, a hyphen is prefixed to the subsequent macro
1558: output.
1.21 schwarze 1559: .Pp
1560: Examples:
1.25 schwarze 1561: .D1 \&.Fl a b c
1562: .D1 \&.Fl \&Pf a b
1563: .D1 \&.Fl
1564: .D1 \&.Op \&Fl o \&Ns \&Ar file
1.21 schwarze 1565: .Pp
1566: See also
1567: .Sx \&Cm .
1.17 schwarze 1568: .Ss \&Fn
1569: .Ss \&Fo
1570: .Ss \&Fr
1571: .Ss \&Ft
1572: .Ss \&Fx
1573: Format the FreeBSD version provided as an argument, or a default value
1574: if no argument is provided.
1575: .Pp
1576: Examples:
1.25 schwarze 1577: .D1 \&.Fx 7.1
1578: .D1 \&.Fx
1.17 schwarze 1579: .Pp
1580: See also
1581: .Sx \&At ,
1582: .Sx \&Bsx ,
1583: .Sx \&Bx ,
1584: .Sx \&Dx ,
1585: .Sx \&Nx ,
1586: .Sx \&Ox ,
1587: and
1588: .Sx \&Ux .
1589: .Ss \&Hf
1590: .Ss \&Ic
1591: .Ss \&In
1592: .Ss \&It
1593: .Ss \&Lb
1594: .Ss \&Li
1595: .Ss \&Lk
1.27 schwarze 1596: Format a hyperlink.
1597: The calling syntax is as follows:
1.18 schwarze 1598: .Pp
1599: .D1 \. Ns Sx \&Lk Cm uri Op Cm name
1600: .Pp
1601: Examples:
1.25 schwarze 1602: .D1 \&.Lk http://bsd.lv "The BSD.lv Project"
1603: .D1 \&.Lk http://bsd.lv
1.18 schwarze 1604: .Pp
1605: See also
1606: .Sx \&Mt .
1.17 schwarze 1607: .Ss \&Lp
1608: .Ss \&Ms
1609: .Ss \&Mt
1610: .Ss \&Nd
1611: .Ss \&Nm
1612: .Ss \&No
1613: .Ss \&Ns
1614: .Ss \&Nx
1615: Format the NetBSD version provided as an argument, or a default value if
1616: no argument is provided.
1617: .Pp
1618: Examples:
1.25 schwarze 1619: .D1 \&.Nx 5.01
1620: .D1 \&.Nx
1.17 schwarze 1621: .Pp
1622: See also
1623: .Sx \&At ,
1624: .Sx \&Bsx ,
1625: .Sx \&Bx ,
1626: .Sx \&Dx ,
1627: .Sx \&Fx ,
1628: .Sx \&Ox ,
1629: and
1630: .Sx \&Ux .
1631: .Ss \&Oc
1632: .Ss \&Oo
1633: .Ss \&Op
1634: .Ss \&Os
1.27 schwarze 1635: Document operating system version.
1636: This is the mandatory third macro of
1.17 schwarze 1637: any
1638: .Nm
1639: file. Its calling syntax is as follows:
1640: .Pp
1641: .D1 \. Ns Sx \&Os Op Cm system
1642: .Pp
1643: The optional
1644: .Cm system
1.27 schwarze 1645: parameter specifies the relevant operating system or environment.
1646: Left unspecified, it defaults to the local operating system version.
1647: This is the suggested form.
1.17 schwarze 1648: .Pp
1649: Examples:
1.25 schwarze 1650: .D1 \&.Os
1651: .D1 \&.Os KTH/CSC/TCS
1652: .D1 \&.Os BSD 4.3
1.17 schwarze 1653: .Pp
1654: See also
1655: .Sx \&Dd
1656: and
1657: .Sx \&Dt .
1658: .Ss \&Ot
1659: Unknown usage.
1660: .Pp
1661: .Em Remarks :
1662: this macro has been deprecated.
1663: .Ss \&Ox
1664: Format the OpenBSD version provided as an argument, or a default value
1665: if no argument is provided.
1666: .Pp
1667: Examples:
1.25 schwarze 1668: .D1 \&.Ox 4.5
1669: .D1 \&.Ox
1.17 schwarze 1670: .Pp
1671: See also
1672: .Sx \&At ,
1673: .Sx \&Bsx ,
1674: .Sx \&Bx ,
1675: .Sx \&Dx ,
1676: .Sx \&Fx ,
1677: .Sx \&Nx ,
1678: and
1679: .Sx \&Ux .
1680: .Ss \&Pa
1681: .Ss \&Pc
1682: .Ss \&Pf
1683: .Ss \&Po
1684: .Ss \&Pp
1685: .Ss \&Pq
1686: .Ss \&Qc
1687: .Ss \&Ql
1688: .Ss \&Qo
1689: .Ss \&Qq
1690: .Ss \&Re
1691: Closes a
1692: .Sx \&Rs
1.27 schwarze 1693: block.
1694: Does not have any tail arguments.
1.17 schwarze 1695: .Ss \&Rs
1696: Begins a bibliographic
1697: .Pq Dq reference
1.27 schwarze 1698: block.
1699: Does not have any head arguments.
1700: The block macro may only contain
1.17 schwarze 1701: .Sx \&%A ,
1702: .Sx \&%B ,
1703: .Sx \&%C ,
1704: .Sx \&%D ,
1705: .Sx \&%I ,
1706: .Sx \&%J ,
1707: .Sx \&%N ,
1708: .Sx \&%O ,
1709: .Sx \&%P ,
1710: .Sx \&%Q ,
1711: .Sx \&%R ,
1712: .Sx \&%T ,
1713: and
1714: .Sx \&%V
1715: child macros (at least one must be specified).
1716: .Pp
1717: Examples:
1.25 schwarze 1718: .Bd -literal -offset indent -compact
1.17 schwarze 1719: \&.Rs
1720: \&.%A J. E. Hopcroft
1721: \&.%A J. D. Ullman
1722: \&.%B Introduction to Automata Theory, Languages, and Computation
1723: \&.%I Addison-Wesley
1724: \&.%C Reading, Massachusettes
1725: \&.%D 1979
1726: \&.Re
1727: .Ed
1728: .Pp
1729: If an
1730: .Sx \&Rs
1731: block is used within a SEE ALSO section, a vertical space is asserted
1732: before the rendered output, else the block continues on the current
1733: line.
1734: .Ss \&Rv
1735: .Ss \&Sc
1736: .Ss \&Sh
1737: .Ss \&Sm
1738: .Ss \&So
1739: .Ss \&Sq
1740: .Ss \&Ss
1741: .Ss \&St
1742: .Ss \&Sx
1743: .Ss \&Sy
1744: .Ss \&Tn
1745: .Ss \&Ud
1746: .Ss \&Ux
1.27 schwarze 1747: Format the UNIX name.
1748: Accepts no argument.
1.17 schwarze 1749: .Pp
1750: Examples:
1.25 schwarze 1751: .D1 \&.Ux
1.17 schwarze 1752: .Pp
1753: See also
1754: .Sx \&At ,
1755: .Sx \&Bsx ,
1756: .Sx \&Bx ,
1757: .Sx \&Dx ,
1758: .Sx \&Fx ,
1759: .Sx \&Nx ,
1760: and
1761: .Sx \&Ox .
1762: .Ss \&Va
1763: .Ss \&Vt
1.27 schwarze 1764: A variable type.
1765: This is also used for indicating global variables in the SYNOPSIS
1766: section, in which case a variable name is also specified.
1767: Note that it accepts
1.22 schwarze 1768: .Sx Block partial-implicit
1769: syntax when invoked as the first macro in the SYNOPSIS section, else it
1770: accepts ordinary
1771: .Sx In-line
1772: syntax.
1773: .Pp
1774: Note that this should not be confused with
1775: .Sx \&Ft ,
1776: which is used for function return types.
1777: .Pp
1778: Examples:
1.25 schwarze 1779: .D1 \&.Vt unsigned char
1780: .D1 \&.Vt extern const char * const sys_signame[] ;
1.22 schwarze 1781: .Pp
1782: See also
1783: .Sx \&Ft
1784: and
1785: .Sx \&Va .
1.17 schwarze 1786: .Ss \&Xc
1.24 schwarze 1787: Close a scope opened by
1788: .Sx \&Xo .
1.17 schwarze 1789: .Ss \&Xo
1.27 schwarze 1790: Open an extension scope.
1791: This macro originally existed to extend the 9-argument limit of troff;
1792: since this limit has been lifted, the macro has been deprecated.
1.17 schwarze 1793: .Ss \&Xr
1.22 schwarze 1794: Link to another manual
1795: .Pq Qq cross-reference .
1796: Its calling syntax is
1797: .Pp
1798: .D1 \. Ns Sx \&Xr Cm name section
1799: .Pp
1800: The
1801: .Cm name
1802: and
1803: .Cm section
1.27 schwarze 1804: are the name and section of the linked manual.
1805: If
1.22 schwarze 1806: .Cm section
1807: is followed by non-punctuation, an
1808: .Sx \&Ns
1.27 schwarze 1809: is inserted into the token stream.
1810: This behaviour is for compatibility with
1.22 schwarze 1811: .Xr groff 1 .
1812: .Pp
1813: Examples:
1.25 schwarze 1814: .D1 \&.Xr mandoc 1
1815: .D1 \&.Xr mandoc 1 ;
1816: .D1 \&.Xr mandoc 1 \&Ns s behaviour
1.17 schwarze 1817: .Ss \&br
1818: .Ss \&sp
1.1 kristaps 1819: .Sh COMPATIBILITY
1.26 schwarze 1820: This section documents compatibility between mandoc and other other
1821: troff implementations, at this time limited to GNU troff
1822: .Pq Qq groff .
1.9 schwarze 1823: The term
1.15 schwarze 1824: .Qq historic groff
1.26 schwarze 1825: refers to groff versions before the
1.15 schwarze 1826: .Pa doc.tmac
1.9 schwarze 1827: file re-write
1.15 schwarze 1828: .Pq somewhere between 1.15 and 1.19 .
1.26 schwarze 1829: .Pp
1830: Heirloom troff, the other significant troff implementation accepting
1831: \-mdoc, is similar to historic groff.
1.15 schwarze 1832: .Pp
1833: .Bl -dash -compact
1834: .It
1.21 schwarze 1835: The comment syntax
1836: .Sq \e."
1837: is no longer accepted.
1838: .It
1.26 schwarze 1839: In groff, the
1.21 schwarze 1840: .Sx \&Pa
1841: macro does not format its arguments when used in the FILES section under
1.27 schwarze 1842: certain list types.
1843: mandoc does.
1.21 schwarze 1844: .It
1.26 schwarze 1845: Historic groff does not print a dash for empty
1.21 schwarze 1846: .Sx \&Fl
1.27 schwarze 1847: arguments.
1848: mandoc and newer groff implementations do.
1.21 schwarze 1849: .It
1.26 schwarze 1850: groff behaves irregularly when specifying
1.20 schwarze 1851: .Sq \ef
1.26 schwarze 1852: .Sx Text Decoration
1.27 schwarze 1853: within line-macro scopes.
1854: mandoc follows a consistent system.
1.20 schwarze 1855: .It
1.26 schwarze 1856: In mandoc, negative scaling units are truncated to zero; groff would
1.27 schwarze 1857: move to prior lines.
1858: Furthermore, the
1.17 schwarze 1859: .Sq f
1860: scaling unit, while accepted, is rendered as the default unit.
1.15 schwarze 1861: .It
1.9 schwarze 1862: In quoted literals, groff allowed pair-wise double-quotes to produce a
1.27 schwarze 1863: standalone double-quote in formatted output.
1864: This idiosyncratic behaviour is not applicable in mandoc.
1.15 schwarze 1865: .It
1.17 schwarze 1866: Display types
1.20 schwarze 1867: .Sx \&Bd
1868: .Fl center
1.17 schwarze 1869: and
1870: .Fl right
1871: are aliases for
1.26 schwarze 1872: .Fl left
1873: in manodc. Furthermore, the
1.17 schwarze 1874: .Fl file Ar file
1.27 schwarze 1875: argument is ignored.
1876: Lastly, since text is not right-justified in mandoc (or even groff),
1.17 schwarze 1877: .Fl ragged
1878: and
1879: .Fl filled
1880: are aliases, as are
1881: .Fl literal
1882: and
1883: .Fl unfilled .
1.15 schwarze 1884: .It
1.27 schwarze 1885: Historic groff has many un-callable macros.
1886: Most of these (excluding some block-level macros) are now callable.
1.15 schwarze 1887: .It
1.9 schwarze 1888: The vertical bar
1.15 schwarze 1889: .Sq \(ba
1.3 schwarze 1890: made historic groff
1.15 schwarze 1891: .Qq go orbital
1.26 schwarze 1892: but has been a proper delimiter since then.
1.15 schwarze 1893: .It
1.26 schwarze 1894: .Sx \&It Fl nested
1.3 schwarze 1895: is assumed for all lists (it wasn't in historic groff): any list may be
1896: nested and
1.17 schwarze 1897: .Fl enum
1.1 kristaps 1898: lists will restart the sequence only for the sub-list.
1.15 schwarze 1899: .It
1.1 kristaps 1900: Some manuals use
1.17 schwarze 1901: .Sx \&Li
1.1 kristaps 1902: incorrectly by following it with a reserved character and expecting the
1.27 schwarze 1903: delimiter to render.
1904: This is not supported in mandoc.
1.15 schwarze 1905: .It
1.9 schwarze 1906: In groff, the
1.17 schwarze 1907: .Sx \&Fo
1.27 schwarze 1908: macro only produces the first parameter.
1909: This is not the case in mandoc.
1.26 schwarze 1910: .It
1911: In groff, the
1912: .Sx \&Cd ,
1913: .Sx \&Er ,
1.30 schwarze 1914: .Sx \&Ex ,
1.26 schwarze 1915: and
1.30 schwarze 1916: .Sx \&Rv
1.27 schwarze 1917: macros were stipulated only to occur in certain manual sections.
1918: mandoc does not have these restrictions.
1.30 schwarze 1919: .It
1920: Newer groff and mandoc print
1921: .Qq AT&T UNIX
1922: prior to unknown arguments of
1923: .Sx \&At ;
1924: older groff did nothing.
1.15 schwarze 1925: .El
1.1 kristaps 1926: .Sh SEE ALSO
1.15 schwarze 1927: .Xr mandoc 1 ,
1928: .Xr mandoc_char 7
1.1 kristaps 1929: .Sh AUTHORS
1930: The
1.15 schwarze 1931: .Nm
1.9 schwarze 1932: reference was written by
1.26 schwarze 1933: .An Kristaps Dzonsons Aq kristaps@bsd.lv .
1.17 schwarze 1934: .\"
1935: .\" XXX: this really isn't the place for these caveats.
1936: .\" .
1937: .\" .
1938: .\" .Sh CAVEATS
1939: .\" There are many ambiguous parts of mdoc.
1940: .\" .
1941: .\" .Pp
1942: .\" .Bl -dash -compact
1943: .\" .It
1944: .\" .Sq \&Fa
1945: .\" should be
1946: .\" .Sq \&Va
1947: .\" as function arguments are variables.
1948: .\" .It
1949: .\" .Sq \&Ft
1950: .\" should be
1951: .\" .Sq \&Vt
1952: .\" as function return types are still types. Furthermore, the
1953: .\" .Sq \&Ft
1954: .\" should be removed and
1955: .\" .Sq \&Fo ,
1956: .\" which ostensibly follows it, should follow the same convention as
1957: .\" .Sq \&Va .
1958: .\" .It
1959: .\" .Sq \&Va
1960: .\" should formalise that only one or two arguments are acceptable: a
1961: .\" variable name and optional, preceding type.
1962: .\" .It
1963: .\" .Sq \&Fd
1964: .\" is ambiguous. It's commonly used to indicate an include file in the
1965: .\" synopsis section.
1966: .\" .Sq \&In
1967: .\" should be used, instead.
1968: .\" .It
1969: .\" Only the
1970: .\" .Sq \-literal
1971: .\" argument to
1972: .\" .Sq \&Bd
1973: .\" makes sense. The remaining ones should be removed.
1974: .\" .It
1975: .\" The
1976: .\" .Sq \&Xo
1977: .\" and
1978: .\" .Sq \&Xc
1979: .\" macros should be deprecated.
1980: .\" .It
1981: .\" The
1982: .\" .Sq \&Dt
1983: .\" macro lacks clarity. It should be absolutely clear which title will
1984: .\" render when formatting the manual page.
1985: .\" .It
1986: .\" A
1987: .\" .Sq \&Lx
1988: .\" should be provided for Linux (\(`a la
1989: .\" .Sq \&Ox ,
1990: .\" .Sq \&Nx
1991: .\" etc.).
1992: .\" .It
1993: .\" There's no way to refer to references in
1994: .\" .Sq \&Rs/Re
1995: .\" blocks.
1996: .\" .It
1997: .\" The \-split and \-nosplit dictates via
1998: .\" .Sq \&An
1999: .\" are re-set when entering and leaving the AUTHORS section.
2000: .\" .El
2001: .\" .