Debian Codegraph @

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