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