1 .\" $Id: mdoc.7,v 1.69 2009/10/24 05:52:13 kristaps Exp $
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
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.
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.
17 .Dd $Mdocdate: October 24 2009 $
24 .Nd mdoc language reference
30 language is used to format
33 manuals. In this reference document, we describe its syntax, structure,
34 and usage. Our reference implementation is
38 section describes compatibility with
44 document follows simple rules: lines beginning with the control
47 are parsed for macros. Other lines are interpreted within the scope of
49 .Bd -literal -offset indent
50 \&.Sh Macro lines change control state.
51 Other lines are interpreted within the current state.
57 documents may contain only graphable 7-bit ASCII characters, the space
58 character, and, in certain circumstances, the tab character. All
67 whether in a macro or free-form text line, is ignored to the end of
68 line. A macro line with only a control character and comment escape,
70 is also ignored. Macro lines with only a control charater and optionally
71 whitespace are stripped from input.
74 .Ss Reserved Characters
75 Within a macro line, the following characters are reserved:
77 .Bl -tag -width Ds -offset indent -compact
103 Use of reserved characters is described in
105 For general use in macro lines, these characters must either be escaped
106 with a non-breaking space
108 or, if applicable, an appropriate escape sequence used.
111 .Ss Special Characters
112 Special characters may occur in both macro and free-form lines.
113 Sequences begin with the escape character
115 followed by either an open-parenthesis
117 for two-character sequences; an open-bracket
119 for n-character sequences (terminated at a close-bracket
121 or a single one-character sequence. See
123 for a complete list. Examples include
132 Terms may be text-decorated using the
134 escape followed by an indicator: B (bold), I, (italic), or P and R
135 (Roman, or reset). This form is not recommended for
137 which encourages semantic, not presentation, annotation.
140 .Ss Predefined Strings
143 also defined a set of package-specific
144 .Dq predefined strings ,
146 .Sx Special Characters ,
147 demark special output characters and strings by way of input codes.
148 Predefined strings are escaped with the slash-asterisk,
158 for a complete list. Examples include
167 In non-literal free-form lines, consecutive blocks of whitespace are
168 pruned from input and added later in the output filter, if applicable:
169 .Bd -literal -offset indent
170 These spaces are pruned from input.
177 In macro lines, whitespace delimits arguments and is discarded. If
178 arguments are quoted, whitespace within the quotes is retained.
181 Blank lines are only permitted within literal contexts, as are lines
182 containing only whitespace. Tab characters are only acceptable when
185 or when in a literal context.
189 Macro arguments may be quoted with a double-quote to group
190 space-delimited terms or to retain blocks of whitespace. A quoted
191 argument begins with a double-quote preceded by whitespace. The next
192 double-quote not pair-wise adjacent to another double-quote terminates
193 the literal, regardless of surrounding whitespace.
202 Note that any quoted term, be it argument or macro, is indiscriminately
203 considered literal text. Thus, the following produces
205 .Bd -literal -offset indent
210 In free-form mode, quotes are regarded as opaque text.
213 There are several macros in
215 that require a date argument. The
217 for dates is the American format:
219 .D1 Cm Month Day , Year
223 value is an optionally zero-padded numeral. The
225 value is the full month name. The
227 value is the full four-digit year.
230 .Em non-canonical form
231 is the same as the canonical form, but without the comma between the
239 dates range from only a
241 to the full canonical or non-canonical form.
243 Some examples of valid dates follow:
245 .D1 "May, 2009" Pq reduced form
246 .D1 "2009" Pq reduced form
247 .D1 "May 20, 2009" Pq canonical form
248 .D1 "May 20 2009" Pq non-canonical form
251 Many macros support scaled widths for their arguments, such as
252 stipulating a two-inch list indentation with the following:
253 .Bd -literal -offset indent
258 The syntax for scaled widths is
259 .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
260 where a decimal must be preceded or proceeded by at least one digit.
261 Negative numbers, while accepted, are truncated to zero. The following
262 scaling units are accepted:
264 .Bl -tag -width Ds -offset indent -compact
277 default vertical span
289 default horizontal span
294 Using anything other than
300 is necessarily non-portable across output media. See
307 document consists of a document prologue followed by one or more
310 The prologue, which consists of (in order) the
315 macros, is required for every document.
317 The first section (sections are denoted by
319 must be the NAME section, consisting of at least one
324 Following that, convention dictates specifying at least the SYNOPSIS and
325 DESCRIPTION sections, although this varies between manual sections.
327 The following is a well-formed skeleton
330 .Bd -literal -offset indent
337 \&.Nd a description goes here
338 \&.\e\*q The next is for sections 2 & 3 only.
349 utility processes files ...
350 \&.\e\*q .Sh IMPLEMENTATION NOTES
351 \&.\e\*q The next is for sections 1 & 8 only.
352 \&.\e\*q .Sh EXIT STATUS
353 \&.\e\*q The next is for sections 2, 3, & 9 only.
354 \&.\e\*q .Sh RETURN VALUES
355 \&.\e\*q The next is for sections 1, 6, 7, & 8 only.
356 \&.\e\*q .Sh ENVIRONMENT
358 \&.\e\*q .Sh EXAMPLES
359 \&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only.
360 \&.\e\*q .Sh DIAGNOSTICS
361 \&.\e\*q The next is for sections 2, 3, & 9 only.
363 \&.\e\*q .Sh SEE ALSO
364 \&.\e\*q .Xr foobar 1
365 \&.\e\*q .Sh STANDARDS
370 \&.\e\*q .Sh SECURITY CONSIDERATIONS
375 document are conventionally ordered as they appear above. Sections
376 should be composed as follows:
377 .Bl -tag -width Ds -offset Ds
379 Must contain at least one
383 The name needs re-stating since one
385 documents can be used for more than one utility or function, such as
387 also being referenced as
394 .It IMPLEMENTATION NOTES
408 .It SECURITY CONSIDERATIONS
413 Macros are one to three three characters in length and begin with a
416 at the beginning of the line. An arbitrary amount of whitespace may
417 sit between the control character and the macro name. Thus, the
418 following are equivalent:
419 .Bd -literal -offset indent
425 The syntax of a macro depends on its classification. In this section,
427 refers to macro arguments, which may be followed by zero or more
431 opens the scope of a macro; and if specified,
438 column indicates that the macro may be called subsequent to the initial
439 line-macro. If a macro is not callable, then its invocation after the
440 initial line macro is interpreted as opaque text, such that
448 column indicates whether the macro may be followed by further
449 (ostensibly callable) macros. If a macro is not parsable, subsequent
450 macro invocations on the line will be interpreted as opaque text.
455 column, if applicable, describes closure rules.
458 .Ss Block full-explicit
459 Multi-line scope closed by an explicit closing macro. All macros
460 contains bodies; only
463 .Bd -literal -offset indent
464 \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
470 .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXX"
471 .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
472 .It Sx \&Bd Ta \&No Ta \&No Ta closed by Sx \&Ed
473 .It Sx \&Bf Ta \&No Ta \&No Ta closed by Sx \&Ef
474 .It Sx \&Bk Ta \&No Ta \&No Ta closed by Sx \&Ek
475 .It Sx \&Bl Ta \&No Ta \&No Ta closed by Sx \&El
476 .It Sx \&Ed Ta \&No Ta \&No Ta opened by Sx \&Bd
477 .It Sx \&Ef Ta \&No Ta \&No Ta opened by Sx \&Bf
478 .It Sx \&Ek Ta \&No Ta \&No Ta opened by Sx \&Bk
479 .It Sx \&El Ta \&No Ta \&No Ta opened by Sx \&Bl
483 .Ss Block full-implicit
484 Multi-line scope closed by end-of-file or implicitly by another macro.
485 All macros have bodies; some
493 don't have heads; only one
498 .Bd -literal -offset indent
499 \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
504 .Bl -column -compact -offset indent "MacroX" "CallableX" "ParsableX" "closed by XXXXXXXXXXX"
505 .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
506 .It Sx \&It Ta \&No Ta Yes Ta closed by Sx \&It , Sx \&El
507 .It Sx \&Nd Ta \&No Ta \&No Ta closed by Sx \&Sh
508 .It Sx \&Sh Ta \&No Ta \&No Ta closed by Sx \&Sh
509 .It Sx \&Ss Ta \&No Ta \&No Ta closed by Sx \&Sh , Sx \&Ss
513 .Ss Block partial-explicit
514 Like block full-explicit, but also with single-line scope. Each
515 has at least a body and, in limited circumstances, a head
522 .Bd -literal -offset indent
523 \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
525 \&.Yc \(lBtail...\(rB
527 \&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
528 \(lBbody...\(rB \&Yc \(lBtail...\(rB
532 .Bl -column "MacroX" "CallableX" "ParsableX" "closed by XXXX" -compact -offset indent
533 .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Scope
534 .It Sx \&Ac Ta Yes Ta Yes Ta opened by Sx \&Ao
535 .It Sx \&Ao Ta Yes Ta Yes Ta closed by Sx \&Ac
536 .It Sx \&Bc Ta Yes Ta Yes Ta closed by Sx \&Bo
537 .It Sx \&Bo Ta Yes Ta Yes Ta opened by Sx \&Bc
538 .It Sx \&Brc Ta Yes Ta Yes Ta opened by Sx \&Bro
539 .It Sx \&Bro Ta Yes Ta Yes Ta closed by Sx \&Brc
540 .It Sx \&Dc Ta Yes Ta Yes Ta opened by Sx \&Do
541 .It Sx \&Do Ta Yes Ta Yes Ta closed by Sx \&Dc
542 .It Sx \&Ec Ta Yes Ta Yes Ta opened by Sx \&Eo
543 .It Sx \&Eo Ta Yes Ta Yes Ta closed by Sx \&Ec
544 .It Sx \&Fc Ta Yes Ta Yes Ta opened by Sx \&Fo
545 .It Sx \&Fo Ta \&No Ta \&No Ta closed by Sx \&Fc
546 .It Sx \&Oc Ta Yes Ta Yes Ta closed by Sx \&Oo
547 .It Sx \&Oo Ta Yes Ta Yes Ta opened by Sx \&Oc
548 .It Sx \&Pc Ta Yes Ta Yes Ta closed by Sx \&Po
549 .It Sx \&Po Ta Yes Ta Yes Ta opened by Sx \&Pc
550 .It Sx \&Qc Ta Yes Ta Yes Ta opened by Sx \&Oo
551 .It Sx \&Qo Ta Yes Ta Yes Ta closed by Sx \&Oc
552 .It Sx \&Re Ta \&No Ta \&No Ta opened by Sx \&Rs
553 .It Sx \&Rs Ta \&No Ta \&No Ta closed by Sx \&Re
554 .It Sx \&Sc Ta Yes Ta Yes Ta opened by Sx \&So
555 .It Sx \&So Ta Yes Ta Yes Ta closed by Sx \&Sc
556 .It Sx \&Xc Ta Yes Ta Yes Ta opened by Sx \&Xo
557 .It Sx \&Xo Ta Yes Ta Yes Ta closed by Sx \&Xc
561 .Ss Block partial-implicit
562 Like block full-implicit, but with single-line scope closed by
563 .Sx Reserved Characters
565 .Bd -literal -offset indent
566 \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
570 .Bl -column "MacroX" "CallableX" "ParsableX" -compact -offset indent
571 .It Em Macro Ta Em Callable Ta Em Parsable
572 .It Sx \&Aq Ta Yes Ta Yes
573 .It Sx \&Bq Ta Yes Ta Yes
574 .It Sx \&Brq Ta Yes Ta Yes
575 .It Sx \&D1 Ta \&No Ta \&Yes
576 .It Sx \&Dl Ta \&No Ta Yes
577 .It Sx \&Dq Ta Yes Ta Yes
578 .It Sx \&Op Ta Yes Ta Yes
579 .It Sx \&Pq Ta Yes Ta Yes
580 .It Sx \&Ql Ta Yes Ta Yes
581 .It Sx \&Qq Ta Yes Ta Yes
582 .It Sx \&Sq Ta Yes Ta Yes
588 .Sx Reserved Characters ,
589 end of line, fixed argument lengths, and/or subsequent macros. In-line
590 macros have only text children. If a number (or inequality) of
593 then the macro accepts an arbitrary number of arguments.
594 .Bd -literal -offset indent
595 \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lbres...\(rb
597 \&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
599 \&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
603 .Bl -column "MacroX" "CallableX" "ParsableX" "Arguments" -compact -offset indent
604 .It Em Macro Ta Em Callable Ta Em Parsable Ta Em Arguments
605 .It Sx \&%A Ta \&No Ta \&No Ta >0
606 .It Sx \&%B Ta \&No Ta \&No Ta >0
607 .It Sx \&%C Ta \&No Ta \&No Ta >0
608 .It Sx \&%D Ta \&No Ta \&No Ta >0
609 .It Sx \&%I Ta \&No Ta \&No Ta >0
610 .It Sx \&%J Ta \&No Ta \&No Ta >0
611 .It Sx \&%N Ta \&No Ta \&No Ta >0
612 .It Sx \&%O Ta \&No Ta \&No Ta >0
613 .It Sx \&%P Ta \&No Ta \&No Ta >0
614 .It Sx \&%Q Ta \&No Ta \&No Ta >0
615 .It Sx \&%R Ta \&No Ta \&No Ta >0
616 .It Sx \&%T Ta \&No Ta \&No Ta >0
617 .It Sx \&%U Ta \&No Ta \&No Ta >0
618 .It Sx \&%V Ta \&No Ta \&No Ta >0
619 .It Sx \&Ad Ta Yes Ta Yes Ta n
620 .It Sx \&An Ta Yes Ta Yes Ta n
621 .It Sx \&Ap Ta Yes Ta Yes Ta 0
622 .It Sx \&Ar Ta Yes Ta Yes Ta n
623 .It Sx \&At Ta Yes Ta Yes Ta 1
624 .It Sx \&Bsx Ta Yes Ta Yes Ta n
625 .It Sx \&Bt Ta \&No Ta \&No Ta 0
626 .It Sx \&Bx Ta Yes Ta Yes Ta n
627 .It Sx \&Cd Ta Yes Ta Yes Ta >0
628 .It Sx \&Cm Ta Yes Ta Yes Ta n
629 .It Sx \&Db Ta \&No Ta \&No Ta 1
630 .It Sx \&Dd Ta \&No Ta \&No Ta >0
631 .It Sx \&Dt Ta \&No Ta \&No Ta n
632 .It Sx \&Dv Ta Yes Ta Yes Ta n
633 .It Sx \&Dx Ta Yes Ta Yes Ta n
634 .It Sx \&Em Ta Yes Ta Yes Ta >0
635 .It Sx \&En Ta \&No Ta \&No Ta 0
636 .It Sx \&Er Ta Yes Ta Yes Ta >0
637 .It Sx \&Es Ta \&No Ta \&No Ta 0
638 .It Sx \&Ev Ta Yes Ta Yes Ta n
639 .It Sx \&Ex Ta \&No Ta \&No Ta n
640 .It Sx \&Fa Ta Yes Ta Yes Ta n
641 .It Sx \&Fd Ta \&No Ta \&No Ta >0
642 .It Sx \&Fl Ta Yes Ta Yes Ta n
643 .It Sx \&Fn Ta Yes Ta Yes Ta >0
644 .It Sx \&Fr Ta \&No Ta \&No Ta n
645 .It Sx \&Ft Ta Yes Ta Yes Ta n
646 .It Sx \&Fx Ta Yes Ta Yes Ta n
647 .It Sx \&Hf Ta \&No Ta \&No Ta n
648 .It Sx \&Ic Ta Yes Ta Yes Ta >0
649 .It Sx \&In Ta \&No Ta \&No Ta n
650 .It Sx \&Lb Ta \&No Ta \&No Ta 1
651 .It Sx \&Li Ta Yes Ta Yes Ta n
652 .It Sx \&Lk Ta Yes Ta Yes Ta n
653 .It Sx \&Lp Ta \&No Ta \&No Ta 0
654 .It Sx \&Ms Ta Yes Ta Yes Ta >0
655 .It Sx \&Mt Ta Yes Ta Yes Ta >0
656 .It Sx \&Nm Ta Yes Ta Yes Ta n
657 .It Sx \&No Ta Yes Ta Yes Ta 0
658 .It Sx \&Ns Ta Yes Ta Yes Ta 0
659 .It Sx \&Nx Ta Yes Ta Yes Ta n
660 .It Sx \&Os Ta \&No Ta \&No Ta n
661 .It Sx \&Ot Ta \&No Ta \&No Ta n
662 .It Sx \&Ox Ta Yes Ta Yes Ta n
663 .It Sx \&Pa Ta Yes Ta Yes Ta n
664 .It Sx \&Pf Ta \&No Ta Yes Ta 1
665 .It Sx \&Pp Ta \&No Ta \&No Ta 0
666 .It Sx \&Rv Ta \&No Ta \&No Ta n
667 .It Sx \&Sm Ta \&No Ta \&No Ta 1
668 .It Sx \&St Ta \&No Ta Yes Ta 1
669 .It Sx \&Sx Ta Yes Ta Yes Ta >0
670 .It Sx \&Sy Ta Yes Ta Yes Ta >0
671 .It Sx \&Tn Ta Yes Ta Yes Ta >0
672 .It Sx \&Ud Ta \&No Ta \&No Ta 0
673 .It Sx \&Ux Ta Yes Ta Yes Ta n
674 .It Sx \&Va Ta Yes Ta Yes Ta n
675 .It Sx \&Vt Ta Yes Ta Yes Ta >0
676 .It Sx \&Xr Ta Yes Ta Yes Ta >0, <3
677 .It Sx \&br Ta \&No Ta \&No Ta 0
678 .It Sx \&sp Ta \&No Ta \&No Ta 1
683 This section is a canonical reference of all macros, arranged
684 alphabetically. For the scoping of individual macros, see
690 block. Multiple authors should each be accorded their own
692 line. Author names should be ordered with full or abbreviated
693 forename(s) first, then full surname.
698 block. This macro may also be used in a non-bibliographic context when
699 referring to book titles.
702 Publication city or location of an
707 this macro is not implemented in
711 Publication date of an
713 block. This should follow the reduced syntax for
715 Canonical or non-canonical form is not necessary since publications are
716 often referenced only by year, or month and year.
719 Publisher or issuer name of an
729 Issue number (usually for journals) of an
734 Optional information of an
739 Book or journal page number of an
744 Institutional author (school, government, etc.) of an
746 block. Multiple institutional authors should each be accorded their own
751 Technical report name of an
758 block. This macro may also be used in a non-bibliographical context
759 when referring to article titles.
762 URI of current document.
772 block. Does not have any tail arguments.
775 Address construct: usually in the context of an computational address in
776 memory, not a physical (post) address.
779 .Bd -literal -offset indent
785 Author name. This macro may alternatively accepts the following
786 arguments, although these may not be specified along with a parameter:
787 .Bl -tag -width 12n -offset indent
789 Renders a line break before each author listing.
795 In the AUTHORS section, the default is not to split the first author
796 listing, but all subsequent author listings, whether or not they're
797 interspersed by other macros or text, are split. Thus, specifying
799 will cause the first listing also to be split. If not in the AUTHORS
800 section, the default is not to split.
803 .Bd -literal -offset indent
805 \&.An J. E. Hopcraft ,
814 are re-set when entering the AUTHORS section, so if one specifies
816 in the general document body, it must be re-specified in the AUTHORS
820 Begins a block enclosed by angled brackets. Does not have any head
824 .Bd -literal -offset indent
825 \&.Fl -key= Ns Ao Ar val Ac
832 Inserts an apostrophe without any surrounding white-space. This is
833 generally used as a grammatic device when referring to the verb form of
835 .Bd -literal -offset indent
840 Encloses its arguments in angled brackets.
843 .Bd -literal -offset indent
844 \&.Fl -key= Ns Aq Ar val
848 this macro is often abused for rendering URIs, which should instead use
852 or to note pre-processor
854 statements, which should use
861 Command arguments. If an argument is not provided, the string
863 is used as a default.
866 .Bd -literal -offset indent
873 Formats an AT&T version. Accepts at most one parameter:
874 .Bl -tag -width 12n -offset indent
883 Note that these parameters do not begin with a hyphen.
886 .Bd -literal -offset indent
904 block. Does not have any tail arguments.
907 Begins a display block. A display is collection of macros or text which
908 may be collectively offset or justified in a manner different from that
909 of the enclosing context. By default, the block is preceded by a
912 Each display is associated with a type, which must be one of the
914 .Bl -tag -width 12n -offset indent
916 Only left-justify the block.
918 Do not justify the block at all.
920 Left- and right-justify the block.
925 Centre-justify each line.
928 The type must be provided first. Secondary arguments are as follows:
929 .Bl -tag -width 12n -offset indent
930 .It Fl offset Ar width
931 Offset by the value of
933 which is interpreted as one of the following, specified in order:
936 As one of the pre-defined strings
938 the width of standard indentation;
943 which has no effect ;
945 which justifies to the right margin; and
947 which aligns around an imagined centre axis.
949 As a precalculated width for a named macro. The most popular is the
955 As a scaling unit following the syntax described in
958 As the calculated string length of the opaque string.
961 If unset, it will revert to the value of
966 Do not assert a vertical space before the block.
970 before any text or macros within the block.
974 .Bd -literal -offset indent
975 \&.Bd \-unfilled \-offset two-indent \-compact
990 Begins a block enclosed by square brackets. Does not have any head
994 .Bd -literal -offset indent
1003 Encloses its arguments in square brackets.
1006 .Bd -literal -offset indent
1011 this macro is sometimes abused to emulate optional arguments for
1012 commands; the correct macros to use for this purpose are
1024 block. Does not have any tail arguments.
1027 Begins a block enclosed by curly braces. Does not have any head
1031 .Bd -literal -offset indent
1040 Encloses its arguments in curly braces.
1043 .Bd -literal -offset indent
1044 \&.Brq 1 , ... , Va n
1051 Format the BSD/OS version provided as an argument, or a default value if
1052 no argument is provided.
1055 .Bd -literal -offset indent
1072 .Dq is currently in beta test.
1075 Format the BSD version provided as an argument, or a default value if no
1076 argument is provided.
1079 .Bd -literal -offset indent
1095 Configuration declaration (suggested for use only in section four
1096 manuals). This denotes strings accepted by
1100 .Bd -literal -offset indent
1101 \&.Cd device le0 at scode?
1105 this macro is commonly abused by using quoted literals to retain
1106 white-space and align consecutive
1108 declarations. This practise is discouraged.
1111 Command modifiers. Useful when specifying configuration options or
1115 .Bd -literal -offset indent
1124 One-line indented display. This is formatted by the default rules and
1125 is useful for simple indented statements. It is followed by a newline.
1128 .Bd -literal -offset indent
1141 block. Does not have any tail arguments.
1144 Document date. This is the mandatory first macro of any
1146 manual. Its calling syntax is as follows:
1148 .D1 \. Ns Sx \&Dd Cm date
1154 which signifies the current manual revision date dictated by
1156 or instead a valid canonical date as specified by
1160 .Bd -literal -offset indent
1162 \&.Dd $\&Mdocdate: July 21 2007$
1172 One-line intended display. This is formatted as literal text and is
1173 useful for commands and invocations. It is followed by a newline.
1176 .Bd -literal -offset indent
1177 \&.Dl % mandoc mdoc.7 | less
1186 Begins a block enclosed by double quotes. Does not have any head
1190 .Bd -literal -offset indent
1191 \&.D1 Do April is the cruellest month Dc \e(em T.S. Eliot
1198 Encloses its arguments in double quotes.
1201 .Bd -literal -offset indent
1202 \&.Dq April is the cruellest month
1210 Document title. This is the mandatory second macro of any
1212 file. Its calling syntax is as follows:
1214 .D1 \. Ns Sx \&Dt Cm title section Op Cm volume | arch
1216 Its arguments are as follows:
1217 .Bl -tag -width Ds -offset Ds
1219 The document's title (name). This should be capitalised and is
1222 The manual section. This may be one of
1230 .Pq Perl libraries ,
1240 .Pq system utilities ,
1242 .Pq kernel functions ,
1244 .Pq X Window System ,
1246 .Pq X Window System ,
1256 It is also required and should correspond to the manual's filename
1259 This overrides the volume inferred from
1261 This field is optional, and if specified, must be one of
1263 .Pq users' supplementary documents ,
1265 .Pq programmers' supplementary documents ,
1267 .Pq administrators' supplementary documents ,
1269 .Pq system managers' manuals ,
1271 .Pq users' reference manuals ,
1273 .Pq programmers' reference manuals ,
1275 .Pq kernel manuals ,
1286 .Pq contributed manuals .
1288 This specifies a specific relevant architecture. If
1290 is not provided, it may be used in its place, else it may be used
1291 subsequent that. It, too, is optional. It must be one of
1322 .Bd -literal -offset indent
1335 Defined variables such as preprocessor constants.
1338 .Bd -literal -offset indent
1347 Format the DragonFlyBSD version provided as an argument, or a default
1348 value if no argument is provided.
1351 .Bd -literal -offset indent
1372 Denotes text that should be emphasised. Note that this is a
1373 presentation term and should not be used for stylistically decorating
1377 .Bd -literal -offset indent
1385 Error constants (suggested for use only in section two manuals).
1388 .Bd -literal -offset indent
1399 Environmental variables such as those specified in
1403 .Bd -literal -offset indent
1409 Inserts text regarding a utility's exit values. This macro must have
1412 argument specified, then an optional
1416 is not provided, the document's name as stipulated in
1428 Format the FreeBSD version provided as an argument, or a default value
1429 if no argument is provided.
1432 .Bd -literal -offset indent
1462 Format the NetBSD version provided as an argument, or a default value if
1463 no argument is provided.
1466 .Bd -literal -offset indent
1485 Document operating system version. This is the mandatory third macro of
1488 file. Its calling syntax is as follows:
1490 .D1 \. Ns Sx \&Os Op Cm system
1494 parameter specifies the relevant operating system or environment. Left
1495 unspecified, it defaults to the local operating system version. This is
1499 .Bd -literal -offset indent
1514 this macro has been deprecated.
1517 Format the OpenBSD version provided as an argument, or a default value
1518 if no argument is provided.
1521 .Bd -literal -offset indent
1550 block. Does not have any tail arguments.
1553 Begins a bibliographic
1555 block. Does not have any head arguments. The block macro may only
1571 child macros (at least one must be specified).
1574 .Bd -literal -offset indent
1576 \&.%A J. E. Hopcroft
1578 \&.%B Introduction to Automata Theory, Languages, and Computation
1579 \&.%I Addison-Wesley
1580 \&.%C Reading, Massachusettes
1587 block is used within a SEE ALSO section, a vertical space is asserted
1588 before the rendered output, else the block continues on the current
1604 Format the UNIX name. Accepts no argument.
1607 .Bd -literal -offset indent
1631 This section documents compatibility with other roff implementations, at
1632 this time limited to
1636 refers to those versions before the
1639 .Pq somewhere between 1.15 and 1.19 .
1644 Negative scaling units are now truncated to zero instead of creating
1645 interesting conditions, such as with
1649 scaling unit, while accepted, is rendered as the default unit.
1651 In quoted literals, groff allowed pair-wise double-quotes to produce a
1652 standalone double-quote in formatted output. This idiosyncratic
1653 behaviour is no longer applicable.
1663 argument is ignored. Since text is not right-justified,
1672 Blocks of whitespace are stripped from both macro and free-form text
1673 lines (except when in literal mode), while groff would retain whitespace
1674 in free-form text lines.
1676 Historic groff has many un-callable macros. Most of these (excluding
1677 some block-level macros) are now callable, conforming to the
1678 non-historic groff version.
1684 but is a proper delimiter in this implementation.
1687 is assumed for all lists (it wasn't in historic groff): any list may be
1690 lists will restart the sequence only for the sub-list.
1694 incorrectly by following it with a reserved character and expecting the
1695 delimiter to render. This is not supported.
1699 macro only produces the first parameter. This is no longer the case.
1711 reference was written by
1712 .An Kristaps Dzonsons Aq kristaps@kth.se .
1714 .\" XXX: this really isn't the place for these caveats.
1718 .\" There are many ambiguous parts of mdoc.
1721 .\" .Bl -dash -compact
1726 .\" as function arguments are variables.
1731 .\" as function return types are still types. Furthermore, the
1733 .\" should be removed and
1735 .\" which ostensibly follows it, should follow the same convention as
1739 .\" should formalise that only one or two arguments are acceptable: a
1740 .\" variable name and optional, preceding type.
1743 .\" is ambiguous. It's commonly used to indicate an include file in the
1744 .\" synopsis section.
1746 .\" should be used, instead.
1752 .\" makes sense. The remaining ones should be removed.
1758 .\" macros should be deprecated.
1762 .\" macro lacks clarity. It should be absolutely clear which title will
1763 .\" render when formatting the manual page.
1767 .\" should be provided for Linux (\(`a la
1772 .\" There's no way to refer to references in
1776 .\" The \-split and \-nosplit dictates via
1778 .\" are re-set when entering and leaving the AUTHORS section.