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