xref: /openbsd-src/share/man/man7/man.7 (revision 85349e0846d6f429f90042da265c7b7a55300e88)
1.\"	$OpenBSD: man.7,v 1.20 2011/08/30 11:38:59 jmc Exp $
2.\"
3.\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: August 30 2011 $
18.Dt MAN 7
19.Os
20.Sh NAME
21.Nm man
22.Nd man language reference
23.Sh DESCRIPTION
24The
25.Nm man
26language was historically used to format
27.Ux
28manuals.
29This reference document describes its syntax, structure, and usage.
30.Pp
31.Bf -emphasis
32Do not use
33.Nm
34to write your manuals.
35.Ef
36Use the
37.Xr mdoc 7
38language, instead.
39.Pp
40A
41.Nm
42document follows simple rules:  lines beginning with the control
43character
44.Sq \&.
45are parsed for macros.
46Other lines are interpreted within the scope of
47prior macros:
48.Bd -literal -offset indent
49\&.SH Macro lines change control state.
50Other lines are interpreted within the current state.
51.Ed
52.Sh INPUT ENCODING
53.Nm
54documents may contain only graphable 7-bit ASCII characters, the
55space character, and the tab character.
56.Pp
57Blank lines are acceptable; where found, the output will assert a
58vertical space.
59.Pp
60If the first character of a line is a space, that line is printed
61with a leading newline.
62.Ss Comments
63Text following a
64.Sq \e\*q ,
65whether in a macro or free-form text line, is ignored to the end of
66line.
67A macro line with only a control character and comment escape,
68.Sq \&.\e\*q ,
69is also ignored.
70Macro lines with only a control character and optionally whitespace are
71stripped from input.
72.Ss Special Characters
73Special characters may occur in both macro and free-form lines.
74Sequences begin with the escape character
75.Sq \e
76followed by either an open-parenthesis
77.Sq \&(
78for two-character sequences; an open-bracket
79.Sq \&[
80for n-character sequences (terminated at a close-bracket
81.Sq \&] ) ;
82or a single one-character sequence.
83See
84.Xr mandoc_char 7
85for a complete list.
86Examples include
87.Sq \e(em
88.Pq em-dash
89and
90.Sq \ee
91.Pq back-slash .
92.Ss Text Decoration
93Terms may be text-decorated using the
94.Sq \ef
95escape followed by an indicator: B (bold), I (italic), R (Roman), or P
96(revert to previous mode):
97.Pp
98.D1 \efBbold\efR \efIitalic\efP
99.Pp
100A numerical representation 3, 2, or 1 (bold, italic, and Roman,
101respectively) may be used instead.
102A text decoration is only valid, if specified in free-form text, until
103the next macro invocation; if specified within a macro, it's only valid
104until the macro closes scope.
105Note that macros like
106.Sx \&BR
107open and close a font scope with each argument.
108.Pp
109The
110.Sq \ef
111attribute is forgotten when entering or exiting a macro block.
112.Ss Whitespace
113Whitespace consists of the space character.
114In free-form lines, whitespace is preserved within a line; unescaped
115trailing spaces are stripped from input (unless in a literal context).
116Blank free-form lines, which may include spaces, are permitted and
117rendered as an empty line.
118.Pp
119In macro lines, whitespace delimits arguments and is discarded.
120If arguments are quoted, whitespace within the quotes is retained.
121.Ss Scaling Widths
122Many macros support scaled widths for their arguments, such as
123stipulating a two-inch paragraph indentation with the following:
124.Bd -literal -offset indent
125\&.HP 2i
126.Ed
127.Pp
128The syntax for scaled widths is
129.Sq Li [+-]?[0-9]*.[0-9]*[:unit:]? ,
130where a decimal must be preceded or proceeded by at least one digit.
131Negative numbers, while accepted, are truncated to zero.
132The following scaling units are accepted:
133.Pp
134.Bl -tag -width Ds -offset indent -compact
135.It c
136centimetre
137.It i
138inch
139.It P
140pica (~1/6 inch)
141.It p
142point (~1/72 inch)
143.It f
144synonym for
145.Sq u
146.It v
147default vertical span
148.It m
149width of rendered
150.Sq m
151.Pq em
152character
153.It n
154width of rendered
155.Sq n
156.Pq en
157character
158.It u
159default horizontal span
160.It M
161mini-em (~1/100 em)
162.El
163.Pp
164Using anything other than
165.Sq m ,
166.Sq n ,
167.Sq u ,
168or
169.Sq v
170is necessarily non-portable across output media.
171.Pp
172If a scaling unit is not provided, the numerical value is interpreted
173under the default rules of
174.Sq v
175for vertical spaces and
176.Sq u
177for horizontal ones.
178.Em Note :
179this differs from
180.Xr mdoc 7 ,
181which, if a unit is not provided, will instead interpret the string as
182literal text.
183.Ss Sentence Spacing
184When composing a manual, make sure that sentences end at the end of
185a line.
186By doing so, front-ends will be able to apply the proper amount of
187spacing after the end of sentence (unescaped) period, exclamation mark,
188or question mark followed by zero or more non-sentence closing
189delimiters
190.Po
191.Sq \&) ,
192.Sq \&] ,
193.Sq \&' ,
194.Sq \&"
195.Pc .
196.Sh MANUAL STRUCTURE
197Each
198.Nm
199document must contain the
200.Sx \&TH
201macro describing the document's section and title.
202It may occur anywhere in the document, although conventionally it
203appears as the first macro.
204.Pp
205Beyond
206.Sx \&TH ,
207at least one macro or text node must appear in the document.
208.Pp
209The following is a well-formed skeleton
210.Nm
211file for a utility
212.Qq progname :
213.Bd -literal -offset indent
214\&.TH PROGNAME 1 2009-10-10
215\&.SH NAME
216\efBprogname\efR \e(en a description goes here
217\&.\e\*q .SH LIBRARY
218\&.\e\*q For sections 2 & 3 only.
219\&.\e\*q Not used in OpenBSD.
220\&.SH SYNOPSIS
221\efBprogname\efR [\efB\e-options\efR] arguments...
222\&.SH DESCRIPTION
223The \efBfoo\efR utility processes files...
224\&.\e\*q .SH IMPLEMENTATION NOTES
225\&.\e\*q Not used in OpenBSD.
226\&.\e\*q .SH RETURN VALUES
227\&.\e\*q For sections 2, 3, & 9 only.
228\&.\e\*q .SH ENVIRONMENT
229\&.\e\*q For sections 1, 6, 7, & 8 only.
230\&.\e\*q .SH FILES
231\&.\e\*q .SH EXIT STATUS
232\&.\e\*q For sections 1, 6, & 8 only.
233\&.\e\*q .SH EXAMPLES
234\&.\e\*q .SH DIAGNOSTICS
235\&.\e\*q For sections 1, 4, 6, 7, & 8 only.
236\&.\e\*q .SH ERRORS
237\&.\e\*q For sections 2, 3, & 9 only.
238\&.\e\*q .SH SEE ALSO
239\&.\e\*q .BR foo ( 1 )
240\&.\e\*q .SH STANDARDS
241\&.\e\*q .SH HISTORY
242\&.\e\*q .SH AUTHORS
243\&.\e\*q .SH CAVEATS
244\&.\e\*q .SH BUGS
245\&.\e\*q .SH SECURITY CONSIDERATIONS
246\&.\e\*q Not used in OpenBSD.
247.Ed
248.Pp
249The sections in a
250.Nm
251document are conventionally ordered as they appear above.
252Sections should be composed as follows:
253.Bl -ohang -offset indent
254.It Em NAME
255The name(s) and a short description of the documented material.
256The syntax for this is generally as follows:
257.Pp
258.D1 \efBname\efR \e(en description
259.It Em LIBRARY
260The name of the library containing the documented material, which is
261assumed to be a function in a section 2 or 3 manual.
262For functions in the C library, this may be as follows:
263.Pp
264.D1 Standard C Library (libc, -lc)
265.It Em SYNOPSIS
266Documents the utility invocation syntax, function call syntax, or device
267configuration.
268.Pp
269For the first, utilities (sections 1, 6, and 8), this is
270generally structured as follows:
271.Pp
272.D1 \efBname\efR [-\efBab\efR] [-\efBc\efR\efIarg\efR] \efBpath\efR...
273.Pp
274For the second, function calls (sections 2, 3, 9):
275.Pp
276.D1 \&.B char *name(char *\efIarg\efR);
277.Pp
278And for the third, configurations (section 4):
279.Pp
280.D1 \&.B name* at cardbus ? function ?
281.Pp
282Manuals not in these sections generally don't need a
283.Em SYNOPSIS .
284.It Em DESCRIPTION
285This expands upon the brief, one-line description in
286.Em NAME .
287It usually contains a break-down of the options (if documenting a
288command).
289.It Em IMPLEMENTATION NOTES
290Implementation-specific notes should be kept here.
291This is useful when implementing standard functions that may have side
292effects or notable algorithmic implications.
293.It Em RETURN VALUES
294This section documents the return values of functions in sections 2, 3, and 9.
295.It Em ENVIRONMENT
296Documents any usages of environment variables, e.g.,
297.Xr environ 7 .
298.It Em FILES
299Documents files used.
300It's helpful to document both the file name and a short description of how
301the file is used (created, modified, etc.).
302.It Em EXIT STATUS
303This section documents the command exit status for
304section 1, 6, and 8 utilities.
305Historically, this information was described in
306.Em DIAGNOSTICS ,
307a practise that is now discouraged.
308.It Em EXAMPLES
309Example usages.
310This often contains snippets of well-formed,
311well-tested invocations.
312Make sure that examples work properly!
313.It Em DIAGNOSTICS
314Documents error conditions.
315This is most useful in section 4 manuals.
316Historically, this section was used in place of
317.Em EXIT STATUS
318for manuals in sections 1, 6, and 8; however, this practise is
319discouraged.
320.It Em ERRORS
321Documents error handling in sections 2, 3, and 9.
322.It Em SEE ALSO
323References other manuals with related topics.
324This section should exist for most manuals.
325.Pp
326.D1 \&.BR bar \&( 1 \&),
327.Pp
328Cross-references should conventionally be ordered
329first by section, then alphabetically.
330.It Em STANDARDS
331References any standards implemented or used, such as
332.Pp
333.D1 IEEE Std 1003.2 (\e(lqPOSIX.2\e(rq)
334.Pp
335If not adhering to any standards, the
336.Em HISTORY
337section should be used.
338.It Em HISTORY
339A brief history of the subject, including where support first appeared.
340.It Em AUTHORS
341Credits to the person or persons who wrote the code and/or documentation.
342Authors should generally be noted by both name and email address.
343.It Em CAVEATS
344Common misuses and misunderstandings should be explained
345in this section.
346.It Em BUGS
347Known bugs, limitations, and work-arounds should be described
348in this section.
349.It Em SECURITY CONSIDERATIONS
350Documents any security precautions that operators should consider.
351.El
352.Sh MACRO SYNTAX
353Macros are one to three characters in length and begin with a
354control character,
355.Sq \&. ,
356at the beginning of the line.
357The
358.Sq \(aq
359macro control character is also accepted.
360An arbitrary amount of whitespace (spaces or tabs) may sit between the
361control character and the macro name.
362Thus, the following are equivalent:
363.Bd -literal -offset indent
364\&.PP
365\&.\ \ \ PP
366.Ed
367.Pp
368To include space characters in macro arguments, arguments may be quoted;
369see the
370.Sq MACRO SYNTAX
371section in the
372.Xr roff 7
373manual for details.
374.Pp
375The
376.Nm
377macros are classified by scope: line scope or block scope.
378Line macros are only scoped to the current line (and, in some
379situations, the subsequent line).
380Block macros are scoped to the current line and subsequent lines until
381closed by another block macro.
382.Ss Line Macros
383Line macros are generally scoped to the current line, with the body
384consisting of zero or more arguments.
385If a macro is scoped to the next line and the line arguments are empty,
386the next line, which must be text, is used instead.
387Thus:
388.Bd -literal -offset indent
389\&.I
390foo
391.Ed
392.Pp
393is equivalent to
394.Sq \&.I foo .
395If next-line macros are invoked consecutively, only the last is used.
396If a next-line macro is followed by a non-next-line macro, an error is
397raised, except for
398.Sx \&br ,
399.Sx \&sp ,
400and
401.Sx \&na .
402.Pp
403The syntax is as follows:
404.Bd -literal -offset indent
405\&.YO \(lBbody...\(rB
406\(lBbody...\(rB
407.Ed
408.Bl -column -offset indent "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX"
409.It Em Macro Ta Em Arguments Ta Em Scope     Ta Em Notes
410.It Sx \&AT  Ta    <=1       Ta    current   Ta    \&
411.It Sx \&B   Ta    n         Ta    next-line Ta    \&
412.It Sx \&BI  Ta    n         Ta    current   Ta    \&
413.It Sx \&BR  Ta    n         Ta    current   Ta    \&
414.It Sx \&DT  Ta    0         Ta    current   Ta    \&
415.It Sx \&I   Ta    n         Ta    next-line Ta    \&
416.It Sx \&IB  Ta    n         Ta    current   Ta    \&
417.It Sx \&IR  Ta    n         Ta    current   Ta    \&
418.It Sx \&R   Ta    n         Ta    next-line Ta    \&
419.It Sx \&RB  Ta    n         Ta    current   Ta    \&
420.It Sx \&RI  Ta    n         Ta    current   Ta    \&
421.It Sx \&SB  Ta    n         Ta    next-line Ta    \&
422.It Sx \&SM  Ta    n         Ta    next-line Ta    \&
423.It Sx \&TH  Ta    >1, <6    Ta    current   Ta    \&
424.It Sx \&UC  Ta    <=1       Ta    current   Ta    \&
425.It Sx \&br  Ta    0         Ta    current   Ta    compat
426.It Sx \&fi  Ta    0         Ta    current   Ta    compat
427.It Sx \&in  Ta    1         Ta    current   Ta    compat
428.It Sx \&na  Ta    0         Ta    current   Ta    compat
429.It Sx \&nf  Ta    0         Ta    current   Ta    compat
430.It Sx \&sp  Ta    1         Ta    current   Ta    compat
431.El
432.Pp
433Macros marked as
434.Qq compat
435are included for compatibility with the significant corpus of existing
436manuals that mix dialects of roff.
437These macros should not be used for portable
438.Nm
439manuals.
440.Ss Block Macros
441Block macros comprise a head and body.
442As with in-line macros, the head is scoped to the current line and, in
443one circumstance, the next line (the next-line stipulations as in
444.Sx Line Macros
445apply here as well).
446.Pp
447The syntax is as follows:
448.Bd -literal -offset indent
449\&.YO \(lBhead...\(rB
450\(lBhead...\(rB
451\(lBbody...\(rB
452.Ed
453.Pp
454The closure of body scope may be to the section, where a macro is closed
455by
456.Sx \&SH ;
457sub-section, closed by a section or
458.Sx \&SS ;
459part, closed by a section, sub-section, or
460.Sx \&RE ;
461or paragraph, closed by a section, sub-section, part,
462.Sx \&HP ,
463.Sx \&IP ,
464.Sx \&LP ,
465.Sx \&P ,
466.Sx \&PP ,
467or
468.Sx \&TP .
469No closure refers to an explicit block closing macro.
470.Pp
471As a rule, block macros may not be nested; thus, calling a block macro
472while another block macro scope is open, and the open scope is not
473implicitly closed, is syntactically incorrect.
474.Bl -column -offset indent "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX"
475.It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope  Ta Em Notes
476.It Sx \&HP  Ta    <2        Ta    current    Ta    paragraph   Ta    \&
477.It Sx \&IP  Ta    <3        Ta    current    Ta    paragraph   Ta    \&
478.It Sx \&LP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
479.It Sx \&P   Ta    0         Ta    current    Ta    paragraph   Ta    \&
480.It Sx \&PP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
481.It Sx \&RE  Ta    0         Ta    current    Ta    none        Ta    compat
482.It Sx \&RS  Ta    1         Ta    current    Ta    part        Ta    compat
483.It Sx \&SH  Ta    >0        Ta    next-line  Ta    section     Ta    \&
484.It Sx \&SS  Ta    >0        Ta    next-line  Ta    sub-section Ta    \&
485.It Sx \&TP  Ta    n         Ta    next-line  Ta    paragraph   Ta    \&
486.El
487.Pp
488Macros marked
489.Qq compat
490are as mentioned in
491.Sx Line Macros .
492.Pp
493If a block macro is next-line scoped, it may only be followed by in-line
494macros for decorating text.
495.Sh REFERENCE
496This section is a canonical reference to all macros, arranged
497alphabetically.
498For the scoping of individual macros, see
499.Sx MACRO SYNTAX .
500.Ss \&AT
501Sets the volume for the footer for compatibility with man pages from
502.Tn AT&T UNIX
503releases.
504The optional arguments specify which release it is from.
505.Ss \&B
506Text is rendered in bold face.
507.Pp
508See also
509.Sx \&I
510and
511.Sx \&R .
512.Ss \&BI
513Text is rendered alternately in bold face and italic.
514Thus,
515.Sq .BI this word and that
516causes
517.Sq this
518and
519.Sq and
520to render in bold face, while
521.Sq word
522and
523.Sq that
524render in italics.
525Whitespace between arguments is omitted in output.
526.Pp
527Examples:
528.Pp
529.Dl \&.BI bold italic bold italic
530.Pp
531The output of this example will be emboldened
532.Dq bold
533and italicised
534.Dq italic ,
535with spaces stripped between arguments.
536.Pp
537See also
538.Sx \&IB ,
539.Sx \&BR ,
540.Sx \&RB ,
541.Sx \&RI ,
542and
543.Sx \&IR .
544.Ss \&BR
545Text is rendered alternately in bold face and roman (the default font).
546Whitespace between arguments is omitted in output.
547.Pp
548See
549.Sx \&BI
550for an equivalent example.
551.Pp
552See also
553.Sx \&BI ,
554.Sx \&IB ,
555.Sx \&RB ,
556.Sx \&RI ,
557and
558.Sx \&IR .
559.Ss \&DT
560Has no effect.
561Included for compatibility.
562.Ss \&HP
563Begin a paragraph whose initial output line is left-justified, but
564subsequent output lines are indented, with the following syntax:
565.Bd -filled -offset indent
566.Pf \. Sx \&HP
567.Op Cm width
568.Ed
569.Pp
570The
571.Cm width
572argument must conform to
573.Sx Scaling Widths .
574If specified, it's saved for later paragraph left-margins; if unspecified, the
575saved or default width is used.
576.Pp
577See also
578.Sx \&IP ,
579.Sx \&LP ,
580.Sx \&P ,
581.Sx \&PP ,
582and
583.Sx \&TP .
584.Ss \&I
585Text is rendered in italics.
586.Pp
587See also
588.Sx \&B
589and
590.Sx \&R .
591.Ss \&IB
592Text is rendered alternately in italics and bold face.
593Whitespace between arguments is omitted in output.
594.Pp
595See
596.Sx \&BI
597for an equivalent example.
598.Pp
599See also
600.Sx \&BI ,
601.Sx \&BR ,
602.Sx \&RB ,
603.Sx \&RI ,
604and
605.Sx \&IR .
606.Ss \&IP
607Begin an indented paragraph with the following syntax:
608.Bd -filled -offset indent
609.Pf \. Sx \&IP
610.Op Cm head Op Cm width
611.Ed
612.Pp
613The
614.Cm width
615argument defines the width of the left margin and is defined by
616.Sx Scaling Widths .
617It's saved for later paragraph left-margins; if unspecified, the saved or
618default width is used.
619.Pp
620The
621.Cm head
622argument is used as a leading term, flushed to the left margin.
623This is useful for bulleted paragraphs and so on.
624.Pp
625See also
626.Sx \&HP ,
627.Sx \&LP ,
628.Sx \&P ,
629.Sx \&PP ,
630and
631.Sx \&TP .
632.Ss \&IR
633Text is rendered alternately in italics and roman (the default font).
634Whitespace between arguments is omitted in output.
635.Pp
636See
637.Sx \&BI
638for an equivalent example.
639.Pp
640See also
641.Sx \&BI ,
642.Sx \&IB ,
643.Sx \&BR ,
644.Sx \&RB ,
645and
646.Sx \&RI .
647.Ss \&LP
648Begin an undecorated paragraph.
649The scope of a paragraph is closed by a subsequent paragraph,
650sub-section, section, or end of file.
651The saved paragraph left-margin width is reset to the default.
652.Pp
653See also
654.Sx \&HP ,
655.Sx \&IP ,
656.Sx \&P ,
657.Sx \&PP ,
658and
659.Sx \&TP .
660.Ss \&P
661Synonym for
662.Sx \&LP .
663.Pp
664See also
665.Sx \&HP ,
666.Sx \&IP ,
667.Sx \&LP ,
668.Sx \&PP ,
669and
670.Sx \&TP .
671.Ss \&PP
672Synonym for
673.Sx \&LP .
674.Pp
675See also
676.Sx \&HP ,
677.Sx \&IP ,
678.Sx \&LP ,
679.Sx \&P ,
680and
681.Sx \&TP .
682.Ss \&R
683Text is rendered in roman (the default font).
684.Pp
685See also
686.Sx \&I
687and
688.Sx \&B .
689.Ss \&RB
690Text is rendered alternately in roman (the default font) and bold face.
691Whitespace between arguments is omitted in output.
692.Pp
693See
694.Sx \&BI
695for an equivalent example.
696.Pp
697See also
698.Sx \&BI ,
699.Sx \&IB ,
700.Sx \&BR ,
701.Sx \&RI ,
702and
703.Sx \&IR .
704.Ss \&RE
705Explicitly close out the scope of a prior
706.Sx \&RS .
707The default left margin is restored to the state of the original
708.Sx \&RS
709invocation.
710.Ss \&RI
711Text is rendered alternately in roman (the default font) and italics.
712Whitespace between arguments is omitted in output.
713.Pp
714See
715.Sx \&BI
716for an equivalent example.
717.Pp
718See also
719.Sx \&BI ,
720.Sx \&IB ,
721.Sx \&BR ,
722.Sx \&RB ,
723and
724.Sx \&IR .
725.Ss \&RS
726Temporarily reset the default left margin.
727This has the following syntax:
728.Bd -filled -offset indent
729.Pf \. Sx \&RS
730.Op Cm width
731.Ed
732.Pp
733The
734.Cm width
735argument must conform to
736.Sx Scaling Widths .
737If not specified, the saved or default width is used.
738.Pp
739See also
740.Sx \&RE .
741.Ss \&SB
742Text is rendered in small size (one point smaller than the default font)
743bold face.
744.Ss \&SH
745Begin a section.
746The scope of a section is only closed by another section or the end of
747file.
748The paragraph left-margin width is reset to the default.
749.Ss \&SM
750Text is rendered in small size (one point smaller than the default
751font).
752.Ss \&SS
753Begin a sub-section.
754The scope of a sub-section is closed by a subsequent sub-section,
755section, or end of file.
756The paragraph left-margin width is reset to the default.
757.Ss \&TH
758Sets the title of the manual page with the following syntax:
759.Bd -filled -offset indent
760.Pf \. Sx \&TH
761.Ar title section date
762.Op Ar source Op Ar volume
763.Ed
764.Pp
765Conventionally, the document
766.Ar title
767is given in all caps.
768The recommended
769.Ar date
770format is
771.Sy YYYY-MM-DD
772as specified in the ISO-8601 standard;
773if the argument does not conform, it is printed verbatim.
774If the
775.Ar date
776is empty or not specified, the current date is used.
777The optional
778.Ar source
779string specifies the organisation providing the utility.
780The
781.Ar volume
782string replaces the default rendered volume, which is dictated by the
783manual section.
784.Pp
785Examples:
786.Pp
787.Dl \&.TH CVS 5 "1992-02-12" GNU
788.Ss \&TP
789Begin a paragraph where the head, if exceeding the indentation width, is
790followed by a newline; if not, the body follows on the same line after a
791buffer to the indentation width.
792Subsequent output lines are indented.
793The syntax is as follows:
794.Bd -filled -offset indent
795.Pf \. Sx \&TP
796.Op Cm width
797.Ed
798.Pp
799The
800.Cm width
801argument must conform to
802.Sx Scaling Widths .
803If specified, it's saved for later paragraph left-margins; if
804unspecified, the saved or default width is used.
805.Pp
806See also
807.Sx \&HP ,
808.Sx \&IP ,
809.Sx \&LP ,
810.Sx \&P ,
811and
812.Sx \&PP .
813.Ss \&UC
814Sets the volume for the footer for compatibility with man pages from
815BSD releases.
816The optional first argument specifies which release it is from.
817.Ss \&br
818Breaks the current line.
819Consecutive invocations have no further effect.
820.Pp
821See also
822.Sx \&sp .
823.Ss \&fi
824End literal mode begun by
825.Sx \&nf .
826.Ss \&in
827Indent relative to the current indentation:
828.Pp
829.D1 Pf \. Sx \&in Op Cm width
830.Pp
831If
832.Cm width
833is signed, the new offset is relative.
834Otherwise, it is absolute.
835This value is reset upon the next paragraph, section, or sub-section.
836.Ss \&na
837Don't align to the right margin.
838.Ss \&nf
839Begin literal mode: all subsequent free-form lines have their end of
840line boundaries preserved.
841May be ended by
842.Sx \&fi .
843.Ss \&sp
844Insert vertical spaces into output with the following syntax:
845.Bd -filled -offset indent
846.Pf \. Sx \&sp
847.Op Cm height
848.Ed
849.Pp
850Insert
851.Cm height
852spaces, which must conform to
853.Sx Scaling Widths .
854If 0, this is equivalent to the
855.Sx \&br
856macro.
857Defaults to 1, if unspecified.
858.Pp
859See also
860.Sx \&br .
861.Sh COMPATIBILITY
862This section documents areas of questionable portability between
863implementations of the
864.Nm
865language.
866.Pp
867.Bl -dash -compact
868.It
869In quoted literals, GNU troff allowed pair-wise double-quotes to produce
870a standalone double-quote in formatted output.
871It is not known whether this behaviour is exhibited by other formatters.
872.It
873troff suppresses a newline before
874.Sq \(aq
875macro output; in mandoc, it is an alias for the standard
876.Sq \&.
877control character.
878.It
879The
880.Sq \eh
881.Pq horizontal position ,
882.Sq \ev
883.Pq vertical position ,
884.Sq \em
885.Pq text colour ,
886.Sq \eM
887.Pq text filling colour ,
888.Sq \ez
889.Pq zero-length character ,
890.Sq \ew
891.Pq string length ,
892.Sq \ek
893.Pq horizontal position marker ,
894.Sq \eo
895.Pq text overstrike ,
896and
897.Sq \es
898.Pq text size
899escape sequences are all discarded in mandoc.
900.It
901The
902.Sq \ef
903scaling unit is accepted by mandoc, but rendered as the default unit.
904.It
905The
906.Sx \&sp
907macro does not accept negative values in mandoc.
908In GNU troff, this would result in strange behaviour.
909.El
910.Sh SEE ALSO
911.Xr man 1 ,
912.Xr mandoc 1 ,
913.Xr mandoc_char 7 ,
914.Xr mdoc 7 ,
915.Xr roff 7 ,
916.Xr tbl 7
917.Sh HISTORY
918The
919.Nm
920language first appeared as a macro package for the roff typesetting
921system in
922.At v7 .
923It was later rewritten by James Clark as a macro package for groff.
924The stand-alone implementation that is part of the
925.Xr mandoc 1
926utility written by Kristaps Dzonsons appeared in
927.Ox 4.6 .
928.Sh AUTHORS
929This
930.Nm
931reference was written by
932.An Kristaps Dzonsons Aq kristaps@bsd.lv .
933.Sh CAVEATS
934Do not use this language.
935Use
936.Xr mdoc 7 ,
937instead.
938