Debian Codegraph @

upstream/debian-trixie/man7/groff_man_style.7

raw
1 '\" t
2 .\" This page is generated by m4 from tmac/groff_man.7.man.in.
3 .TH groff_man_style 7 "3 June 2025" "groff 1.23.0"
4 .SH Name
5 groff_man_style \- GNU
6 .I roff
7 man page tutorial and style guide
8 .
9 .
10 .\" ====================================================================
11 .\" Legal Terms
12 .\" ====================================================================
13 .\"
14 .\" Copyright (C) 1999-2018, 2020-2021 Free Software Foundation, Inc.
15 .\"
16 .\" Permission is granted to make and distribute verbatim copies of this
17 .\" manual provided the copyright notice and this permission notice are
18 .\" preserved on all copies.
19 .\"
20 .\" Permission is granted to copy and distribute modified versions of
21 .\" this manual under the conditions for verbatim copying, provided that
22 .\" the entire resulting derived work is distributed under the terms of
23 .\" a permission notice identical to this one.
24 .\"
25 .\" Permission is granted to copy and distribute translations of this
26 .\" manual into another language, under the above conditions for
27 .\" modified versions, except that this permission notice may be
28 .\" included in translations approved by the Free Software Foundation
29 .\" instead of in the original English.
30 .
31 .
32 .\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
33 .do nr *groff_groff_man_7_man_C \n[.cp]
34 .cp 0
35 .
36 .\" Define fallback for groff 1.23's MR macro if the system lacks it.
37 .nr do-fallback 0
38 .if !\n(.f .nr do-fallback 1 \" mandoc
39 .if \n(.g .if !d MR .nr do-fallback 1 \" older groff
40 .if !\n(.g .nr do-fallback 1 \" non-groff *roff
41 .if \n[do-fallback] \{\
42 . de MR
43 . ie \\n(.$=1 \
44 . I \%\\$1
45 . el \
46 . IR \%\\$1 (\\$2)\\$3
47 . .
48 .\}
49 .rr do-fallback
50 .
51 .
52 .\" ====================================================================
53 .SH Synopsis
54 .\" ====================================================================
55 .
56 .SY "groff \-man"
57 .RI [ option\~ .\|.\|.\&]
58 .RI [ file\~ .\|.\|.]
59 .
60 .SY "groff \-m man"
61 .RI [ option\~ .\|.\|.\&]
62 .RI [ file\~ .\|.\|.]
63 .YS
64 .
65 .
66 .\" ====================================================================
67 .SH Description
68 .\" ====================================================================
69 .
70 The GNU implementation of the
71 .I man
72 macro package is part of the
73 .I groff
74 document formatting system.
75 .
76 It is used to produce manual pages
77 .\" We use an unbreakable space \~ here to keep the phrase intact for
78 .\" its introduction; in subsequent discussion, that is not important.
79 (\(lqman\~pages\(rq)
80 like the one you are reading.
81 .
82 .
83 .P
84 This document presents the macros thematically;
85 for those needing only a quick reference,
86 the following table lists them alphabetically,
87 with cross references to appropriate subsections below.
88 .
89 .
90 .P
91 .TS
92 l l l.
93 Macro Meaning Subsection
94 .T&
95 lB l l.
96 _
97 \&.B Bold Font style macros
98 \&.BI Bold, italic alternating Font style macros
99 \&.BR Bold, roman alternating Font style macros
100 \&.EE Example end Document structure macros
101 \&.EX Example begin Document structure macros
102 \&.I Italic Font style macros
103 \&.IB Italic, bold alternating Font style macros
104 \&.IP Indented paragraph Paragraphing macros
105 \&.IR Italic, roman alternating Font style macros
106 \&.LP Begin paragraph Paragraphing macros
107 \&.ME Mail-to end Hyperlink macros
108 \&.MR Man page cross reference Hyperlink macros
109 \&.MT Mail-to start Hyperlink macros
110 \&.P Begin paragraph Paragraphing macros
111 \&.PP Begin paragraph Paragraphing macros
112 \&.RB Roman, bold alternating Font style macros
113 \&.RE Relative inset end Document structure macros
114 \&.RI Roman, italic alternating Font style macros
115 \&.RS Relative inset start Document structure macros
116 \&.SB Small bold Font style macros
117 \&.SH Section heading Document structure macros
118 \&.SM Small Font style macros
119 \&.SS Subsection heading Document structure macros
120 \&.SY Synopsis start Command synopsis macros
121 \&.TH Title heading Document structure macros
122 \&.TP Tagged paragraph Paragraphing macros
123 \&.TQ Supplemental paragraph tag Paragraphing macros
124 \&.UE URI end Hyperlink macros
125 \&.UR URI start Hyperlink macros
126 \&.YS Synopsis end Command synopsis macros
127 .TE
128 .
129 .
130 .P
131 We discuss other macros
132 .RB ( .AT ,
133 .BR .DT ,
134 .BR .HP ,
135 .BR .OP ,
136 .BR .PD ,
137 and
138 .BR .UC )
139 in subsection \(lqDeprecated features\(rq below.
140 .
141 .
142 .P
143 Throughout Unix documentation,
144 a manual entry is referred to simply as a \(lqman page\(rq,
145 regardless of its length,
146 without gendered implication,
147 and irrespective of the macro package selected for its composition.
148 .
149 .
150 .\" ====================================================================
151 .\" .SS "Input file format"
152 .\" ====================================================================
153 .P
154 Man pages should be encoded using Unicode basic Latin code points
155 exclusively,
156 and employ the Unix line-ending convention
157 (U+000A only).
158 .\" What about rare English words that require diacritics, and
159 .\" proper names that require more than basic Latin?
160 .\"
161 .\" sentence (including end-of-sentence detection)
162 .\" The above distinction works well with filling.
163 .\" Don't fill your input text yourself; let groff do the work.
164 .\" Also good for diffs.
165 .\" escape sequences--pretty much just "see Portability"
166 .
167 .\" ====================================================================
168 .SS "Fundamental concepts"
169 .\" ====================================================================
170 .\" font (family, style [elsewhere known as face])
171 .\" type size
172 .\" typesetter (troff device, PostScript, PDF)
173 .\" terminal (nroff device, emulator, typewriter, TTY)
174 .I groff
175 is a programming system for typesetting:
176 we thus often use the verb \(lqto set\(rq in the sense
177 \(lqto typeset\(rq.
178 .
179 The formatter
180 .MR \%troff 1
181 collects words from the input and
182 .I fills
183 output lines with as many as will fit.
184 .
185 .I Words
186 are separated by spaces and newlines.
187 .\" Also tabs and leaders, but let's not discuss those in man(7).
188 .
189 A transition to a new output line is called a
190 .I break.
191 .
192 When formatted,
193 a word may be broken at hyphens,
194 at
195 .B \e%
196 or
197 .B \e:
198 escape sequences
199 (see subsection \(lqPortability\(rq below),
200 or at predetermined locations
201 if automatic hyphenation is enabled
202 (see the
203 .B \-rHY
204 option in section \(lqOptions\(rq below).
205 .
206 An output line may be supplemented with
207 .I inter-sentence space,
208 and then optionally
209 .I adjusted
210 with more space to a consistent line length
211 (see the
212 .B \-dAD
213 option).
214 .
215 .MR roff 7
216 details these processes.
217 .
218 .
219 .P
220 An input line that starts with a dot (.\&)
221 or neutral apostrophe (\(aq)
222 is a
223 .I control line.
224 .
225 To call a macro,
226 put its name after a dot on a control line.
227 .\" You never need to indent macro calls in man(7), or call them with
228 .\" the no-break control character.
229 .
230 We refer to macros in this document using this leading dot.
231 .
232 Some macros interpret
233 .I arguments,
234 words that follow the macro name.
235 .
236 A newline,
237 unless escaped
238 (see subsection \(lqPortability\(rq below),
239 marks the end of the macro call.
240 .
241 An input line consisting of a dot followed by a newline
242 is called the
243 .I empty request;
244 it does nothing.
245 .
246 .I Text lines
247 are input lines that are not control lines.
248 .
249 .
250 .P
251 We describe below several
252 .I man
253 macros that plant one-line
254 .I input traps:
255 the next input line that directly produces formatted output is treated
256 specially.
257 .
258 For
259 .I man
260 documents that follow the advice in section
261 \[lq]Portability\[rq] below,
262 this means that control lines using the empty request
263 and uncommented input lines ending with an escaped newline
264 do not spring the trap;
265 anything else does
266 (but see the
267 .B .TP
268 macro description).
269 .
270 .
271 .\" ====================================================================
272 .\" .SS "Why have a tutorial and style guide?"
273 .\" ====================================================================
274 .\" the processing pipeline in brief
275 .\" preprocessors, roff itself, various output devices
276 .\" Things that aren't groff--why you want the man page language to be
277 .\" small (mandoc, Kerrisk's man7.org, manpages.debian.org, non-expert
278 .\" humans).
279 .\" possibly exhibit a horrorshow docbook-to-man example
280 .
281 .
282 .br
283 .ne 6v
284 .\" ====================================================================
285 .SS "Macro reference preliminaries"
286 .\" ====================================================================
287 .
288 A tagged paragraph describes each macro.
289 .
290 We present coupled pairs together,
291 as with
292 .B .EX
293 and
294 .BR .EE .
295 .
296 .
297 .br
298 .ne 2v
299 .P
300 Optional macro arguments are indicated by surrounding them with square
301 brackets.
302 .
303 If a macro accepts multiple arguments,
304 those containing space \" or tab (in Plan 9 troff [only?])
305 characters must be double-quoted to be interpreted correctly.
306 .
307 An empty macro argument can be specified with a pair of double-quotes
308 (""),
309 but the
310 .I man
311 package is designed such that this should seldom be necessary.
312 .
313 See section \(lqNotes\(rq below for examples of cases where better
314 alternatives to empty arguments in macro calls are available.
315 .
316 Most macro arguments will be formatted as text in the output;
317 exceptions are noted.
318 .
319 .
320 .\" ====================================================================
321 .SS "Document structure macros"
322 .\" ====================================================================
323 .
324 Document structure macros organize a man page's content.
325 .
326 All of them break the output line.
327 .
328 .B .TH
329 (title heading)
330 identifies the document as a man page and configures the page headers
331 and footers.
332 .
333 Section headings
334 .RB ( .SH ),
335 one of which is mandatory and many of which are conventionally expected,
336 facilitate location of material by the reader and aid the man page
337 writer to discuss all essential aspects of the topic.
338 .
339 Subsection headings
340 .RB ( .SS )
341 are optional and permit sections that grow long to develop in a
342 controlled way.
343 .
344 Many technical discussions benefit from examples;
345 lengthy ones,
346 especially those reflecting multiple lines of input to or output from
347 the system,
348 are usefully bracketed by
349 .B .EX
350 and
351 .BR .EE .
352 .
353 When none of the foregoing meets a structural demand,
354 use
355 .BR .RS / .RE
356 to inset a region within a (sub)section.
357 .
358 .
359 .TP
360 .BI .TH " topic section"\c
361 .RI " [" footer-middle ]\c
362 .RI " [" footer-inside ]\c
363 .RI " [" header-middle ]
364 Determine the contents of the page header and footer.
365 .
366 .I roff
367 systems refer to these collectively as \(lqtitles\(rq.
368 .
369 The subject of the man page is
370 .I topic
371 and the section of the manual to which it belongs is
372 .I section.
373 .
374 This use of \(lqsection\(rq has nothing to do with the section headings
375 otherwise discussed in this page;
376 it arises from the organizational scheme of printed and bound Unix
377 manuals.
378 .
379 See
380 .MR man 1
381 or
382 .MR intro 1
383 for the manual sectioning applicable to your system.
384 .
385 .I topic
386 and
387 .I section
388 are positioned together at the left and right in the header
389 (with
390 .I section
391 in parentheses immediately appended to
392 .IR topic ).
393 .
394 .I footer-middle
395 is centered in the footer.
396 .
397 The arrangement of the rest of the footer depends on whether
398 double-sided layout is enabled with the option
399 .BR \-rD1 .
400 .
401 When disabled (the default),
402 .I footer-inside
403 is positioned at the bottom left.
404 .
405 Otherwise,
406 .I footer-inside
407 appears at the bottom left on recto (odd-numbered) pages,
408 and at the bottom right on verso (even-numbered) pages.
409 .
410 The outside footer is the page number,
411 except in the continuous-rendering mode enabled by the option
412 .BR \-rcR=1 ,
413 in which case it is the
414 .I topic
415 and
416 .I section,
417 as in the header.
418 .
419 .I header-middle
420 is centered in the header.
421 .
422 If
423 .I section
424 is an integer between 1 and\~9 (inclusive),
425 there is no need to specify
426 .I header-middle;
427 .I an.tmac
428 will supply text for it.
429 .
430 The macro package may also abbreviate
431 .I topic
432 and
433 .I footer-inside
434 with ellipses
435 .RB ( .\|.\|.\& )
436 if they would overrun the space available in the header and footer,
437 respectively.
438 .
439 For HTML output,
440 headers and footers are suppressed.
441 .
442 .
443 .IP
444 Additionally,
445 this macro breaks the page,
446 resetting the number to\~1
447 (unless the
448 .B \-rC1
449 option is given).
450 .
451 This feature is intended only for formatting multiple
452 .I man
453 documents in sequence.
454 .
455 .
456 .IP
457 A valid
458 .I man
459 document calls
460 .B .TH
461 once,
462 early in the file,
463 prior to any other macro calls.
464 .
465 .
466 .IP
467 By convention,
468 .I footer-middle
469 is the date of the most recent modification to the man page source
470 document,
471 and
472 .I footer-inside
473 is the name and version or release of the project providing it.
474 .
475 .
476 .TP
477 .BR .SH " ["\c
478 .IR heading-text ]
479 Set
480 .I heading-text
481 as a section heading.
482 .
483 If no argument is given,
484 a one-line input trap is planted;
485 text on the next line
486 .\", which can be formatted with a macro, \" true but discouraged
487 becomes
488 .I heading-text.
489 .
490 The left margin is reset to zero to set the heading text in bold
491 (or the font specified by the string
492 .BR HF ),
493 and,
494 on typesetting devices,
495 slightly larger than the base type size.
496 .
497 If the heading font
498 .B \[rs]*[HF]
499 is bold,
500 use of an italic style in
501 .I heading-text
502 is mapped to the bold-italic style if available in the font family.
503 .
504 The inset level is reset to 1,
505 setting the left margin to the value of the
506 .B IN \" TODO: future: BP or BI register ("base paragraph indentation")
507 register.
508 .
509 Text after
510 .I heading-text
511 is set as an ordinary paragraph
512 .RB ( .P ).
513 .
514 .
515 .IP
516 The content of
517 .I heading-text
518 and ordering of sections follows a set of common practices,
519 as has much of the layout of material within sections.
520 .
521 For example,
522 a section called \(lqName\(rq or \(lqNAME\(rq must exist,
523 must be the first section after the
524 .B .TH
525 call,
526 and must contain only text of the form
527 .RS \" Invisibly move left margin to current .IP indentation.
528 .RS \" Now indent further, visibly.
529 .IR topic [\c
530 .BI , " another-topic"\c
531 .RB "].\|.\|.\& \e\- "\c
532 .I summary-description
533 .RE \" Move left margin back to .IP indentation.
534 for a man page to be properly indexed.
535 .
536 See
537 .MR man 7
538 for the conventions prevailing on your system.
539 .RE \" Move left margin back to standard position.
540 .
541 .
542 .TP
543 .BR .SS " ["\c
544 .IR subheading-text ]
545 Set
546 .I subheading-text
547 as a subsection heading indented between a section heading and an
548 ordinary paragraph
549 .RB ( .P ).
550 .
551 If no argument is given,
552 a one-line input trap is planted;
553 text on the next line
554 .\", which can be formatted with a macro, \" true but discouraged
555 becomes
556 .I subheading-text.
557 .
558 The left margin is reset to the value of the
559 .B SN
560 register to set the heading text in bold
561 (or the font specified by the string
562 .BR HF ).
563 .
564 If the heading font
565 .B \[rs]*[HF]
566 is bold,
567 use of an italic style in
568 .I subheading-text
569 is mapped to the bold-italic style if available in the font family.
570 .
571 The inset level is reset to 1,
572 setting the left margin to the value of the
573 .B IN \" TODO: future: BP or BI register ("base paragraph indentation")
574 register.
575 .
576 Text after
577 .I subheading-text
578 is set as an ordinary paragraph
579 .RB ( .P ).
580 .
581 .
582 .TP
583 .B .EX
584 .TQ
585 .B .EE
586 Begin and end example.
587 .
588 After
589 .BR .EX ,
590 filling is disabled and a constant-width (monospaced) font is selected.
591 .
592 Calling
593 .B .EE
594 enables filling and restores the previous font.
595 .
596 .
597 .IP
598 Example regions are useful for formatting code,
599 shell sessions,
600 and text file contents.
601 .
602 An example region is not
603 a \(lqliteral mode\(rq
604 of any sort:
605 special character escape sequences must still be used to produce correct
606 glyphs for
607 .BR \(aq ,
608 .BR \- ,
609 .BR \(rs ,
610 .BR \(ha ,
611 .BR \(ga ,
612 and
613 .BR \(ti ,
614 and sentence endings are still detected and additional inter-sentence
615 space applied.
616 .
617 If the amount of additional inter-sentence spacing is altered,
618 the rendering of,
619 for instance,
620 regular expressions using
621 .B .\&
622 or
623 .B ?\&
624 followed by multiple spaces can change.
625 .
626 Use the dummy character escape sequence
627 .B \(rs&
628 before the spaces.
629 .
630 .
631 .IP
632 .\" Also see subsection "History" below...
633 These macros are extensions introduced in Ninth Edition Research Unix.
634 .
635 Systems running that
636 .IR troff , \" AT&T Research Unix
637 or those from
638 Documenter's Workbench,
639 Heirloom Doctools,
640 or Plan\~9
641 .I troff
642 support them.
643 .\" Solaris 10 troff does not support .EX/.EE. Neatroff doesn't ship
644 .\" (m)an macros.
645 .
646 To be certain your page will be portable to systems that do not,
647 copy their definitions from the
648 .I \%an\-ext.tmac
649 file of a
650 .I groff
651 installation.
652 .
653 .
654 .TP
655 .BR .RS " ["\c
656 .IR inset-amount ]
657 Start a new relative inset level.
658 .
659 The position of the left margin is saved,
660 then moved right by
661 .I inset-amount,
662 if specified,
663 and by the amount of the
664 .B IN
665 register otherwise.
666 .
667 Calls to
668 .B .RS
669 can be nested;
670 each increments by\~1
671 the inset level used by
672 .BR .RE .
673 .
674 The level prior to any
675 .B .RS
676 calls is\~1.
677 .
678 .
679 .TP
680 .BR .RE " ["\c
681 .IR level ]
682 End a relative inset.
683 .
684 The left margin corresponding to inset level
685 .I level
686 is restored.
687 .
688 If no argument is given,
689 the inset level is reduced by\~1.
690 .
691 .
692 .\" ====================================================================
693 .SS "Paragraphing macros"
694 .\" ====================================================================
695 .
696 An ordinary paragraph
697 .RB ( .P )
698 like this one
699 is set without a first-line indentation at the current left margin.
700 .
701 In man pages and other technical literature,
702 definition lists are frequently encountered;
703 these can be set as \(lqtagged paragraphs\(rq,
704 which have one
705 .RB ( .TP )
706 or more
707 .RB ( .TQ )
708 leading tags followed by a paragraph that has an additional indentation.
709 .
710 The indented paragraph
711 .RB ( .IP )
712 macro is useful to continue the indented content of a narrative started
713 with
714 .BR .TP ,
715 or to present an itemized or ordered list.
716 .
717 All of these macros break the output line.
718 .
719 If another paragraph macro has occurred since the previous
720 .B .SH
721 or
722 .BR .SS ,
723 they
724 (except for
725 .BR .TQ )
726 follow the break with a default amount of vertical space,
727 which can be changed by the deprecated
728 .B .PD
729 macro;
730 see subsection \(lqHorizontal and vertical spacing\(rq below.
731 .
732 They also reset the type size and font style to defaults
733 .RB ( .TQ
734 again excepted);
735 see subsection \(lqFont style macros\(rq below.
736 .
737 .
738 .br
739 .ne 4v
740 .TP
741 .B .P
742 .TQ
743 .B .LP
744 .TQ
745 .B .PP
746 Begin a new paragraph;
747 these macros are synonymous.
748 .
749 The indentation is reset to the default value;
750 the left margin,
751 as affected by
752 .B .RS
753 and
754 .BR .RE ,
755 is not.
756 .
757 .
758 .TP
759 .BR .TP " ["\c
760 .IR indentation ]
761 Set a paragraph with a leading tag,
762 and the remainder of the paragraph indented.
763 .
764 A one-line input trap is planted;
765 text on the next line,
766 which can be formatted with a macro,
767 becomes the tag,
768 which is placed at the current left margin.
769 .
770 The tag can be extended with the
771 .B \(rsc
772 escape sequence.
773 .
774 Subsequent text is indented by
775 .I indentation,
776 if specified,
777 and by the amount of the
778 .B IN
779 register otherwise.
780 .
781 If the tag is not as wide as the indentation,
782 the paragraph starts on the same line as the tag,
783 at the applicable indentation,
784 and continues on the following lines.
785 .
786 Otherwise,
787 the descriptive part of the paragraph begins on the line following the
788 tag.
789 .
790 .
791 .IP
792 The line containing the tag can include a macro call,
793 for instance to set the tag in bold with
794 .BR .B .
795 .
796 .B .TP
797 was used to write the first paragraph of this description of
798 .BR .TP ,
799 and
800 .B .IP
801 the subsequent one.
802 .
803 .
804 .TP
805 .B .TQ
806 Set an additional tag for a paragraph tagged with
807 .BR .TP .
808 .
809 An input trap is planted as with
810 .BR .TP .
811 .
812 .
813 .IP
814 This macro is a GNU extension not defined on systems running
815 AT&T,
816 Plan\~9,
817 or
818 Solaris
819 .IR troff ;
820 see
821 .I \%an\-ext.tmac
822 in section \(lqFiles\(rq below.
823 .
824 .
825 .IP
826 The descriptions of
827 .BR .P ,
828 .BR .LP ,
829 and
830 .B .PP
831 above were written using
832 .B .TP
833 and
834 .BR .TQ .
835 .
836 .
837 .TP
838 .BR .IP " ["\c
839 .IR tag "] "\c
840 .RI [ indentation ]
841 Set an indented paragraph with an optional tag.
842 .
843 The
844 .I tag
845 and
846 .I indentation
847 arguments,
848 if present,
849 are handled as with
850 .BR .TP ,
851 with the exception that the
852 .I tag
853 argument to
854 .B .IP
855 cannot include a macro call.
856 .
857 .
858 .IP
859 Two convenient uses for
860 .B .IP
861 are
862 .
863 .
864 .RS \" Invisibly move left margin to current .IP indentation.
865 .RS 4n \" Now indent further, visibly.
866 .IP (1) 4n
867 to start a new paragraph with the same indentation as an immediately
868 preceding
869 .B .IP
870 or
871 .B .TP
872 paragraph,
873 if no
874 .I indentation
875 argument is given;
876 and
877 .
878 .
879 .IP (2)
880 to set a paragraph with a short
881 .I tag
882 that is not semantically important,
883 such as a bullet (\(bu)\(emobtained with the
884 .B \e(bu
885 special character escape sequence\(emor list enumerator,
886 as seen in this very paragraph.
887 .RE \" Move left margin back to .IP indentation.
888 .RE \" Move left margin back to standard position.
889 .
890 .
891 .\" ====================================================================
892 .SS "Command synopsis macros"
893 .\" ====================================================================
894 .
895 .B .SY
896 and
897 .B .YS
898 aid you to construct a command synopsis that has the classical Unix
899 appearance.
900 .
901 They break the output line.
902 .
903 .\" TODO: Determine whether this (is still? was ever?) true.
904 .\" Furthermore,
905 .\" some tools are able to interpret these macros semantically and treat
906 .\" them appropriately for localization and/or presentation.
907 .
908 .
909 .P
910 These macros are GNU extensions not defined on systems running
911 AT&T,
912 Plan\~9,
913 or
914 Solaris
915 .IR troff ;
916 see
917 .I \%an\-ext.tmac
918 in section \(lqFiles\(rq below.
919 .
920 .
921 .TP
922 .BI .SY " command"
923 Begin synopsis.
924 .
925 A new paragraph begins at the left margin
926 (as with
927 .BR .P )
928 unless
929 .B .SY
930 has already been called without a corresponding
931 .BR .YS ,
932 in which case only a break is performed.
933 .
934 Adjustment and automatic hyphenation are disabled.
935 .
936 .I command
937 is set in bold.
938 .
939 If a break is required,
940 lines after the first are indented by the width of
941 .I command
942 plus a space.
943 .
944 .
945 .TP
946 .B .YS
947 End synopsis.
948 .
949 Indentation,
950 adjustment,
951 and hyphenation
952 are restored to their previous states.
953 .
954 .
955 .P
956 Multiple
957 .BR .SY / .YS
958 blocks can be specified,
959 for instance to distinguish differing modes of operation of a complex
960 command like
961 .MR tar 1 ;
962 each will be vertically separated as paragraphs are.
963 .
964 .
965 .P
966 .B .SY
967 can be repeated before
968 .B .YS
969 to indicate synonymous ways of invoking a particular mode of operation.
970 .
971 .
972 .br
973 .ne 2v
974 .P
975 .IR groff 's
976 own command-line interface serves to illustrate most of the specimens
977 of synopsis syntax one is likely to encounter.
978 .
979 .
980 .IP
981 .\" from src/roff/groff/groff.1.man
982 .EX
983 \&.SY groff
984 \&.RB [ \e-abcCeEgGijklNpRsStUVXzZ ]
985 \&.RB [ \e-d\e\(ti\ec
986 \&.IR cs ]
987 \&.RB [ \e-d\e\(ti\ec
988 \&.IB name =\ec
989 \&.IR string ]
990 \&.RB [ \e-D\e\(ti\ec
991 \&.IR enc ]
992 .EE
993 .
994 .I (and so on similarly)
995 .
996 .EX
997 \&.RI [ file\e\(ti .\e|.\e|.]
998 \&.YS
999 \&.
1000 \&.
1001 \&.SY groff
1002 \&.B \e-h
1003 \&.
1004 \&.SY groff
1005 \&.B \e-\e-help
1006 \&.YS
1007 \&.
1008 \&.
1009 \&.SY groff
1010 \&.B \e-v
1011 \&.RI [ option\e\(ti .\e|.\e|.\e&]
1012 \&.RI [ file\e\(ti .\e|.\e|.]
1013 \&.
1014 \&.SY groff
1015 \&.B \e-\e-version
1016 \&.RI [ option\e\(ti .\e|.\e|.\e&]
1017 \&.RI [ file\e\(ti .\e|.\e|.]
1018 \&.YS
1019 .EE
1020 .
1021 .
1022 .P
1023 produces the following output.
1024 .
1025 .
1026 .RS
1027 .SY groff
1028 .RB [ \-abcCeEgGijklNpRsStUVXzZ ]
1029 .RB [ \-d\~\c
1030 .IR cs ]
1031 .RB [ \-d\~\c
1032 .IB name =\c
1033 .IR string ]
1034 .RB [ \-D\~\c
1035 .IR enc ]
1036 .RB [ \-f\~\c
1037 .IR fam ]
1038 .RB [ \-F\~\c
1039 .IR dir ]
1040 .RB [ \-I\~\c
1041 .IR dir ]
1042 .RB [ \-K\~\c
1043 .IR enc ]
1044 .RB [ \-L\~\c
1045 .IR arg ]
1046 .RB [ \-m\~\c
1047 .IR name ]
1048 .RB [ \-M\~\c
1049 .IR dir ]
1050 .RB [ \-n\~\c
1051 .IR num ]
1052 .RB [ \-o\~\c
1053 .IR list ]
1054 .RB [ \-P\~\c
1055 .IR arg ]
1056 .RB [ \-r\~\c
1057 .IR cn ]
1058 .RB [ \-r\~\c
1059 .IB reg =\c
1060 .IR expr ]
1061 .RB [ \-T\~\c
1062 .IR dev ]
1063 .RB [ \-w\~\c
1064 .IR name ]
1065 .RB [ \-W\~\c
1066 .IR name ]
1067 .RI [ file\~ .\|.\|.]
1068 .YS
1069 .
1070 .
1071 .SY groff
1072 .B \-h
1073 .
1074 .SY groff
1075 .B \-\-help
1076 .YS
1077 .
1078 .
1079 .SY groff
1080 .B \-v
1081 .RI [ option\~ .\|.\|.\&]
1082 .RI [ file\~ .\|.\|.]
1083 .
1084 .SY groff
1085 .B \-\-version
1086 .RI [ option\~ .\|.\|.\&]
1087 .RI [ file\~ .\|.\|.]
1088 .YS
1089 .RE
1090 .
1091 .
1092 .P
1093 Several features of the above example are of note.
1094 .
1095 .
1096 .IP \(bu 2n
1097 The empty request (.),
1098 which does nothing,
1099 is used to vertically space the input file for readability by the
1100 document maintainer.
1101 .
1102 Do not put blank (empty) lines in a man page source document.
1103 .
1104 .
1105 .IP \(bu
1106 Command and option names are presented in
1107 .B bold
1108 to cue the user that they should be input literally.
1109 .
1110 .
1111 .IP \(bu
1112 Option dashes are specified with the
1113 .B \e\-
1114 escape sequence;
1115 this is an important practice to make them clearly visible and to
1116 facilitate copy-and-paste from the rendered man page to a shell prompt
1117 or text file.
1118 .
1119 .
1120 .IP \(bu
1121 Option arguments and command operands are presented in
1122 .I italics
1123 (but see subsection \(lqFont style macros\(rq below regarding terminals)
1124 to cue the user that they must be replaced with appropriate text.
1125 .
1126 .
1127 .IP \(bu
1128 Symbols that are neither to be typed literally nor replaced at the
1129 user's discretion appear in the roman style;
1130 brackets surround optional arguments,
1131 and an ellipsis indicates that the previous syntactical element may be
1132 repeated arbitrarily.
1133 .
1134 .
1135 .IP \(bu
1136 The non-breaking adjustable space escape sequence
1137 .B \e\(ti
1138 is used to prevent the output line from being broken within the option
1139 brackets;
1140 see subsection \(lqPortability\(rq below.
1141 .
1142 .
1143 .IP \(bu
1144 The output line continuation escape sequence
1145 .B \ec
1146 is used with font style alternation macros to allow all three font
1147 styles to be set without (breakable) space among them;
1148 see subsection \(lqPortability\(rq below.
1149 .
1150 .
1151 .IP \(bu
1152 The dummy character escape sequence
1153 .B \e&
1154 follows the ellipsis when further text will follow after space on the
1155 output line,
1156 keeping its last period from being interpreted as the end of a
1157 sentence
1158 .\" ...because it is followed by characters that are transparent to
1159 .\" end-of-sentence detection, and a newline...
1160 and causing additional inter-sentence space to be placed after it.
1161 .
1162 See subsection \(lqPortability\(rq below.
1163 .
1164 .
1165 .\" ====================================================================
1166 .SS "Hyperlink macros"
1167 .\" ====================================================================
1168 .
1169 Man page cross references
1170 like
1171 .MR ls 1
1172 are best presented with
1173 .BR .MR .
1174 .
1175 Text may be hyperlinked to email addresses with
1176 .BR .MT / .ME
1177 or other URIs with
1178 .BR .UR / .UE .
1179 .
1180 Hyperlinked text is supported on HTML
1181 .\", PDF,
1182 and terminal output devices;
1183 terminals and pager programs must support ECMA-48 OSC\~8 escape
1184 sequences
1185 (see
1186 .MR grotty 1 ).
1187 .
1188 When device support is unavailable or disabled with the
1189 .B U
1190 register
1191 (see section \[lq]Options\[rq] below),
1192 .B .MT
1193 and
1194 .B .UR
1195 URIs are rendered between angle brackets after the linked text.
1196 .
1197 .
1198 .P
1199 .BR .MT ,
1200 .BR .ME ,
1201 .BR .UR ,
1202 and
1203 .B .UE
1204 are GNU extensions not defined on systems running
1205 AT&T,
1206 Plan\~9,
1207 or
1208 Solaris
1209 .IR troff ; \" Solaris
1210 see
1211 .I \%an\-ext.tmac
1212 in section \(lqFiles\(rq below.
1213 .
1214 Plan\~9 from User Space's
1215 .I troff \" plan9port
1216 implements
1217 .BR .MR .
1218 .
1219 .
1220 .P
1221 The arguments to
1222 .BR .MR ,
1223 .BR .MT ,
1224 and
1225 .B .UR
1226 should be prepared for typesetting since they can appear in the
1227 output.
1228 .
1229 Use special character escape sequences to encode Unicode basic Latin
1230 characters where necessary,
1231 particularly the hyphen-minus.
1232 .
1233 (See section \[lq]Portability\[rq] below.)
1234 .
1235 URIs can be lengthy;
1236 rendering them can result in jarring adjustment or variations in line
1237 length,
1238 or
1239 .I \%troff
1240 warnings when a hyperlink is longer than an output line.
1241 .
1242 The application of non-printing break point escape sequences
1243 .B \e:
1244 after each slash
1245 (or series thereof),
1246 and before each dot
1247 (or series thereof)
1248 is recommended as a rule of thumb.
1249 .
1250 The former practice avoids forcing a trailing slash in a URI onto a
1251 separate output line,
1252 and the latter helps the reader to avoid mistakenly interpreting a dot
1253 at the end of a line as a period
1254 (or multiple dots as an ellipsis).
1255 .
1256 Thus,
1257 .RS
1258 .EX
1259 \&.UR http://\e:example\e:.com/\e:fb8afcfbaebc74e\e:.cc
1260 .EE
1261 .RE
1262 has several potential break points in the URI shown.
1263 .
1264 Consider adding break points before or after at signs in email
1265 addresses,
1266 and question marks,
1267 ampersands,
1268 and number signs in HTTP(S) URIs.
1269 .
1270 The formatter removes
1271 .B \e:
1272 escape sequences from hyperlinks when supplying device control commands
1273 to output drivers.
1274 .
1275 .
1276 .TP
1277 .BI .MR "\~topic manual-section"\c
1278 .RI \~[ trailing-text ]
1279 .IR (since\~ groff \~1.23) \" TODO: remove note once novelty dies down
1280 Set a man page cross reference as
1281 \[lq]\c
1282 .IB topic ( manual-section )\c
1283 \[rq].
1284 .
1285 If
1286 .I trailing-text
1287 (typically punctuation)
1288 is specified,
1289 it follows the closing parenthesis without intervening space.
1290 .
1291 Hyphenation is disabled while the cross reference is set.
1292 .
1293 .I topic
1294 is set in the font specified by the
1295 .B MF
1296 string.
1297 .
1298 The cross reference hyperlinks to a URI of the form
1299 .RB \[lq] man:\c
1300 .IR topic ( manual-section )\[rq].
1301 .
1302 .
1303 .RS
1304 .IP
1305 .EX
1306 The output driver
1307 \&.MR grops 1
1308 produces PostScript from
1309 \&.I troff
1310 output.
1311 \&.
1312 The Ghostscript program (\[rs]c
1313 \&.MR gs 1 )
1314 interprets PostScript and PDF.
1315 .EE
1316 .RE
1317 .
1318 .
1319 .TP
1320 .BI .MT " address"
1321 .TQ
1322 .BR .ME " ["\c
1323 .IR trailing-text ]
1324 Identify
1325 .I address
1326 as an RFC 6068
1327 .I addr-spec
1328 for a \(lqmailto:\(rq URI with the text between the two macro
1329 calls as the link text.
1330 .
1331 An argument to
1332 .B .ME
1333 is placed after the link text without intervening space.
1334 .
1335 .I address
1336 may not be visible in the rendered document if hyperlinks are enabled
1337 and supported by the output driver.
1338 .
1339 If they are not,
1340 .I address
1341 is set in angle brackets after the link text and before
1342 .I trailing-text.
1343 .
1344 If hyperlinking is enabled but there is no link text,
1345 .I address
1346 is formatted and hyperlinked
1347 .I without
1348 angle brackets.
1349 .
1350 .
1351 .br
1352 .ne 6v
1353 .IP
1354 When rendered by
1355 .I groff
1356 to a PostScript device,
1357 .RS
1358 .IP
1359 .EX
1360 Contact
1361 \&.MT fred\e:.foonly@\e:fubar\e:.net
1362 Fred Foonly
1363 \&.ME
1364 for more information.
1365 .EE
1366 .RE
1367 .
1368 .
1369 .IP
1370 displays as \(lqContact Fred Foonly \(lafred\:.foonly@\:fubar\:.net\(ra
1371 for more information.\(rq.
1372 .
1373 .
1374 .TP
1375 .BI .UR " uri"
1376 .TQ
1377 .BR .UE " ["\c
1378 .IR trailing-text ]
1379 Identify
1380 .I uri
1381 as an RFC 3986 URI hyperlink with the text between the two macro calls
1382 as the link text.
1383 .
1384 An argument to
1385 .B .UE
1386 is placed after the link text without intervening space.
1387 .
1388 .I uri
1389 may not be visible in the rendered document if hyperlinks are enabled
1390 and supported by the output driver.
1391 .
1392 If they are not,
1393 .I uri
1394 is set in angle brackets after the link text and before
1395 .I trailing-text.
1396 .
1397 If hyperlinking is enabled but there is no link text,
1398 .I uri
1399 is formatted and hyperlinked
1400 .I without
1401 angle brackets.
1402 .
1403 .
1404 .IP
1405 When rendered by
1406 .I groff
1407 to a PostScript device,
1408 .RS
1409 .IP
1410 .EX
1411 The GNU Project of the Free Software Foundation
1412 hosts the
1413 \&.UR https://\e:www\e:.gnu\e:.org/\e:software/\e:groff/
1414 \&.I groff
1415 home page
1416 \&.UE .
1417 .EE
1418 .RE
1419 .
1420 .
1421 .IP
1422 displays as \(lqThe GNU Project of the Free Software Foundation hosts
1423 the
1424 .I groff
1425 home page
1426 \(lahttps://\:www\:.gnu\:.org/\:software/\:groff/\(ra.\(rq.
1427 .
1428 .
1429 .P
1430 The hyperlinking of
1431 .B .TP
1432 paragraph tags with
1433 .BR .UR / .UE
1434 and
1435 .BR .MT / .ME
1436 is not yet supported;
1437 if attempted,
1438 the hyperlink will be typeset at the beginning of the indented paragraph
1439 even on hyperlink-supporting devices.
1440 .
1441 .
1442 .\" ====================================================================
1443 .SS "Font style macros"
1444 .\" ====================================================================
1445 .
1446 The
1447 .I man
1448 macro package is limited in its font styling options,
1449 offering only
1450 .BR bold \~( .B ),
1451 .I italic\c
1452 .RB \~( .I ),
1453 and roman.
1454 .
1455 Italic text is usually set underscored instead on terminal devices.
1456 .
1457 The
1458 .B .SM
1459 and
1460 .B .SB
1461 macros set text in roman or bold,
1462 respectively,
1463 at a smaller type size;
1464 these differ visually from regular-sized roman or bold text only on
1465 typesetting devices.
1466 .
1467 It is often necessary to set text in different styles without
1468 intervening space.
1469 .
1470 The macros
1471 .BR .BI ,
1472 .BR .BR ,
1473 .BR .IB ,
1474 .BR .IR ,
1475 .BR .RB ,
1476 and
1477 .BR .RI ,
1478 where \(lqB\(rq,
1479 \(lqI\(rq,
1480 and \(lqR\(rq indicate bold,
1481 italic,
1482 and roman,
1483 respectively,
1484 set their odd- and even-numbered arguments in alternating styles,
1485 with no space separating them.
1486 .
1487 .
1488 .P
1489 Because font styles are presentational rather than semantic,
1490 conflicting traditions have arisen regarding which font styles should be
1491 used to mark file or path names,
1492 environment variables,
1493 and inlined literals.
1494 .
1495 .
1496 .br
1497 .ne 2v
1498 .P
1499 The default type size and family for typesetting devices is 10-point
1500 Times,
1501 except on the
1502 .B \%X75\-12
1503 and
1504 .B \%X100\-12
1505 devices where the type size is 12 points.
1506 .
1507 The default style is roman.
1508 .
1509 .
1510 .TP
1511 .BR .B \~[\c
1512 .IR text ]
1513 Set
1514 .I text
1515 in bold.
1516 .
1517 If no argument is given,
1518 a one-line input trap is planted;
1519 text on the next line,
1520 which can be further formatted with a macro,
1521 is set in bold.
1522 .
1523 .
1524 .IP
1525 Use bold
1526 for literal portions of syntax synopses,
1527 for command-line options in running text,
1528 and for literals that are major topics of the subject under discussion;
1529 for example,
1530 this page uses bold for macro,
1531 string,
1532 and register names.
1533 .
1534 In an
1535 .BR .EX / .EE
1536 example of interactive I/O
1537 (such as a shell session),
1538 set only user input in bold.
1539 .
1540 .
1541 .
1542 .TP
1543 .BR .I \~[\c
1544 .IR text ]
1545 Set
1546 .I text
1547 in an italic or oblique face.
1548 .
1549 If no argument is given,
1550 a one-line input trap is planted;
1551 text on the next line,
1552 which can be further formatted with a macro,
1553 is set in an italic or oblique face.
1554 .
1555 .
1556 .IP
1557 Use italics
1558 for file and path names,
1559 for environment variables,
1560 for C data types,
1561 for enumeration or preprocessor constants in C,
1562 for variant (user-replaceable) portions of syntax synopses,
1563 for the first occurrence (only) of a technical concept being introduced,
1564 for names of journals and of literary works longer than an article,
1565 and anywhere a parameter requiring replacement by the user is
1566 encountered.
1567 .
1568 An exception involves variant text in a context already typeset in
1569 italics,
1570 such as file or path names with replaceable components;
1571 in such cases,
1572 follow the convention of mathematical typography:
1573 set the file or path name in italics as usual
1574 but use roman for the variant part
1575 (see
1576 .B .IR
1577 and
1578 .B .RI
1579 below),
1580 and italics again in running roman text when referring to the variant
1581 material.
1582 .
1583 .
1584 .TP
1585 .BR .SM \~[\c
1586 .IR text ]
1587 Set
1588 .I text
1589 one point smaller than the default type size on typesetting devices.
1590 .
1591 If no argument is given,
1592 a one-line input trap is planted;
1593 text on the next line,
1594 which can be further formatted with a macro,
1595 is set smaller.
1596 .
1597 .
1598 .IP
1599 .I Note:
1600 terminals will render
1601 .I text
1602 at normal size instead.
1603 .
1604 Do not rely upon
1605 .B .SM
1606 to communicate semantic information distinct from using roman style at
1607 normal size;
1608 it will be hidden from readers using such devices.
1609 .
1610 .
1611 .TP
1612 .BR .SB \~[\c
1613 .IR text ]
1614 Set
1615 .I text
1616 in bold and
1617 (on typesetting devices)
1618 one point smaller than the default type size.
1619 .
1620 If no argument is given,
1621 a one-line input trap is planted;
1622 text on the next line,
1623 which can be further formatted with a macro,
1624 is set smaller and in bold.
1625 .
1626 This macro is an extension introduced in SunOS\~4.0.
1627 .
1628 .
1629 .IP
1630 .I Note:
1631 terminals will render
1632 .I text
1633 in bold at the normal size instead.
1634 .
1635 Do not rely upon
1636 .B .SB
1637 to communicate semantic information distinct from using bold style at
1638 normal size;
1639 it will be hidden from readers using such devices.
1640 .
1641 .
1642 .P
1643 Observe what is
1644 .I not
1645 prescribed for setting in bold or italics above:
1646 elements of \(lqsynopsis language\(rq such as ellipses and brackets
1647 around options;
1648 proper names and adjectives;
1649 titles of anything other than major works of literature;
1650 identifiers for standards documents or technical reports such as
1651 CSTR\~#54,
1652 RFC\~1918,
1653 Unicode\~13.0,
1654 or
1655 POSIX.1-2017;
1656 acronyms;
1657 and occurrences after the first of a technical term.
1658 .
1659 .
1660 .P
1661 Be frugal with italics for emphasis,
1662 and particularly with bold.
1663 .
1664 Article titles and brief runs of literal text,
1665 such as references to individual characters or short strings,
1666 including section and subsection headings of man pages,
1667 are suitable objects for quotation;
1668 see the
1669 .BR \e(lq ,
1670 .BR \e(rq ,
1671 .BR \e(oq ,
1672 and
1673 .B \e(cq
1674 escape sequences in subsection \(lqPortability\(rq below.
1675 .
1676 .
1677 .P
1678 Unlike the above font style macros,
1679 the font style alternation macros below set no input traps;
1680 they must be given arguments to have effect.
1681 .
1682 Italic corrections are applied as appropriate.
1683 .
1684 If a space is required within an argument,
1685 first consider whether the same result could be achieved with as much
1686 clarity by using single-style macros on separate input lines.
1687 .
1688 When it cannot,
1689 double-quote an argument containing embedded space characters.
1690 .
1691 Setting all three different styles within a word
1692 presents challenges;
1693 it is possible with the
1694 .B \ec
1695 and/or
1696 .B \ef
1697 escape sequences.
1698 .
1699 See subsection \(lqPortability\(rq
1700 below for approaches.
1701 .
1702 .
1703 .TP
1704 .BI .BI " bold-text italic-text "\c
1705 \&.\|.\|.\&
1706 Set each argument in bold and italics,
1707 alternately.
1708 .
1709 .
1710 .RS
1711 .IP
1712 .\" from src/roff/troff/troff.1.man
1713 .EX
1714 \&.BI \-r\~ register = numeric-expression
1715 .EE
1716 .RE
1717 .
1718 .
1719 .TP
1720 .BI .BR " bold-text roman-text "\c
1721 \&.\|.\|.\&
1722 Set each argument in bold and roman,
1723 alternately.
1724 .
1725 .
1726 .RS
1727 .IP
1728 .\" from tmac/groff_ms.7.man
1729 .EX
1730 After
1731 \&.B .NH
1732 is called,
1733 .EE
1734 .RE
1735 .
1736 .
1737 .TP
1738 .BI .IB " italic-text bold-text "\c
1739 \&.\|.\|.\&
1740 Set each argument in italics and bold,
1741 alternately.
1742 .
1743 .
1744 .RS
1745 .IP
1746 .\" from src/preproc/pic/pic.1.man
1747 .EX
1748 In places where
1749 \&.IB n th
1750 is allowed,
1751 .EE
1752 .RE
1753 .
1754 .
1755 .TP
1756 .BI .IR " italic-text roman-text "\c
1757 \&.\|.\|.\&
1758 Set each argument in italics and roman,
1759 alternately.
1760 .
1761 .
1762 .RS
1763 .IP
1764 .\" from src/preproc/pic/pic.1.man
1765 .EX
1766 Use GNU
1767 \&.IR pic \[aq]s
1768 \&.B figname
1769 command to change the name of the vbox.
1770 .EE
1771 .RE
1772 .
1773 .
1774 .TP
1775 .BI .RB " roman-text bold-text "\c
1776 \&.\|.\|.\&
1777 Set each argument in roman and bold,
1778 alternately.
1779 .
1780 .
1781 .RS
1782 .IP
1783 .\" from src/preproc/pic/pic.1.man
1784 .EX
1785 if
1786 \&.I file
1787 is
1788 \&.RB \[rs][lq] \[rs]\- \[rs][rq],
1789 the standard input stream is read.
1790 .RE
1791 .EE
1792 .
1793 .
1794 .TP
1795 .BI .RI " roman-text italic-text "\c
1796 \&.\|.\|.\&
1797 Set each argument in roman and italics,
1798 alternately.
1799 .
1800 .
1801 .RS
1802 .IP
1803 .\" from src/preproc/pic/pic.1.man
1804 .EX
1805 \&.RI ( tpic
1806 was a fork of AT&T
1807 \&.I pic \" AT&T
1808 by Tim Morgan of the University of California at Irvine
1809 .EE
1810 .RE
1811 .
1812 .
1813 .\" ====================================================================
1814 .SS "Horizontal and vertical spacing"
1815 .\" ====================================================================
1816 .
1817 The
1818 .I indentation
1819 argument accepted by
1820 .BR .IP ,
1821 .BR .TP ,
1822 and the deprecated
1823 .B .HP
1824 is a number plus an optional scaling unit,
1825 as is
1826 .BR .RS 's
1827 .IR inset-amount .
1828 .
1829 If no scaling unit is given,
1830 the
1831 .I man
1832 package assumes \(lqn\(rq;
1833 that is,
1834 the width of a letter \(lqn\(rq in the font current when the macro is
1835 called
1836 (see section \(lqMeasurements\(rq in
1837 .MR groff 7 ).
1838 .
1839 An indentation specified in a call to
1840 .BR .IP ,
1841 .BR .TP ,
1842 or the deprecated
1843 .B .HP
1844 persists until
1845 (1) another of these macros is called with an
1846 .I indentation
1847 argument,
1848 or
1849 (2)
1850 .BR .SH ,
1851 .BR .SS ,
1852 or
1853 .B .P
1854 or its synonyms is called;
1855 these clear the indentation entirely.
1856 .
1857 .
1858 .P
1859 The left margin used by ordinary paragraphs set with
1860 .B .P
1861 (and its synonyms)
1862 not within an
1863 .BR .RS / .RE
1864 relative inset
1865 .\" TODO: future: BP or BI register ("base paragraph indentation")
1866 is 7.2n for typesetting devices
1867 and 7n for terminal devices
1868 (but see the
1869 .B \-rIN
1870 option).
1871 .
1872 Headers,
1873 footers
1874 (both set with
1875 .BR .TH ),
1876 and section headings
1877 .RB ( .SH )
1878 are set at the page offset
1879 (see
1880 .MR groff 7 )
1881 and subsection headings
1882 .RB ( .SS )
1883 indented from it by 3n
1884 (but see the
1885 .B \-rSN
1886 option).
1887 .
1888 .\" XXX: This is not true, but they do handle it badly.
1889 .\" HTML output devices ignore indentation.
1890 .
1891 .
1892 .P
1893 It may be helpful to think of the left margin and indentation as related
1894 but distinct concepts;
1895 .IR groff 's
1896 implementation of the
1897 .I man
1898 macro package tracks them separately.
1899 .
1900 The left margin is manipulated by
1901 .B .RS
1902 and
1903 .B .RE
1904 (and by
1905 .\".BR .TH ,\" True but not to be encouraged within a document.
1906 .B .SH
1907 and
1908 .BR .SS ,
1909 which reset it to the default).
1910 .
1911 Indentation is controlled by the paragraphing macros
1912 (though,
1913 again,
1914 .\".BR .TH ,
1915 .B .SH
1916 and
1917 .B .SS
1918 reset it);
1919 it is imposed by the
1920 .BR .TP ,
1921 .BR .IP ,
1922 and deprecated
1923 .B .HP
1924 macros,
1925 and cancelled by
1926 .B .P
1927 and its synonyms.
1928 .
1929 An extensive example follows.
1930 .
1931 .
1932 .P
1933 This ordinary
1934 .RB ( .P )
1935 paragraph is not in a relative inset nor does it possess an indentation.
1936 .
1937 .
1938 .RS
1939 .P
1940 Now we have created a relative inset
1941 (in other words,
1942 moved the left margin)
1943 with
1944 .B .RS
1945 and started another ordinary paragraph with
1946 .BR .P .
1947 .
1948 .
1949 .TP
1950 .B tag
1951 This tagged paragraph,
1952 set with
1953 .BR .TP ,
1954 is still within the
1955 .B .RS
1956 region,
1957 but lines after the first have a supplementary indentation that the
1958 tag lacks.
1959 .
1960 .
1961 .IP
1962 A paragraph like this one,
1963 set with
1964 .BR .IP ,
1965 will appear to the reader as also associated with the tag above,
1966 because
1967 .B .IP
1968 re-uses the previous paragraph's indentation unless given an argument
1969 to change it.
1970 .
1971 This paragraph is affected both by the moved left margin
1972 .RB ( .RS )
1973 and indentation
1974 .RB ( .IP ).
1975 .
1976 .TS
1977 box;
1978 l.
1979 This table is affected both by
1980 the left margin and indentation.
1981 .TE
1982 .
1983 .
1984 .IP \(bu
1985 This indented paragraph has a bullet for a tag,
1986 making it more obvious that the left margin and indentation are
1987 distinct;
1988 only the former affects the tag,
1989 but both affect the text of the paragraph.
1990 .
1991 .
1992 .br
1993 .ne 3v
1994 .P
1995 This ordinary
1996 .RB ( .P )
1997 paragraph resets the indentation,
1998 but the left margin is still inset.
1999 .
2000 .TS
2001 box;
2002 l.
2003 This table is affected only
2004 by the left margin.
2005 .TE
2006 .RE
2007 .
2008 .
2009 .P
2010 Finally,
2011 we have ended the relative inset by using
2012 .BR .RE ,
2013 which
2014 (because we used only one
2015 .BR .RS / .RE
2016 pair)
2017 has reset the left margin to the default.
2018 .
2019 This is an ordinary
2020 .B .P
2021 paragraph.
2022 .
2023 .
2024 .P
2025 Resist the temptation to mock up tabular or multi-column output with
2026 tab characters or the indentation arguments to
2027 .BR .IP ,
2028 .BR .TP ,
2029 .BR .RS ,
2030 or the deprecated
2031 .BR .HP ;
2032 the result may not render comprehensibly on an output device you fail to
2033 check,
2034 or which is developed in the future.
2035 .
2036 The table preprocessor
2037 .MR \%tbl 1
2038 can likely meet your needs.
2039 .
2040 .
2041 .P
2042 Several macros insert vertical space:
2043 .BR .SH ,
2044 .BR .SS ,
2045 .BR .TP ,
2046 .B .P
2047 (and its synonyms),
2048 .BR .IP ,
2049 and the deprecated
2050 .BR .HP .
2051 .
2052 The default inter-section and inter-paragraph spacing is
2053 is 1v for terminal devices
2054 and 0.4v for typesetting devices
2055 (\(lqv\(rq is a unit of vertical distance,
2056 where 1v is the distance between adjacent text baselines in a
2057 single-spaced document).
2058 .
2059 (The deprecated macro
2060 .B .PD
2061 can change this vertical spacing,
2062 but its use is discouraged.)
2063 .
2064 Between
2065 .B .EX
2066 and
2067 .B .EE
2068 calls,
2069 the inter-paragraph spacing is 1v regardless of output
2070 device.
2071 .
2072 .
2073 .\" ====================================================================
2074 .SS Registers
2075 .\" ====================================================================
2076 .
2077 Registers are described in section \(lqOptions\(rq below.
2078 .
2079 They can be set not only on the command line but in the site
2080 .I man.local
2081 file as well;
2082 see section \(lqFiles\(rq below.
2083 .
2084 .
2085 .br
2086 .ne 7v
2087 .\" ====================================================================
2088 .SS Strings
2089 .\" ====================================================================
2090 .
2091 The following strings are defined for use in man pages.
2092 .
2093 .
2094 Others are supported for configuration of rendering parameters;
2095 see section \(lqOptions\(rq below.
2096 .
2097 .
2098 .TP
2099 .B \e*R
2100 interpolates a special character escape sequence for the \(lqregistered
2101 sign\(rq glyph,
2102 .BR \e(rg ,
2103 if available,
2104 and \(lq(Reg.)\(rq otherwise.
2105 .
2106 .
2107 .
2108 .TP
2109 .B \e*S
2110 interpolates an escape sequence setting the type size to the document
2111 default.
2112 .
2113 .
2114 .TP
2115 .B \e*(lq
2116 .TQ
2117 .B \e*(rq
2118 interpolate special character escape sequences for left and right
2119 double-quotation marks,
2120 .B \e(lq
2121 and
2122 .BR \e(rq ,
2123 respectively.
2124 .
2125 .
2126 .TP
2127 .B \e*(Tm
2128 interpolates a special character escape sequence for the \(lqtrade mark
2129 sign\(rq glyph,
2130 .BR \e(tm ,
2131 if available,
2132 and \(lq(TM)\(rq otherwise.
2133 .
2134 .
2135 .P
2136 None of the above is necessary in a contemporary man page.
2137 .
2138 .B \e*S
2139 is superfluous,
2140 since type size changes are invisible on terminal devices and macros
2141 that change it restore its original value afterward.
2142 .
2143 Better alternatives exist for the rest;
2144 simply use the
2145 .BR \(rs(rg , \" Heirloom Doctools, mandoc, neatmkfn, Plan 9, Solaris
2146 .BR \(rs(lq , \" Heirloom Doctools, mandoc, neatmkfn, Plan 9
2147 .BR \(rs(rq , \" Heirloom Doctools, mandoc, neatmkfn, Plan 9
2148 and
2149 .B \(rs(tm \" Heirloom Doctools, mandoc, neatmkfn, Plan 9
2150 special character escape sequences directly.
2151 .
2152 Unless a man page author is aiming for a pathological level of
2153 portability,
2154 such as the composition of pages for consumption on simulators of 1980s
2155 Unix systems
2156 (or Solaris
2157 .IR troff ,
2158 though even it supports
2159 .BR \(rs(rg ),
2160 the above strings should be avoided.
2161 .
2162 .
2163 .\" ====================================================================
2164 .SS Portability
2165 .\" ====================================================================
2166 .
2167 It is wise to quote multi-word section and subsection headings;
2168 the
2169 .B .SH
2170 and
2171 .B .SS
2172 macros of
2173 .MR man 7
2174 implementations descended from Seventh Edition Unix supported six
2175 arguments at most.
2176 .
2177 A similar restriction applied to the
2178 .BR .B ,
2179 .BR .I ,
2180 .BR .SM ,
2181 and font style alternation macros.
2182 .
2183 .
2184 .P
2185 The two major syntactical categories for formatting control in the
2186 .I roff
2187 language are requests and escape sequences.
2188 .
2189 Since the
2190 .I man
2191 macros are implemented in terms of
2192 .I groff
2193 requests and escape sequences,
2194 one can,
2195 in principle,
2196 supplement the functionality of
2197 .I man
2198 with these lower-level elements where necessary.
2199 .
2200 .
2201 .br
2202 .ne 2v
2203 .P
2204 However,
2205 using raw
2206 .I groff
2207 requests
2208 (apart from the empty request
2209 .RB \(lq . \(rq)\&
2210 is likely to make your page render poorly when processed by other tools;
2211 many of these attempt to interpret page sources directly for conversion
2212 to HTML.
2213 .
2214 Some requests make implicit assumptions about things like character
2215 and page sizes that may not hold in an HTML environment;
2216 also,
2217 many of these viewers don't interpret the full
2218 .I groff
2219 vocabulary,
2220 a problem that can lead to portions of your text being omitted
2221 or presented incomprehensibly.
2222 .
2223 .
2224 .P
2225 For portability to modern viewers,
2226 it is best to write your page solely with the macros described in this
2227 page
2228 (except for the ones identified as deprecated,
2229 which should be avoided).
2230 .
2231 The macros we have described as extensions
2232 .RB ( .EX / .EE ,
2233 .BR .SY / .YS ,
2234 .BR .TQ ,
2235 .BR .UR / .UE ,
2236 .BR .MT / .ME ,
2237 .BR .MR ,
2238 and
2239 .BR .SB )
2240 should be used with caution,
2241 as they may not be built in to some viewer that is important to your
2242 audience.
2243 .
2244 See
2245 .I \%an\-ext.tmac
2246 in section \(lqFiles\(rq below.
2247 .
2248 .
2249 .P
2250 Similar caveats apply to escape sequences.
2251 .
2252 Some escape sequences are however required for correct typesetting
2253 even in man pages and usually do not cause portability problems.
2254 .
2255 Several of these render glyphs corresponding to punctuation code points
2256 in the Unicode basic Latin range
2257 (U+0000\(enU+007F)
2258 that are handled specially in
2259 .I roff
2260 input;
2261 the escape sequences below must be used to render them correctly and
2262 portably when documenting material that uses them
2263 syntactically\(emnamely,
2264 any of the set
2265 .B \(aq \- \(rs \(ha \(ga \(ti
2266 (apostrophe,
2267 dash or minus,
2268 backslash,
2269 caret,
2270 grave accent,
2271 tilde).
2272 .
2273 .
2274 .br
2275 .ne 2v
2276 .TP
2277 .B \e\(dq
2278 Comment.
2279 .
2280 Everything after the double-quote to the end of the input line is
2281 ignored.
2282 .
2283 Whole-line comments should be placed immediately after the empty request
2284 .RB (\(lq . \(rq).
2285 .
2286 .
2287 .TP
2288 .BI \e newline
2289 Join the next input line to the current one.
2290 .
2291 Except for the update of the input line counter
2292 (used for diagnostic messages and related purposes),
2293 a series of lines ending in backslash-newline appears to
2294 .I groff
2295 as a single input line.
2296 .
2297 Use this escape sequence to split excessively long input lines for
2298 document maintenance.
2299 .
2300 .
2301 .TP
2302 .B \e%
2303 Control hyphenation.
2304 .
2305 The location of this escape sequence within a word marks a hyphenation
2306 point,
2307 supplementing
2308 .IR groff 's
2309 automatic hyphenation patterns.
2310 .
2311 At the beginning of a word,
2312 it suppresses any hyphenation breaks within
2313 .I except
2314 those specified with
2315 .BR \e% .
2316 .
2317 .
2318 .TP
2319 .B \e:
2320 Insert a non-printing break point.
2321 .
2322 A word can break at such a point,
2323 but a hyphen glyph is not written to the output if it does.
2324 .
2325 This escape sequence is an input word boundary,
2326 so the remainder of the word is subject to hyphenation as normal.
2327 .
2328 You can use
2329 .B \e:
2330 and
2331 .B \e%
2332 in combination to control breaking of a file name or URI or to permit
2333 hyphenation only after certain explicit hyphens within a word.
2334 .
2335 See subsection \[lq]Hyperlink macros\[rq] above for an example.
2336 .
2337 .
2338 .IP
2339 This escape sequence is a
2340 .I groff
2341 extension also supported by Heirloom Doctools
2342 .I troff \" Heirloom
2343 050915 (September 2005),
2344 .I mandoc
2345 1.14.5 (2019-03-10),
2346 and
2347 .I neatroff
2348 (commit 399a4936,
2349 2014-02-17),
2350 but not by Plan\~9,
2351 Solaris,
2352 or Documenter's Workbench
2353 .IR troff s. \" Plan 9, Solaris, DWB
2354 .\" as of this writing, 2022-08-13
2355 .
2356 .
2357 .TP
2358 .B \e\(ti
2359 Adjustable non-breaking space.
2360 .
2361 Use this escape sequence to prevent a break inside a short phrase or
2362 between a numerical quantity and its corresponding unit(s).
2363 .
2364 .
2365 .RS
2366 .IP
2367 .EX
2368 Before starting the motor,
2369 set the output speed to\e\(ti1.
2370 There are 1,024\e\(tibytes in 1\e\(tiKiB.
2371 CSTR\e\(ti#8 documents the B\e\(tilanguage.
2372 .EE
2373 .RE
2374 .
2375 .
2376 .\" BEGIN Keep in sync with groff.texi node "Other Differences" and
2377 .\" groff_diff(7).
2378 .IP
2379 This escape sequence is a
2380 .I groff
2381 extension also supported by Heirloom Doctools
2382 .I troff \" Heirloom
2383 050915 (September 2005),
2384 .I mandoc
2385 1.9.5 (2009-09-21),
2386 .I neatroff
2387 (commit 1c6ab0f6e,
2388 2016-09-13),
2389 and
2390 Plan\~9 from User Space
2391 .I troff \" Plan 9
2392 (commit 93f8143600,
2393 2022-08-12),
2394 but not by Solaris
2395 or Documenter's Workbench
2396 .IR troff s. \" Solaris, DWB
2397 .\" as of this writing, 2022-08-13
2398 .\" END Keep in sync with groff.texi node "Other Differences" and
2399 .\" groff_diff(7).
2400 .
2401 .
2402 .TP
2403 .B \e&
2404 Dummy character.
2405 .
2406 Insert at the beginning of an input line to prevent a dot or apostrophe
2407 from being interpreted as beginning a
2408 .I roff
2409 control line.
2410 .
2411 Append to an end-of-sentence punctuation sequence to keep it from being
2412 recognized as such.
2413 .
2414 .
2415 .TP
2416 .B \e|
2417 Thin space
2418 (one-sixth em on typesetters,
2419 zero-width on terminals);
2420 a non-breaking space.
2421 .
2422 Used primarily in ellipses
2423 (\(lq.\e|.\e|.\(rq)
2424 to space the dots more pleasantly on typesetting devices like
2425 .BR dvi ,
2426 .BR pdf ,
2427 and
2428 .BR ps .
2429 .
2430 .
2431 .TP
2432 .B \ec
2433 End a text line without inserting space or attempting a break.
2434 .
2435 .\" TODO: When we explain what a "sentence" is, move this parenthetical
2436 .\" there.
2437 Normally,
2438 if filling is enabled,
2439 the end of a text line is treated like a space;
2440 .\" end-of-sentence detection is performed, and...
2441 an output line
2442 .I may
2443 be broken there
2444 (if not,
2445 an adjustable space is inserted);
2446 if filling is disabled,
2447 the line
2448 .I will
2449 be broken there,
2450 as in
2451 .BR .EX / .EE
2452 examples.
2453 .
2454 The next line is interpreted as usual and can include a macro call
2455 (contrast with
2456 .BI \e newline\/\c
2457 ).
2458 .
2459 .B \(rsc
2460 is useful when three font styles are
2461 needed in a single word,
2462 as in a command synopsis.
2463 .
2464 .
2465 .RS
2466 .IP
2467 .\" from contrib/pdfmark/pdfroff.1.man
2468 .EX
2469 \&.RB [ \e\-\e\-stylesheet=\ec
2470 \&.IR name ]
2471 .EE
2472 .RE
2473 .
2474 .
2475 .IP
2476 It also helps when changing font styles in
2477 .BR .EX / .EE
2478 examples,
2479 since they are not filled.
2480 .
2481 .
2482 .RS
2483 .IP
2484 .\" from src/devices/grotty/grotty.1.man
2485 .EX
2486 \&.EX
2487 $ \ec
2488 \&.B groff \e\-T utf8 \e\-Z \ec
2489 \&.I file \ec
2490 \&.B | grotty \e\-i
2491 \&.EE
2492 .EE
2493 .RE
2494 .
2495 .
2496 .IP
2497 Alternatively,
2498 and perhaps with better portability,
2499 the
2500 .B \ef
2501 font selection escape sequence can be used;
2502 see below.
2503 .
2504 Using
2505 .B \ec
2506 to continue a
2507 .B .TP
2508 paragraph tag across multiple input lines will render incorrectly with
2509 .I groff
2510 1.22.3,
2511 .I mandoc
2512 1.14.1,
2513 older versions of these programs,
2514 and perhaps with some other formatters.
2515 .
2516 .
2517 .TP
2518 .B \ee
2519 Format the current escape character on the output;
2520 widely used in man pages to render a backslash glyph.
2521 .
2522 .\" Don't bold the .ec request in this discussion; it's not a major
2523 .\" topic of _this_ page as it would be in groff(7). Also, we don't
2524 .\" want to encourage people to mess with this old kludge by drawing
2525 .\" attention to it.
2526 It works reliably as long as the \[lq].ec\[rq] request is not used,
2527 which should never happen in man pages,
2528 and it is slightly more portable than the more explicit
2529 .B \e(rs
2530 (\(lqreverse solidus\(rq) special character escape sequence.
2531 .
2532 .
2533 .TP
2534 .BR \efB ,\~ \efI ,\~ \efR ,\~ \efP
2535 Switch to bold,
2536 italic,
2537 roman,
2538 or back to the previous style,
2539 respectively.
2540 .
2541 Either
2542 .B \ef
2543 or
2544 .B \ec
2545 is needed when three different font styles are required in a word.
2546 .
2547 .
2548 .RS
2549 .IP
2550 .\" second example from contrib/pdfmark/pdfroff.1.man
2551 .EX
2552 \&.RB [ \e\-\e\-reference\e\-dictionary=\efI\e,name\e/\efP ]
2553 .IP
2554 \&.RB [ \e\-\e\-reference\e\-dictionary=\ec
2555 \&.IR name ]
2556 .EE
2557 .RE
2558 .
2559 .
2560 .IP
2561 Style escape sequences may be more portable than
2562 .BR \ec .
2563 .
2564 As shown above,
2565 it is up to you to account for italic corrections with
2566 .\" Normally we don't quote escape sequences, but these use
2567 .\" potentially-confusing prose punctuation.
2568 .RB \(lq \^\e\|/\^ \(rq
2569 and
2570 .RB \(lq \^\e\^, \(rq,
2571 which are themselves GNU extensions,
2572 if desired and if supported by your implementation.
2573 .
2574 .
2575 .IP
2576 .B \efP
2577 reliably returns to the style in use immediately preceding the
2578 previous
2579 .B \ef
2580 escape sequence only if no
2581 sectioning,
2582 paragraph,
2583 or style macro calls have intervened.
2584 .
2585 .
2586 .IP
2587 As long as at most two styles are needed in a word,
2588 style macros like
2589 .B .B
2590 and
2591 .B .BI
2592 usually result in more readable
2593 .I roff
2594 source than
2595 .B \ef
2596 escape sequences do.
2597 .
2598 .
2599 .P
2600 Several special characters are also widely portable.
2601 .\" meaning: groff, Heirloom Doctools troff, neatroff, mandoc
2602 .
2603 Except for
2604 .BR \[rs]\- ,
2605 .BR \[rs](em ,
2606 and
2607 .BR \[rs](ga ,
2608 AT&T
2609 .I troff
2610 did not consistently define the characters listed below,
2611 .\" Only \-, \(em, and \(ga were documented in CSTR #54 (1976). CSTR
2612 .\" #54 (1992) offers no _comprehensive_ list but shows \(en in its
2613 .\" PostScript DESC file example. In DWB 3.3, \(aq was supported by the
2614 .\" "post" device, and \(dq by "pcl" and "Latin1".
2615 but its descendants,
2616 like Plan\~9 or Solaris
2617 .IR troff , \" Plan 9, Solaris
2618 can be made to support them by defining them in font description files,
2619 making them aliases of existing glyphs if necessary;
2620 see
2621 .MR groff_font 5 .
2622 .
2623 .
2624 .TP
2625 .B \e\-
2626 Minus sign or basic Latin hyphen-minus.
2627 .
2628 This escape sequence produces the Unix command-line option dash in the
2629 output.
2630 .
2631 .RB \(lq \- \(rq
2632 is a hyphen in the
2633 .I roff
2634 language;
2635 some output devices replace it with U+2010
2636 (hyphen)
2637 or similar.
2638 .
2639 .
2640 .TP
2641 .B \e(aq
2642 Basic Latin neutral apostrophe.
2643 .
2644 Some output devices format
2645 .RB \(lq\| \(aq \|\(rq
2646 as a right single quotation mark.
2647 .
2648 .
2649 .br
2650 .ne 3v
2651 .TP
2652 .B \e(oq
2653 .TQ
2654 .B \e(cq
2655 Opening (left) and closing (right) single quotation marks.
2656 .
2657 Use these for paired directional single quotes,
2658 \(oqlike this\(cq.
2659 .
2660 .
2661 .TP
2662 .B \e(dq
2663 Basic Latin quotation mark
2664 (double quote).
2665 .
2666 Use in macro calls to prevent
2667 .\" This page prefers double quotes, but not here because they are more
2668 .\" confusing to the eye when another double quote is what is quoted!
2669 .RB \(oq\| \(dq \|\(rq
2670 .\" AT&T: .RB """
2671 from being interpreted as beginning a quoted argument,
2672 or simply for readability.
2673 .
2674 .
2675 .RS
2676 .IP
2677 .\" from src/preproc/eqn/eqn.1.man
2678 .EX
2679 \&.TP
2680 \&.BI \(dqsplit \e(dq\(dq text \e(dq
2681 .EE
2682 .RE
2683 .
2684 .
2685 .br
2686 .\" XXX: We need only 2v, but 2v more are necessary due to bad
2687 .\" interaction with TP's own use of the ne request.
2688 .ne 4v
2689 .TP
2690 .B \e(lq
2691 .TQ
2692 .B \e(rq
2693 Left and right double quotation marks.
2694 .
2695 Use these for paired directional double quotes,
2696 \(lqlike this\(rq.
2697 .
2698 .
2699 .TP
2700 .B \e(em
2701 Em-dash.
2702 .
2703 Use for an interruption\(emsuch as this one\(emin a sentence.
2704 .
2705 .
2706 .TP
2707 .B \e(en
2708 En-dash.
2709 .
2710 Use to separate the ends of a range,
2711 particularly between numbers;
2712 for example,
2713 \(lqthe digits 1\(en9\(rq.
2714 .
2715 .
2716 .TP
2717 .B \e(ga
2718 Basic Latin grave accent.
2719 .
2720 Some output devices format
2721 .RB \(lq\| \(ga \|\(rq
2722 as a left single quotation mark.
2723 .
2724 .
2725 .TP
2726 .B \e(ha
2727 Basic Latin circumflex accent
2728 (\(lqhat\(rq).
2729 .
2730 Some output devices format
2731 .RB \(lq \(ha \(rq
2732 as U+02C6
2733 (modifier letter circumflex accent)
2734 or similar.
2735 .
2736 .
2737 .TP
2738 .B \e(rs
2739 Reverse solidus
2740 (backslash).
2741 .
2742 The backslash is the default escape character in the
2743 .I roff
2744 language,
2745 so it does not represent itself in output.
2746 .
2747 Also see
2748 .B \ee
2749 above.
2750 .
2751 .
2752 .TP
2753 .B \e(ti
2754 Basic Latin tilde.
2755 .
2756 Some output devices format
2757 .RB \(lq \(ti \(rq
2758 as U+02DC
2759 (small tilde)
2760 or similar.
2761 .
2762 .
2763 .P
2764 For maximum portability,
2765 escape sequences and special characters not listed above are better
2766 avoided in man pages.
2767 .
2768 .
2769 .\" ====================================================================
2770 .SS Hooks
2771 .\" ====================================================================
2772 .
2773 Two macros,
2774 both GNU extensions,\" from groff 1.19
2775 are called internally by the
2776 .I groff man
2777 package to format page headers and footers and can be redefined by the
2778 administrator in a site's
2779 .I man.local
2780 file
2781 (see section \(lqFiles\(rq below).
2782 .
2783 The presentation of
2784 .B .TH
2785 above describes the default headers and footers.
2786 .
2787 Because these macros are hooks for
2788 .I groff man
2789 internals,
2790 man pages have no reason to call them.
2791 .
2792 Such hook definitions will likely consist of \[lq].sp\[rq] and
2793 \[lq].tl\[rq] requests.
2794 .
2795 They must also increase the page length with \[lq].pl\[rq] requests in
2796 continuous rendering mode;
2797 .B .PT
2798 furthermore has the responsibility of emitting a PDF bookmark after
2799 writing the first page header in a document.
2800 .
2801 Consult the existing implementations in
2802 .I an.tmac
2803 when drafting replacements.
2804 .
2805 .
2806 .TP
2807 .B .BT
2808 Set the page footer text
2809 (\(lqbottom trap\(rq).
2810 .
2811 .
2812 .TP
2813 .B .PT
2814 Set the page header text
2815 (\(lqpage trap\(rq).
2816 .
2817 .
2818 .P
2819 To remove a page header or footer entirely,
2820 define the appropriate macro as empty rather than deleting it.
2821 .
2822 .
2823 .\" ====================================================================
2824 .SS "Deprecated features"
2825 .\" ====================================================================
2826 .
2827 Use of the following in man pages for public distribution is
2828 discouraged.
2829 .
2830 .
2831 .TP
2832 .BR .AT " ["\c
2833 .IR system " [" release ]]
2834 Alter the footer for use with legacy AT&T man pages,
2835 overriding any definition of the
2836 .I footer-inside
2837 argument to
2838 .BR .TH .
2839 .
2840 This macro exists only to render man pages from historical systems.
2841 .
2842 .
2843 .IP
2844 .I system
2845 can be any of the following.
2846 .
2847 .
2848 .RS \" Invisibly move left margin to current .IP indentation.
2849 .RS \" Now indent further, visibly.
2850 .TP
2851 3
2852 7th edition
2853 .I (default)
2854 .
2855 .
2856 .TP
2857 4
2858 System III
2859 .
2860 .
2861 .TP
2862 5
2863 System V
2864 .RE \" Move left margin back to .IP indentation.
2865 .RE \" Move left margin back to standard position.
2866 .
2867 .
2868 .IP
2869 The optional
2870 .I release
2871 argument specifies the release number,
2872 as in \(lqSystem\~V Release\~3\(rq.
2873 .
2874 .
2875 .TP
2876 .B .DT
2877 Reset tab stops to the default
2878 (every 0.5i [inches]).
2879 .
2880 .IP
2881 Use of this presentation-oriented macro is deprecated.
2882 .
2883 It translates poorly to HTML,
2884 under which exact space control and tabulation are not readily
2885 available.
2886 .
2887 Thus,
2888 information or distinctions that you use tab stops to express are likely
2889 to be lost.
2890 .
2891 If you feel tempted to change the tab stops such that calling this macro
2892 later is desirable to restore them,
2893 you should probably be composing a table using
2894 .MR \%tbl 1
2895 instead.
2896 .
2897 .
2898 .TP
2899 .BR .HP " ["\c
2900 .IR indentation ]
2901 Set up a paragraph with a hanging left indentation.
2902 .
2903 The
2904 .I indentation
2905 argument,
2906 if present,
2907 is handled as with
2908 .BR .TP .
2909 .
2910 .
2911 .IP
2912 Use of this presentation-oriented macro is deprecated.
2913 .
2914 A hanging indentation cannot be expressed naturally under HTML,
2915 and
2916 .RI non- roff -based
2917 man page interpreters may treat
2918 .B .HP
2919 as an ordinary paragraph.
2920 .
2921 Thus,
2922 information or distinctions you mean to express with indentation may be
2923 lost.
2924 .
2925 .
2926 .TP
2927 .BI .OP " option-name"\/\c
2928 .RI " [" option-argument ]
2929 Indicate an optional command parameter called
2930 .IR option-name ,
2931 which is set in bold.
2932 .
2933 If the option takes an argument,
2934 specify
2935 .I option-argument
2936 using a noun,
2937 abbreviation,
2938 or hyphenated noun phrase.
2939 .
2940 If present,
2941 .I option-argument
2942 is preceded by a space and set in italics.
2943 .
2944 Square brackets in roman surround both arguments.
2945 .
2946 .
2947 .IP
2948 Use of this quasi-semantic macro,
2949 .\" https://github.com/n-t-roff/DWB3.3/blob/master/macros/man/an.sr#L37
2950 an extension originating in Documenter's Workbench
2951 .IR troff ,\" DWB
2952 is deprecated.
2953 .
2954 It cannot easily be used to annotate options that take optional
2955 arguments or options whose arguments have internal structure
2956 (such as a mixture of literal and variable components).
2957 .
2958 One could work around these limitations with font selection escape
2959 sequences,
2960 but it is preferable to use font style alternation macros,
2961 which afford greater flexibility.
2962 .
2963 .
2964 .TP
2965 .BR .PD " ["\c
2966 .IR vertical-space ]
2967 Define the vertical space between paragraphs or (sub)sections.
2968 .
2969 The optional argument
2970 .I vertical-space
2971 specifies the amount;
2972 the default scaling unit is \(lqv\(rq.
2973 .
2974 Without an argument,
2975 the spacing is reset to its default value;
2976 see subsection \(lqHorizontal and vertical spacing\(rq above.
2977 .
2978 .
2979 .IP
2980 Use of this presentation-oriented macro is deprecated.
2981 .
2982 It translates poorly to HTML,
2983 under which exact control of inter-paragraph spacing is not readily
2984 available.
2985 .
2986 Thus,
2987 information or distinctions that you use
2988 .B .PD
2989 to express are likely to be lost.
2990 .
2991 .
2992 .TP
2993 .BR .UC " ["\c
2994 .IR version ]
2995 Alter the footer for use with legacy BSD man pages,
2996 overriding any definition of the
2997 .I footer-inside
2998 argument to
2999 .BR .TH .
3000 .
3001 This macro exists only to render man pages from historical systems.
3002 .
3003 .
3004 .IP
3005 .I version
3006 can be any of the following.
3007 .
3008 .
3009 .RS \" Invisibly move left margin to current .IP indentation.
3010 .RS \" Now indent further, visibly.
3011 .TP
3012 3
3013 3rd Berkeley Distribution
3014 .I (default)
3015 .
3016 .
3017 .TP
3018 4
3019 4th Berkeley Distribution
3020 .
3021 .
3022 .TP
3023 5
3024 4.2 Berkeley Distribution
3025 .
3026 .
3027 .TP
3028 6
3029 4.3 Berkeley Distribution
3030 .
3031 .
3032 .TP
3033 7
3034 4.4 Berkeley Distribution
3035 .RE \" Move left margin back to .IP indentation.
3036 .RE \" Move left margin back to standard position.
3037 .
3038 .
3039 .\" ====================================================================
3040 .SS History
3041 .\" ====================================================================
3042 .
3043 .MT [email protected]
3044 M.\& Douglas McIlroy
3045 .ME
3046 designed,
3047 implemented,
3048 and documented the AT&T
3049 .I man
3050 macros
3051 for
3052 Unix Version\~7 (1979) and employed them
3053 to edit the first volume of its
3054 .IR "Programmer's Manual" ,
3055 a compilation of all man pages supplied by the system.
3056 .
3057 That
3058 .I man
3059 supported the macros listed in this page not described as extensions,
3060 except
3061 .B .P
3062 .\" .SS was implemented in tmac.an but not documented in man(7).
3063 and the deprecated
3064 .B .AT
3065 and
3066 .BR .UC .
3067 .
3068 The only strings defined were
3069 .B R
3070 and
3071 .BR S ;
3072 no registers were documented.
3073 .
3074 .
3075 .P
3076 .B .UC
3077 appeared in 3BSD (1980).
3078 .
3079 .\" per https://archive.org/details/\
3080 .\" bitsavers_attunixSysalRelease3Jun80_33886798
3081 Unix System\~III (1980) introduced
3082 .B .P
3083 .\" ...and de-documented .LP...
3084 and exposed the registers
3085 .B IN
3086 and
3087 .BR LL ,
3088 .\" ...as well as \n[PD], which we implement but don't expose.
3089 which had been internal to Seventh Edition Unix
3090 .IR man .
3091 .
3092 .\" This inference is based on RCS idents of "PWB Manual Entry Macros"
3093 .\" from various forms of "an.src" distributed with System III (an.src
3094 .\" 1.35, dated 5/6/80, lacks the Tm string), Research Unix Version 10
3095 .\" (1.36, dated 11/11/80, has it), Ultrix 3.1 (1.37, dated 12/19/80,
3096 .\" retains it) and "pdp11v" (also 1.37). One source (S. S. Pirzada)
3097 .\" says PWB 2.0 was released in June 1979. I found no record of later
3098 .\" releases and cannot account for the discrepancy (field updates?).
3099 .\" -- GBR
3100 PWB/UNIX 2.0 (1980) added the
3101 .B Tm
3102 string.
3103 .
3104 4BSD (1980) added
3105 .\" undocumented .VS and .VE macros to mark regions with 12-point box
3106 .\" rules (\[br]) as margin characters, as well as...
3107 .B lq
3108 and
3109 .B rq
3110 strings.
3111 .
3112 .\" The SunOS inferences here and below are based on inspection of SunOS
3113 .\" 2.0 (May 1985), 3.2 (September 1986), 3.5 (January 1988), and 4.0
3114 .\" (December 1988) tape archives (only).
3115 SunOS\~2.0 (1985) recognized
3116 .BR C ,
3117 .BR D ,
3118 .BR P ,
3119 and
3120 .B X
3121 registers.
3122 .
3123 4.3BSD (1986) added
3124 .\" undocumented .DS and .DE macros for "displays", which are .RS/.RE
3125 .\" wrappers with filling disabled and vertical space of 1v before and
3126 .\" .5v after, as well as...
3127 .B .AT
3128 and
3129 .BR .P .
3130 .
3131 .\" Per Doug McIlroy in
3132 .\" <https://lists.gnu.org/archive/html/groff/2019-07/msg00038.html>...
3133 Ninth Edition Research Unix (1986) introduced
3134 .B .EX
3135 and
3136 .BR .EE .
3137 .
3138 SunOS\~4.0 (1988) added
3139 .BR .SB .
3140 .
3141 .
3142 .P
3143 The foregoing features were what James Clark implemented in early
3144 versions of
3145 .IR groff .
3146 .
3147 .
3148 Later,
3149 .I groff
3150 1.20 (2009) originated
3151 .BR .SY / .YS ,
3152 .BR .TQ ,
3153 .BR .MT / .ME ,
3154 and
3155 .BR .UR / .UE .
3156 .\" ...along with implementations of OP, EX, and EE.
3157 .
3158 Plan\~9 from User Space's
3159 .I troff \" plan9port
3160 introduced
3161 .B .MR
3162 in 2020.
3163 .\" https://github.com/9fans/plan9port/commit/\
3164 .\" 977b25a76ae8263e53fb4eb1abfc395769f23e3d
3165 .\" d32deab17bfffa5bffc5fab3e6577558e40888c5
3166 .\" 36cd4c58c1346375b98f517fb8568be5bb47618d
3167 .
3168 .
3169 .br
3170 .ne 4v
3171 .\" ====================================================================
3172 .SH Options
3173 .\" ====================================================================
3174 .
3175 The following
3176 .I groff
3177 options set registers
3178 (with
3179 .BR \-r )
3180 and strings
3181 (with
3182 .BR \-d )
3183 recognized and used by the
3184 .I man
3185 macro package.
3186 .
3187 To ensure rendering consistent with output device capabilities and
3188 reader preferences,
3189 man pages should never manipulate them.
3190 .
3191 .
3192 .TP
3193 .BI \-dAD= adjustment-mode
3194 Set line adjustment to
3195 .I adjustment-mode,
3196 which is typically
3197 .RB \[lq] b \[rq]
3198 for adjustment to both margins
3199 (the default),
3200 or
3201 .RB \[lq] l \[rq]
3202 for left alignment
3203 (ragged right margin).
3204 .
3205 Any valid argument to
3206 .IR groff 's
3207 \[lq].ad\[rq] request may be used.
3208 .
3209 See
3210 .MR groff 7
3211 for less-common choices.
3212 .
3213 .
3214 .TP
3215 .B \-rcR=1
3216 Enable continuous rendering.
3217 .
3218 Output is not paginated;
3219 instead,
3220 one
3221 (potentially very long)
3222 page is produced.
3223 .
3224 This is the default for terminal and HTML devices.
3225 .
3226 Use
3227 .B \-rcR=0
3228 to disable it on terminal devices;
3229 on HTML devices,
3230 it cannot be disabled.
3231 .
3232 .
3233 .TP
3234 .B \-rC1
3235 Number output pages consecutively,
3236 in strictly increasing sequence,
3237 rather than resetting the page number to\~1
3238 (or the value of register
3239 .BR P )
3240 with each new
3241 .I man
3242 document.
3243 .
3244 .
3245 .TP
3246 .B \-rCS=1
3247 Set section headings
3248 (the argument(s) to
3249 .BR .SH )
3250 in full capitals.
3251 .
3252 This transformation is off by default because it discards case
3253 distinction information.
3254 .
3255 .
3256 .TP
3257 .B \-rCT=1
3258 Set the man page topic
3259 (the first argument to
3260 .BR .TH )
3261 in full capitals in headers and footers.
3262 .
3263 This transformation is off by default because it discards case
3264 distinction information.
3265 .
3266 .
3267 .TP
3268 .B \-rD1
3269 Enable double-sided layout,
3270 formatting footers for even and odd pages differently;
3271 see the description of
3272 .B .TH
3273 in subsection \(lqDocument structure macros\(rq above.
3274 .
3275 .
3276 .TP
3277 .BI \-rFT= footer-distance
3278 Set distance of the footer relative to the bottom of the page to
3279 .I footer-distance;
3280 this amount is always negative.
3281 .
3282 At one half-inch above this location,
3283 the page text is broken before writing the footer.
3284 .
3285 Ignored if continuous rendering is enabled.
3286 .
3287 The default is \-0.5i.
3288 .
3289 .
3290 .TP
3291 .BI \-dHF= heading-font
3292 Set the font used for section and subsection headings;
3293 the default is
3294 .RB \(lq B \(rq
3295 (bold style of the default family).
3296 .
3297 Any valid argument to
3298 .IR groff 's
3299 \[lq].ft\[rq] request may be used.
3300 .
3301 See
3302 .MR groff 7 .
3303 .
3304 .
3305 .TP
3306 .B \-rHY=0
3307 Disable automatic hyphenation.
3308 .
3309 Normally,
3310 it is enabled\~(1).
3311 .
3312 The hyphenation mode is determined by the
3313 .I groff
3314 locale;
3315 see section \[lq]Localization\[lq] of
3316 .MR groff 7 .
3317 .
3318 .
3319 .TP
3320 .BI \-rIN= standard-indentation
3321 Set the amount of indentation used for ordinary paragraphs
3322 .RB ( .P
3323 and its synonyms)
3324 and the default indentation amount used by
3325 .BR .IP ,
3326 .BR .RS ,
3327 .BR .TP ,
3328 .\" .TQ inherits its indentation from the preceding .TP.
3329 and the deprecated
3330 .BR .HP .
3331 .
3332 See subsection \(lqHorizontal and vertical spacing\(rq above for the
3333 default.
3334 .
3335 For
3336 terminal devices,
3337 .I standard-indentation
3338 should always be an integer multiple of unit \(lqn\(rq to get consistent
3339 indentation.
3340 .
3341 .
3342 .TP
3343 .BI \-rLL= line-length
3344 Set line length;
3345 the default is 78n for terminal devices
3346 and 6.5i for typesetting devices.
3347 .
3348 .
3349 .TP
3350 .BI \-rLT= title-length
3351 Set the line length for titles.
3352 .
3353 (\(lqTitles\(rq is the
3354 .I roff
3355 term for headers and footers.)
3356 .
3357 By default,
3358 it is set to the line length
3359 (see
3360 .B \-rLL
3361 above).
3362 .
3363 .
3364 .TP
3365 .BI \-dMF= man-page-topic-font
3366 Set the font used for man page topics named in
3367 .B .TH
3368 and
3369 .B .MR
3370 calls;
3371 the default is
3372 .RB \(lq I \(rq
3373 (italic style of the default family).
3374 .
3375 Any valid argument to
3376 .IR groff 's
3377 \[lq].ft\[rq] request may be used.
3378 .
3379 If the
3380 .B MF
3381 string ends in \[lq]I\[rq],
3382 it is assumed to be an oblique typeface,
3383 and italic corrections are applied before and after man page topics.
3384 .
3385 .
3386 .TP
3387 .BI \-rP n
3388 Start enumeration of pages at
3389 .IR n .
3390 .
3391 The default is\~1.
3392 .
3393 .
3394 .TP
3395 .BI \-rS type-size
3396 Use
3397 .I type-size
3398 for the document's body text;
3399 acceptable values are 10,
3400 11,
3401 or 12 points.
3402 .
3403 See subsection \(lqFont style macros\(rq above for the default.
3404 .
3405 .
3406 .TP
3407 .BI \-rSN= subsection-indentation
3408 Set indentation of subsection headings to
3409 .I subsection-indentation.
3410 .
3411 See subsection \(lqHorizontal and vertical spacing\(rq above for the
3412 default.
3413 .
3414 .
3415 .br
3416 .ne 4v
3417 .TP
3418 .B \-rU1
3419 Enable generation of URI hyperlinks in the
3420 .I grohtml
3421 and
3422 .I grotty
3423 output drivers.
3424 .
3425 .I grohtml
3426 enables them by default;
3427 .I grotty
3428 does not,
3429 pending more widespread pager support for OSC\~8 escape sequences.
3430 .
3431 Use
3432 .B \-rU0
3433 to disable hyperlinks;
3434 this will make the arguments to
3435 .B MT
3436 and
3437 .B UR
3438 calls visible in the document text produced by link-capable drivers.
3439 .
3440 .
3441 .TP
3442 .BI \-rX p
3443 Number successors of
3444 .RI page\~ p
3445 as
3446 .IR p a,
3447 .IR p b,
3448 .IR p c,
3449 and so forth.
3450 .
3451 The register tracking the suffixed page letter uses format \(lqa\(rq
3452 (see the \(lq.af\(rq request in
3453 .MR groff 7 ).
3454 .
3455 For example,
3456 the option
3457 .B \-rX2
3458 produces the following page
3459 numbers: 1,
3460 2,
3461 2a,
3462 2b,
3463 \&.\|.\|.\|,
3464 2aa,
3465 2ab,
3466 and so on.
3467 .
3468 .
3469 .\" ====================================================================
3470 .SH Files
3471 .\" ====================================================================
3472 .
3473 .TP
3474 .I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%tmac/\:an\:.tmac
3475 Most
3476 .I man
3477 macros are defined in this file.
3478 .
3479 It also loads extensions from
3480 .I \%an\-ext.tmac
3481 (see below).
3482 .
3483 .
3484 .TP
3485 .I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%tmac/\:\%andoc\:.tmac
3486 This brief
3487 .I groff
3488 program detects whether the
3489 .I man
3490 or
3491 .I mdoc
3492 macro package is being used by a document and loads the correct macro
3493 definitions,
3494 taking advantage of the fact that pages using them must call
3495 .B .TH
3496 or
3497 .BR .Dd ,
3498 respectively,
3499 before any other macros.
3500 .
3501 A
3502 .I man
3503 program or user typing,
3504 for example,
3505 .RB \[lq] "groff \-mandoc page.1" \[rq],
3506 need not know which package the file
3507 .I page.1
3508 uses.
3509 .
3510 Multiple man pages,
3511 in either format,
3512 can be handled;
3513 .I \%andoc
3514 reloads each macro package as necessary.
3515 .
3516 .
3517 .TP
3518 .I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%tmac/\:\%an\-ext\:.tmac
3519 Except for
3520 .BR .SB ,
3521 definitions of macros described above as extensions
3522 are contained in this file;
3523 in some cases,
3524 they are simpler versions of definitions appearing in
3525 .IR an.tmac ,
3526 and are ignored if the formatter is GNU
3527 .IR troff .\" GNU
3528 .
3529 They are written to be compatible with AT&T
3530 .I troff \" AT&T
3531 and permissively licensed\(emnot copylefted.
3532 .
3533 To reduce the risk of name space collisions,
3534 string and register names begin only with
3535 .RB \[lq] m \[rq] .
3536 .
3537 We encourage man page authors
3538 who are concerned about portability to legacy Unix systems
3539 to copy these definitions into their pages,
3540 and maintainers of
3541 .I troff \" generic
3542 implementations or work-alike systems that format man pages
3543 to re-use them.
3544 .
3545 .
3546 .IP
3547 The definitions for these macros are read after a page calls
3548 .BR .TH ,
3549 so they will replace any macros of the same names preceding it in your
3550 file.
3551 .
3552 If you use your own implementations of these macros,
3553 they must be defined after
3554 .B .TH
3555 is called to have any effect.
3556 .
3557 Furthermore,
3558 it is wise to define such page-local macros
3559 (if at all)
3560 after the \(lqName\(rq section to accommodate timid
3561 .I makewhatis
3562 or
3563 .I mandb
3564 implementations that may give up their scan for indexing material early.
3565 .
3566 .
3567 .TP
3568 .I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%tmac/\:man\:.tmac
3569 This is a wrapper that loads
3570 .IR an.tmac .
3571 .
3572 .
3573 .TP
3574 .I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%tmac/\:\%mandoc\:.tmac
3575 This is a wrapper that loads
3576 .IR \%andoc.tmac .
3577 .
3578 .
3579 .TP
3580 .I /usr/\:\%share/\:\%groff/\:\%site\-tmac/\:\%man\:\%.local
3581 Put site-local changes and customizations into this file.
3582 .
3583 .
3584 .RS
3585 .RS
3586 .P
3587 .EX
3588 \&.\e" Use narrower indentation on terminals and similar.
3589 \&.if n .nr IN 4n
3590 \&.\e" Put only one space after the end of a sentence.
3591 \&.ss 12 0 \e" See groff(7).
3592 \&.\e" Keep pages narrow even on wide terminals.
3593 \&.if n .if \(rsn[LL]>78n .nr LL 78n
3594 \&.\e" Ensure hyperlinks are enabled for terminals.
3595 \&.nr U 1
3596 .EE
3597 .RE
3598 .RE
3599 .
3600 .
3601 .IP
3602 On multi-user systems,
3603 it is more considerate to users whose preferences may differ from the
3604 administrator's to be less aggressive with such settings,
3605 or to permit their override with a user-specific
3606 .I man.local
3607 file.
3608 .
3609 Place the requests below at the end of the site-local file to
3610 manifest courtesy.
3611 .
3612 .br
3613 .ne 3v
3614 .RS
3615 .RS
3616 .EX
3617 \&.soquiet \eV[XDG_CONFIG_HOME]/man.local
3618 \&.soquiet \eV[HOME]/.man.local
3619 .EE
3620 .RE
3621 .
3622 However,
3623 a security-sandboxed
3624 .MR man 1 \" such as man-db 2.8.5
3625 program may lack permission to open such files.
3626 .RE
3627 .
3628 .
3629 .\" ====================================================================
3630 .SH Notes
3631 .\" ====================================================================
3632 .
3633 Some tips on troubleshooting your man pages follow.
3634 .
3635 .
3636 .TP
3637 \(bu Some ASCII characters look funny or copy and paste wrong.
3638 .
3639 On devices with large glyph repertoires,
3640 like UTF-8-capable terminals and PDF,
3641 several keyboard glyphs are mapped to code points outside the Unicode
3642 basic Latin range because that usually results in better typography in
3643 the general case.
3644 .
3645 When documenting GNU/Linux command or C language syntax,
3646 however,
3647 this translation is sometimes not desirable.
3648 .
3649 .
3650 .IP
3651 .if t .ne 2v
3652 .if n .ne 3v \" account for horizontal rule
3653 .TS
3654 c c
3655 rfCB lfCB.
3656 To get a \(lqliteral\(rq.\|.\|. .\|.\|.should be input.
3657 _
3658 \(aq \(rs(aq
3659 \- \(rs\-
3660 \(rs \(rs(rs
3661 \(ha \(rs(ha
3662 \(ga \(rs(ga
3663 \(ti \(rs(ti
3664 _
3665 .TE
3666 .
3667 .
3668 .IP
3669 Additionally,
3670 if a neutral double quote (") is needed in a macro argument,
3671 you can use
3672 .B \(rs(dq
3673 to get it.
3674 .
3675 You should
3676 .I not
3677 use
3678 .B \(rs(aq
3679 for an ordinary apostrophe
3680 (as in \(lqcan't\(rq)
3681 or
3682 .B \(rs\-
3683 for an ordinary hyphen
3684 (as in \(lqword-aligned\(rq).
3685 .
3686 Review subsection \(lqPortability\(rq above.
3687 .
3688 .
3689 .TP
3690 \(bu Do I ever need to use an empty macro argument ("")?
3691 .
3692 Probably not.
3693 .
3694 When this seems necessary,
3695 often a shorter or clearer alternative is available.
3696 .
3697 .
3698 .IP
3699 .if t .ne 10v
3700 .if n .ne 16v \" account for horizontal rules
3701 .TS
3702 c c
3703 lfCB lfCB.
3704 Instead of.\|.\|. .\|.\|.should be considered.
3705 _
3706 \&.TP \(dq\(dq .TP
3707 _
3708 \&.BI \(dq\(dq \fIitalic-text bold-text .IB \fIitalic-text bold-text
3709 _
3710 \&.TH foo 1 \(dq\(dq \(dqfoo 1.2.3\(dq .TH foo 1 \
3711 \f(CIyyyy\fP-\f(CImm\fP-\f(CIdd\fP \(dqfoo 1.2.3\(dq
3712 _
3713 \&.IP \(dq\(dq 4n .IP
3714 _
3715 \&.IP \(dq\(dq 4n .RS 4n
3716 \fIparagraph .P
3717 \fR.\|.\|. \fIparagraph
3718 \fR.\|.\|. .RE
3719 _
3720 \&.B one two \(dq\(dq three .B one two three
3721 .TE
3722 .
3723 .
3724 .IP
3725 In the title heading
3726 .RB ( .TH ),
3727 the date of the page's last revision is more important than packaging
3728 information;
3729 it should not be omitted.
3730 .
3731 Ideally,
3732 a page maintainer will keep both up to date.
3733 .
3734 .
3735 .IP
3736 .B .IP
3737 is sometimes ill-understood and misused,
3738 especially when no marker argument is supplied\(eman indentation
3739 argument is not required.
3740 .
3741 By setting an explicit indentation,
3742 you may be overriding the reader's preference as set with the
3743 .B \-rIN
3744 option.
3745 .
3746 If your page renders adequately without one,
3747 use the simpler form.
3748 .
3749 If you need to indent multiple (unmarked) paragraphs,
3750 consider setting an inset region with
3751 .B .RS
3752 and
3753 .B .RE
3754 instead.
3755 .
3756 .
3757 .IP
3758 In the last example,
3759 the empty argument does have a subtly different effect than its
3760 suggested replacement:
3761 the empty argument causes an additional space character to be
3762 interpolated between the arguments \(lqtwo\(rq and \(lqthree\(rq\(embut
3763 it is a regular breaking space,
3764 so it can be discarded at the end of an output line.
3765 .
3766 It is better not to be subtle,
3767 particularly with space,
3768 which can be overlooked in source and rendered forms.
3769 .
3770 .
3771 .TP
3772 .RB \(bu " .RS" " doesn't indent relative to my indented paragraph."
3773 .
3774 The
3775 .B .RS
3776 macro sets the left margin;
3777 that is,
3778 the position at which an
3779 .I ordinary
3780 paragraph
3781 .RB ( .P
3782 and its synonyms)
3783 will be set.
3784 .
3785 .BR .IP ,
3786 .BR .TP ,
3787 and the deprecated
3788 .B .HP
3789 use the same default indentation.
3790 .
3791 If not given an argument,
3792 .B .RS
3793 moves the left margin by this same amount.
3794 .
3795 To create an inset relative to an indented paragraph,
3796 call
3797 .B .RS
3798 repeatedly until an acceptable indentation is achieved,
3799 or give
3800 .B .RS
3801 an indentation argument that is at least as much as the paragraph's
3802 indentation amount relative to an adjacent
3803 .B .P
3804 paragraph.
3805 .
3806 See subsection \(lqHorizontal and vertical spacing\(rq above for the
3807 values.
3808 .
3809 .
3810 .IP
3811 Another approach you can use with tagged paragraphs is to place an
3812 .B .RS
3813 call immediately after the paragraph tag;
3814 this will also force a break regardless of the width of the tag,
3815 which some authors prefer.
3816 .
3817 Follow-up paragraphs under the tag can then be set with
3818 .B .P
3819 instead of
3820 .BR .IP .
3821 .
3822 Remember to use
3823 .B .RE
3824 to end the indented region before starting the next tagged paragraph
3825 (at the appropriate nesting level).
3826 .
3827 .
3828 .TP
3829 .RB \(bu " .RE" " doesn't move the inset back to the expected level."
3830 .TQ
3831 \(bu warning: scaling unit invalid in context
3832 .TQ
3833 \(bu warning: register \(aqan\-saved\-margin\c
3834 .IR n "\(aq not defined"
3835 .TQ
3836 \(bu warning: register \(aqan\-saved\-prevailing\-indent\c
3837 .IR n "\(aq not defined"
3838 .
3839 The
3840 .B .RS
3841 macro takes an
3842 .I indentation amount
3843 as an argument;
3844 the
3845 .B .RE
3846 macro's argument is a specific
3847 .I inset level.
3848 .
3849 .B .RE\~1
3850 goes to the level before any
3851 .B .RS
3852 macros were called,
3853 .B .RE\~2
3854 goes to the level of the first
3855 .B .RS
3856 call you made,
3857 and so forth.
3858 .
3859 If you desire symmetry in your macro calls,
3860 simply issue one
3861 .B .RE
3862 without an argument
3863 for each
3864 .B .RS
3865 that precedes it.
3866 .
3867 .
3868 .IP
3869 After calls to the
3870 .B .SH
3871 and
3872 .B .SS
3873 sectioning macros,
3874 all relative insets are cleared and calls to
3875 .B .RE
3876 have no effect until
3877 .B .RS
3878 is used again.
3879 .
3880 .
3881 .TP
3882 \(bu Do I need to keep typing the indentation in a series of \c
3883 .BR .IP " calls?"
3884 .
3885 Not if you don't want to change it.
3886 .
3887 Review subsection \(lqHorizontal and vertical spacing\(rq above.
3888 .
3889 .
3890 .IP
3891 .if t .ne 5v
3892 .if n .ne 7v \" account for horizontal rules
3893 .TS
3894 c c
3895 lfCB lfCB.
3896 Instead of.\|.\|. .\|.\|.should be considered.
3897 _
3898 \&.IP \(rs(bu 4n .IP \(rs(bu 4n
3899 \fIparagraph \fIparagraph
3900 \&.IP \(rs(bu 4n .IP \(rs(bu
3901 \fIanother-paragraph \fIanother-paragraph
3902 _
3903 .TE
3904 .
3905 .
3906 .TP
3907 \(bu Why doesn't the package provide a string to insert an ellipsis?
3908 .
3909 Examples of ellipsis usage are shown above,
3910 in subsection \[lq]Command synopsis macros\[rq].
3911 .
3912 The idiomatic
3913 .I roff
3914 ellipsis is three dots (periods)
3915 with thin space escape sequences
3916 .B \[rs]|
3917 internally separating them.
3918 .
3919 Since dots both begin control lines and are candidate end-of-sentence
3920 characters,
3921 however,
3922 it is sometimes necessary to prefix and/or suffix an ellipsis with the
3923 dummy character escape sequence
3924 .BR \[rs]& .
3925 .
3926 That fact stands even if a string is defined to contain the sequence;
3927 further,
3928 if the string ends with
3929 .BR \[rs]& ,
3930 end-of-sentence detection is defeated when you use the string at the end
3931 of an actual sentence.
3932 .
3933 (Ending a sentence with an ellipsis is often poor style,
3934 but not always.)
3935 .
3936 A hypothetical string
3937 .B EL
3938 that contained an ellipsis,
3939 but not the trailing dummy character
3940 .BR \[rs]& ,
3941 would then need to be suffixed with the latter
3942 when not ending a sentence.
3943 .
3944 .
3945 .IP
3946 .if t .ne 5v
3947 .if n .ne 7v \" account for horizontal rules
3948 .TS
3949 C C
3950 LfCB LfCB.
3951 Instead of.\|.\|. .\|.\|.do this.
3952 _
3953 \&.ds EL \[rs]&.\[rs]|.\[rs]|. Arguments are
3954 Arguments are .IR src-file\[rs]\[ti] .\[rs]|.\[rs]|.\[rs]&
3955 \&.IR src-file\[rs]\[ti] \[rs]*(EL\[rs]& .IR dest-dir .
3956 \&.IR dest-dir .
3957 _
3958 .TE
3959 .
3960 .
3961 .IP
3962 The first column practices a false economy;
3963 the savings in typing is offset by the cost of obscuring even the
3964 suggestion of an ellipsis to a casual reader of the source document,
3965 and reduced portability to
3966 .RI non- roff
3967 man page formatters that cannot handle string definitions.
3968 .
3969 .
3970 .IP
3971 There is an ellipsis code point in Unicode,
3972 and some fonts have an ellipsis glyph,
3973 which some man pages have accessed in a non-portable way with the
3974 font-dependent
3975 .B \[rs]N
3976 escape sequence.
3977 .
3978 We discourage the use of these;
3979 on terminals,
3980 they may crowd the dots into a half-width character cell,
3981 and will not render at all if the output device doesn't have the glyph.
3982 .
3983 In syntax synopses,
3984 missing ellipses can cause great confusion.
3985 .
3986 Dots and space are universally supported.
3987 .\" XXX: Does an unconditional _preceding_ dummy character cause
3988 .\" problems?
3989 .
3990 .
3991 .\" ====================================================================
3992 .SH Authors
3993 .\" ====================================================================
3994 .
3995 The initial GNU implementation of the
3996 .I man
3997 macro package was written by James Clark. \" by 1.01
3998 .
3999 Later,
4000 .MT wl@\:gnu\:.org
4001 Werner Lemberg
4002 .ME
4003 supplied the
4004 .BR S , \" 1.16
4005 .BR LT , \" 1.18
4006 and
4007 .B cR \" 1.17
4008 registers,
4009 the last a 4.3BSD-Reno
4010 .IR mdoc (7)
4011 feature.
4012 .\" "Assume nroff on crt's [sic] only if cR==1"
4013 .\" https://minnie.tuhs.org/cgi-bin/utree.pl
4014 .\" ?file=4.3BSD-Reno/share/tmac/tmac.doc
4015 .
4016 .MT kollar@\:alltel\:.net
4017 Larry Kollar
4018 .ME
4019 added the
4020 .BR FT ,
4021 .BR HY ,
4022 and
4023 .B SN
4024 registers;
4025 the
4026 .B HF
4027 string;
4028 and the
4029 .B PT
4030 and
4031 .B BT
4032 macros.
4033 .
4034 .MT g.branden\:.robinson@\:gmail\:.com
4035 G.\& Branden Robinson
4036 .ME
4037 implemented the
4038 .B AD
4039 and
4040 .B MF
4041 strings;
4042 .BR CS ,
4043 .BR CT ,
4044 and
4045 .B U
4046 registers;
4047 and the
4048 .B MR
4049 macro. \" all 1.23
4050 .
4051 .
4052 Except for
4053 .BR .SB , \" Clark, as noted above
4054 the extension macros were written by
4055 Lemberg,
4056 .MT esr@\:thyrsus\:.com
4057 Eric S.\& Raymond
4058 .ME ,
4059 and
4060 Robinson. \" 1.23: MR
4061 .
4062 .
4063 .br
4064 .ne 3v
4065 .P
4066 This document was originally written for the Debian GNU/Linux system by
4067 .MT sgk@\:debian\:.org
4068 Susan G.\& Kleinmann
4069 .ME .
4070 .
4071 It was corrected and updated by Lemberg and Robinson.
4072 .
4073 The extension macros were documented by Raymond and Robinson.
4074 Raymond also originated the portability section,
4075 to which
4076 .MT schwarze@\:usta\:.de
4077 Ingo Schwarze
4078 .ME
4079 contributed most of the material on escape sequences.
4080 .
4081 .
4082 .\" ====================================================================
4083 .SH "See also"
4084 .\" ====================================================================
4085 .
4086 .MR \%tbl 1 ,
4087 .MR \%eqn 1 ,
4088 and
4089 .MR \%refer 1
4090 are preprocessors used with man pages.
4091 .
4092 .MR man 1
4093 describes the man page librarian on your system.
4094 .
4095 .MR groff_mdoc 7
4096 details the
4097 .I groff
4098 version of the BSD-originated alternative macro package for man pages.
4099 .
4100 .
4101 .P
4102 .MR groff_man 7 ,
4103 .MR groff 7 ,
4104 .MR groff_char 7 ,
4105 .MR man 7
4106 .
4107 .
4108 .\" Restore compatibility mode (for, e.g., Solaris 10/11).
4109 .cp \n[*groff_groff_man_7_man_C]
4110 .do rr *groff_groff_man_7_man_C
4111 .
4112 .
4113 .\" Local Variables:
4114 .\" fill-column: 72
4115 .\" mode: nroff
4116 .\" End:
4117 .\" vim: set filetype=groff textwidth=72: