rename amd64 architecture to x86_64
[dragonfly.git] / usr.bin / mandoc / mdoc.7
CommitLineData
cbce6d97 1.\" $Id: mdoc.7,v 1.18 2009/10/27 21:40:07 schwarze Exp $
589e7c1d
SW
2.\"
3.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
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.\"
cbce6d97 17.Dd October 29, 2009
589e7c1d
SW
18.Dt MDOC 7
19.Os
20.
21.
22.Sh NAME
23.Nm mdoc
24.Nd mdoc language reference
25.
26.
27.Sh DESCRIPTION
28The
29.Nm mdoc
30language is used to format
31.Bx
32.Ux
33manuals. In this reference document, we describe its syntax, structure,
34and usage. Our reference implementation is
35.Xr mandoc 1 .
36The
37.Sx COMPATIBILITY
38section describes compatibility with
39.Xr groff 1 .
40.
41.Pp
42An
43.Nm
44document follows simple rules: lines beginning with the control
45character
46.Sq \.
47are parsed for macros. Other lines are interpreted within the scope of
48prior macros:
49.Bd -literal -offset indent
50\&.Sh Macro lines change control state.
51Other lines are interpreted within the current state.
52.Ed
53.
54.
55.Sh LANGUAGE SYNTAX
56.Nm
57documents may contain only graphable 7-bit ASCII characters, the space
58character, and, in certain circumstances, the tab character. All
59manuals must have
60.Ux
61line terminators.
62.
63.
64.Ss Comments
65Text following a
66.Sq \e" ,
67whether in a macro or free-form text line, is ignored to the end of
68line. A macro line with only a control character and comment escape,
69.Sq \&.\e" ,
70is also ignored. Macro lines with only a control charater and optionally
71whitespace are stripped from input.
72.
73.
74.Ss Reserved Characters
75Within a macro line, the following characters are reserved:
76.Pp
77.Bl -tag -width Ds -offset indent -compact
78.It \&.
79.Pq period
80.It \&,
81.Pq comma
82.It \&:
83.Pq colon
84.It \&;
85.Pq semicolon
86.It \&(
87.Pq left-parenthesis
88.It \&)
89.Pq right-parenthesis
90.It \&[
91.Pq left-bracket
92.It \&]
93.Pq right-bracket
94.It \&?
95.Pq question
96.It \&!
97.Pq exclamation
98.It \&|
99.Pq vertical bar
100.El
101.
102.Pp
103Use of reserved characters is described in
104.Sx MACRO SYNTAX .
105For general use in macro lines, these characters must either be escaped
106with a non-breaking space
107.Pq Sq \e&
108or, if applicable, an appropriate escape sequence used.
109.
110.
111.Ss Special Characters
112Special characters may occur in both macro and free-form lines.
113Sequences begin with the escape character
114.Sq \e
115followed by either an open-parenthesis
116.Sq \&(
117for two-character sequences; an open-bracket
118.Sq \&[
119for n-character sequences (terminated at a close-bracket
120.Sq \&] ) ;
121or a single one-character sequence. See
122.Xr mandoc_char 7
123for a complete list. Examples include
124.Sq \e(em
125.Pq em-dash
126and
127.Sq \ee
128.Pq back-slash .
129.
130.
131.Ss Text Decoration
132Terms may be text-decorated using the
133.Sq \ef
134escape followed by an indicator: B (bold), I, (italic), or P and R
135(Roman, or reset). This form is not recommended for
136.Nm ,
137which encourages semantic, not presentation, annotation.
138.
139.
140.Ss Predefined Strings
141Historically,
142.Xr groff 1
143also defined a set of package-specific
144.Dq predefined strings ,
145which, like
146.Sx Special Characters ,
147demark special output characters and strings by way of input codes.
148Predefined strings are escaped with the slash-asterisk,
149.Sq \e* :
150single-character
151.Sq \e*X ,
152two-character
153.Sq \e*(XX ,
154and N-character
155.Sq \e*[N] .
156See
157.Xr mandoc_char 7
158for a complete list. Examples include
159.Sq \e*(Am
160.Pq ampersand
161and
162.Sq \e*(Ba
163.Pq vertical bar .
164.
165.
166.Ss Whitespace
167In non-literal free-form lines, consecutive blocks of whitespace are
168pruned from input and added later in the output filter, if applicable:
169.Bd -literal -offset indent
170These spaces are pruned from input.
171\&.Bd \-literal
172These are not.
173\&.Ed
174.Ed
175.
176.Pp
177In macro lines, whitespace delimits arguments and is discarded. If
178arguments are quoted, whitespace within the quotes is retained.
179.
180.Pp
181Blank lines are only permitted within literal contexts, as are lines
182containing only whitespace. Tab characters are only acceptable when
183delimiting
184.Sq \&Bl \-column
185or when in a literal context.
186.
187.
188.Ss Quotation
189Macro arguments may be quoted with a double-quote to group
190space-delimited terms or to retain blocks of whitespace. A quoted
191argument begins with a double-quote preceded by whitespace. The next
192double-quote not pair-wise adjacent to another double-quote terminates
193the literal, regardless of surrounding whitespace.
194.
195.Pp
196This produces tokens
197.Sq a" ,
198.Sq b c ,
199.Sq de ,
200and
201.Sq fg" .
202Note that any quoted term, be it argument or macro, is indiscriminately
203considered literal text. Thus, the following produces
204.Sq \&Em a :
205.Bd -literal -offset indent
206\&.Em "Em a"
207.Ed
208.
209.Pp
210In free-form mode, quotes are regarded as opaque text.
211.
212.Ss Dates
213There are several macros in
214.Nm
215that require a date argument. The
216.Em canonical form
217for dates is the American format:
218.Pp
219.D1 Cm Month Day , Year
220.Pp
221The
222.Cm Day
223value is an optionally zero-padded numeral. The
224.Cm Month
225value is the full month name. The
226.Cm Year
227value is the full four-digit year.
228.Pp
229The
230.Em non-canonical form
231is the same as the canonical form, but without the comma between the
232.Cm Day
233and
234.Cm Year
235field.
236.Pp
237Lastly,
238.Em reduced form
239dates range from only a
240.Cm Year
241to the full canonical or non-canonical form.
242.Pp
243Some examples of valid dates follow:
244.Pp
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
249.
250.Ss Scaling Widths
251Many macros support scaled widths for their arguments, such as
252stipulating a two-inch list indentation with the following:
253.Bd -literal -offset indent
254\&.Bl -tag -width 2i
255.Ed
256.
257.Pp
258The syntax for scaled widths is
259.Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
260where a decimal must be preceded or proceeded by at least one digit.
261Negative numbers, while accepted, are truncated to zero. The following
262scaling units are accepted:
263.Pp
264.Bl -tag -width Ds -offset indent -compact
265.It c
266centimetre
267.It i
268inch
269.It P
270pica (~1/6 inch)
271.It p
272point (~1/72 inch)
273.It f
274synonym for
275.Sq u
276.It v
277default vertical span
278.It m
279width of rendered
280.Sq m
281.Pq em
282character
283.It n
284width of rendered
285.Sq n
286.Pq en
287character
288.It u
289default horizontal span
290.It M
291mini-em (~1/100 em)
292.El
293.Pp
294Using anything other than
295.Sq m ,
296.Sq n ,
297.Sq u ,
298or
299.Sq v
300is necessarily non-portable across output media. See
301.Sx COMPATIBILITY .
302.
303.
304.Sh MANUAL STRUCTURE
305A well-formed
306.Nm
307document consists of a document prologue followed by one or more
308sections.
309.Pp
310The prologue, which consists of (in order) the
311.Sx \&Dd ,
312.Sx \&Dt ,
313and
314.Sx \&Os
315macros, is required for every document.
316.Pp
317The first section (sections are denoted by
318.Sx \&Sh )
319must be the NAME section, consisting of at least one
320.Sx \&Nm
321followed by
322.Sx \&Nd .
323.Pp
324Following that, convention dictates specifying at least the SYNOPSIS and
325DESCRIPTION sections, although this varies between manual sections.
326.Pp
327The following is a well-formed skeleton
328.Nm
329file:
330.Bd -literal -offset indent
331\&.Dd $\&Mdocdate$
332\&.Dt mdoc 7
333\&.Os
334\&.
335\&.Sh NAME
336\&.Nm foo
337\&.Nd a description goes here
338\&.\e\*q The next is for sections 2 & 3 only.
339\&.\e\*q .Sh LIBRARY
340\&.
341\&.Sh SYNOPSIS
342\&.Nm foo
343\&.Op Fl options
344\&.Ar
345\&.
346\&.Sh DESCRIPTION
347The
348\&.Nm
349utility 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
357\&.\e\*q .Sh FILES
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.
362\&.\e\*q .Sh ERRORS
363\&.\e\*q .Sh SEE ALSO
364\&.\e\*q .Xr foobar 1
365\&.\e\*q .Sh STANDARDS
366\&.\e\*q .Sh HISTORY
367\&.\e\*q .Sh AUTHORS
368\&.\e\*q .Sh CAVEATS
369\&.\e\*q .Sh BUGS
370\&.\e\*q .Sh SECURITY CONSIDERATIONS
371.Ed
372.Pp
373The sections in a
374.Nm
375document are conventionally ordered as they appear above. Sections
376should be composed as follows:
377.Bl -tag -width Ds -offset Ds
378.It NAME
379Must contain at least one
380.Sx \&Nm
381followed by
382.Sx \&Nd .
383The name needs re-stating since one
384.Nm
385documents can be used for more than one utility or function, such as
386.Xr grep 1
387also being referenced as
388.Xr egrep 1
389and
390.Xr fgrep 1 .
391.It LIBRARY
392.It SYNOPSIS
393.It DESCRIPTION
394.It IMPLEMENTATION NOTES
395.It EXIT STATUS
396.It RETURN VALUES
397.It ENVIRONMENT
398.It FILES
399.It EXAMPLES
400.It DIAGNOSTICS
401.It ERRORS
402.It SEE ALSO
403.It STANDARDS
404.It HISTORY
405.It AUTHORS
406.It CAVEATS
407.It BUGS
408.It SECURITY CONSIDERATIONS
409.El
410.
411.
412.Sh MACRO SYNTAX
413Macros are one to three three characters in length and begin with a
414control character ,
415.Sq \&. ,
416at the beginning of the line. An arbitrary amount of whitespace may
417sit between the control character and the macro name. Thus, the
418following are equivalent:
419.Bd -literal -offset indent
420\&.Pp
421\&.\ \ \ \&Pp
422.Ed
423.
424.Pp
425The syntax of a macro depends on its classification. In this section,
426.Sq \-arg
427refers to macro arguments, which may be followed by zero or more
428.Sq parm
429parameters;
430.Sq \&Yo
431opens the scope of a macro; and if specified,
432.Sq \&Yc
433closes it out.
434.
435.Pp
436The
437.Em Callable
438column indicates that the macro may be called subsequent to the initial
439line-macro. If a macro is not callable, then its invocation after the
440initial line macro is interpreted as opaque text, such that
441.Sq \&.Fl \&Sh
442produces
443.Sq Fl \&Sh .
444.
445.Pp
446The
447.Em Parsable
448column indicates whether the macro may be followed by further
449(ostensibly callable) macros. If a macro is not parsable, subsequent
450macro invocations on the line will be interpreted as opaque text.
451.
452.Pp
453The
454.Em Scope
455column, if applicable, describes closure rules.
456.
457.
458.Ss Block full-explicit
459Multi-line scope closed by an explicit closing macro. All macros
460contains bodies; only
461.Sx \&Bf
462contains a head.
463.Bd -literal -offset indent
464\&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
465\(lBbody...\(rB
466\&.Yc
467.Ed
468.
469.Pp
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
480.El
481.
482.
483.Ss Block full-implicit
484Multi-line scope closed by end-of-file or implicitly by another macro.
485All macros have bodies; some
486.Po
487.Sx \&It Fl bullet ,
488.Fl hyphen ,
489.Fl dash ,
490.Fl enum ,
491.Fl item
492.Pc
493don't have heads; only one
494.Po
495.Sx \&It Fl column
496.Pc
497has multiple heads.
498.Bd -literal -offset indent
499\&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB
500\(lBbody...\(rB
501.Ed
502.
503.Pp
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
510.El
511.
512.
513.Ss Block partial-explicit
514Like block full-explicit, but also with single-line scope. Each
515has at least a body and, in limited circumstances, a head
516.Po
517.Sx \&Fo ,
518.Sx \&Eo
519.Pc
520and/or tail
521.Pq Sx \&Ec .
522.Bd -literal -offset indent
523\&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB
524\(lBbody...\(rB
525\&.Yc \(lBtail...\(rB
526
527\&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \
528\(lBbody...\(rB \&Yc \(lBtail...\(rB
529.Ed
530.
531.Pp
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
558.El
559.
560.
561.Ss Block partial-implicit
562Like block full-implicit, but with single-line scope closed by
563.Sx Reserved Characters
564or end of line.
565.Bd -literal -offset indent
566\&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB
567.Ed
568.
569.Pp
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
583.El
584.
585.
586.Ss In-line
587Closed by
588.Sx Reserved Characters ,
589end of line, fixed argument lengths, and/or subsequent macros. In-line
590macros have only text children. If a number (or inequality) of
591arguments is
592.Pq n ,
593then the macro accepts an arbitrary number of arguments.
594.Bd -literal -offset indent
595\&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lbres...\(rb
596
597\&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc...
598
599\&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN
600.Ed
601.
602.Pp
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
cbce6d97 614.It Sx \&%Q Ta \&No Ta \&No Ta >0
589e7c1d
SW
615.It Sx \&%R Ta \&No Ta \&No Ta >0
616.It Sx \&%T Ta \&No Ta \&No Ta >0
cbce6d97 617.It Sx \&%U Ta \&No Ta \&No Ta >0
589e7c1d
SW
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
679.El
680.
681.
682.Sh REFERENCE
683This section is a canonical reference of all macros, arranged
684alphabetically. For the scoping of individual macros, see
685.Sx MACRO SYNTAX .
686.
687.Ss \&%A
688Author name of an
689.Sx \&Rs
690block. Multiple authors should each be accorded their own
691.Sx \%%A
692line. Author names should be ordered with full or abbreviated
693forename(s) first, then full surname.
694.
695.Ss \&%B
696Book title of an
697.Sx \&Rs
698block. This macro may also be used in a non-bibliographic context when
699referring to book titles.
700.
701.Ss \&%C
702Publication city or location of an
703.Sx \&Rs
704block.
705.Pp
706.Em Remarks :
707this macro is not implemented in
708.Xr groff 1 .
709.
710.Ss \&%D
711Publication date of an
712.Sx \&Rs
713block. This should follow the reduced syntax for
714.Sx Dates .
715Canonical or non-canonical form is not necessary since publications are
716often referenced only by year, or month and year.
717.
718.Ss \&%I
719Publisher or issuer name of an
720.Sx \&Rs
721block.
722.
723.Ss \&%J
724Journal name of an
725.Sx \&Rs
726block.
727.
728.Ss \&%N
729Issue number (usually for journals) of an
730.Sx \&Rs
731block.
732.
733.Ss \&%O
734Optional information of an
735.Sx \&Rs
736block.
737.
738.Ss \&%P
739Book or journal page number of an
740.Sx \&Rs
741block.
742.
743.Ss \&%Q
744Institutional author (school, government, etc.) of an
745.Sx \&Rs
746block. Multiple institutional authors should each be accorded their own
747.Sx \&%Q
748line.
749.
750.Ss \&%R
751Technical report name of an
752.Sx \&Rs
753block.
754.
755.Ss \&%T
756Article title of an
757.Sx \&Rs
758block. This macro may also be used in a non-bibliographical context
759when referring to article titles.
760.
cbce6d97
SW
761.Ss \&%U
762URI of reference document.
763.
589e7c1d
SW
764.Ss \&%V
765Volume number of an
766.Sx \&Rs
767block.
768.
769.Ss \&Ac
770Closes an
771.Sx \&Ao
772block. Does not have any tail arguments.
773.
774.Ss \&Ad
775Address construct: usually in the context of an computational address in
776memory, not a physical (post) address.
777.Pp
778Examples:
779.Bd -literal -offset indent
780\&.Ad [0,$]
781\&.Ad 0x00000000
782.Ed
783.
784.Ss \&An
785Author name. This macro may alternatively accepts the following
786arguments, although these may not be specified along with a parameter:
787.Bl -tag -width 12n -offset indent
788.It Fl split
789Renders a line break before each author listing.
790.It Fl nosplit
791The opposite of
792.Fl split .
793.El
794.Pp
795In the AUTHORS section, the default is not to split the first author
796listing, but all subsequent author listings, whether or not they're
797interspersed by other macros or text, are split. Thus, specifying
798.Fl split
799will cause the first listing also to be split. If not in the AUTHORS
800section, the default is not to split.
801.Pp
802Examples:
803.Bd -literal -offset indent
804\&.An -nosplit
805\&.An J. E. Hopcraft ,
806\&.An J. D. Ullman .
807.Ed
808.Pp
809.Em Remarks :
810the effects of
811.Fl split
812or
813.Fl nosplit
814are re-set when entering the AUTHORS section, so if one specifies
815.Sx \&An Fl nosplit
816in the general document body, it must be re-specified in the AUTHORS
817section.
818.
819.Ss \&Ao
820Begins a block enclosed by angled brackets. Does not have any head
821arguments.
822.Pp
823Examples:
824.Bd -literal -offset indent
825\&.Fl -key= Ns Ao Ar val Ac
826.Ed
827.Pp
828See also
829.Sx \&Aq .
830.
831.Ss \&Ap
832Inserts an apostrophe without any surrounding white-space. This is
833generally used as a grammatic device when referring to the verb form of
834a function:
835.Bd -literal -offset indent
836\&.Fn execve Ap d
837.Ed
838.
839.Ss \&Aq
840Encloses its arguments in angled brackets.
841.Pp
842Examples:
843.Bd -literal -offset indent
844\&.Fl -key= Ns Aq Ar val
845.Ed
846.Pp
847.Em Remarks :
848this macro is often abused for rendering URIs, which should instead use
849.Sx \&Lk
850or
851.Sx \&Mt ,
852or to note pre-processor
853.Dq Li #include
854statements, which should use
855.Sx \&In .
856.Pp
857See also
858.Sx \&Ao .
859.
860.Ss \&Ar
861Command arguments. If an argument is not provided, the string
862.Dq file ...
863is used as a default.
864.Pp
865Examples:
866.Bd -literal -offset indent
867\&.Fl o Ns Ar file1
868\&.Ar
869\&.Ar arg1 , arg2 .
870.Ed
871.
872.Ss \&At
873Formats an AT&T version. Accepts at most one parameter:
874.Bl -tag -width 12n -offset indent
875.It Cm v[1-7] | 32v
876A version of
877.At .
878.It Cm V[.[1-4]]?
879A system version of
880.At .
881.El
882.Pp
883Note that these parameters do not begin with a hyphen.
884.Pp
885Examples:
886.Bd -literal -offset indent
887\&.At
888\&.At V.1
889.Ed
890.Pp
891See also
892.Sx \&Bsx ,
893.Sx \&Bx ,
894.Sx \&Dx ,
895.Sx \&Fx ,
896.Sx \&Nx ,
897.Sx \&Ox ,
898and
899.Sx \&Ux .
900.
901.Ss \&Bc
902Closes a
903.Sx \&Bo
904block. Does not have any tail arguments.
905.
906.Ss \&Bd
907Begins a display block. A display is collection of macros or text which
908may be collectively offset or justified in a manner different from that
909of the enclosing context. By default, the block is preceded by a
910vertical space.
911.Pp
912Each display is associated with a type, which must be one of the
913following arguments:
914.Bl -tag -width 12n -offset indent
915.It Fl ragged
916Only left-justify the block.
917.It Fl unfilled
918Do not justify the block at all.
919.It Fl filled
920Left- and right-justify the block.
921.It Fl literal
922Alias for
923.Fl unfilled .
924.It Fl centered
925Centre-justify each line.
926.El
927.Pp
928The type must be provided first. Secondary arguments are as follows:
929.Bl -tag -width 12n -offset indent
930.It Fl offset Ar width
931Offset by the value of
932.Ar width ,
933which is interpreted as one of the following, specified in order:
934.Bl -item
935.It
936As one of the pre-defined strings
937.Ar indent ,
938the width of standard indentation;
939.Ar indent-two ,
940twice
941.Ar indent ;
942.Ar left ,
943which has no effect ;
944.Ar right ,
945which justifies to the right margin; and
946.Ar center ,
947which aligns around an imagined centre axis.
948.It
949As a precalculated width for a named macro. The most popular is the
950imaginary macro
cbce6d97 951.Ar \&Ds ,
589e7c1d
SW
952which resolves to
953.Ar 6n .
954.It
955As a scaling unit following the syntax described in
956.Sx Scaling Widths .
957.It
958As the calculated string length of the opaque string.
959.El
960.Pp
961If unset, it will revert to the value of
962.Ar 8n
963as described in
964.Sx Scaling Widths .
965.It Fl compact
966Do not assert a vertical space before the block.
967.It Fl file Ar file
968Prepend the file
969.Ar file
970before any text or macros within the block.
971.El
972.Pp
973Examples:
974.Bd -literal -offset indent
975\&.Bd \-unfilled \-offset two-indent \-compact
976 Hello world.
977\&.Ed
978.Ed
979.Pp
980See also
981.Sx \&D1
982and
983.Sx \&Dl .
984.
985.Ss \&Bf
986.Ss \&Bk
987.Ss \&Bl
988.
989.Ss \&Bo
990Begins a block enclosed by square brackets. Does not have any head
991arguments.
992.Pp
993Examples:
994.Bd -literal -offset indent
995\&.Bo 1 ,
996\&.Dv BUFSIZ Bc
997.Ed
998.Pp
999See also
1000.Sx \&Bq .
1001.
1002.Ss \&Bq
1003Encloses its arguments in square brackets.
1004.Pp
1005Examples:
1006.Bd -literal -offset indent
1007\&.Bq 1 , Dv BUFSIZ
1008.Ed
1009.Pp
1010.Em Remarks :
1011this macro is sometimes abused to emulate optional arguments for
1012commands; the correct macros to use for this purpose are
1013.Sx \&Op ,
1014.Sx \&Oo ,
1015and
1016.Sx \&Oc .
1017.Pp
1018See also
1019.Sx \&Bo .
1020.
1021.Ss \&Brc
1022Closes a
1023.Sx \&Bro
1024block. Does not have any tail arguments.
1025.
1026.Ss \&Bro
1027Begins a block enclosed by curly braces. Does not have any head
1028arguments.
1029.Pp
1030Examples:
1031.Bd -literal -offset indent
1032\&.Bro 1 , ... ,
1033\&.Va n Brc
1034.Ed
1035.Pp
1036See also
1037.Sx \&Brq .
1038.
1039.Ss \&Brq
1040Encloses its arguments in curly braces.
1041.Pp
1042Examples:
1043.Bd -literal -offset indent
1044\&.Brq 1 , ... , Va n
1045.Ed
1046.Pp
1047See also
1048.Sx \&Bro .
1049.
1050.Ss \&Bsx
1051Format the BSD/OS version provided as an argument, or a default value if
1052no argument is provided.
1053.Pp
1054Examples:
1055.Bd -literal -offset indent
1056\&.Bsx 1.0
1057\&.Bsx
1058.Ed
1059.Pp
1060See also
1061.Sx \&At ,
1062.Sx \&Bx ,
1063.Sx \&Dx ,
1064.Sx \&Fx ,
1065.Sx \&Nx ,
1066.Sx \&Ox ,
1067and
1068.Sx \&Ux .
1069.
1070.Ss \&Bt
1071Prints
1072.Dq is currently in beta test.
1073.
1074.Ss \&Bx
1075Format the BSD version provided as an argument, or a default value if no
1076argument is provided.
1077.Pp
1078Examples:
1079.Bd -literal -offset indent
1080\&.Bx 4.4
1081\&.Bx
1082.Ed
1083.Pp
1084See also
1085.Sx \&At ,
1086.Sx \&Bsx ,
1087.Sx \&Dx ,
1088.Sx \&Fx ,
1089.Sx \&Nx ,
1090.Sx \&Ox ,
1091and
1092.Sx \&Ux .
1093.
1094.Ss \&Cd
1095Configuration declaration (suggested for use only in section four
1096manuals). This denotes strings accepted by
1097.Xr config 8 .
1098.Pp
1099Examples:
1100.Bd -literal -offset indent
1101\&.Cd device le0 at scode?
1102.Ed
1103.Pp
1104.Em Remarks :
1105this macro is commonly abused by using quoted literals to retain
1106white-space and align consecutive
1107.Sx \&Cd
1108declarations. This practise is discouraged.
1109.
1110.Ss \&Cm
1111Command modifiers. Useful when specifying configuration options or
1112keys.
1113.Pp
1114Examples:
1115.Bd -literal -offset indent
1116\&.Cm ControlPath
1117\&.Cm ControlMaster
1118.Ed
1119.Pp
1120See also
1121.Sx \&Fl .
1122.
1123.Ss \&D1
1124One-line indented display. This is formatted by the default rules and
1125is useful for simple indented statements. It is followed by a newline.
1126.Pp
1127Examples:
1128.Bd -literal -offset indent
1129\&.D1 Fl abcdefgh
1130.Ed
1131.Pp
1132See also
1133.Sx \&Bd
1134and
1135.Sx \&Dl .
1136.
1137.Ss \&Db
1138.Ss \&Dc
1139Closes a
1140.Sx \&Do
1141block. Does not have any tail arguments.
1142.
1143.Ss \&Dd
1144Document date. This is the mandatory first macro of any
1145.Nm
1146manual. Its calling syntax is as follows:
1147.Pp
1148.D1 \. Ns Sx \&Dd Cm date
1149.Pp
1150The
1151.Cm date
1152field may be either
1153.Ar $\&Mdocdate$ ,
1154which signifies the current manual revision date dictated by
1155.Xr cvs 1
1156or instead a valid canonical date as specified by
1157.Sx Dates .
1158.Pp
1159Examples:
1160.Bd -literal -offset indent
1161\&.Dd $\&Mdocdate$
1162\&.Dd $\&Mdocdate: July 21 2007$
1163\&.Dd July 21, 2007
1164.Ed
1165.Pp
1166See also
1167.Sx \&Dt
1168and
1169.Sx \&Os .
1170.
1171.Ss \&Dl
1172One-line intended display. This is formatted as literal text and is
1173useful for commands and invocations. It is followed by a newline.
1174.Pp
1175Examples:
1176.Bd -literal -offset indent
1177\&.Dl % mandoc mdoc.7 | less
1178.Ed
1179.Pp
1180See also
1181.Sx \&Bd
1182and
1183.Sx \&D1 .
1184.
1185.Ss \&Do
1186Begins a block enclosed by double quotes. Does not have any head
1187arguments.
1188.Pp
1189Examples:
1190.Bd -literal -offset indent
1191\&.D1 Do April is the cruellest month Dc \e(em T.S. Eliot
1192.Ed
1193.Pp
1194See also
1195.Sx \&Dq .
1196.
1197.Ss \&Dq
1198Encloses its arguments in double quotes.
1199.Pp
1200Examples:
1201.Bd -literal -offset indent
1202\&.Dq April is the cruellest month
1203\e(em T.S. Eliot
1204.Ed
1205.Pp
1206See also
1207.Sx \&Do .
1208.
1209.Ss \&Dt
1210Document title. This is the mandatory second macro of any
1211.Nm
1212file. Its calling syntax is as follows:
1213.Pp
1214.D1 \. Ns Sx \&Dt Cm title section Op Cm volume | arch
1215.Pp
1216Its arguments are as follows:
1217.Bl -tag -width Ds -offset Ds
1218.It Cm title
1219The document's title (name). This should be capitalised and is
1220required.
1221.It Cm section
1222The manual section. This may be one of
1223.Ar 1
1224.Pq utilities ,
1225.Ar 2
1226.Pq system calls ,
1227.Ar 3
1228.Pq libraries ,
1229.Ar 3p
1230.Pq Perl libraries ,
1231.Ar 4
1232.Pq devices ,
1233.Ar 5
1234.Pq file formats ,
1235.Ar 6
1236.Pq games ,
1237.Ar 7
1238.Pq miscellaneous ,
1239.Ar 8
1240.Pq system utilities ,
1241.Ar 9
1242.Pq kernel functions ,
1243.Ar X11
1244.Pq X Window System ,
1245.Ar X11R6
1246.Pq X Window System ,
1247.Ar unass
1248.Pq unassociated ,
1249.Ar local
1250.Pq local system ,
1251.Ar draft
1252.Pq draft manual ,
1253or
1254.Ar paper
1255.Pq paper .
1256It is also required and should correspond to the manual's filename
1257suffix.
1258.It Cm volume
1259This overrides the volume inferred from
1260.Ar section .
1261This field is optional, and if specified, must be one of
1262.Ar USD
1263.Pq users' supplementary documents ,
1264.Ar PS1
1265.Pq programmers' supplementary documents ,
1266.Ar AMD
1267.Pq administrators' supplementary documents ,
1268.Ar SMM
1269.Pq system managers' manuals ,
1270.Ar URM
1271.Pq users' reference manuals ,
1272.Ar PRM
1273.Pq programmers' reference manuals ,
1274.Ar KM
1275.Pq kernel manuals ,
1276.Ar IND
1277.Pq master index ,
1278.Ar MMI
1279.Pq master index ,
1280.Ar LOCAL
1281.Pq local manuals ,
1282.Ar LOC
1283.Pq local manuals ,
1284or
1285.Ar CON
1286.Pq contributed manuals .
1287.It Cm arch
1288This specifies a specific relevant architecture. If
1289.Cm volume
1290is not provided, it may be used in its place, else it may be used
1291subsequent that. It, too, is optional. It must be one of
1292.Ar alpha ,
589e7c1d
SW
1293.Ar amiga ,
1294.Ar arc ,
1295.Ar arm ,
1296.Ar armish ,
1297.Ar aviion ,
1298.Ar hp300 ,
1299.Ar hppa ,
1300.Ar hppa64 ,
1301.Ar i386 ,
1302.Ar landisk ,
1303.Ar luna88k ,
1304.Ar mac68k ,
1305.Ar macppc ,
1306.Ar mvme68k ,
1307.Ar mvme88k ,
1308.Ar mvmeppc ,
1309.Ar pmax ,
1310.Ar sgi ,
1311.Ar socppc ,
1312.Ar sparc ,
1313.Ar sparc64 ,
1314.Ar sun3 ,
1315.Ar vax ,
c1543a89 1316.Ar x86_64 ,
589e7c1d
SW
1317or
1318.Ar zaurus .
1319.El
1320.Pp
1321Examples:
1322.Bd -literal -offset indent
1323\&.Dt FOO 1
1324\&.Dt FOO 4 KM
1325\&.Dt FOO 9 i386
1326\&.Dt FOO 9 KM i386
1327.Ed
1328.Pp
1329See also
1330.Sx \&Dd
1331and
1332.Sx \&Os .
1333.
1334.Ss \&Dv
1335Defined variables such as preprocessor constants.
1336.Pp
1337Examples:
1338.Bd -literal -offset indent
1339\&.Dv BUFSIZ
1340\&.Dv STDOUT_FILENO
1341.Ed
1342.Pp
1343See also
1344.Sx \&Er .
1345.
1346.Ss \&Dx
1347Format the DragonFlyBSD version provided as an argument, or a default
1348value if no argument is provided.
1349.Pp
1350Examples:
1351.Bd -literal -offset indent
1352\&.Dx 2.4.1
1353\&.Dx
1354.Ed
1355.Pp
1356See also
1357.Sx \&At ,
1358.Sx \&Bsx ,
1359.Sx \&Bx ,
1360.Sx \&Fx ,
1361.Sx \&Nx ,
1362.Sx \&Ox ,
1363and
1364.Sx \&Ux .
1365.
1366.Ss \&Ec
1367.Ss \&Ed
1368.Ss \&Ef
1369.Ss \&Ek
1370.Ss \&El
1371.Ss \&Em
1372Denotes text that should be emphasised. Note that this is a
1373presentation term and should not be used for stylistically decorating
1374technical terms.
1375.Pp
1376Examples:
1377.Bd -literal -offset indent
1378\&.Ed Warnings!
1379\&.Ed Remarks :
1380.Ed
1381.
1382.Ss \&En
1383.Ss \&Eo
1384.Ss \&Er
1385Error constants (suggested for use only in section two manuals).
1386.Pp
1387Examples:
1388.Bd -literal -offset indent
1389\&.Er EPERM
1390\&.Er ENOENT
1391.Ed
1392.Pp
1393See also
1394.Sx \&Dv .
1395.
1396.Ss \&Es
1397.
1398.Ss \&Ev
1399Environmental variables such as those specified in
1400.Xr environ 7 .
1401.Pp
1402Examples:
1403.Bd -literal -offset indent
1404\&.Ev DISPLAY
1405\&.Ev PATH
1406.Ed
1407.
1408.Ss \&Ex
1409Inserts text regarding a utility's exit values. This macro must have
1410first the
1411.Fl std
1412argument specified, then an optional
1413.Ar utility .
1414If
1415.Ar utility
1416is not provided, the document's name as stipulated in
1417.Sx \&Nm
1418is provided.
1419.Ss \&Fa
1420.Ss \&Fc
1421.Ss \&Fd
1422.Ss \&Fl
1423.Ss \&Fn
1424.Ss \&Fo
1425.Ss \&Fr
1426.Ss \&Ft
1427.Ss \&Fx
1428Format the FreeBSD version provided as an argument, or a default value
1429if no argument is provided.
1430.Pp
1431Examples:
1432.Bd -literal -offset indent
1433\&.Fx 7.1
1434\&.Fx
1435.Ed
1436.Pp
1437See also
1438.Sx \&At ,
1439.Sx \&Bsx ,
1440.Sx \&Bx ,
1441.Sx \&Dx ,
1442.Sx \&Nx ,
1443.Sx \&Ox ,
1444and
1445.Sx \&Ux .
1446.
1447.Ss \&Hf
1448.Ss \&Ic
1449.Ss \&In
1450.Ss \&It
1451.Ss \&Lb
1452.Ss \&Li
1453.Ss \&Lk
cbce6d97
SW
1454Format a hyperlink. The calling syntax is as follows:
1455.Pp
1456.D1 \. Ns Sx \&Lk Cm uri Op Cm name
1457.Pp
1458Examples:
1459.Bd -literal -offset indent
1460\&.Lk http://bsd.lv "The BSD.lv Project"
1461\&.Lk http://bsd.lv
1462.Ed
1463.Pp
1464See also
1465.Sx \&Mt .
1466.
589e7c1d
SW
1467.Ss \&Lp
1468.Ss \&Ms
1469.Ss \&Mt
1470.Ss \&Nd
1471.Ss \&Nm
1472.Ss \&No
1473.Ss \&Ns
1474.Ss \&Nx
1475Format the NetBSD version provided as an argument, or a default value if
1476no argument is provided.
1477.Pp
1478Examples:
1479.Bd -literal -offset indent
1480\&.Nx 5.01
1481\&.Nx
1482.Ed
1483.Pp
1484See also
1485.Sx \&At ,
1486.Sx \&Bsx ,
1487.Sx \&Bx ,
1488.Sx \&Dx ,
1489.Sx \&Fx ,
1490.Sx \&Ox ,
1491and
1492.Sx \&Ux .
1493.
1494.Ss \&Oc
1495.Ss \&Oo
1496.Ss \&Op
1497.Ss \&Os
1498Document operating system version. This is the mandatory third macro of
1499any
1500.Nm
1501file. Its calling syntax is as follows:
1502.Pp
1503.D1 \. Ns Sx \&Os Op Cm system
1504.Pp
1505The optional
1506.Cm system
1507parameter specifies the relevant operating system or environment. Left
1508unspecified, it defaults to the local operating system version. This is
1509the suggested form.
1510.Pp
1511Examples:
1512.Bd -literal -offset indent
1513\&.Os
1514\&.Os KTH/CSC/TCS
1515\&.Os BSD 4.3
1516.Ed
1517.Pp
1518See also
1519.Sx \&Dd
1520and
1521.Sx \&Dt .
1522.
1523.Ss \&Ot
1524Unknown usage.
1525.Pp
1526.Em Remarks :
1527this macro has been deprecated.
1528.
1529.Ss \&Ox
1530Format the OpenBSD version provided as an argument, or a default value
1531if no argument is provided.
1532.Pp
1533Examples:
1534.Bd -literal -offset indent
1535\&.Ox 4.5
1536\&.Ox
1537.Ed
1538.Pp
1539See also
1540.Sx \&At ,
1541.Sx \&Bsx ,
1542.Sx \&Bx ,
1543.Sx \&Dx ,
1544.Sx \&Fx ,
1545.Sx \&Nx ,
1546and
1547.Sx \&Ux .
1548.
1549.Ss \&Pa
1550.Ss \&Pc
1551.Ss \&Pf
1552.Ss \&Po
1553.Ss \&Pp
1554.Ss \&Pq
1555.Ss \&Qc
1556.Ss \&Ql
1557.Ss \&Qo
1558.Ss \&Qq
1559.
1560.Ss \&Re
1561Closes a
1562.Sx \&Rs
1563block. Does not have any tail arguments.
1564.
1565.Ss \&Rs
1566Begins a bibliographic
1567.Pq Dq reference
cbce6d97 1568block. Does not have any head arguments. The block macro may only
589e7c1d
SW
1569contain
1570.Sx \&%A ,
1571.Sx \&%B ,
1572.Sx \&%C ,
1573.Sx \&%D ,
1574.Sx \&%I ,
1575.Sx \&%J ,
1576.Sx \&%N ,
1577.Sx \&%O ,
1578.Sx \&%P ,
1579.Sx \&%Q ,
1580.Sx \&%R ,
1581.Sx \&%T ,
1582and
1583.Sx \&%V
1584child macros (at least one must be specified).
1585.Pp
1586Examples:
1587.Bd -literal -offset indent
1588\&.Rs
1589\&.%A J. E. Hopcroft
1590\&.%A J. D. Ullman
1591\&.%B Introduction to Automata Theory, Languages, and Computation
1592\&.%I Addison-Wesley
1593\&.%C Reading, Massachusettes
1594\&.%D 1979
1595\&.Re
1596.Ed
1597.Pp
1598If an
1599.Sx \&Rs
1600block is used within a SEE ALSO section, a vertical space is asserted
1601before the rendered output, else the block continues on the current
1602line.
1603.
1604.Ss \&Rv
1605.Ss \&Sc
1606.Ss \&Sh
1607.Ss \&Sm
1608.Ss \&So
1609.Ss \&Sq
1610.Ss \&Ss
1611.Ss \&St
1612.Ss \&Sx
1613.Ss \&Sy
1614.Ss \&Tn
1615.Ss \&Ud
1616.Ss \&Ux
1617Format the UNIX name. Accepts no argument.
1618.Pp
1619Examples:
1620.Bd -literal -offset indent
1621\&.Ux
1622.Ed
1623.Pp
1624See also
1625.Sx \&At ,
1626.Sx \&Bsx ,
1627.Sx \&Bx ,
1628.Sx \&Dx ,
1629.Sx \&Fx ,
1630.Sx \&Nx ,
1631and
1632.Sx \&Ox .
1633.
1634.Ss \&Va
1635.Ss \&Vt
1636.Ss \&Xc
1637.Ss \&Xo
1638.Ss \&Xr
1639.Ss \&br
1640.Ss \&sp
1641.
1642.
1643.Sh COMPATIBILITY
1644This section documents compatibility with other roff implementations, at
1645this time limited to
1646.Xr groff 1 .
1647The term
1648.Qq historic groff
1649refers to those versions before the
1650.Pa doc.tmac
1651file re-write
1652.Pq somewhere between 1.15 and 1.19 .
1653.
1654.Pp
1655.Bl -dash -compact
1656.It
1657Negative scaling units are now truncated to zero instead of creating
1658interesting conditions, such as with
1659.Sq \&sp -1i .
1660Furthermore, the
1661.Sq f
1662scaling unit, while accepted, is rendered as the default unit.
1663.It
1664In quoted literals, groff allowed pair-wise double-quotes to produce a
1665standalone double-quote in formatted output. This idiosyncratic
1666behaviour is no longer applicable.
1667.It
1668Display types
1669.Sx \&Bd Fl center
1670and
1671.Fl right
1672are aliases for
1673.Fl left .
1674The
1675.Fl file Ar file
1676argument is ignored. Since text is not right-justified,
1677.Fl ragged
1678and
1679.Fl filled
1680are aliases, as are
1681.Fl literal
1682and
1683.Fl unfilled .
1684.It
1685Blocks of whitespace are stripped from both macro and free-form text
1686lines (except when in literal mode), while groff would retain whitespace
1687in free-form text lines.
1688.It
1689Historic groff has many un-callable macros. Most of these (excluding
1690some block-level macros) are now callable, conforming to the
1691non-historic groff version.
1692.It
1693The vertical bar
1694.Sq \(ba
1695made historic groff
1696.Qq go orbital
1697but is a proper delimiter in this implementation.
1698.It
1699.Sx \&It Fl nested
1700is assumed for all lists (it wasn't in historic groff): any list may be
1701nested and
1702.Fl enum
1703lists will restart the sequence only for the sub-list.
1704.It
1705Some manuals use
1706.Sx \&Li
1707incorrectly by following it with a reserved character and expecting the
1708delimiter to render. This is not supported.
1709.It
1710In groff, the
1711.Sx \&Fo
1712macro only produces the first parameter. This is no longer the case.
1713.El
1714.
1715.
1716.Sh SEE ALSO
1717.Xr mandoc 1 ,
1718.Xr mandoc_char 7
1719.
1720.
1721.Sh AUTHORS
1722The
1723.Nm
1724reference was written by
1725.An Kristaps Dzonsons Aq kristaps@kth.se .
1726.\"
1727.\" XXX: this really isn't the place for these caveats.
1728.\" .
1729.\" .
1730.\" .Sh CAVEATS
1731.\" There are many ambiguous parts of mdoc.
1732.\" .
1733.\" .Pp
1734.\" .Bl -dash -compact
1735.\" .It
1736.\" .Sq \&Fa
1737.\" should be
1738.\" .Sq \&Va
1739.\" as function arguments are variables.
1740.\" .It
1741.\" .Sq \&Ft
1742.\" should be
1743.\" .Sq \&Vt
1744.\" as function return types are still types. Furthermore, the
1745.\" .Sq \&Ft
1746.\" should be removed and
1747.\" .Sq \&Fo ,
1748.\" which ostensibly follows it, should follow the same convention as
1749.\" .Sq \&Va .
1750.\" .It
1751.\" .Sq \&Va
1752.\" should formalise that only one or two arguments are acceptable: a
1753.\" variable name and optional, preceding type.
1754.\" .It
1755.\" .Sq \&Fd
1756.\" is ambiguous. It's commonly used to indicate an include file in the
1757.\" synopsis section.
1758.\" .Sq \&In
1759.\" should be used, instead.
1760.\" .It
1761.\" Only the
1762.\" .Sq \-literal
1763.\" argument to
1764.\" .Sq \&Bd
1765.\" makes sense. The remaining ones should be removed.
1766.\" .It
1767.\" The
1768.\" .Sq \&Xo
1769.\" and
1770.\" .Sq \&Xc
1771.\" macros should be deprecated.
1772.\" .It
1773.\" The
1774.\" .Sq \&Dt
1775.\" macro lacks clarity. It should be absolutely clear which title will
1776.\" render when formatting the manual page.
1777.\" .It
1778.\" A
1779.\" .Sq \&Lx
1780.\" should be provided for Linux (\(`a la
1781.\" .Sq \&Ox ,
1782.\" .Sq \&Nx
1783.\" etc.).
1784.\" .It
1785.\" There's no way to refer to references in
1786.\" .Sq \&Rs/Re
1787.\" blocks.
1788.\" .It
1789.\" The \-split and \-nosplit dictates via
1790.\" .Sq \&An
1791.\" are re-set when entering and leaving the AUTHORS section.
1792.\" .El
1793.\" .