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