Debian Codegraph @

upstream/fedora-rawhide/man7/groff_diff.7

raw
1 '\" e
2 .TH groff_diff 7 "2026-03-03" "groff 1.24.0"
3 .SH Name
4 groff_diff \- differences between GNU
5 .I roff
6 and AT&T
7 .I troff
8 .
9 .
10 .\" ====================================================================
11 .\" Legal Terms
12 .\" ====================================================================
13 .\"
14 .\" Copyright 1989-2024 Free Software Foundation, Inc.
15 .\" 2019-2025 G. Branden Robinson
16 .\"
17 .\" This file is part of groff, the GNU roff typesetting system.
18 .\"
19 .\" Permission is granted to copy, distribute and/or modify this
20 .\" document under the terms of the GNU Free Documentation License,
21 .\" Version 1.3 or any later version published by the Free Software
22 .\" Foundation; with no Invariant Sections, with no Front-Cover Texts,
23 .\" and with no Back-Cover Texts.
24 .\"
25 .\" A copy of the Free Documentation License is included as a file
26 .\" called FDL in the main directory of the groff source package.
27 .
28 .
29 .\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
30 .do nr *groff_groff_diff_7_man_C \n[.cp]
31 .cp 0
32 .
33 .\" Define fallback for groff 1.23's MR macro if the system lacks it.
34 .nr do-fallback 0
35 .if !\n(.f .nr do-fallback 1 \" mandoc
36 .if \n(.g .if !d MR .nr do-fallback 1 \" older groff
37 .if !\n(.g .nr do-fallback 1 \" non-groff *roff
38 .if \n[do-fallback] \{\
39 . de MR
40 . ie \\n(.$=1 \
41 . I \%\\$1
42 . el \
43 . IR \%\\$1 (\\$2)\\$3
44 . .
45 .\}
46 .rr do-fallback
47 .
48 .
49 .\" ====================================================================
50 .\" Local definitions
51 .\" ====================================================================
52 .
53 .\" define a string tx for the TeX logo
54 .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
55 .el .ds tx TeX
56 .
57 .
58 .\" from old groff_out.man
59 .ie \n(.g \
60 . ds ic \/
61 .el \
62 . ds ic \^
63 .
64 .
65 .\" ====================================================================
66 .SH Description
67 .\" ====================================================================
68 .
69 The GNU
70 .I roff
71 text processing system,
72 .IR groff ,
73 is a reimplementation and extension of AT&T
74 .IR troff , \" AT&T
75 the typesetting system originating in Unix systems of the 1970s.
76 .
77 .I groff
78 removes many arbitrary limitations and adds features,
79 both to the input language and to the page description language output
80 by the
81 .I troff \" generic
82 formatter.
83 .
84 We also note here differences arising from
85 .IR groff 's
86 implementation of AT&T
87 .I troff \" AT&T
88 features.
89 .
90 See
91 .MR roff 7
92 for background.
93 .
94 GNU
95 .I troff \" GNU
96 can operate in a manner that increases support
97 for documents written for AT&T
98 .IR troff ; \" AT&T
99 see section \[lq]Compatibility mode\[rq] below.
100 .
101 .
102 .\" ====================================================================
103 .SH Language
104 .\" ====================================================================
105 .
106 GNU
107 .I troff \" GNU
108 features identifiers of arbitrary length;
109 supports color output,
110 non-integral type sizes,
111 user-defined characters,
112 and automatic hyphenation of languages other than English;
113 adds more conditional expression operators;
114 recognizes additional scaling units and arithmetic operators;
115 enables general file I/O
116 (in \[lq]unsafe mode\[rq] only);
117 and exposes more formatter state.
118 .
119 .
120 .\" ====================================================================
121 .SS "Long names"
122 .\" ====================================================================
123 .
124 GNU
125 .I troff \" GNU
126 introduces many new requests;
127 with three exceptions
128 .RB ( cp ,
129 .BR do ,
130 .BR rj ),
131 they have names longer than two characters.
132 .
133 The names of registers,
134 fonts,
135 strings/\:macros/\:diversions,
136 environments,
137 special characters,
138 character classes,
139 streams,
140 hyphenation language codes,
141 and colors can be of any length.
142 .
143 Anywhere AT&T
144 .I troff \" AT&T
145 supports a parameterized escape sequence that uses an opening
146 parenthesis \[lq](\[rq] to introduce a two-character argument,
147 .I groff
148 supports a square-bracketed form \[lq][]\[rq] where the argument
149 within can be of arbitrary length.
150 .
151 .
152 .\" ====================================================================
153 .SS "Font families, abstract styles, and translation"
154 .\" ====================================================================
155 .
156 GNU
157 .I troff \" GNU
158 can group text typefaces into
159 .I families.
160 For example,
161 .I groff
162 ships with support for families containing each of the styles
163 .RB \[lq] R \[rq],
164 .RB \[lq] I \[rq],
165 .RB \[lq] B \[rq],
166 and
167 .RB \[lq] BI \[rq]
168 (roman [upright],
169 bold,
170 italic [slanted],
171 and bold-italic).
172 .
173 So that a document need not be coupled to a specific font family,
174 an output device can associate a style in the abstract sense with a
175 mounting position.
176 .
177 Thus the default family can combine with a style dynamically,
178 producing a
179 .I "resolved font name."
180 .
181 A document can
182 .I translate,
183 or remap,
184 font names with the
185 .B ftr
186 request.
187 .
188 .
189 .P
190 Applying the requests
191 .BR cs ,
192 .BR bd ,
193 .BR tkf ,
194 .BR uf ,
195 or
196 .B \%fspecial
197 to an abstract style affects the member of the default family
198 corresponding to that style.
199 .
200 The default family can be set with the
201 .B fam
202 request or
203 .B \-f
204 command-line option.
205 .
206 The
207 .B styles
208 directive in the output device's
209 .I DESC
210 file controls which mounting positions
211 (if any)
212 are initially associated with abstract styles rather than fonts,
213 and the
214 .B sty
215 request can update this association.
216 .
217 .
218 .\" ====================================================================
219 .SS Colors
220 .\" ====================================================================
221 .
222 .I groff
223 supports color output with a variety of color spaces and up to 16 bits
224 per channel.
225 .
226 Some devices,
227 particularly terminals,
228 may be more limited.
229 .
230 When color support is enabled,
231 two colors are current at any given time:
232 the
233 .I stroke color,
234 with which glyphs,
235 rules (lines),
236 and geometric figures are drawn,
237 and the
238 .I fill color,
239 which paints the interior of filled geometric figures.
240 .
241 The
242 .BR color ,
243 .BR \%defcolor ,
244 .BR gcolor ,
245 and
246 .B fcolor
247 requests;
248 .B \[rs]m
249 and
250 .B \[rs]M
251 escape sequences;
252 and
253 .BR .color ,
254 .BR .m ,
255 and
256 .B .M
257 registers exercise color support.
258 .
259 .
260 .\" ====================================================================
261 .SS Hyphenation
262 .\" ====================================================================
263 .
264 GNU
265 .I troff \" GNU
266 uses a hyphenation algorithm and language-specific pattern files
267 (based on \*[tx]'s)
268 to decide which words can be hyphenated and where.
269 .
270 AT&T
271 .IR troff 's \" AT&T
272 hyphenation system (\[lq]suftab\[rq]) was specific to English.
273 .
274 .
275 .P
276 New requests permit finer control over hyphenation breaking;
277 hyphenation of a word might be suppressed due to a limit on consecutive
278 hyphenated lines
279 .RB ( hlm ),
280 a minimum line length threshold
281 .RB ( hym ),
282 or because the line can instead be adjusted with additional inter-word
283 space
284 .RB ( hys ).
285 .
286 The
287 .B hla
288 request selects a hyphenation language,
289 whereas
290 .B hpf
291 and
292 .B hpfa
293 respectively
294 load and append to the language's hyphenation patterns.
295 .
296 If no hyphenation language is set or no patterns are loaded,
297 GNU
298 .I troff \" GNU
299 does not perform automatic hyphenation.
300 .
301 .
302 .\" BEGIN Keep (roughly) parallel with groff.texi node "Manipulating
303 .\" Hyphenation".
304 .P
305 For automatic hyphenation to work,
306 the formatter must know which letters are equivalent.
307 .
308 For example,
309 the letter \[lq]E\[rq] behaves like \[lq]e\[rq];
310 only the latter typically appears in hyphenation pattern files.
311 .
312 GNU
313 .I troff \" GNU
314 expects characters
315 that participate in automatic hyphenation
316 to be assigned
317 .I "hyphenation codes"
318 that define these equivalence classes.
319 .
320 At startup,
321 GNU
322 .I troff \" GNU
323 assigns hyphenation codes to the letters \[lq]a\[rq]\[en]\[lq]z\[rq],
324 applies the same codes to \[lq]A\[rq]\[en]\[lq]Z\[rq]
325 in one-to-one correspondence,
326 and assigns a code of zero to all other characters.
327 .
328 .
329 .br
330 .ne 2v
331 .P
332 The
333 .B hcode
334 request enables application of hyphenation codes
335 to characters outside the Unicode basic Latin set;
336 without doing so,
337 words containing such letters
338 won't hyphenate properly
339 even if the corresponding hyphenation patterns contain them.
340 .
341 Localization files for the input character set and language
342 configure hyphenation codes;
343 see
344 .MR groff_tmac 5 .
345 .\" END Keep (roughly) parallel with groff.texi node "Manipulating
346 .\" Hyphenation".
347 .
348 .
349 .P
350 GNU
351 .IR troff 's \" GNU
352 .B \[rs]:
353 escape sequence works like
354 .B \[rs]%
355 but produces no hyphen if the word breaks at that location.
356 .
357 .
358 .\" ====================================================================
359 .SS "Fractional type sizes and new scaling units"
360 .\" ====================================================================
361 .
362 .\" BEGIN Keep (roughly) parallel with groff.texi node "Using Fractional
363 .\" Type Sizes".
364 When configuring the type size,
365 AT&T
366 .I troff \" AT&T
367 ignored scaling units and intepreted all measurements in points.
368 Combined with integer arithmetic,
369 this design choice made it impossible to support,
370 for instance,
371 ten-and-a-half-point type.
372 .
373 In GNU
374 .I troff \" GNU
375 an output device can select a scaling factor
376 that subdivides a point into \[lq]scaled points\[rq].
377 A type size expressed in scaled points
378 can thus represent a non-integral size in points.
379 .
380 .
381 .P
382 A
383 .I "scaled point,"
384 scaling unit
385 .BR s ,
386 is equal to
387 .RI 1/ sizescale
388 points,
389 where the device description file,
390 .IR DESC ,
391 specifies
392 .I sizescale
393 and otherwise defaults to\~1;
394 see
395 .MR groff_font 5 .
396 .
397 GNU
398 .I troff \" GNU
399 also defines the
400 .I "typographical point,"
401 scaling unit
402 .BR z ,
403 which explicitly specifies a type size of potentially
404 non-integral measure.
405 The program multiplies typographical points by
406 .I sizescale
407 and converts the value to an integer.
408 .
409 Arguments GNU
410 .I troff \" GNU
411 interprets in
412 .B z
413 units by default comprise those to the escape sequences
414 .B \[rs]H
415 and
416 .BR \[rs]s ,
417 .\" Legacy forms of the `\s` escape sequence don't accept numerical
418 .\" expressions--only integers.
419 to the request
420 .BR ps ,
421 the third argument to the
422 .B cs
423 request,
424 and the second and fourth arguments to the
425 .B tkf
426 request.
427 .
428 In GNU
429 .IR troff , \" GNU
430 the register
431 .B \[rs]n[.s]
432 interpolates the type size in typographical points
433 .RB ( z ),
434 whereas the register
435 .B \[rs]n[.ps]
436 interpolates it in scaled points
437 .RB ( s ).
438 .
439 .RB \[lq] \[rs]n[.ps]s \[rq],
440 .RB \[lq] \[rs]n[.s]z \[rq],
441 and
442 .RB \[lq] 1m \[rq]
443 are co-equal by definition.
444 .
445 .
446 .P
447 For example,
448 if
449 .I sizescale
450 is\~1000,
451 then a scaled point is one thousandth of a point.
452 .
453 Consequently,
454 .RB \[lq] ".ps 10.5" \[rq]
455 is synonymous with
456 .RB \[lq] ".ps 10.5z" \[rq];
457 both set the type size to 10,500\~scaled points
458 or 10.5\~typographical points.
459 .
460 .
461 .P
462 It makes no sense to use the
463 .RB \[lq] z \[rq]\~scaling
464 unit in a numeric expression whose default scaling unit is neither
465 .RB \[lq] u \[rq]
466 .RB nor\~\[lq] z \[rq],
467 so GNU
468 .I troff \" GNU
469 disallows this.
470 .
471 Similarly,
472 it is nonsensical to use scaling units other than
473 .RB \[lq] p \[rq],
474 .RB \[lq] s \[rq],
475 .RB \[lq] z \[rq],
476 or
477 .RB \[lq] u \[rq],
478 in a numeric expression whose default scaling unit
479 .RB is\~\[lq] z \[rq],
480 and so GNU
481 .I troff \" GNU
482 disallows those as well.
483 .
484 .
485 .br
486 .ne 2v
487 .P
488 Output devices may be limited in the type sizes they can employ.
489 .
490 The
491 .B .s
492 and
493 .B .ps
494 registers represent the type size selected by the formatter
495 as it understands a device's capability.
496 .
497 the read-only registers
498 .B .psr
499 and
500 (string-valued)
501 .B .sr
502 interpolate the last
503 .I requested
504 in scaled points
505 and in points as a decimal fraction,
506 respectively.
507 .
508 Like the actual current and previous type size,
509 the requested ones are properties of an environment.
510 .
511 .
512 .P
513 For example,
514 if a document requests a type size of 10.95\~points,
515 and the nearest size permitted by a
516 .B sizes
517 request
518 (or by the
519 .B sizes
520 or
521 .B \%sizescale
522 directives in the device's
523 .I DESC
524 file)
525 is 11\~points,
526 .I groff
527 uses the latter value.
528 .\" END Keep (roughly) parallel with groff.texi node "Using Fractional
529 .\" Type Sizes".
530 .
531 .
532 .P
533 A further two new measurement units available in
534 .I groff
535 are
536 .RB \[lq] M \[rq],
537 which indicates hundredths of an em,
538 and
539 .RB \[lq] f \^\[rq],
540 which multiplies by 65,536.
541 .
542 The latter provides convenient fractions for color definitions with the
543 .B \%defcolor
544 request.
545 .
546 For example,
547 0.5f equals 32768u.
548 .
549 .
550 .\" ====================================================================
551 .SS "Special fonts"
552 .\" ====================================================================
553 .
554 .\" BEGIN Keep (roughly) parallel with groff.texi node "Special Fonts".
555 .\" (the second paragraph thereof; the first covers "portable" concepts)
556 GNU
557 .IR troff 's \" GNU
558 .RB \%\[lq] special \[rq]
559 and
560 .B \%fspecial
561 requests permit a document
562 to supplement the set of fonts the device configures
563 for glyph search
564 without having to use
565 the
566 .B fp
567 request to manipulate the list of mounting positions,
568 which can be tedious\[em]by default,
569 GNU
570 .I troff \" GNU
571 mounts 40 fonts at startup
572 when using the
573 .B ps
574 device.
575 .\" END Keep (roughly) parallel with groff.texi node "Special Fonts".
576 .
577 .
578 .\" ====================================================================
579 .SS "Numeric expressions"
580 .\" ====================================================================
581 .
582 GNU
583 .I troff \" GNU
584 permits spaces in a numeric expression within parentheses,
585 and offers three new operators.
586 .
587 .
588 .TP 8n \" "e1>?e2" +2n
589 .IB e1 >? e2
590 Interpolate the greater of expressions
591 .I e1
592 and
593 .IR e2 .
594 .
595 .
596 .TP
597 .IB e1 <? e2
598 Interpolate the lesser of expressions
599 .I e1
600 and
601 .IR e2 .
602 .
603 .
604 .TP
605 .BI ( c ; e )
606 Interpolate expression
607 .I e
608 using
609 .I c
610 as the default scaling unit,
611 ignoring scaling units in
612 .I e
613 if
614 .I c
615 is empty.
616 .
617 .
618 .P
619 Arithmetic in GNU
620 .I troff \" troff
621 saturates instead of wrapping.
622 .
623 .
624 .\" ====================================================================
625 .SS "Conditional expressions"
626 .\" ====================================================================
627 .
628 More conditions can be tested with the
629 .RB \[lq]\| if \|\[rq]
630 and
631 .B ie
632 requests,
633 as well as the new
634 .RB \[lq] while \[rq]
635 request.
636 .
637 .
638 .TP
639 .BI c\~ chr
640 True if a character
641 .I chr
642 is available;
643 .I chr
644 is an
645 ordinary,
646 special,
647 or
648 indexed
649 character,
650 whether defined by a font description file or a request.
651 .
652 .
653 .TP
654 .BI d\~ nam
655 True if a string,
656 macro,
657 diversion,
658 or request
659 .I nam
660 is defined.
661 .
662 .
663 .TP
664 .BI F\~ fnt
665 True if a font
666 .I fnt
667 is available;
668 .I fnt
669 can be an abstract style
670 or a font name.
671 .
672 .I fnt
673 is handled as if it were an argument to the
674 .B ft
675 request
676 (that is,
677 the default family is combined with an abstract style and font
678 translation is applied),
679 but
680 .I fnt
681 cannot be a mounting position,
682 and no font is mounted.
683 .
684 .
685 .TP
686 .BI m\~ col
687 True if a color
688 .I col
689 is defined.
690 .
691 .
692 .TP
693 .BI r\~ reg
694 True if a register
695 .I reg
696 is defined.
697 .
698 .
699 .TP
700 .BI S\~ sty
701 True if an abstract style
702 .I sty
703 is registered.
704 .
705 Font translations apply.
706 .
707 .
708 .TP
709 .B v
710 Always false.
711 .
712 This condition exists for compatibility with certain other
713 .I troff
714 implementations.
715 .
716 (We refer to
717 .IR vtroff ,
718 a translator that converted the C/A/T command stream
719 produced by early-vintage AT&T
720 .I troff \" AT&T
721 to a form suitable for Versatec and Benson-Varian plotters.)
722 .
723 .
724 .br
725 .ne 6v
726 .\" ====================================================================
727 .SS "Drawing commands"
728 .\" ====================================================================
729 .
730 GNU
731 .I troff \" GNU
732 extends the
733 .B \[rs]D
734 escape sequence
735 with drawing commands to create filled
736 circles and ellipses,
737 and polygons.
738 .\" CSTR #54 did not countenance polygons, but DWB 3.3 had outlined ones
739 .\" as \D'p' as we do. Filled polygons appear to be a GNU innovation.
740 .
741 Stroked (outlined) objects are drawn with the stroke color and
742 filled (solid) ones shaded with the fill color.
743 .
744 These are independent properties;
745 if you want a filled,
746 stroked figure,
747 you must draw the same figure twice using each command.
748 .
749 A filled figure is smaller
750 than a stroked one using the same parameters
751 because the former is drawn only within its defined area,
752 whereas strokes have a line thickness,
753 set with another new drawing command.
754 .
755 .
756 .\" ====================================================================
757 .SS "Notational conventions"
758 .\" ====================================================================
759 .
760 In the request and escape sequence descriptions below,
761 GNU
762 .I troff \" GNU
763 reads arguments named
764 .I character-sequence,
765 .I command,
766 .I contents,
767 .I file,
768 and
769 .I message
770 in copy mode
771 until the end of the input line.
772 .
773 A
774 .I character-sequence
775 comprises one or more ordinary,
776 special,
777 or indexed characters;
778 spaces;
779 or escape sequences that interpolate only these.
780 .\" XXX: or tabs, leaders, backspace, and delete characters
781 .
782 We name the remaining arguments for clarity;
783 they are also
784 .I character-sequences.
785 .
786 A neutral double quote
787 .RB \[oq] \[dq] \[cq] \" single quotes around double quote
788 can optionally prefix a
789 .I character-sequence;
790 the formatter discards one if present,
791 permitting initial embedded spaces in the argument.
792 .
793 .
794 .P
795 .I input
796 refers to arbitrary character sequences
797 (up to a newline or delimiter)
798 that
799 GNU
800 .I troff \" GNU
801 fully interprets,
802 in contrast to copy mode.
803 .
804 .
805 .\" ====================================================================
806 .SS "Escape sequences"
807 .\" ====================================================================
808 .
809 .\" TODO: Some of the synopses here and in "New requests" get pretty
810 .\" discursive. It would be better to lift the introduction of new
811 .\" concepts in groff programming to new subsections above. Examples
812 .\" include: string parameterization, user-definable characters,
813 .\" character properties (cflags), character classes; the hyphenation
814 .\" language, code, and pattern file system; file stream manipulation...
815 .\"
816 .\" _Maybe_ output suppression. It's a big enough concept, but only
817 .\" well understood by retired contributors, only used by the grohtml
818 .\" output driver (still beta after 20 years), and we have some Savannah
819 .\" tickets that point the way to radically simplifying its design,
820 .\" eliminating its need to groff before you groff.
821 .I groff
822 introduces several new escape sequences,
823 extends the syntax of the AT&T
824 .I troff \" AT&T
825 escape sequences
826 .BR \[rs]D ,
827 .BR \[rs]f ,
828 .BR \[rs]k ,
829 .BR \[rs]n ,
830 .BR \[rs]s ,
831 .BR \[rs]$ ,
832 and
833 .BR \[rs]* ,
834 and alters the behavior of
835 .BR \[rs]X .
836 .
837 The following list collates
838 escape sequences alphabetically at first,
839 and then by symbol roughly in Unicode code point order.
840 .\" Exceptions are made to group closely-related escape sequences in an
841 .\" order more agreeable to the development of a topic.
842 .
843 Neutral apostrophes
844 .B \[aq]
845 illustrate escape sequences with a user-selectable delimiter.
846 .
847 Many others are available;
848 see subsection \[lq]Miscellaneous\[rq]
849 and section \[lq]Compatibility Mode\[rq] below.
850 .
851 .
852 .TP 10n \" "\D'E h v'" + 2n + hand-tuned for PDF
853 .BI \[rs]A\[aq] input \[aq]
854 Interpolate 1 if
855 .I input
856 is a valid identifier,
857 and\~0 otherwise.
858 .
859 Because GNU
860 .I troff \" GNU
861 ignores any input character with an invalid code when reading it,
862 invalid identifiers are empty or contain spaces,
863 tabs,
864 newlines,
865 or escape sequences that interpolate something other than a sequence of
866 ordinary characters.
867 .
868 You can employ
869 .B \[rs]A
870 to validate a macro argument before using it to construct another escape
871 sequence or identifier.
872 .
873 .TP
874 .BI \[rs]B\[aq] input \[aq]
875 Interpolate 1 if
876 .I input
877 is a valid numeric expression,
878 and\~0 otherwise.
879 .
880 You might use
881 .B \[rs]B
882 along with the
883 .RB \[lq]\| if \|\[rq]
884 request to filter out invalid macro arguments.
885 .
886 .
887 .TP
888 .BI \[rs]D\[aq]C\~ "d" \[aq]
889 Draw filled circle of diameter
890 .I d
891 with its leftmost point at the drawing position.
892 .
893 .
894 .TP
895 .BI \[rs]D\[aq]E\~ "h v" \[aq]
896 Draw filled ellipse of axis lengths
897 .I h
898 and
899 .IR v ,
900 with its leftmost point at the drawing position.
901 .
902 .
903 .TP
904 .BI \[rs]D\[aq]p\~ "h1 v1"\~\c
905 .RI .\|.\|.\~ "hn vn"\c
906 .B \[aq]
907 Draw polygon with vertices at the drawing position
908 and each point in sequence.
909 .
910 GNU
911 .I troff \" GNU
912 closes the polygon by drawing a line from
913 .RI ( hn ,\~ vn )
914 back to the initial drawing position;
915 DWB and Heirloom
916 .IR troff s \" DWB, Heirloom
917 do not.
918 .
919 .\" XXX: This would be the "STUPID_DRAWING_POSITIONING" complained of in
920 .\" src/libs/libdriver/input.cpp. It is neither the rightmost point
921 .\" of the figure nor the initial drawing position that GNU troff
922 .\" automatically returned to close the figure.
923 Afterward,
924 the drawing position is left at
925 .RI ( hn ,\~ vn ).
926 .
927 .
928 .TP
929 .BI \[rs]D\[aq]P\~ "h1 v1"\~\c
930 .RI .\|.\|.\~ "hn vn"\c
931 .B \[aq]
932 As
933 .BR \[rs]D\[aq]p\[aq] ,
934 but the polygon is filled.
935 .
936 .I groff
937 does not specify how the output device must fill concave or
938 self-intersecting polygons.
939 .
940 .
941 .TP
942 .BI \[rs]D\[aq]t\~ "n" \[aq]
943 Set line thickness of geometric objects
944 .RI to\~ n
945 basic units.
946 .
947 A zero
948 .I n
949 selects the minimum supported thickness.
950 .
951 A negative
952 .I n
953 (the default)
954 selects a thickness proportional to the type size.
955 .
956 .
957 .TP
958 .B \[rs]E
959 Embed an escape character that is not interpreted in copy mode
960 (compare with
961 .B \[rs]a
962 and
963 .BR \[rs]t ).
964 .
965 You can use it to ease the writing of nested macro definitions.
966 .
967 It is also convenient to define strings containing escape sequences that
968 need to work when used in copy mode
969 (for example,
970 as macro arguments),
971 or that will be interpolated at varying macro nesting depths.
972 .
973 .
974 .TP
975 .BI \[rs]f\^[ fnt ]
976 Select typeface
977 .IR fnt ,
978 which may be a mounting position,
979 abstract style,
980 or font name.
981 .
982 .BR \[rs]f\^[] ,
983 .BR \[rs]f\^[P] ,
984 and
985 .B \[rs]f\^P
986 are synonyms;
987 we recommend the first.
988 .
989 .
990 .br
991 .ne 4v
992 .TP
993 .BI \[rs]F f
994 .TQ
995 .BI \[rs]F( fm
996 .TQ
997 .BI \[rs]F[ fml ]
998 Select default font family.
999 .
1000 .B \[rs]F[]
1001 makes the previous font family the default.
1002 .
1003 .B \[rs]FP
1004 is unlike
1005 .BR \[rs]f\^P ;
1006 it selects font family \[lq]P\[rq] as the default.
1007 .
1008 See the
1009 .B fam
1010 request below.
1011 .
1012 .
1013 .br
1014 .ne 3v
1015 .TP
1016 .BI \[rs]k( rg
1017 .TQ
1018 .BI \[rs]k[ reg ]
1019 Store the horizontal drawing position,
1020 relative to that corresponding to the start of the input line
1021 (ignoring page offset and indentation),
1022 in two-character register
1023 .RI name\~ rg
1024 or arbitrary register
1025 .RI name\~ reg .
1026 .
1027 .
1028 .TP
1029 .BI \[rs]m c
1030 .TQ
1031 .BI \[rs]m( cl
1032 .TQ
1033 .BI \[rs]m[ col ]
1034 Set stroke color to
1035 .IR col .
1036 .
1037 .B \[rs]m[]
1038 restores the previous stroke color,
1039 or the default if there is none.
1040 .
1041 .
1042 .TP
1043 .BI \[rs]M c
1044 .TQ
1045 .BI \[rs]M( cl
1046 .TQ
1047 .BI \[rs]M[ col ]
1048 Set fill color to
1049 .IR col .
1050 .
1051 .B \[rs]M[]
1052 restores the previous fill color,
1053 or the default if there is none.
1054 .
1055 .
1056 .TP
1057 .BI \[rs]n[ reg ]
1058 Interpolate register
1059 .IR reg .
1060 .
1061 .
1062 .TP
1063 .BI \[rs]O n
1064 .TQ
1065 .BI \[rs]O[ n ]
1066 Suppress
1067 .I \%troff
1068 output of glyphs and geometric objects.
1069 .
1070 The sequences
1071 .BR \[rs]O2 ,
1072 .BR \[rs]O3 ,
1073 .BR \[rs]O4 ,
1074 and
1075 .B \[rs]O5
1076 are intended for internal use by
1077 .MR grohtml 1 .
1078 .
1079 .
1080 .RS
1081 .TP
1082 .B \[rs]O0
1083 .TQ
1084 .B \[rs]O1
1085 Disable and enable,
1086 respectively,
1087 the emission of glyphs and geometric objects to the output driver,
1088 provided that this sequence occurs at the outermost suppression level
1089 (see
1090 .B \[rs]O3
1091 and
1092 .BR \[rs]O4 ).
1093 .
1094 Horizontal motions corresponding to non-overstruck glyph widths still
1095 occur.
1096 .
1097 These sequences also reset the registers
1098 .BR opminx ,
1099 .BR opminy ,
1100 .BR opmaxx ,
1101 and
1102 .B opmaxy
1103 to\~\-1.
1104 .
1105 These four registers mark the top left and bottom right hand corners of
1106 a box encompassing all written or drawn output.
1107 .
1108 .
1109 .TP
1110 .B \[rs]O2
1111 At the outermost suppression level,
1112 enable emission of glyphs and geometric objects,
1113 and write to the standard error stream the page number and values of the
1114 four aforementioned registers encompassing glyphs written since the last
1115 interpolation of a
1116 .B \[rs]O
1117 sequence,
1118 as well as the page offset,
1119 line length,
1120 image file name
1121 (if any),
1122 horizontal and vertical device motion quanta,
1123 and input file name.
1124 .
1125 Numeric values are in basic units.
1126 .
1127 .
1128 .TP
1129 .B \[rs]O3
1130 .TQ
1131 .B \[rs]O4
1132 Begin and end a nested suppression level,
1133 respectively.
1134 .
1135 .I \%grohtml
1136 uses this mechanism to create images of output preprocessed with
1137 .IR \%pic ,
1138 .IR \%eqn ,
1139 and
1140 .IR \%tbl .
1141 .
1142 At startup,
1143 .I \%troff
1144 is at the outermost suppression level.
1145 .
1146 .I \%pre\-grohtml
1147 generates these sequences when processing the document,
1148 using
1149 .I \%troff
1150 with the
1151 .B ps
1152 output device,
1153 Ghostscript,
1154 and the PNM tools to produce images in PNG format.
1155 .
1156 These sequences start a new page if the device is not
1157 .B html
1158 or
1159 .BR xhtml ,
1160 to reduce the number of images crossing a page boundary.
1161 .
1162 .
1163 .TP
1164 .BI \[rs]O5[ Pfile ]
1165 At the outermost suppression level,
1166 write the name
1167 .I file
1168 to the standard error stream at position
1169 .IR P ,
1170 which must be one of
1171 .BR l ,
1172 .BR r ,
1173 .BR c ,
1174 or
1175 .BR i ,
1176 corresponding to
1177 left,
1178 right,
1179 centered,
1180 and inline alignments within the document,
1181 respectively.
1182 .
1183 .I file
1184 is a name associated with the production of the next image.
1185 .RE
1186 .
1187 .
1188 .TP
1189 .BI \[rs]R\[aq] name\~\[+-]n \[aq]
1190 Synonymous with
1191 .RB \[lq] .nr
1192 .IR name\~\[+-]n \[rq].
1193 .
1194 .TP
1195 .B \[rs]s[0]
1196 .TQ
1197 .B \[rs]s\[aq]0\[aq]
1198 Restore the previous type size;
1199 no operation if there is none.
1200 .
1201 .TP
1202 .BI \[rs]s[ \[+-]n ]
1203 .TQ
1204 .BI \[rs]s \[+-] [ n ]
1205 .TQ
1206 .BI \[rs]s\[aq] \[+-]n \[aq]
1207 .TQ
1208 .BI \[rs]s \[+-] \[aq] n \[aq]
1209 Set the type size to,
1210 or increment or decrement it by,
1211 .IR n \~typographical
1212 points.
1213 .
1214 .
1215 .br
1216 .ne 5v
1217 .TP
1218 .BI \[rs]V e
1219 .TQ
1220 .BI \[rs]V( ev
1221 .TQ
1222 .BI \[rs]V[ env ]
1223 Interpolate contents of the system environment variable
1224 .I env
1225 (one-character
1226 .RI name\~ e ,
1227 two-character
1228 .RI name\~ ev)
1229 as returned by
1230 .MR getenv 3 .
1231 .
1232 .B \[rs]V
1233 is interpreted even in copy mode.
1234 .
1235 .
1236 .\" TODO: When we get this giant headache generalized and adapted to the
1237 .\" `device` request, move this discussion into a dedicated subsection
1238 .\" above.
1239 .TP
1240 .BI \[rs]X\[aq] character-sequence \[aq]
1241 Unlike AT&T
1242 .IR troff , \" AT&T
1243 GNU
1244 .I troff \"
1245 performs some limited processing of the sequence of ordinary characters,
1246 special characters,
1247 and spaces in
1248 .IR character-sequence .
1249 .
1250 .
1251 .\" XXX: Force paragraph spacing here. I know--it's terrible. And
1252 .\" unnecessary once we get this giant discussion moved to its own
1253 .\" (sub)section.
1254 .sp \n[PD]u
1255 .\"IP
1256 The formatter's special character repertoire is unknown
1257 to output drivers outside of glyphs named in a device's fonts,
1258 and even then they may not possess complete coverage of the names
1259 documented in
1260 .MR groff_char 7 .
1261 .
1262 Further,
1263 escape sequences that produce horizontal or vertical motions,
1264 hyphenation breaks,
1265 or that are dummy characters may appear in strings
1266 or be converted to nodes,
1267 particularly in diversions. \" (@pxref{Gtroff Internals})
1268 .
1269 When they occur in a device extension command,
1270 they produce warnings in category
1271 .RB \[lq] char \[rq].
1272 .
1273 These are not representable when interpolated directly into
1274 device-independent output,
1275 as might be done when writing out tag names for PDF bookmarks,
1276 which can appear in a viewer's navigation pane.
1277 .
1278 This is also the case for a small number of special characters,
1279 such as
1280 .BR \[rs][ru] ,
1281 the baseline rule,
1282 that lack a Unicode definition.
1283 .
1284 .
1285 .sp \n[PD]u
1286 .\"IP
1287 So that any Unicode code point can be represented in device extension
1288 commands,
1289 for example in an author's name in document metadata
1290 or as a usefully named bookmark or hyperlink anchor,
1291 GNU
1292 .I troff \" GNU
1293 transforms its argument to represent characters
1294 outside the Unicode Basic Latin range
1295 as Unicode code points expressed in
1296 .IR groff 's
1297 notation for these,
1298 \[lq]\|\c
1299 .BI \[rs][u XXXX ]\c
1300 \|\[rq];
1301 see
1302 .MR groff_char 7 .
1303 .
1304 For these transformations,
1305 the formatter ignores character translations and definitions.
1306 .
1307 .
1308 .sp \n[PD]u
1309 .\"IP
1310 GNU
1311 .I troff \" GNU
1312 converts several ordinary characters that typeset as non-basic Latin
1313 code points to code points outside that range so that they are used
1314 consistently whether they are formatted as glyphs or used in a device
1315 extension command argument.
1316 .
1317 These ordinary characters are
1318 .RB \[lq]\| \[aq] \|\[rq],
1319 .RB \[lq]\| \- \|\[rq],
1320 .RB \[lq]\| \[ha] \|\[rq],
1321 .RB \[lq]\| \[ga] \|\[rq],
1322 and
1323 .RB \[lq]\| \[ti] \|\[rq];
1324 others are written as-is.
1325 .
1326 Thus,
1327 .RB \[lq]\| \[aq] \|\[rq]
1328 transforms to
1329 .RB \[lq]\| \[rs][u2019] \|\[rq].
1330 .
1331 .
1332 .sp \n[PD]u
1333 .\"IP
1334 Contrariwise,
1335 GNU
1336 .I troff \" GNU
1337 translates special characters that typeset
1338 as Unicode basic Latin characters
1339 to basic Latin characters accordingly.
1340 .
1341 Thus,
1342 .RB \[lq]\| \[rs][ga] \|\[rq]
1343 transforms to
1344 .RB \[lq]\| \[ga] \|\[rq],
1345 .RB \[lq]\| \[rs][Do] \|\[rq]
1346 to
1347 .RB \[lq]\| $ \|\[rq],
1348 and so on.
1349 .
1350 .
1351 .br
1352 .ne 5v
1353 .TP
1354 .BI \[rs]Y m
1355 .TQ
1356 .BI \[rs]Y( ma
1357 .TQ
1358 .BI \[rs]Y[ mac ]
1359 Interpolate a macro or string as a device extension command.
1360 .
1361 As
1362 .BI \[rs]X\[aq]\[rs]*[ mac ]\[aq]\c
1363 ,
1364 except that GNU
1365 .I troff \" GNU
1366 does not interpret the contents of
1367 .IR mac ;
1368 further,
1369 .I mac
1370 can be a macro and thus contain newlines,
1371 unlike the argument to
1372 .B \[rs]X .
1373 .
1374 This inclusion of newlines requires an extension to the AT&T
1375 .I troff \" AT&T
1376 device-independent page description language,
1377 and their presence confuses drivers that do not know about it
1378 (see subsection \[lq]Device control commands\[rq] of
1379 .MR groff_out 5 ).
1380 .
1381 .
1382 .TP
1383 .BI \[rs]Z\[aq] input \[aq]
1384 Save the drawing position,
1385 format
1386 .IR input ,
1387 then restore it.
1388 .
1389 GNU
1390 .I troff \" GNU
1391 ignores tabs and leaders in
1392 .I input
1393 with an error diagnostic.
1394 .
1395 .
1396 .TP
1397 .B \[rs]#
1398 Read everything up to and including the next newline in copy mode and
1399 discard it.
1400 .
1401 .B \[rs]#
1402 is like
1403 .BR \[rs]" ,
1404 except that
1405 .B \[rs]"
1406 does not ignore a newline;
1407 the latter therefore cannot be used by itself for a whole-line
1408 comment\[em]it leaves a blank line on the input stream.
1409 .
1410 .
1411 .\" Keep \$0 before \$( in spite of collation.
1412 .TP
1413 .B \[rs]$0
1414 Interpolate the name by which the macro being interpreted was called.
1415 .
1416 In GNU
1417 .I troff \" GNU
1418 this name can vary;
1419 see the
1420 .B als
1421 request.
1422 .
1423 .
1424 .TP
1425 .BI \[rs]$( nn
1426 .TQ
1427 .BI \[rs]$[ nnn ]
1428 In a macro or string definition,
1429 interpolate
1430 the
1431 .IR nn th
1432 or
1433 .IR nnn th
1434 argument.
1435 .
1436 In GNU
1437 .IR troff , \" GNU
1438 macros and strings can have an unlimited number of arguments.
1439 .
1440 .
1441 .TP
1442 .B \[rs]$*
1443 In a macro or string definition,
1444 interpolate the catenation of all arguments,
1445 separated by spaces.
1446 .
1447 .
1448 .TP
1449 .B \[rs]$@
1450 In a macro or string definition,
1451 interpolate the catenation of all arguments,
1452 with each surrounded by double quotes and separated by spaces.
1453 .
1454 .
1455 .TP
1456 .B \[rs]$\[ha]
1457 In a macro or string definition,
1458 interpolate the catenation of all arguments
1459 constructed in a form suitable for passage to the
1460 .B ds
1461 request.
1462 .
1463 .
1464 .TP
1465 .B \[rs])
1466 Interpolate a
1467 .I transparent
1468 dummy character\[em]one that is ignored by end-of-sentence detection.
1469 .
1470 It behaves as
1471 .BR \[rs]& ,
1472 except that
1473 .B \[rs]&
1474 is treated as letters and numerals normally are after
1475 \[lq].\[rq],
1476 \[lq]?\[rq],
1477 and
1478 \[lq]!\[rq];
1479 .B \[rs]&
1480 cancels end-of-sentence detection,
1481 and
1482 .B \[rs])
1483 does not.
1484 .
1485 .
1486 .TP
1487 .BI \[rs]*[ "string\~\c
1488 .RI [ arg \~.\|.\|.]\c
1489 .B ]
1490 Interpolate
1491 .I string,
1492 passing it
1493 .I arg
1494 \&.\|.\|.\&
1495 as arguments.
1496 .
1497 .
1498 .\" Keep \/ before \, in spite of collation.
1499 .TP
1500 .B \[rs]\|/
1501 Apply an
1502 .IR "italic correction" :
1503 modify the spacing of the preceding glyph
1504 so that the distance between it and the following glyph
1505 is correct if the latter is of upright shape.
1506 .
1507 For example,
1508 if an italic\~\[lq]f\^\[rq] is followed immediately
1509 by a roman right parenthesis,
1510 then in many fonts the top right portion of the\~\[lq]f\^\[rq]
1511 overlaps the top of the right parenthesis,
1512 .if t producing \f[I]f\f[R]),
1513 which is ugly.
1514 .
1515 Inserting
1516 .B \[rs]\^/
1517 between them
1518 .if t \{\
1519 . nop produces
1520 . ie \n(.g \f[I]f\/\f[R])
1521 . el \f[I]f\|\f[R])
1522 . nop and
1523 .\}
1524 avoids this problem.
1525 .
1526 Consider using
1527 .B \[rs]\^/
1528 whenever a slanted glyph
1529 is immediately followed by an upright glyph
1530 without any intervening space.
1531 .
1532 .
1533 .TP
1534 .B \[rs],
1535 Apply a
1536 .IR "left italic correction" :
1537 modify the spacing of the following glyph
1538 so that the distance between it and the preceding glyph
1539 is correct if the latter is of upright shape.
1540 .
1541 For example,
1542 if a roman left parenthesis is immediately followed
1543 by an italic\~\[lq]f\^\[rq],
1544 then in many fonts the bottom left portion of the\~\[lq]f\^\[rq]
1545 overlaps the bottom of the left parenthesis,
1546 .if t producing \f[R](\f[I]f\f[R],
1547 which is ugly.
1548 .
1549 Inserting
1550 .B \[rs]\^,
1551 between them
1552 .if t \{\
1553 . nop produces
1554 . ie \n(.g \f[R](\,\f[I]f\f[R]
1555 . el \f[R](\^\f[I]f\f[R]
1556 . nop and
1557 .\}
1558 avoids this problem.
1559 .
1560 Consider using
1561 .B \[rs]\^,
1562 whenever an upright glyph
1563 is followed immediately by a slanted glyph
1564 without any intervening space.
1565 .
1566 .
1567 .TP
1568 .B \[rs]:
1569 Insert a non-printing break point.
1570 .
1571 That is,
1572 a word can break there,
1573 but the soft hyphen character does not mark the break point if it does
1574 (in contrast to
1575 .RB \[lq]\^ \[rs]% \[rq]).
1576 .
1577 The remainder of the word is subject to hyphenation as normal.
1578 .
1579 .
1580 .TP
1581 .BI \[rs]? character-sequence \[rs]?
1582 Suppress formatting of
1583 .I character-sequence.
1584 .
1585 This feature has two applications.
1586 .
1587 .
1588 .IP
1589 Surround operands to the output comparison operator
1590 with
1591 .B \[rs]?\&
1592 to compare them
1593 by character rather than as formatted output.
1594 .
1595 Since
1596 GNU
1597 .I troff \" GNU
1598 reads comparands protected with
1599 .B \[rs]?\&
1600 in copy mode,
1601 they need not even be valid
1602 .I groff
1603 syntax.
1604 .
1605 The escape character is still lexically recognized,
1606 however,
1607 and consumes the next character.
1608 .
1609 .
1610 .IP
1611 When used in a diversion,
1612 .B \[rs]?\&
1613 transparently embeds input,
1614 read in copy mode,
1615 until its own next occurrence on the input line.
1616 .
1617 Use
1618 .B \[rs]!\&
1619 if you want to embed newlines in a diversion.
1620 .
1621 Unlike
1622 .BR \[rs]! ,
1623 .B \[rs]?\&
1624 is interpreted even in copy mode,
1625 and a
1626 .I character-sequence
1627 in the top-level diversion
1628 is not sent to device-independent output.
1629 .
1630 .
1631 .TP
1632 .BI \[rs][ char ]
1633 Typeset the special character
1634 .IR char .
1635 .
1636 See
1637 .MR groff_char 7 .
1638 .
1639 .
1640 .TP
1641 .BI \[rs][ "base-char combining-component\~"\c
1642 .RB .\|.\|. ]
1643 Typeset a composite glyph consisting of
1644 .I base-char
1645 overlaid with one or more
1646 .IR combining-component s.
1647 .
1648 For example,
1649 .RB \[lq]\| \[rs][A\~ho] \^\[rq]
1650 is a capital letter \[lq]A\[rq] with a \[lq]hook accent\[rq] (ogonek).
1651 .
1652 See the
1653 .B \%composite
1654 request below;
1655 .IR "Groff: The GNU Implementation of troff" ,
1656 the
1657 .I groff
1658 Texinfo manual,
1659 for details of composite glyph name construction;
1660 and
1661 .MR groff_char 7
1662 for a list of components used in composite glyph names.
1663 .
1664 .
1665 .TP
1666 .B \[rs]\[ti]
1667 Insert an adjustable,
1668 unbreakable space.
1669 .
1670 As with ordinary spaces,
1671 GNU
1672 .I troff \" GNU
1673 discards any sequence of these at the end of an output line
1674 if a break occurs.
1675 .
1676 .
1677 .\" ====================================================================
1678 .SS "Restricted requests"
1679 .\" ====================================================================
1680 .
1681 To mitigate risks from untrusted input documents,
1682 GNU
1683 .I troff \" GNU
1684 disables the
1685 .BR cf ,
1686 .BR pi ,
1687 and
1688 .B sy
1689 requests by default.
1690 .
1691 Its
1692 .B \-U
1693 option enables \[lq]unsafe mode\[rq],
1694 restoring their function
1695 (and enabling additional
1696 .I groff
1697 extension requests,
1698 .RB \[lq] open \[rq],
1699 .BR opena ,
1700 and
1701 .BR pso ).
1702 .
1703 .
1704 .br
1705 .ne 6v
1706 .\" ====================================================================
1707 .SS "Altered requests"
1708 .\" ====================================================================
1709 .
1710 .TP
1711 .BI .bd\~ "special-font font"
1712 Stop emboldening
1713 .I special-font
1714 when
1715 .I font
1716 is selected.
1717 .
1718 .\" XXX:
1719 .\" Possibly allow prefixing an integer with `\&` to force
1720 .\" interpretation of this form.
1721 .I special-font
1722 must be a font name,
1723 not a mounting position.
1724 .
1725 .TP
1726 .BR .cf\~ [ \[dq] ]\c
1727 .I file
1728 Break and copy the contents of
1729 .I file
1730 as \[lq]throughput\[rq] to
1731 GNU
1732 .IR troff 's \" GNU
1733 output.
1734 .
1735 If a diversion is in use,
1736 GNU
1737 .I troff \" GNU
1738 performs the copy only when the diversion is emitted.
1739 .
1740 In AT&T
1741 .IR troff , \" AT&T
1742 the contents of
1743 .I file
1744 are immediately copied to the output regardless of whether a diversion
1745 is being written to;
1746 this behavior is so anomalous that it must be considered a bug.
1747 .
1748 .
1749 .IP
1750 GNU
1751 .I troff \" GNU
1752 removes a leading neutral double quote
1753 .RB \[oq] \[dq] \[cq]
1754 from the argument,
1755 permitting initial embedded spaces in it,
1756 and reads it to the end of the input line in copy mode.
1757 .
1758 If
1759 .I file
1760 does not exist or is not readable,
1761 a warning in category
1762 .RB \[lq] file \[rq]
1763 is emitted
1764 and the request has no other effect.
1765 .
1766 .
1767 .\" BEGIN Keep in sync with groff.texi node "Compatibility Mode".
1768 .br
1769 .ne 6v
1770 .TP
1771 .BI .de\~ name\~\c
1772 .RI [ end-name ]
1773 .TQ
1774 .BI .am\~ name\~\c
1775 .RI [ end-name ]
1776 .TQ
1777 .BI .ds\~ name\~\c
1778 .RB [[ \[dq] ]\c
1779 .IR contents ]
1780 .TQ
1781 .BI .as\~ name\~\c
1782 .RB [[ \[dq] ]\c
1783 .IR contents ]
1784 In compatibility mode,
1785 these requests behave as
1786 .BR de1 ,
1787 .BR am1 ,
1788 .BR ds1 ,
1789 and
1790 .BR as1 ,
1791 respectively:
1792 GNU
1793 .I troff \" GNU
1794 inserts a
1795 .I "compatibility save"
1796 token at the beginning of the macro,
1797 string,
1798 or appendment thereto as applicable
1799 and a
1800 .I "compatibility restore"
1801 token at its end,
1802 enabling compatibility mode during its interpolation.
1803 .
1804 Thus they work as expected
1805 even if the interpolation context disables compatibility mode.
1806 .\" END Keep in sync with groff.texi node "Compatibility Mode".
1807 .
1808 .
1809 .TP
1810 .BI .hy\~ n
1811 New values 16 and\~32 are available;
1812 the former enables hyphenation before the last character in a word,
1813 and the latter enables hyphenation after the first character in a word.
1814 .
1815 If invoked without an argument,
1816 the mode configured by the
1817 .B hydefault
1818 request is selected.
1819 .
1820 .
1821 .TP
1822 .BI .lf\~ input-line-number\~\c
1823 .RB [[ \[dq] ]\c
1824 .IR file-identifier ]
1825 In GNU
1826 .I troff \" GNU
1827 the first argument becomes the input line number of the
1828 .I next
1829 line the formatter reads.
1830 It also
1831 removes a leading neutral double quote
1832 .RB \[oq] \[dq] \[cq]
1833 from
1834 .I file-identifier,
1835 permitting initial embedded spaces in it,
1836 and reads it to the end of the input line in copy mode.
1837 .
1838 .
1839 .TP
1840 .BR .nx\~ [[ \[dq] ]\c
1841 .IR file ]
1842 GNU
1843 .I troff \" GNU
1844 removes a leading neutral double quote
1845 .RB \[oq] \[dq] \[cq]
1846 from
1847 .IR file ,
1848 permitting initial embedded spaces in it,
1849 and reads it to the end of the input line in copy mode.
1850 .
1851 .
1852 .TP
1853 .BR .pi\~ [ \[dq] ]\c
1854 .I command
1855 GNU
1856 .I troff \" GNU
1857 strips a leading neutral double quote from the argument,
1858 permitting initial embedded spaces in it.
1859 .
1860 .
1861 .TP
1862 .BI .pm\~ name\~\c
1863 \&.\|.\|.
1864 GNU
1865 .I troff \" GNU
1866 reports,
1867 to the standard error stream,
1868 the JSON-encoded name and contents of each macro,
1869 string,
1870 or diversion
1871 .IR name .
1872 .
1873 .
1874 .TP
1875 .BR .so\~ [ \[dq] ]\c
1876 .I file
1877 GNU
1878 .I troff \" GNU
1879 removes a leading neutral double quote
1880 .RB \[oq] \[dq] \[cq]
1881 from
1882 .IR file ,
1883 permitting initial embedded spaces in it,
1884 and reads it to the end of the input line in copy mode.
1885 .
1886 GNU
1887 .I troff \" GNU
1888 searches for
1889 .I file
1890 in any directories specified by
1891 .B \-I
1892 command-line options,
1893 followed by the current working directory.
1894 .
1895 If
1896 .I file
1897 does not exist or is not readable,
1898 GNU
1899 .I troff \" GNU
1900 emits a warning in category
1901 .RB \[lq] file \[rq].
1902 .
1903 .
1904 .TP
1905 .BI .ss\~ word-space-size\~\c
1906 .RI [ additional-sentence-space-size ]
1907 A second argument sets the amount of additional space separating
1908 sentences on the same output line.
1909 .
1910 If omitted,
1911 this amount is set to
1912 .IR word-space-size .
1913 .
1914 Both arguments are in twelfths of current font's space width
1915 (typically one-fourth to one-third em for Western scripts;
1916 see
1917 .MR groff_font 5 ).
1918 .
1919 The default for both parameters is\~12.
1920 .
1921 Negative values are erroneous.
1922 .
1923 .
1924 .TP
1925 .BR .sy\~ [ \[dq] ]\c
1926 .I command
1927 GNU
1928 .I troff \" GNU
1929 strips a leading neutral double quote from the argument,
1930 permitting initial embedded spaces in it.
1931 .
1932 .
1933 .TP
1934 .BR .ta\~ [[\c
1935 .IR "n1 n2\~" .\|.\|.\~ nn \~]\c
1936 .BR T \~\c \" space in roman because we must use 2-font macro with \c
1937 .IR "r1 r2\~" .\|.\|.\~ rn ]
1938 GNU
1939 .I troff \" GNU
1940 supports an extended syntax to specify repeating tab stops after
1941 the
1942 .RB \[lq] T \[rq]
1943 mark.
1944 .
1945 These values are always taken as relative distances from the previous
1946 tab stop.
1947 .
1948 This is the idiomatic way to specify tab stops at equal intervals in
1949 .IR groff .
1950 .
1951 GNU
1952 .IR troff 's \" GNU
1953 startup value is
1954 .RB \[lq] "T 0.5i" \[rq].
1955 .
1956 .
1957 .IP
1958 The syntax summary above instructs
1959 .I groff
1960 to set tabs at positions
1961 .IR n1 ,
1962 .IR n2 ,
1963 \&.\|.\|.\|,
1964 .IR nn ,
1965 then at
1966 .IR nn \|+\| r1 ,
1967 .IR nn \|+\| r2 ,
1968 \&.\|.\|.\|,
1969 .IR nn \|+\| rn ,
1970 then at
1971 .IR nn \|+\| rn \|+\| r1 ,
1972 .IR nn \|+\| rn \|+\| r2 ,
1973 \&.\|.\|.\|,
1974 .IR nn \|+\| rn \|+\| rn ,
1975 and so on.
1976 .
1977 .
1978 .\" ====================================================================
1979 .SS "New requests"
1980 .\" ====================================================================
1981 .
1982 Several GNU
1983 .I troff \" GNU
1984 requests work like AT&T
1985 .IR troff 's \" AT&T
1986 .RB \[lq] as \[rq]
1987 and
1988 .B ds
1989 requests,
1990 accepting an optional leading neutral double quote,
1991 notated
1992 .\" Use single quotes here for quotation to avoid the perversity of an
1993 .\" output device lacking directional double quotes rendering the
1994 .\" following as `"["]"`.
1995 .RB \[oq][ \[dq] ]\[cq],
1996 in an argument that the formatter reads
1997 in copy mode to the end of the input line,
1998 permitting inclusion of leading spaces.
1999 .
2000 .
2001 .TP 8n \" ".break" + 2n
2002 .BI .aln\~ "new-register existing-register"
2003 Create alias
2004 (additional name)
2005 .I new-register
2006 of
2007 .IR existing-register ,
2008 causing the names to refer to the same stored object.
2009 .
2010 If
2011 .I existing-register
2012 is undefined,
2013 the formatter ignores the request.
2014 GNU
2015 .I troff \" GNU
2016 produces a warning in category
2017 .RB \[lq] reg \[rq].
2018 .
2019 See section \[lq]Warnings\[rq] of
2020 .MR \%troff 1
2021 regarding the enablement and suppression of warnings.
2022 .
2023 To remove a register alias,
2024 invoke
2025 .B rr
2026 on its name.
2027 .
2028 A register's contents do not become inaccessible until it has no more
2029 names.
2030 .
2031 .
2032 .TP
2033 .BI .als\~ "new-name existing-name"
2034 Create alias
2035 (additional name)
2036 .I new-name
2037 of request,
2038 string,
2039 macro,
2040 or diversion
2041 .IR existing-name ,
2042 causing the names to refer to the same stored object.
2043 .
2044 If
2045 .I existing-name
2046 is undefined,
2047 the formatter ignores the request.
2048 GNU
2049 .I troff \" GNU
2050 produces a warning in category
2051 .RB \[lq] mac \[rq].
2052 .
2053 If
2054 .I new-name
2055 already exists,
2056 its contents are lost unless already aliased.
2057 .
2058 See section \[lq]Warnings\[rq] of
2059 .MR \%troff 1
2060 regarding the enablement and suppression of warnings.
2061 .
2062 To remove an alias,
2063 invoke
2064 .B rm
2065 on its name.
2066 .
2067 The object itself is not destroyed until it has no more names.
2068 .
2069 .
2070 .IP
2071 When a request,
2072 macro,
2073 string,
2074 or diversion is aliased,
2075 redefinitions and appendments \[lq]write through\[rq] alias names.
2076 .
2077 To replace an alias with a separately defined object,
2078 remove its name first.
2079 .
2080 .
2081 .TP
2082 .BI .am1\~ name\~\c
2083 .RI [ end-name ]
2084 As
2085 .RB \[lq] am \[rq],
2086 but
2087 GNU
2088 .I troff \" GNU
2089 disables compatibility mode while interpreting the appendment to
2090 .I name:
2091 it inserts a
2092 .I "compatibility save"
2093 token at the beginning of the appendment,
2094 and a
2095 .I "compatibility restore"
2096 token at its end.
2097 .
2098 The requests
2099 .RB \[lq] am \[rq],
2100 .BR am1 ,
2101 .BR de ,
2102 and
2103 .B de1
2104 can thus be intermixed freely
2105 since the compatibility save/\:restore tokens
2106 affect only the parts of the macro populated by
2107 .B am1
2108 and
2109 .BR de1 .
2110 .
2111 .
2112 .TP
2113 .BI .ami\~ name\~\c
2114 .RI [ end-name ]
2115 Append to macro indirectly.
2116 .
2117 See
2118 .B dei
2119 below.
2120 .
2121 .
2122 .TP
2123 .BI .ami1\~ name\~\c
2124 .RI [ end-name ]
2125 As
2126 .BR ami ,
2127 but
2128 GNU
2129 .I troff \" GNU
2130 disables compatibility mode
2131 while interpreting the appendment to the macro
2132 named by the contents of string
2133 .I name;
2134 see
2135 .B am1
2136 above.
2137 .
2138 .
2139 .TP
2140 .BI .as1\~ name\~\c
2141 .RB [[ \[dq] ]\c
2142 .IR contents ]
2143 As
2144 .RB \[lq] as \[rq],
2145 but
2146 GNU
2147 .I troff \" GNU
2148 disables compatibility mode
2149 while interpreting the appendment to the string
2150 .I name:
2151 it inserts a
2152 .I "compatibility save"
2153 token at the beginning of the appendment,
2154 and a
2155 .I "compatibility restore"
2156 token at its end.
2157 .
2158 The requests
2159 .RB \[lq] as \[rq],
2160 .BR as1 ,
2161 .BR ds ,
2162 and
2163 .B ds1
2164 can thus be intermixed freely
2165 since the compatibility save/\:restore tokens
2166 affect only the portions of the string populated by
2167 .B as1
2168 and
2169 .BR ds1 .
2170 .
2171 .
2172 .TP
2173 .BI .asciify\~ div
2174 .I Unformat
2175 the diversion
2176 .I div
2177 in a way such that Unicode basic Latin (US-ASCII) characters,
2178 characters translated with the
2179 .B trin
2180 request,
2181 space characters,
2182 and some escape sequences
2183 that were formatted in the diversion
2184 .I div
2185 are treated like ordinary input characters when
2186 .I div
2187 is interpolated.
2188 .
2189 Doing so can be useful in conjunction with the
2190 .B writem
2191 request.
2192 .
2193 .
2194 .IP
2195 When transforming a glyph node back into an input sequence
2196 that demands expression as a special character escape sequence,
2197 GNU
2198 .I troff
2199 uses the default escape character.
2200 .
2201 .
2202 .IP
2203 .B \%asciify
2204 cannot return all nodes in a diversion to their source equivalents:
2205 those produced by indexed characters
2206 .RB ( \[rs]N ),
2207 for example,
2208 remain nodes,
2209 so the result cannot be guaranteed to be a character sequence
2210 as a macro or string is.
2211 .\" TODO: We _could_ store the integer argument to the `\N` escape
2212 .\" sequence in the node data, enabling such reversal.
2213 .
2214 Give the diversion name as an argument to the
2215 .B pm
2216 request to inspect its contents and node list.
2217 .
2218 Glyph parameters such as the type face and size are not preserved;
2219 use
2220 .RB \%\[lq] unformat \[rq]
2221 to achieve that.
2222 .
2223 .
2224 .TP
2225 .B .backtrace
2226 Write backtrace of input stack to the standard error stream.
2227 .
2228 See the
2229 .B \-b
2230 option of
2231 .MR \%troff 1 .
2232 .
2233 .
2234 .TP
2235 .BR .blm\~ [\c
2236 .IR name ]
2237 Set a blank line macro (trap).
2238 .
2239 If a blank line macro is thus defined,
2240 .I groff
2241 executes
2242 .I name
2243 when a blank line is encountered in the input,
2244 instead of the usual behavior.
2245 .
2246 A line consisting only of spaces is also treated as blank and subject to
2247 this trap.
2248 .
2249 If no argument is supplied,
2250 the default blank line behavior is (re-)established.
2251 .
2252 .
2253 .br
2254 .ne 4v
2255 .TP
2256 .BR .box\~ [\c
2257 .IR name ]
2258 .TQ
2259 .BR .boxa\~ [\c
2260 .IR name ]
2261 Divert
2262 (or append)
2263 output to
2264 .I name,
2265 similarly to the
2266 .B di
2267 and
2268 .B da
2269 requests,
2270 respectively.
2271 .
2272 Any pending output line is
2273 .I not
2274 included in the diversion.
2275 .
2276 Without an argument,
2277 stop diverting output;
2278 any pending output line inside the diversion is discarded.
2279 .
2280 .
2281 .TP
2282 .B .break
2283 Exit a
2284 .RB \[lq] while \[rq]
2285 loop.
2286 .
2287 Do not confuse this request with a typographical break or the
2288 .B br
2289 request.
2290 .
2291 See
2292 .RB \[lq] continue \[rq].
2293 .
2294 .
2295 .TP
2296 .B .brp
2297 Break and force adjustment of the output line
2298 per the current adjustment mode.
2299 .
2300 Like
2301 .BR br ,
2302 it does nothing if invoked with the no-break control character.
2303 .
2304 .
2305 .TP
2306 .BI .cflags\~ "n c"\c
2307 \&.\|.\|.
2308 Assign properties encoded by non-negative integer
2309 .I n
2310 to each character or class
2311 .IR c .
2312 .
2313 Spaces need not separate
2314 .I c
2315 arguments.
2316 .
2317 .
2318 .\" TODO: Bust discussion of character flags into its own subsection?
2319 .IP
2320 .I n
2321 is the sum of any of the following.
2322 .
2323 Some combinations are nonsensical,
2324 such as
2325 .RB \[lq] 33 \[rq]
2326 (1 + 32).
2327 .
2328 .
2329 .RS
2330 .IP 1
2331 Recognize the character as ending a sentence if followed by a newline
2332 or two spaces.
2333 .
2334 Initially,
2335 characters
2336 .RB \[lq] .?!\& \[rq]
2337 have this property.
2338 .
2339 .
2340 .IP 2
2341 Enable breaks before the character.
2342 .
2343 A line is not broken at a character with this property unless the
2344 characters on each side both have non-zero hyphenation codes.
2345 .
2346 This exception can be overridden by adding 64.
2347 .
2348 Initially,
2349 no characters have this property.
2350 .
2351 .
2352 .IP 4
2353 Enable breaks after the character.
2354 .
2355 A line is not broken at a character with this property unless the
2356 characters on each side both have non-zero hyphenation codes.
2357 .
2358 This exception can be overridden by adding 64.
2359 .
2360 Initially,
2361 characters
2362 .RB \[lq] \-\[rs][hy]\[rs][em] \^\[rq]
2363 have this property.
2364 .
2365 .
2366 .IP 8
2367 Mark the glyph associated with this character as overlapping other
2368 instances of itself horizontally.
2369 .
2370 Initially,
2371 characters
2372 .RB \[lq]\^ \[rs][ul]\[rs][rn]\[rs][ru]\[rs][radicalex]\[rs][sqrtex]\
2373 \& \^\[rq]
2374 have this property.
2375 .
2376 .
2377 .IP 16
2378 Mark the glyph associated with this character as overlapping other
2379 instances of itself vertically.
2380 .
2381 Initially,
2382 the character
2383 .RB \[lq]\^ \[rs][br] \^\[rq]
2384 has this property.
2385 .
2386 .
2387 .IP 32
2388 Mark the character as transparent for the purpose of end-of-sentence
2389 recognition.
2390 .
2391 In other words,
2392 an end-of-sentence character followed by any number of characters with
2393 this property is treated as the end of a sentence if followed by a
2394 newline or two spaces.
2395 .
2396 This is the same as having a zero space factor in \*[tx].
2397 .
2398 Initially,
2399 characters
2400 .\" The following is ordered with the apostrophe and (single) closing
2401 .\" quote on the ends so they are more easily visually distinguished
2402 .\" from the double quotation marks in roman.
2403 .RB \[lq]\| \[aq]\|"\|)]*\[rs][dg]\[rs][dd]\[rs][rq]\[rs]\^[cq] \|\[rq]
2404 have this property.
2405 .
2406 .
2407 .IP 64
2408 Ignore hyphenation codes of the surrounding characters.
2409 .
2410 Use this value in combination with values 2 and\~4.
2411 .
2412 Initially,
2413 no characters have this property.
2414 .
2415 .
2416 .P
2417 The remaining values were implemented for East Asian language support;
2418 those who use alphabetic scripts exclusively can disregard them.
2419 .
2420 .
2421 .IP 128
2422 Prohibit a break before the character,
2423 but allow a break after the character.
2424 .
2425 This works only in combination with values 256 and 512 and has no effect
2426 otherwise.
2427 .
2428 Initially,
2429 no characters have this property.
2430 .
2431 .
2432 .IP 256
2433 Prohibit a break after the character,
2434 but allow a break before the character.
2435 .
2436 This works only in combination with values 128 and 512 and has no effect
2437 otherwise.
2438 .
2439 Initially,
2440 no characters have this property.
2441 .
2442 .
2443 .IP 512
2444 Allow a break before or after the character.
2445 .
2446 This works only in combination with values 128 and 256 and has no effect
2447 otherwise.
2448 .
2449 Initially,
2450 no characters have this property.
2451 .RE
2452 .
2453 .
2454 .IP
2455 In contrast to values 2 and\~4,
2456 the values 128,
2457 256,
2458 and 512 work
2459 pairwise.
2460 .
2461 If,
2462 for example,
2463 the left character has value 512,
2464 and the right character 128,
2465 no break will be automatically inserted between them.
2466 .
2467 If we use value\~6 instead for the left character,
2468 a break after the character can't be suppressed since the neighboring
2469 character on the right doesn't get examined.
2470 .
2471 .
2472 .TP
2473 .BI .char\~ c\~\c
2474 .RB [[ \[dq] ]\c
2475 .IR contents ]
2476 Define an
2477 ordinary,
2478 special,
2479 or
2480 indexed
2481 character
2482 .I c
2483 as
2484 .I contents.
2485 .
2486 Omitting
2487 .I contents
2488 gives
2489 .I c
2490 an empty definition.
2491 .
2492 .
2493 .IP
2494 Defining
2495 (or redefining)
2496 a
2497 .RI character\~ c
2498 creates a formatter object
2499 that
2500 GNU
2501 .I troff \" GNU
2502 recognizes like any other ordinary,
2503 special,
2504 or indexed character on input,
2505 and produces
2506 .I contents
2507 on output.
2508 .
2509 When
2510 formatting
2511 .IR c ,
2512 GNU
2513 .I troff \" GNU
2514 processes
2515 .I contents
2516 in a temporary environment and encapsulates the result
2517 in a node
2518 (see section \[lq]Gtroff Internals\[rq] in
2519 .IR "Groff: The GNU Implementation of troff" ,
2520 the
2521 .I groff
2522 Texinfo manual);
2523 disabling compatibility mode
2524 and setting the escape character to
2525 .RB to\~ \[rs]
2526 while interpreting
2527 .I contents.
2528 .
2529 Any emboldening,
2530 constant spacing,
2531 or track kerning applies to this object
2532 rather than to individual glyphs resulting from the formatting of
2533 .I contents.
2534 .
2535 .
2536 .IP
2537 A character defined by
2538 .B char
2539 can be used just like a glyph provided by the output device.
2540 .
2541 In particular,
2542 other characters can be translated to it with the
2543 .B tr
2544 request;
2545 it can be made the tab or leader fill character with the
2546 .B tc
2547 and
2548 .B lc
2549 requests;
2550 sequences of it can be drawn with the
2551 .B \[rs]l
2552 and
2553 .B \[rs]L
2554 escape sequences;
2555 and,
2556 if the
2557 .B hcode
2558 request is used on
2559 .IR c ,
2560 it is subject to automatic hyphenation.
2561 .
2562 .
2563 .IP
2564 However,
2565 a user-defined character
2566 .I c
2567 does not participate at its boundaries
2568 in kerning adjustments or italic corrections.
2569 .
2570 .
2571 .IP
2572 The formatter prevents infinite recursion
2573 by treating an occurrence
2574 of a character in its own definition
2575 as if it were undefined;
2576 when interpolating such a character,
2577 GNU
2578 .I troff \" GNU
2579 emits a warning in category
2580 .RB \[lq] char \[rq].
2581 (Mutually recursive character definitions are handled similarly.)
2582 .
2583 .
2584 .IP
2585 The
2586 .B tr
2587 and
2588 .B trin
2589 requests take precedence if
2590 .B char
2591 also applies
2592 .RI to\~ c .
2593 .
2594 The
2595 .B rchar
2596 request removes character definitions.
2597 .
2598 .
2599 .TP
2600 .BI .chop\~ name
2601 Remove the last character from the macro,
2602 string,
2603 or diversion
2604 .IR name .
2605 .
2606 This is useful for removing the newline from the end of a diversion that
2607 is to be interpolated as a string.
2608 .
2609 This request can be used repeatedly on the same
2610 .IR name ;
2611 see section \[lq]Gtroff Internals\[rq] in
2612 .IR "Groff: The GNU Implementation of troff" ,
2613 the
2614 .I groff
2615 Texinfo manual,
2616 for discussion of nodes inserted by
2617 .IR groff .
2618 .
2619 .
2620 .TP
2621 .BI .class\~ ident\~c\~\c
2622 \&.\|.\|.
2623 Define a character class
2624 (or simply \[lq]class\[rq])
2625 .I ident
2626 comprising the members
2627 .IR c \&.\|.\|.,
2628 where each
2629 .I c
2630 is an
2631 ordinary,
2632 special,
2633 or
2634 indexed
2635 character;
2636 or a
2637 .I "range expression."
2638 .
2639 A class thus defined can then be referred to
2640 in a
2641 .B \%cflags
2642 request in lieu of listing all the characters within it.
2643 .
2644 .
2645 .IP
2646 Since class and special character names share the same name space,
2647 we recommend starting and ending the class name with
2648 .RB \[lq] [ \[rq]
2649 and
2650 .RB \[lq] ] \[rq],
2651 respectively,
2652 to avoid collisions with existing special character names defined by
2653 GNU
2654 .I troff \" GNU
2655 or the user
2656 (with
2657 .B char
2658 and related requests).
2659 .
2660 This practice applies the presence of
2661 .RB \[lq] ] \[rq]
2662 in the class name to prevent the usage of the special character escape
2663 form
2664 .RB \[lq] \[rs][ .\|.\|. ] \[rq],
2665 you must therefore access a class thus named via the
2666 .B \[rs]C
2667 escape sequence.
2668 .
2669 .
2670 .IP
2671 An argument
2672 .I c
2673 can alternatively be a
2674 .I "range expression"
2675 consisting of a start character followed by
2676 .RB \[lq] \- \[rq]
2677 and then an end character.
2678 .
2679 Internally,
2680 GNU
2681 .I troff \" GNU
2682 converts these two character names to Unicode code points
2683 (according to the
2684 .I groff
2685 glyph list [GGL]),
2686 which determine the start and end values of the range.
2687 .
2688 If that conversion fails,
2689 GNU
2690 .I troff \" GNU
2691 skips the range expression and any remaining arguments.
2692 .\" .
2693 .\" Furthermore,
2694 .\" classes can be nested.
2695 .
2696 .
2697 .TP
2698 .BI .close\~ stream
2699 Close the named
2700 .IR stream ,
2701 invalidating it as an argument to the
2702 .RB \[lq] write \[rq]
2703 request.
2704 .
2705 See
2706 .RB \[lq] open \[rq].
2707 .
2708 .
2709 .TP
2710 .BI .composite\~ c1\~c2
2711 Map ordinary or special character
2712 .I c1
2713 to
2714 .I c2
2715 when
2716 .I c1
2717 is a combining component in a composite character.
2718 .
2719 Typically,
2720 .B composite
2721 is used to map a spacing character to a combining one.
2722 .
2723 See
2724 .MR groff_char 7 .
2725 .
2726 .
2727 .TP
2728 .B .continue
2729 Skip the remainder of a
2730 .RB \[lq] while \[rq]
2731 loop's body,
2732 immediately retesting its conditional expression.
2733 .
2734 See
2735 .RB \[lq] break \[rq]
2736 above.
2737 .
2738 .
2739 .TP
2740 .BR .color\~ [\c
2741 .IR b ]
2742 Enable or disable output of color-related device-independent output
2743 commands per Boolean expression
2744 .IR b .
2745 .
2746 It is enabled by default,
2747 and if
2748 .I b
2749 is omitted.
2750 .
2751 .
2752 .TP
2753 .BR .cp\~ [\c
2754 .IR b ]
2755 Enable or disable AT&T
2756 .I troff \" AT&T
2757 compatibility mode per Boolean expression
2758 .IR b .
2759 .
2760 It is disabled by default,
2761 and enabled if
2762 .I b
2763 is omitted.
2764 .
2765 In compatibility mode,
2766 long names are not recognized,
2767 and the incompatibilities they cause do not arise.
2768 .
2769 .
2770 .TP
2771 .BI .defcolor\~ "ident scheme color-component\~\c"
2772 \&.\|.\|.
2773 Define a color named
2774 .I ident.
2775 .
2776 .I scheme
2777 identifies a color space and determines the number of required
2778 .IR color-component s;
2779 it must be one of
2780 .RB \[lq] rgb \[rq]
2781 (three components),
2782 .RB \[lq] cmy \[rq]
2783 (three components),
2784 .RB \[lq] cmyk \[rq]
2785 (four components),
2786 or
2787 .RB \[lq] gray \[rq]
2788 (one component).
2789 .
2790 .RB \[lq] grey \[rq]
2791 is accepted as a synonym of
2792 .RB \[lq] gray \[rq].
2793 .
2794 Each color component can be encoded as a hexadecimal value starting
2795 with
2796 .B #
2797 or
2798 .BR ## .
2799 .
2800 The former indicates that each component is in the range 0\[en]255
2801 (0\[en]FF),
2802 the latter the range 0\[en]65535 (0\[en]FFFF).
2803 .
2804 Alternatively,
2805 a component can be specified as a decimal fraction in the range 0\[en]1,
2806 interpreted using a default scaling unit
2807 .RB of\~\[lq] f \^\[rq],
2808 which multiplies its value by 65,536
2809 (but clamps it at 65,535).
2810 .
2811 .
2812 .IP
2813 Each output device has a color named
2814 .RB \[lq] default \[rq],
2815 which cannot be redefined.
2816 .
2817 A device's default stroke and fill colors are not necessarily the same.
2818 .
2819 .
2820 .TP
2821 .BI .de1\~ ident\~\c
2822 .RI [ end-name ]
2823 As
2824 .RB \[lq] de \[rq],
2825 but
2826 GNU
2827 .I troff \" GNU
2828 disables compatibility mode while interpreting
2829 .I name:
2830 it inserts a
2831 .I "compatibility save"
2832 token at the beginning of the macro definition,
2833 and a
2834 .I "compatibility restore"
2835 token at its end.
2836 .
2837 See
2838 .B .am1
2839 above.
2840 .
2841 .
2842 .TP
2843 .BI .dei\~ name\~\c
2844 .RI [ end-name ]
2845 Define macro indirectly,
2846 with the name of the macro to be defined in string
2847 .I name
2848 and the name of the end macro terminating its definition in string
2849 .IR end-name .
2850 .
2851 .
2852 .TP
2853 .BI .dei1\~ name\~\c
2854 .RI [ end-name ]
2855 As
2856 .BR dei ,
2857 but
2858 GNU
2859 .I troff \" GNU
2860 disables compatibility mode
2861 while interpreting the macro
2862 named by the contents of string
2863 .I name.
2864 .
2865 See
2866 .B am1
2867 and
2868 .B de1
2869 above.
2870 .
2871 .
2872 .TP
2873 .BR .device\~ [\c
2874 .RB [ \[dq] ]\c
2875 .IR character-sequence ]
2876 Embed
2877 .I character-sequence
2878 into
2879 GNU
2880 .I troff \" GNU
2881 output as parameters to an
2882 .RB \[lq]x X\[rq]
2883 device extension command;
2884 see
2885 .MR groff_out 5 .
2886 .
2887 The output driver or other postprocessor interprets
2888 .I character-sequence
2889 as it sees fit.
2890 .
2891 .
2892 .TP
2893 .BI .devicem\~ name
2894 Write contents of macro or string
2895 .I name
2896 to
2897 .I \%troff
2898 output as the argument to a device extension command.
2899 .
2900 .
2901 .TP
2902 .BI .do\~ name\~\c
2903 .RI [ argument \~.\|.\|.]
2904 Interpret the string,
2905 request,
2906 diversion,
2907 or macro
2908 .I name
2909 (along with any further arguments)
2910 with compatibility mode disabled.
2911 .
2912 Compatibility mode is restored
2913 (only if it was active)
2914 when the interpolation of
2915 .I name
2916 is interpreted;
2917 that is,
2918 the restored compatibility state applies to the request or
2919 contents of the macro,
2920 string,
2921 or diversion
2922 .IR name ,
2923 its arguments,
2924 and data read from files or pipes if
2925 .I name
2926 is the
2927 .RB \[lq] so \[rq],
2928 .BR soquiet ,
2929 .BR mso ,
2930 .BR msoquiet ,
2931 or
2932 .B pso
2933 request.
2934 .
2935 .
2936 .TP
2937 .BI .ds1\~ name\~\c
2938 .RB [[ \[dq] ]\c
2939 .IR contents ]
2940 As
2941 .BR ds ,
2942 but GNU
2943 .I troff \" GNU
2944 disables AT&T compatibility mode while interpreting
2945 .IR name :
2946 it inserts a \[lq]compatibility save\[rq] token at the beginning of
2947 .IR contents ,
2948 and a \[lq]compatibility restore\[rq] token after it.
2949 .
2950 .
2951 .TP
2952 .B .ecr
2953 Restore the escape character saved with
2954 .BR ecs ,
2955 or set escape character to
2956 .RB \[lq]\| \[rs] \[rq]
2957 if none has been saved.
2958 .
2959 .
2960 .TP
2961 .B .ecs
2962 Save the current escape character.
2963 .
2964 .
2965 .br
2966 .ne 5v
2967 .TP
2968 .BI .evc\~ env
2969 Copy the properties of environment
2970 .I env
2971 to the current environment,
2972 except for:
2973 .
2974 .
2975 .RS
2976 .IP \[bu] 3n
2977 a partially collected line,
2978 if present;
2979 .
2980 .
2981 .IP \[bu]
2982 the interruption status of the previous input line
2983 (due to use of the
2984 .B \[rs]c
2985 escape sequence);
2986 .
2987 .
2988 .IP \[bu]
2989 the count of remaining lines to center,
2990 to right-align,
2991 or to underline
2992 (with or without underlined spaces)\[em]these are set to zero;
2993 .
2994 .
2995 .IP \[bu]
2996 the activation status of temporary indentation;
2997 .
2998 .
2999 .IP \[bu]
3000 input traps and their associated data;
3001 .
3002 .
3003 .br
3004 .ne 4v
3005 .IP \[bu]
3006 the activation status of line numbering
3007 (which can be reactivated with
3008 .RB \[lq] .nm\~+0 \[rq]);
3009 and
3010 .
3011 .
3012 .IP \[bu]
3013 the count of consecutive hyphenated lines
3014 (set to zero).
3015 .RE
3016 .
3017 .
3018 .IP
3019 Copying an environment to itself discards the foregoing data.
3020 .
3021 .
3022 .TP
3023 .BR .fam\~ [\c
3024 .IR fml ]
3025 Set default font family to
3026 .IR fml .
3027 .
3028 With no argument,
3029 the previous font family is selected,
3030 and if none,
3031 the formatter's default family.
3032 .
3033 This default is \[lq]T\[rq] (Times),
3034 but can be overridden by the output device\[em]see
3035 .MR groff_font 5 .
3036 .
3037 The default font family is associated with the environment.
3038 .
3039 See
3040 .BR \[rs]F .
3041 .
3042 .
3043 .TP
3044 .BI .fchar\~ c\~\c
3045 .RB [[ \[dq] ]\c
3046 .IR contents ]
3047 Define fallback
3048 .RI character\~ c
3049 as
3050 .IR contents .
3051 .
3052 As
3053 .BR char ,
3054 but while that request hides a glyph with the same name in the selected
3055 font,
3056 .B fchar
3057 definitions are used only if the font
3058 lacks a glyph for
3059 .IR c .
3060 .
3061 GNU
3062 .I troff \" GNU
3063 performs this test before searching special fonts.
3064 .
3065 .
3066 .TP
3067 .BR .fcolor\~ [\c
3068 .IR col ]
3069 Select
3070 .I col
3071 as the environment's fill color,
3072 or,
3073 without an argument,
3074 restore the previous fill color,
3075 or the default if there is none.
3076 .
3077 .
3078 .TP
3079 .BI .fschar\~ f\~c\~\c
3080 .RB [[ \[dq] ]\c
3081 .IR contents ]
3082 Define fallback special
3083 .RI character\~ c
3084 for font\~\c
3085 .I f
3086 as
3087 .IR contents .
3088 .
3089 As
3090 .BR char ,
3091 but GNU
3092 .I troff \" GNU
3093 locates a character defined by
3094 .B fschar
3095 after any fonts named as arguments to the
3096 .B \%fspecial
3097 are searched and before those named as arguments to the
3098 .RB \%\[lq] special \[rq]
3099 request.
3100 .
3101 .TP
3102 .BI .fspecial\~ f\~\c
3103 .RI [ s\~ .\|.\|.]
3104 Declare each font
3105 .I s
3106 as special only when
3107 .RB font\~ f
3108 is selected.
3109 .
3110 Initially,
3111 a font
3112 .IR f 's
3113 list of associated special fonts is empty for all
3114 .I f.
3115 .
3116 .\" TODO: Move this sentence to a new (sub)section describing the glyph
3117 .\" resolution procedure.
3118 GNU
3119 .I troff \" GNU
3120 searches fonts specified as arguments to the
3121 .RB \%\[lq] special \[rq]
3122 request after those given as arguments to the
3123 .B \%fspecial
3124 request.
3125 .
3126 See
3127 .RB \%\[lq] special \[rq].
3128 .
3129 .
3130 .TP
3131 .BI .ftr\~ f\~\c
3132 .RI [ g ]
3133 Translate
3134 .RI font\~ f
3135 .RI to\~ g .
3136 .
3137 Whenever a font
3138 .RI named\~ f
3139 is referred to in an
3140 .B \[rs]f
3141 escape sequence,
3142 in the
3143 .B F
3144 and
3145 .B S
3146 conditional expression operators,
3147 or in the
3148 .BR ft ,
3149 .BR ul ,
3150 .BR bd ,
3151 .BR cs ,
3152 .BR tkf ,
3153 .RB \%\[lq] special \[rq],
3154 .BR \%fspecial ,
3155 .BR fp ,
3156 or
3157 .B sty
3158 requests,
3159 .RI font\~ g
3160 is used.
3161 If
3162 .I g
3163 is missing or identical
3164 .RI to\~ f ,
3165 then
3166 .RI font\~ f
3167 is not translated.
3168 .
3169 .
3170 .TP
3171 .BI .fzoom\~ f\~\c
3172 .RI [ zoom ]
3173 Set zoom factor
3174 .I zoom
3175 for font\~\c
3176 .IR f .
3177 .I zoom
3178 must be a non-negative integer;
3179 it scales the magnification by thousandths with 1000 as a basis.
3180 If
3181 .I zoom
3182 is missing or equal to zero or 1000,
3183 .RI font\~ f
3184 is not magnified.
3185 .
3186 .IR f \~\c
3187 must be a resolved font name,
3188 not an abstract style or mounting position.
3189 .
3190 .
3191 .TP
3192 .BR .gcolor\~ [\c
3193 .IR col ]
3194 Select
3195 .I col
3196 as the environment's stroke color,
3197 or,
3198 without an argument,
3199 restore the previous stroke color,
3200 or the default if there is none.
3201 .
3202 .
3203 .TP
3204 .BI .hcode\~ "dst1 src1\~"\c
3205 .RI [ "dst2 src2" "] .\|.\|."
3206 Set the hyphenation code of character
3207 .I dst1
3208 to that of
3209 .IR src1 ,
3210 and so on.
3211 .
3212 .I dst1
3213 must be an ordinary character
3214 (other than a numeral)
3215 or a special character,
3216 and
3217 .I src1
3218 must be an ordinary character
3219 (other than a numeral)
3220 or a special character
3221 to which a hyphenation code has already been applied.
3222 .
3223 Assigning the code of an ordinary character to itself
3224 effectively creates a unique hyphenation code
3225 (which can then be copied to others).
3226 .
3227 .B hcode
3228 ignores spaces between arguments.
3229 .
3230 If any argument is invalid,
3231 .B hcode
3232 reports an error and stops reading them.
3233 .
3234 .
3235 .TP
3236 .BR .hla\~ [\c
3237 .IR lang ]
3238 Set the hyphenation language to
3239 .IR lang ,
3240 or clear it if there is no argument.
3241 .
3242 Hyphenation exceptions specified with the
3243 .B hw
3244 request and hyphenation patterns and exceptions specified with the
3245 .B hpf
3246 and
3247 .B hpfa
3248 requests are associated with the hyphenation language.
3249 .
3250 The
3251 .B hla
3252 request is usually invoked by a localization file,
3253 which is in turn loaded by the
3254 .I troffrc
3255 or
3256 .I troffrc\-end
3257 file;
3258 see the
3259 .B hpf
3260 request below.
3261 .
3262 .\" XXX: Not true today, but see Savannah #66387.
3263 .\" The hyphenation language is associated with the environment.
3264 .
3265 .
3266 .TP
3267 .BR .hlm\~ [\c
3268 .IR n ]
3269 Set the consecutive automatically hyphenated line limit to
3270 .I n.
3271 .
3272 A negative value means \[lq]no limit\[rq].
3273 .
3274 Omitting
3275 .I n
3276 implies a limit of
3277 .BR \-1 .
3278 .
3279 This value is associated with the environment.
3280 .
3281 Only lines output from a given environment count toward the maximum
3282 associated with that environment.
3283 .
3284 Hyphens resulting from
3285 .B \[rs]%
3286 are counted;
3287 explicit hyphens are not.
3288 .
3289 .
3290 .TP
3291 .BR .hpf\~ [ \[dq] ]\c
3292 .I pattern-file
3293 Read hyphenation patterns from
3294 .IR pattern-file .
3295 .
3296 This file is sought in the same way that macro files are with the
3297 .B mso
3298 request.
3299 .
3300 .
3301 .IP
3302 The
3303 .I pattern-file
3304 should have the same format as (simple) \*[tx] pattern files.
3305 .
3306 The following scanning rules are implemented.
3307 .
3308 .
3309 .RS
3310 .IP \[bu] 3n
3311 A percent sign starts a comment
3312 (up to the end of the line)
3313 even if preceded by a backslash.
3314 .
3315 .
3316 .IP \[bu]
3317 \[lq]Digraphs\[rq] like
3318 .B \[rs]$
3319 are not supported.
3320 .
3321 .
3322 .IP \[bu]
3323 .RB \[lq] \[ha]\[ha]\c
3324 .IR xx \[rq]
3325 (where each
3326 .I x
3327 is 0\[en]9 or a\[en]f) and
3328 .BI \[ha]\[ha] c
3329 .RI (character\~ c
3330 in the code point range 0\[en]127 decimal)
3331 are recognized;
3332 other uses
3333 .RB of\~ \[ha]
3334 cause an error.
3335 .
3336 .
3337 .IP \[bu]
3338 No macro expansion is performed.
3339 .
3340 .
3341 .IP \[bu]
3342 .B hpf
3343 checks for the expression
3344 .BR \[rs]patterns{ .\|.\|. }
3345 (possibly with whitespace before or after the braces).
3346 .
3347 Everything between the braces is taken as hyphenation patterns.
3348 .
3349 Consequently,
3350 .RB \[lq] { \[rq]
3351 and
3352 .RB \[lq] } \[rq]
3353 are not allowed in patterns.
3354 .
3355 .
3356 .IP \[bu]
3357 Similarly,
3358 .BR \[rs]hyphenation{ .\|.\|. }
3359 gives a list of hyphenation exceptions.
3360 .
3361 .
3362 .IP \[bu]
3363 .B \[rs]endinput
3364 is recognized also.
3365 .
3366 .
3367 .IP \[bu]
3368 For backward compatibility,
3369 if
3370 .B \[rs]patterns
3371 is missing,
3372 the whole file is treated as a list of hyphenation patterns
3373 (but the
3374 .RB \[lq] % \[rq]
3375 character is still recognized as the start of a comment).
3376 .RE
3377 .
3378 .
3379 .IP
3380 Use the
3381 .B hcode
3382 request
3383 (see above)
3384 to map the encoding used in hyphenation pattern files to
3385 .IR groff 's
3386 input encoding.
3387 .
3388 .
3389 .IP
3390 GNU
3391 .I troff \" GNU
3392 ties the set of hyphenation patterns
3393 to the hyphenation language code
3394 selected by the
3395 .B hla
3396 request.
3397 .
3398 The
3399 .B hpf
3400 request is usually invoked by a localization file loaded by the
3401 .I troffrc
3402 file.
3403 .
3404 .I groff
3405 provides localization files for several languages;
3406 See subsection \[lq]Localization packages\[rq] of
3407 .MR groff_tmac 5 .
3408 .
3409 For Western languages,
3410 the localization file
3411 sets the default hyphenation mode
3412 and loads hyphenation patterns and exceptions.
3413 .
3414 By default,
3415 .I troffrc
3416 loads the localization file for English.
3417 .
3418 .
3419 .IP
3420 A second call to
3421 .B hpf
3422 (for the same language)
3423 replaces the old patterns with the new ones.
3424 .
3425 .
3426 .IP
3427 Invoking
3428 .B hpf
3429 causes an error if there is no hyphenation language.
3430 .
3431 .
3432 .IP
3433 If no
3434 .B hpf
3435 request is specified
3436 (either in the document,
3437 in a file loaded at startup,
3438 or in a macro package),
3439 GNU
3440 .I troff \" GNU
3441 won't automatically hyphenate at all.
3442 .
3443 .
3444 .TP
3445 .BR .hpfa\~ [ \[dq] ]\c
3446 .I pattern-file
3447 As
3448 .BR hpf ,
3449 except that the hyphenation patterns and exceptions from
3450 .I pattern-file
3451 are appended to the patterns already applied to the hyphenation language
3452 of the environment.
3453 .
3454 .
3455 .TP
3456 .BI .hpfcode\~ "a b"\c
3457 .RI \~[ "c d" "] .\|.\|."
3458 .I Caution:
3459 This request will be withdrawn in a future
3460 .I groff
3461 release.
3462 .
3463 Use
3464 .B hcode
3465 instead.
3466 .
3467 .
3468 .IP
3469 Define mapping values for character codes in pattern files.
3470 .
3471 .B hpf
3472 or
3473 .B hpfa
3474 apply the mapping
3475 after reading or appending to the active list of patterns.
3476 .
3477 Its arguments are pairs of character codes\[em]integers from 0 to\~255.
3478 .
3479 The request maps character
3480 .RI code\~ a
3481 to
3482 .RI code\~ b ,
3483 .RI code\~ c
3484 to
3485 .RI code\~ d ,
3486 and so on.
3487 .
3488 Character codes that would otherwise be invalid in GNU
3489 .I troff \" GNU
3490 can be used.
3491 .
3492 By default,
3493 every code maps to itself except those for letters \[lq]A\[rq] to
3494 \[lq]Z\[rq],
3495 which map to those for \[lq]a\[rq] to \[lq]z\[rq].
3496 .
3497 .
3498 .TP
3499 .BI .hydefault\~ mode
3500 Set hyphenation mode default to
3501 .I mode.
3502 .
3503 When the
3504 .B hy
3505 request is invoked without an argument,
3506 this mode is selected.
3507 .
3508 The hyphenation mode default is associated with the environment.
3509 .
3510 The formatter's default is
3511 .B 1
3512 for AT&T
3513 .I troff \" AT&T
3514 compatibility.
3515 .
3516 .I groff
3517 locale files generally set a more appropriate one;
3518 see
3519 .MR groff_tmac 5 .
3520 .
3521 .
3522 .TP
3523 .BR .hym\~ [\c
3524 .IR length ]
3525 Set the (right) hyphenation margin
3526 .RI to\~ length .
3527 .
3528 If the adjustment mode is not
3529 .RB \[lq] b \[rq]
3530 or
3531 .RB \[lq] n \[rq],
3532 the line is not hyphenated if it is shorter than
3533 .IR length .
3534 .
3535 Without an argument,
3536 the default hyphenation margin is reset to its default value,
3537 0.
3538 .
3539 The default scaling unit
3540 .RB is\~\[lq] m \[rq].
3541 .
3542 The hyphenation margin is associated with the environment.
3543 .
3544 A negative argument resets the hyphenation margin to zero,
3545 emitting a warning in category
3546 .RB \[lq] range \[rq].
3547 .
3548 .
3549 .TP
3550 .BR .hys\~ [\c
3551 .IR hyphenation-space ]
3552 Suppress hyphenation of the line in adjustment modes
3553 .RB \[lq] b \[rq]
3554 or
3555 .RB \[lq] n \[rq],
3556 if that adjustment can be achieved by adding no more than
3557 .I hyphenation-space
3558 extra space to each inter-word space.
3559 .
3560 Without an argument,
3561 the hyphenation space adjustment threshold is set to its default value,
3562 0.
3563 .
3564 The default scaling unit
3565 .RB is\~\[lq] m \[rq].
3566 .
3567 The hyphenation space adjustment threshold is associated with the
3568 environment.
3569 .
3570 A negative argument resets the hyphenation space adjustment threshold to
3571 zero,
3572 emitting a warning in category
3573 .RB \[lq] range \[rq].
3574 .
3575 .
3576 .TP
3577 .BR .itc\~ n\~\c\" TODO: borrow "npl" notation from groff(7)?
3578 .RI [ mac ]
3579 As
3580 .RB \[lq] it \[rq],
3581 but lines interrupted with the
3582 .B \[rs]c
3583 escape sequence do not apply to the line count.
3584 .
3585 .
3586 .TP
3587 .BR .kern\~ [\c
3588 .IR b ]
3589 Enable or disable pairwise kerning of glyphs in the environment per
3590 Boolean expression
3591 .IR b .
3592 .
3593 It is enabled by default,
3594 and if
3595 .I b
3596 is omitted.
3597 .
3598 .
3599 .TP
3600 .BI .length\~ reg\~\c
3601 .RB [[ \[dq] ]\c
3602 .IR contents ]
3603 Compute the number of characters in
3604 .I contents
3605 and store the count in the register
3606 .IR reg .
3607 .
3608 If
3609 .I reg
3610 doesn't exist,
3611 GNU
3612 .I troff \" GNU
3613 creates it.
3614 .
3615 .
3616 .IP
3617 .I Caution:
3618 If you interpolate a macro or diversion in
3619 .I contents
3620 (see section \[lq]Punning Names\[rq] in
3621 .MR groff 7 ),
3622 the
3623 .B length
3624 request counts characters
3625 (or nodes)
3626 only up to the first newline,
3627 and leaves the rest on the input stream.
3628 .
3629 In conventional circumstances,
3630 that means the remainder is interpreted,
3631 and may be formatted.
3632 .
3633 To discover the length of any
3634 string,
3635 macro,
3636 or diversion,
3637 use the
3638 .B pm
3639 request.
3640 .
3641 See section \[lq]Debugging\[rq] below.
3642 .
3643 .
3644 .TP
3645 .BR .linetabs\~ [\c
3646 .IR b ]
3647 Activate or deactivate line-tabs in the environment per Boolean
3648 expression
3649 .IR b .
3650 .
3651 They are inactive by default,
3652 and activated if
3653 .I b
3654 is omitted.
3655 .
3656 When line-tabs are active,
3657 tab stops are computed relative to the start of the pending output line
3658 instead of the drawing position corresponding to the start of the input
3659 line.
3660 .
3661 .
3662 .TP
3663 .BR .lsm\~ [\c
3664 .IR name ]
3665 Set a leading space trap,
3666 calling the macro
3667 .I name
3668 when GNU
3669 .I troff \" GNU
3670 encounters leading spaces on a text line;
3671 the implicit line break that normally happens in this case
3672 is suppressed.
3673 .
3674 The formatter stores the count of leading spaces on the text line
3675 in register
3676 .BR lsn ,
3677 and the amount of corresponding horizontal motion
3678 in register
3679 .BR lss ,
3680 irrespective of whether a leading space trap is set.
3681 .
3682 When it is,
3683 GNU
3684 .I troff \" GNU
3685 removes the leading spaces from the input line
3686 and produces no motion before calling
3687 .IR name .
3688 .
3689 .
3690 .IP
3691 If no argument is supplied,
3692 GNU
3693 .I troff \" GNU
3694 re\[e ad]stablishes the default handling of leading spaces on text lines
3695 (breaking the line when filling,
3696 and formatting a horizontal motion of
3697 .B \[rs]n[lsn]
3698 word spaces).
3699 .
3700 .
3701 .TP
3702 .BR .mso\~ [ \[dq] ]\c
3703 .I file
3704 As
3705 .RB \[lq] so \[rq],
3706 except that GNU
3707 .I troff \" GNU
3708 searches for the specified
3709 .I file
3710 in the same directories as macro files;
3711 see
3712 .I GROFF_TMAC_PATH
3713 in section \[lq]Environment\[rq] of
3714 .MR groff 1
3715 and
3716 .B \-m
3717 in section \[lq]Options\[rq]
3718 of the same page.
3719 .
3720 If
3721 .I file
3722 does not exist or is not readable,
3723 a warning in category
3724 .RB \[lq] file \[rq]
3725 is emitted
3726 and the request has no other effect.
3727 .
3728 .
3729 .TP
3730 .BR .msoquiet\~ [ \[dq] ]\c
3731 .I file
3732 As
3733 .BR mso ,
3734 but no warning is emitted if
3735 .I file
3736 does not exist.
3737 .
3738 .
3739 .TP
3740 .BR .nop \~[\c
3741 .IR input ]
3742 Interpret
3743 .I input
3744 as if it were an input line.
3745 .
3746 .B nop
3747 resembles
3748 .RB \[lq] ".if 1" \[rq];
3749 it puts a break on the output if
3750 .I input
3751 is empty.
3752 .
3753 Unlike
3754 .RB \[lq]\| if \|\[rq],
3755 it cannot govern conditional blocks.
3756 .
3757 Its application is to maintain consistent indentation within macro
3758 definitions even when formatting output.
3759 .
3760 .
3761 .TP
3762 .B .nroff
3763 Make the
3764 .B n
3765 conditional expression evaluate true and
3766 .B t
3767 false.
3768 .
3769 See
3770 .BR troff .
3771 .
3772 .
3773 .TP
3774 .BI .open\~ "ident\~\c
3775 .RB [ \[dq] ]\c
3776 .I file
3777 Open
3778 .I file
3779 for writing and associate a stream named
3780 .I ident
3781 with it,
3782 making it available for
3783 .RB \[lq] write \[rq]
3784 requests.
3785 .
3786 Unsafe request;
3787 disabled by default.
3788 .
3789 Also see
3790 .B writec
3791 and
3792 .RB \[lq] close \[rq].
3793 .
3794 .TP
3795 .BI .opena\~ "ident\~\c
3796 .RB [ \[dq] ]\c
3797 .I file
3798 As
3799 .RB \[lq] open \[rq],
3800 but appends to
3801 .I file
3802 if it already exists instead of overwriting it.
3803 .
3804 .
3805 .TP
3806 .BR .output \~[ \[dq] ]\c
3807 .I character-sequence
3808 Emit
3809 .IR character-sequence ,
3810 transparently to
3811 GNU
3812 .I troff \" GNU
3813 output;
3814 this usage is similar to that of
3815 .B \[rs]!\&
3816 when it occurs in the top-level diversion.
3817 .
3818 .
3819 .TP
3820 .BI .pchar\~ c\~\c
3821 \&.\|.\|.
3822 Report,
3823 to the standard error stream,
3824 information about each character
3825 (be it
3826 ordinary,
3827 special,
3828 or indexed)
3829 .RI "or character class\~" c .
3830 .
3831 A character defined by a request
3832 .RB ( char ,
3833 .BR \%fchar ,
3834 .BR \%fschar ,
3835 or
3836 .BR \%schar )
3837 reports its contents as a JSON-encoded string,
3838 but the output is not otherwise in JSON format.
3839 .
3840 .
3841 .TP
3842 .BR .pcolor \~[\c
3843 .IR col \~\&.\|.\|.]
3844 Report,
3845 to the standard error stream,
3846 each defined color named
3847 .IR col ,
3848 its color space identifier,
3849 and channel value assignments,
3850 or,
3851 without arguments,
3852 those of all defined colors.
3853 .
3854 A device's default stroke and/or fill colors,
3855 \[lq]default\[rq],
3856 are not listed since they are immutable and their details unknown to the
3857 formatter.
3858 .
3859 .
3860 .TP
3861 .B .pcomposite
3862 Report,
3863 to the standard error stream,
3864 the list of configured composite character mappings.
3865 .
3866 See
3867 .RB \%\[lq] composite \[rq]
3868 above.
3869 .
3870 The \[lq]from\[rq] code point is listed first,
3871 followed by its \[lq]to\[rq] mapping.
3872 .
3873 .
3874 .TP
3875 .B .pev
3876 Report the state of the current environment followed by that of all
3877 other environments to the standard error stream.
3878 .
3879 .
3880 .TP
3881 .B .pfp
3882 Report,
3883 to the standard error stream,
3884 the list of occupied font mounting positions.
3885 .\" Recall the @code{fp} request description in @ref{Selecting Fonts}.
3886 .
3887 Occupied mounting positions are listed,
3888 one per line,
3889 in increasing order,
3890 followed by the typeface name;
3891 if the name corresponds to an abstract style,
3892 the entry ends there.
3893 .
3894 Otherwise,
3895 the name of the font description file
3896 and the font's \[lq]internal name\[rq] datum,
3897 the meaning of which varies by output device,
3898 follow.
3899 .
3900 .
3901 .TP
3902 .B .pftr
3903 Report,
3904 to the standard error stream,
3905 the list of font translations.
3906 .
3907 See
3908 .B pftr
3909 above.
3910 .
3911 The \[lq]from\[rq] font identifier is listed first,
3912 followed by its \[lq]to\[rq] translation.
3913 .
3914 .
3915 .TP
3916 .B .phw
3917 Report,
3918 to the standard error stream,
3919 the list of hyphenation exception words
3920 associated with the hyphenation language
3921 selected by the
3922 .B hla
3923 request.
3924 .
3925 A
3926 .RB \[lq] \- \[rq]
3927 marks each hyphenation point.
3928 .
3929 A word prefixed with
3930 .RB \[lq] \- \[rq]
3931 is not hyphenated at all.
3932 .
3933 The report suffixes words
3934 to which automatic hyphenation applies
3935 (meaning those defined in a hyphenation pattern file
3936 rather than with the
3937 .B hw
3938 request)
3939 with a tab and asterisk
3940 .RB \[lq] * \[rq].
3941 .
3942 .
3943 .TP
3944 .B .pline
3945 Report,
3946 in JSON syntax to the standard error stream,
3947 the list of output nodes corresponding to the pending output line.
3948 .
3949 In JSON,
3950 a pair of empty brackets
3951 .RB \[lq] "[ ]" \[rq]
3952 represents an empty list.
3953 .
3954 A
3955 .I pending
3956 output line has not yet undergone adjustment,
3957 and lacks a line number and margin character
3958 (all as applicable).
3959 .
3960 .
3961 .TP
3962 .BR .pnr \~[\c
3963 .IR reg \~.\|.\|.]
3964 Report the name and value and,
3965 if its type is numeric,
3966 the autoincrement amount and assigned format of each register
3967 .IR reg ,
3968 or,
3969 without arguments,
3970 those of all defined registers,
3971 to the standard error stream.
3972 .
3973 .
3974 .TP
3975 .BI .psbb \~file
3976 Get the bounding box of a PostScript image
3977 .IR file .
3978 .
3979 This file must conform to Adobe's Document Structuring Conventions;
3980 the request attempts to extract the bounding box values from a
3981 .B \%%%BoundingBox
3982 comment.
3983 .
3984 After invocation,
3985 the
3986 .I x
3987 and
3988 .I y
3989 coordinates
3990 (in PostScript units)
3991 of the lower left and upper right corners can be found in the registers
3992 .BR \[rs]n[llx] ,
3993 .BR \[rs]n[lly] ,
3994 .BR \[rs]n[urx] ,
3995 and
3996 .BR \[rs]n[ury] ,
3997 respectively.
3998 .
3999 If an error occurs,
4000 these four registers are set to zero.
4001 .
4002 .
4003 .TP
4004 .BR .pso\~ [ \[dq] ]\c
4005 .I command
4006 As
4007 .RB \[lq] so \[rq],
4008 except that input comes from the standard output stream of
4009 .IR command ,
4010 which is passed to
4011 .MR popen 3 .
4012 .
4013 .
4014 .TP
4015 .B .pstream
4016 Report,
4017 in
4018 JSON
4019 syntax to the standard error stream,
4020 the list of open streams,
4021 including the name of each open stream,
4022 the name of the file backing it,
4023 and its mode
4024 (writing or appending).
4025 .
4026 .
4027 .TP
4028 .B .pwh
4029 Report the names and vertical positions,
4030 in basic units,
4031 of all page location traps
4032 to the standard error stream.
4033 .
4034 GNU
4035 .I troff \" GNU
4036 reports empty slots in the list,
4037 where a trap had been planted
4038 but subsequently (re)moved,
4039 because they can affect the visibility of subsequently planted traps.
4040 .
4041 .
4042 .TP
4043 .BI .pvs \~\[+-]n
4044 Set the post-vertical line spacing
4045 .RI to\~ n ;
4046 default scaling unit
4047 .RB is\~\[lq] p \[rq].
4048 .
4049 With no argument,
4050 the post-vertical line space is set to its previous value.
4051 .
4052 .
4053 .IP
4054 In GNU
4055 .IR troff , \" GNU
4056 the distance between text baselines consists of the extra pre-vertical
4057 line spacing set by the most negative
4058 .B \[rs]x
4059 argument on the pending output line,
4060 the vertical spacing
4061 .RB ( vs ),
4062 the extra post-vertical line spacing set by the most positive
4063 .B \[rs]x
4064 argument on the pending output line,
4065 and the post-vertical line spacing set by this request.
4066 .
4067 .
4068 .TP
4069 .BI .rchar\~ c\c
4070 \&.\|.\|.
4071 Remove definition of each
4072 ordinary,
4073 special,
4074 or
4075 indexed
4076 character
4077 .IR c ,
4078 undoing the effect of a
4079 .BR char ,
4080 .BR \%fchar ,
4081 or
4082 .B \%schar
4083 request.
4084 .
4085 Spaces need not separate
4086 .I c
4087 arguments.
4088 .\" XXX: Removal of a class is unspecified.
4089 .
4090 The character definition removed
4091 (if any)
4092 is the first encountered in the resolution process documented
4093 in section \[lq]Using Symbols\[rq] of
4094 .IR "Groff: The GNU Implementation of troff" .
4095 .\" TODO: Get that information into this man page!
4096 .
4097 Glyphs,
4098 which are defined by font description files,
4099 cannot be removed.
4100 .
4101 .
4102 .TP
4103 .BR .return\~ [\c
4104 .IR input ]
4105 .\" XXX: useless request warning if not interpreting a macro?
4106 Stop interpreting an interpolated macro,
4107 skipping to the end of its definition.
4108 .
4109 Do not confuse
4110 .RB \[lq] return \[rq]
4111 with
4112 .BR rt .
4113 .
4114 If called with an argument
4115 .I input,
4116 GNU
4117 .I troff \" GNU
4118 performs the skip twice\[em]once within the macro being interpreted
4119 and once in an enclosing macro,
4120 permitting a macro to wrap the request
4121 (as
4122 .I trace\:.tmac
4123 does).
4124 .
4125 .
4126 .
4127 .TP
4128 .BI .rfschar\~ "f c\~"\c
4129 \&.\|.\|.
4130 Remove each fallback special
4131 .RI character\~ c
4132 for font
4133 .IR f .
4134 .
4135 Spaces need not separate
4136 .I c
4137 arguments.
4138 .
4139 See
4140 .BR fschar .
4141 .
4142 .
4143 .TP
4144 .BR .rj\~ [\c
4145 .IR n ]
4146 Break,
4147 right-align the
4148 .RI next\~ n
4149 (default: 1)
4150 input lines,
4151 then break again.
4152 .
4153 .B rj
4154 implies
4155 .RB \[lq] ".ce 0" \[rq],
4156 and
4157 .B ce
4158 implies
4159 .RB \[lq] ".rj 0" \[rq].
4160 .
4161 Invoking the request
4162 with the no-break control character
4163 suppresses the first break.
4164 .
4165 .
4166 .TP
4167 .BI .rnn \~r1\~r2
4168 Rename register
4169 .I r1
4170 to
4171 .IR r2 .
4172 .
4173 If
4174 .I r1
4175 doesn't exist,
4176 the request is ignored.
4177 .
4178 .
4179 .TP
4180 .BI .schar\~ c\~\c
4181 .RB [[ \[dq] ]\c
4182 .IR contents ]
4183 Define global fallback character
4184 .I c
4185 as
4186 .IR contents .
4187 .
4188 As
4189 .BR char ,
4190 but GNU
4191 .I troff \" GNU
4192 locates a character defined with
4193 .B schar
4194 after any fonts named as arguments to the
4195 .RB \%\[lq] special \[rq]
4196 request and before any mounted special fonts.
4197 .
4198 .
4199 .TP
4200 .BR .shc \~\c
4201 .RI [ c ]
4202 Set the soft hyphen character,
4203 inserted when a word is hyphenated automatically or at a hyphenation
4204 character,
4205 .RI to\~ c .
4206 .
4207 If
4208 .I c
4209 is omitted,
4210 the soft hyphen character is set to the default,
4211 .BR \[rs][hy] .
4212 .
4213 If the selected glyph does not exist in the font in use at a potential
4214 hyphenation point,
4215 then the line is not broken at that point.
4216 .
4217 Neither character definitions
4218 .RB ( char
4219 and similar)
4220 nor translations
4221 .RB ( tr
4222 and similar)
4223 are considered when assigning the soft hyphen character.
4224 .
4225 .
4226 .TP
4227 .BR .shift\~ [\c
4228 .IR n ]
4229 .\" XXX: useless request warning if not interpreting a macro or string?
4230 Shift macro or string parameters
4231 .I n
4232 places
4233 (by\~1 if
4234 .I n
4235 omitted):
4236 .RI argument\~ i
4237 becomes argument
4238 .IR i \|\-\| n ;
4239 arguments 1
4240 .RI to\~ n
4241 become unavailable.
4242 .
4243 Shifting by a non-positive amount,
4244 or outside of a macro or string definition,
4245 performs no operation.
4246 .
4247 The register
4248 .B .$
4249 adjusts its value accordingly.
4250 .
4251 .
4252 .TP
4253 .BI .sizes\~ "s1 s2\~"\c
4254 .RI .\|.\|.\~ sn\~\c
4255 .RB [ 0 ]
4256 Set the available type sizes to
4257 .IR s1 ,
4258 .IR s2 ,
4259 \&.\|.\|.\&
4260 .I sn
4261 scaled points.
4262 .
4263 The list of sizes can be terminated by an
4264 .RB optional\~\[lq] 0 \[rq].
4265 .
4266 Each
4267 .I si
4268 can also be a range
4269 .IR m \(en n .
4270 .
4271 In contrast to the device description file directive of the same name
4272 (see
4273 .MR groff_font 5 ),
4274 the argument list can't extend over more than one line.
4275 .
4276 .
4277 .TP
4278 .BR .soquiet\~ [ \[dq] ]\c
4279 .I file
4280 As
4281 .RB \[lq] so \[rq],
4282 but no warning is emitted if
4283 .I file
4284 does not exist.
4285 .
4286 .
4287 .TP
4288 .BR .special\~ [\c
4289 .IR s\~ .\|.\|.]
4290 Declare each font
4291 .I s
4292 as special,
4293 irrespective of its description file,
4294 populating a list that
4295 GNU
4296 .I troff \" GNU
4297 searches,
4298 in order,
4299 to find the glyph demanded.
4300 .
4301 GNU
4302 .I troff \" GNU
4303 mounts each font
4304 .I s.
4305 .
4306 Invoking
4307 .B \%special
4308 without arguments empties the list.
4309 .
4310 A font is not automatically unmounted
4311 if a subsequent
4312 .B \%special
4313 request removes it from the list.
4314 .
4315 Initially,
4316 the list is empty.
4317 .
4318 .\" TODO: Move this sentence to a new section description the glyph
4319 .\" resolution procedure.
4320 GNU
4321 .I troff \" GNU
4322 searches fonts specified as arguments to the
4323 .RB \%\[lq] special \[rq]
4324 request after those given as arguments to the
4325 .B \%fspecial
4326 request.
4327 .
4328 .
4329 .TP
4330 .BR .spreadwarn\~ [\c
4331 .IR limit ]
4332 Emit a
4333 .RB \[lq] break \[rq]
4334 warning if the additional space inserted for each space between words in
4335 an output line adjusted to both margins with
4336 .RB \[lq] .ad\~b \[rq]
4337 is larger than or equal to
4338 .IR limit .
4339 .
4340 A negative value is treated as zero;
4341 an absent argument toggles the warning on and off without changing
4342 .IR limit .
4343 .
4344 The default scaling unit is
4345 .BR m .
4346 .
4347 At startup,
4348 .B spreadwarn
4349 is inactive and
4350 .I limit
4351 is 3\~m.
4352 .
4353 .
4354 .IP
4355 For example,
4356 .RB \[lq] ".spreadwarn 0.2m" \[rq]
4357 warns if
4358 .I \%troff
4359 must add 0.2\~m or more to each inter-word space in a line.
4360 .
4361 .
4362 .TP
4363 .BI .stringdown \~str
4364 .TQ
4365 .BI .stringup \~str
4366 Alter the string named
4367 .I str
4368 by replacing each of its bytes with its
4369 lowercase
4370 .RB ( down )
4371 or uppercase
4372 .RB ( up )
4373 version
4374 (if one exists).
4375 .
4376 Special characters
4377 (see
4378 .MR groff_char 7 )
4379 will often transform in the expected way due to the regular naming
4380 convention for accented characters.
4381 .
4382 When they do not,
4383 use substrings and/or catenation.
4384 .
4385 .
4386 .TP
4387 .BI .sty\~ "pos style"
4388 Associate abstract
4389 .I style
4390 with non-negative font mounting
4391 .RI position\~ pos .
4392 .
4393 .
4394 .TP
4395 .BI .substring\~ "str start\~"\c
4396 .RI [ end ]
4397 Replace the string named
4398 .I str
4399 with its substring bounded by the indices
4400 .I start
4401 and
4402 .IR end ,
4403 inclusively.
4404 .
4405 The first character in the string has index\~0.
4406 .
4407 Negative indices count backward from the end of the string:
4408 the last character has index\~\-1,
4409 the character before the last has index\~\-2,
4410 and so on.
4411 .
4412 If
4413 .I end
4414 is omitted,
4415 .B \-1
4416 is implied.
4417 .
4418 .
4419 .TP
4420 .BI .tkf\~ f\~s1\~n1\~s2\~n2
4421 Enable track kerning for font\~\c
4422 .IR f .
4423 When the current font is\~\c
4424 .IR f ,
4425 the width of every glyph is increased by an amount between
4426 .I n1
4427 and
4428 .IR n2 ;
4429 when the current type size is less than or equal to
4430 .IR s1 ,
4431 the width is increased by
4432 .IR n1 ;
4433 when it is greater than or equal to
4434 .IR s2 ,
4435 the width is increased by
4436 .IR n2 ;
4437 when the type size is greater than or equal to
4438 .I s1
4439 and less than or equal to
4440 .IR s2 ,
4441 the increase in width is a linear function of the type size.
4442 .
4443 .
4444 .TP
4445 .BR .tm1 \~[[ \[dq] ]\c
4446 .IR message ]
4447 As
4448 .BR tm ,
4449 but
4450 removes a leading neutral double quote
4451 .RB \[oq] \[dq] \[cq]
4452 from
4453 .IR message ,
4454 permitting initial embedded spaces in it.
4455 .
4456 .
4457 .TP
4458 .BR .tmc \~[[ \[dq] ]\c
4459 .IR message ]
4460 As
4461 .BR tm1 ,
4462 but does not append a newline.
4463 .
4464 .
4465 .TP
4466 .BI .trf\~ file
4467 Break and copy
4468 .I file
4469 as \[lq]throughput\[rq] to GNU
4470 .I troff \" GNU
4471 output,
4472 discarding characters that are invalid as input;
4473 contrast with
4474 .BR cf .
4475 .
4476 Each line of
4477 .I file
4478 is output as if preceded by
4479 .BR \[rs]! ,
4480 but is not interpreted by the formatter.
4481 .
4482 If
4483 .I file
4484 does not end with a newline,
4485 .B trf
4486 appends one.
4487 .
4488 Invoking the request
4489 with the no-break control character
4490 suppresses the break.
4491 .
4492 .
4493 .TP
4494 .BI .trin\~ abcd
4495 As the
4496 .B tr
4497 request,
4498 but the
4499 .B \%asciify
4500 request uses the character code
4501 (if any)
4502 before the character translation.
4503 .
4504 .
4505 .TP
4506 .BI .trnt\~ abcd
4507 As the
4508 .B tr
4509 request,
4510 but the translations do not apply to text that is
4511 transparently throughput into a diversion with
4512 .BR \[rs]! .
4513 .
4514 .
4515 .TP
4516 .B .troff
4517 Make the
4518 .B t
4519 conditional expression evaluate true and
4520 .B n
4521 false.
4522 .
4523 See
4524 .BR nroff .
4525 .
4526 .
4527 .br
4528 .ne 5v
4529 .TP
4530 .BI .unformat\~ div
4531 Unformat the diversion
4532 .IR div .
4533 .
4534 Unlike
4535 .BR \%asciify ,
4536 .RB \%\[lq] unformat \[rq]
4537 handles only tabs and spaces between words,
4538 the latter usually arising from spaces or newlines in the input.
4539 .
4540 Tabs are treated as input tokens,
4541 and spaces become adjustable again.
4542 .
4543 The vertical sizes of lines are not preserved,
4544 but glyph information
4545 (font,
4546 type size,
4547 space width,
4548 and so on)
4549 is retained.
4550 .
4551 .
4552 .TP
4553 .BR .vpt\~ [\c
4554 .IR b ]
4555 Enable or disable vertical position traps per Boolean expression
4556 .IR b .
4557 .
4558 They are enabled by default,
4559 and if
4560 .I b
4561 is omitted.
4562 .
4563 Vertical position traps are those set by the
4564 .BR ch ,
4565 .BR wh ,
4566 and
4567 .B dt
4568 requests.
4569 .
4570 Vertical position trap enablement is global.
4571 .
4572 .
4573 .TP
4574 .BR .warn\~ [\c
4575 .IR n ]
4576 Select the categories,
4577 or \[lq]types\[rq],
4578 of reported warnings.
4579 .
4580 .IR n \~is
4581 the sum of the numeric codes associated with each warning category that
4582 is to be enabled;
4583 all other categories are disabled.
4584 .
4585 The categories and their associated codes are listed in section
4586 \[lq]Warnings\[rq] of
4587 .MR \%troff 1 .
4588 .\" TODO: Maybe move that table to groff(7).
4589 .
4590 For example,
4591 .RB \[lq] ".warn 0" \[rq]
4592 disables all warnings,
4593 and
4594 .RB \[lq] ".warn 1" \[rq]
4595 disables all warnings except those about missing glyphs.
4596 .
4597 If no argument is given,
4598 all warning categories are enabled.
4599 .
4600 .
4601 .TP
4602 .BI .warnscale\~ scaling-unit
4603 Select scaling unit used in certain warnings \" `output_warning()`
4604 (one of
4605 .BR u ,
4606 .BR i ,
4607 .BR c ,
4608 .BR p ,
4609 or
4610 .BR P ;
4611 default:
4612 .BR i ).
4613 .
4614 Ignored on
4615 .IR nroff -mode
4616 output devices,
4617 for which these diagnostics report the vertical page location in lines,
4618 and the horizontal page location in ens.
4619 .
4620 .
4621 .TP
4622 .BI .while \~cond-expr\~input
4623 Evaluate the conditional expression
4624 .IR cond-expr ,
4625 and repeatedly execute
4626 .I input
4627 unless and until
4628 .I cond-expr
4629 evaluates false.
4630 .
4631 .I input,
4632 which is often a conditional block,
4633 is referred to as the
4634 .RB \[lq] while \[rq]
4635 request's
4636 .I body.
4637 .
4638 .
4639 .IP
4640 GNU
4641 .I troff \" GNU
4642 treats the body of a
4643 .RB \[lq] while \[rq]
4644 request similarly to that of a
4645 .B de
4646 request
4647 (albeit one not read in copy mode),
4648 but stores it under an internal name
4649 and deletes it when the loop finishes.
4650 .
4651 The operation of a macro containing a
4652 .RB \[lq] while \[rq]
4653 request can slow significantly if its
4654 body is large.
4655 .
4656 Each time
4657 GNU
4658 .I troff \" GNU
4659 interpolates the macro,
4660 it parses and stores the
4661 .RB \[lq] while \[rq]
4662 body again.
4663 .
4664 An often better solution\[em]and one that is more portable,
4665 since AT&T
4666 .I troff \" AT&T
4667 lacked the
4668 .RB \[lq] while \[rq]
4669 request\[em]is to instead write a recursive macro,
4670 which is parsed only once
4671 (unless you redefine it).
4672 .
4673 To prevent infinite loops,
4674 GNU
4675 .I troff \" GNU
4676 limits the default number of available recursion levels
4677 to 1,000 or somewhat less
4678 (because things other than macro calls can be on the input stack).
4679 .
4680 You can disable this protective measure,
4681 or alter the limit,
4682 by setting the
4683 .B slimit
4684 register.
4685 .
4686 See section \[lq]Debugging\[rq] below.
4687 .
4688 .
4689 .IP
4690 If a
4691 .RB \[lq] while \[rq]
4692 body begins with a conditional block,
4693 its closing brace must end an input line.
4694 .
4695 .
4696 .IP
4697 The
4698 .RB \[lq] break \[rq]
4699 and
4700 .RB \[lq] continue \[rq]
4701 requests alter a
4702 .RB \[lq] while \[rq]
4703 loop's flow of control.
4704 .
4705 .
4706 .TP
4707 .BI .write\~ stream\~\c
4708 .RB [[ \[dq] ]\c
4709 .IR character-sequence ]
4710 Write
4711 .IR character-sequence ,
4712 a sequence of ordinary characters,
4713 spaces,
4714 or tabs
4715 .\" ...or, technically, backspace and delete characters, but let's not
4716 .\" dwell on that.
4717 read in copy mode,
4718 to
4719 .IR stream ,
4720 which must previously have been the subject of an
4721 .RB \[lq] open \[rq]
4722 (or
4723 .BR opena )
4724 request,
4725 followed by a newline.
4726 .
4727 GNU
4728 .I troff \" GNU
4729 flushes the stream after writing to it.
4730 .
4731 .
4732 .TP
4733 .BI .writec\~ stream\~\c
4734 .RB [[ \[dq] ]\c
4735 .IR character-sequence ]
4736 As
4737 .RB \[lq] write \[rq],
4738 but does not append a newline to
4739 .IR contents .
4740 .
4741 .
4742 .TP
4743 .BI .writem\~ "stream name"
4744 Write the contents of the macro or string
4745 .I name
4746 to
4747 .IR stream ,
4748 which must previously have been the subject of an
4749 .RB \[lq] open \[rq]
4750 (or
4751 .BR opena )
4752 request.
4753 .
4754 GNU
4755 .I troff \" GNU
4756 reads the contents of
4757 .I name
4758 in copy mode.
4759 .
4760 .
4761 .br
4762 .ne 4v
4763 .\" ====================================================================
4764 .SS "Altered registers"
4765 .\" ====================================================================
4766 .
4767 GNU
4768 .I troff \" GNU
4769 alters the semantics of two
4770 AT&T
4771 .I troff \" AT&T
4772 registers
4773 and imparts semantics to two others
4774 that CSTR\~#54 documented as \[lq]reserved\[rq].
4775 .
4776 .
4777 .TP
4778 .B \[rs]n[.R]
4779 Because GNU
4780 .I troff \" GNU
4781 dynamically manages register storage,
4782 it repurposes the
4783 .B .R
4784 register
4785 to interpolate the maximum integer representable in the formatter.
4786 .
4787 Favor its use over numeric literals with many zeroes or nines
4788 to indicate an arbitrary large quantity.
4789 .
4790 .
4791 .TP
4792 .B \[rs]n[.s]
4793 In GNU
4794 .IR troff , \" GNU
4795 the
4796 .B .s
4797 register is string-valued;
4798 it interpolates the type size in typographical points,
4799 which can be represented as a decimal fraction.
4800 .
4801 .
4802 .TP
4803 .B \[rs]n[.x]
4804 Interpolate major version number of the running
4805 .I \%troff
4806 formatter.
4807 .
4808 For example,
4809 if the version number is 1.23.0,
4810 then
4811 .B \[rs]n[.x]
4812 contains\~1.
4813 .
4814 .
4815 .TP
4816 .B \[rs]n[.y]
4817 Interpolate minor version number of the running
4818 .I \%troff
4819 formatter.
4820 .
4821 For example,
4822 if the version number is 1.23.0,
4823 then
4824 .B \[rs]n[.y]
4825 contains\~23.
4826 .
4827 Also see
4828 .B \[rs]n[.Y]
4829 below.
4830 .
4831 .
4832 .\" ====================================================================
4833 .SS "New registers"
4834 .\" ====================================================================
4835 .
4836 GNU
4837 .I troff \" GNU
4838 exposes more formatter state via many new read-only registers.
4839 .
4840 Their names often correspond to the requests that affect them.
4841 .
4842 .
4843 .TP 14n \" "\n[.hydefault]" + 2n
4844 .B \[rs]n[.br]
4845 Within a macro definition,
4846 interpolate\~1
4847 if the macro is called with the \[lq]normal\[rq] control character
4848 (\[lq].\[rq] by default),
4849 and\~0 otherwise.
4850 .
4851 This facility allows requests to be reliably wrapped by a macro.
4852 .
4853 Interpolating the
4854 .B .br
4855 register outside of a macro definition makes no sense.
4856 .
4857 .
4858 .TP
4859 .B \[rs]n[.C]
4860 Interpolate 1\~if AT&T
4861 .I troff \" AT&T
4862 compatibility mode is in effect,
4863 0\~otherwise.
4864 .
4865 See
4866 .BR cp .
4867 .
4868 .
4869 .TP
4870 .B \[rs]n[.cdp]
4871 Interpolate depth of last glyph added to the environment.
4872 .
4873 It is positive if the glyph extends below the baseline.
4874 .
4875 .
4876 .TP
4877 .B \[rs]n[.ce]
4878 Interpolate count of input lines remaining to be centered
4879 in the environment.
4880 .
4881 .
4882 .TP
4883 .B \[rs]n[.cht]
4884 Interpolate height of last glyph added to the environment.
4885 .
4886 It is positive if the glyph extends above the baseline.
4887 .
4888 .
4889 .TP
4890 .B \[rs]n[.color]
4891 Interpolate 1\~if color output is enabled,
4892 0\~otherwise.
4893 .
4894 .
4895 .TP
4896 .B \[rs]n[.cp]
4897 Within a
4898 .RB \[lq] do \[rq]
4899 request,
4900 interpolate the saved value of compatibility mode
4901 (see
4902 .B \[rs]n[.C]
4903 above).
4904 .
4905 .
4906 .TP
4907 .B \[rs]n[.csk]
4908 Interpolate skew of last glyph added to the environment.
4909 .
4910 The
4911 .I skew
4912 of a glyph is how far to the right of the center of a glyph the center
4913 of an accent over that glyph is to be placed.
4914 .
4915 .
4916 .TP
4917 .B \[rs]n[.ev]
4918 Interpolate name of current environment.
4919 .
4920 This is a string-valued register.
4921 .
4922 .
4923 .TP
4924 .B \[rs]n[.fam]
4925 Interpolate name of the environment's default font family.
4926 .
4927 This is a string-valued register.
4928 .
4929 .
4930 .TP
4931 .B \[rs]n[.fn]
4932 Interpolate resolved name of the font selected in the environment.
4933 .
4934 This is a string-valued register.
4935 .
4936 .
4937 .TP
4938 .B \[rs]n[.fp]
4939 Interpolate next free non-zero font mounting position.
4940 .
4941 .
4942 .TP
4943 .B \[rs]n[.g]
4944 Interpolate\~1.
4945 .
4946 Test with
4947 .RB \[lq]\| if \|\[rq]
4948 or
4949 .B ie
4950 to check whether GNU
4951 .I troff \" GNU
4952 is the formatter.
4953 .
4954 .
4955 .TP
4956 .B \[rs]n[.height]
4957 Interpolate the rescaled height
4958 of the environment's selected font,
4959 in scaled points.
4960 .
4961 It is zero if the font height is not rescaled.
4962 .
4963 See
4964 .BR \[rs]H .
4965 .
4966 .
4967 .TP
4968 .B \[rs]n[.hla]
4969 Interpolate hyphenation language of the environment.
4970 .
4971 This is a string-valued register.
4972 .
4973 .
4974 .TP
4975 .B \[rs]n[.hlc]
4976 Interpolate count of immediately preceding consecutive hyphenated lines
4977 in the environment.
4978 .
4979 .
4980 .TP
4981 .B \[rs]n[.hlm]
4982 Interpolate maximum number of consecutive hyphenated lines allowed in
4983 the environment.
4984 .
4985 .
4986 .TP
4987 .B \[rs]n[.hy]
4988 Interpolate automatic hyphenation mode of the environment.
4989 .
4990 .
4991 .TP
4992 .B \[rs]n[.hydefault]
4993 Interpolate hyphenation mode default of the environment.
4994 .
4995 .
4996 .TP
4997 .B \[rs]n[.hym]
4998 Inteprolate hyphenation margin of the environment.
4999 .
5000 .
5001 .TP
5002 .B \[rs]n[.hys]
5003 Interpolate hyphenation space adjustment threshold of the environment.
5004 .
5005 .
5006 .TP
5007 .B \[rs]n[.in]
5008 Interpolate indentation amount applicable to the output line pending
5009 in the environment.
5010 .
5011 .
5012 .TP
5013 .B \[rs]n[.int]
5014 Interpolate\~1 if the text most recently formatted in the environment
5015 was \[lq]interrupted\[rq] or continued with
5016 .BR \[rs]c ,
5017 0\~otherwise.
5018 .
5019 .
5020 .TP
5021 .B \[rs]n[.it]
5022 Interpolate count of input lines remaining
5023 in the environment's pending input trap.
5024 .
5025 .
5026 .TP
5027 .B \[rs]n[.itc]
5028 Interpolate\~1 if the environment's pending input trap honors
5029 the output line continuation escape sequence
5030 .RB ( \[rs]c ),
5031 0\~otherwise.
5032 .
5033 .
5034 .TP
5035 .B \[rs]n[.itm]
5036 Interpolate the name of the macro associated with the environment's
5037 pending input trap.
5038 .
5039 This is a string-valued register.
5040 .
5041 .
5042 .TP
5043 .B \[rs]n[.kern]
5044 Interpolate\~1 if pairwise kerning is enabled,
5045 0\~otherwise.
5046 .
5047 .
5048 .TP
5049 .B \[rs]n[.lg]
5050 Interpolate ligature mode.
5051 .
5052 .
5053 .TP
5054 .B \[rs]n[.linetabs]
5055 Interpolate\~1 if line-tabs mode is enabled in the environment,
5056 0\~otherwise.
5057 .
5058 .
5059 .TP
5060 .B \[rs]n[.ll]
5061 Interpolate line length applicable to the environment's
5062 pending output line.
5063 .
5064 .
5065 .TP
5066 .B \[rs]n[.lt]
5067 Interpolate the environment's title line length.
5068 .
5069 .
5070 .TP
5071 .B \[rs]n[.m]
5072 Interpolate name of the environment's selected stroke color.
5073 .
5074 This is a string-valued register.
5075 .
5076 .
5077 .TP
5078 .B \[rs]n[.M]
5079 Interpolate name of the environment's selected fill color.
5080 .
5081 This is a string-valued register.
5082 .
5083 .
5084 .TP
5085 .B \[rs]n[.ne]
5086 Interpolate amount of space demanded by the most recent
5087 .B ne
5088 request that sprang a page location trap.
5089 .
5090 See
5091 .BR \[rs]n[.trunc] .
5092 .
5093 .
5094 .TP
5095 .B \[rs]n[.nm]
5096 Interpolate\~1 if output line numbering is enabled in the environment
5097 (even if temporarily suppressed),
5098 0\~otherwise.
5099 .
5100 .
5101 .TP
5102 .B \[rs]n[.nn]
5103 Interpolate count of lines remaining in the environment
5104 for which numbering is suppressed
5105 while output line numbering is enabled.
5106 .
5107 .
5108 .TP
5109 .B \[rs]n[.ns]
5110 Interpolate\~1 if no-space mode is enabled,
5111 0\~otherwise.
5112 .
5113 .
5114 .TP
5115 .B \[rs]n[.O]
5116 Interpolate output suppression level.
5117 .
5118 See
5119 .BR \[rs]O .
5120 .
5121 .
5122 .TP
5123 .B \[rs]n[.P]
5124 Interpolate\~1 if the current page is selected for output,
5125 0\~otherwise.
5126 .
5127 See
5128 .B \-o
5129 command-line option to
5130 .MR \%troff 1 .
5131 .
5132 .
5133 .TP
5134 .B \[rs]n[.pe]
5135 Interpolate\~1 during page ejection,
5136 0\~otherwise.
5137 .
5138 .
5139 .TP
5140 .B \[rs]n[.pn]
5141 Interpolate next page number
5142 (either that set by
5143 .BR pn ,
5144 or that of the current page plus\~1).
5145 .
5146 .
5147 .TP
5148 .B \[rs]n[.ps]
5149 Interpolate the environment's type size in scaled points.
5150 .
5151 .
5152 .TP
5153 .B \[rs]n[.psr]
5154 Interpolate the environment's most recently requested type size
5155 in scaled points.
5156 .
5157 .
5158 .TP
5159 .B \[rs]n[.pvs]
5160 Interpolate the environment's post-vertical line spacing amount.
5161 .
5162 .
5163 .TP
5164 .B \[rs]n[.rj]
5165 Interpolate count of input lines remaining to be right-aligned
5166 in the environment.
5167 .
5168 .
5169 .TP
5170 .B \[rs]n[.slant]
5171 Interpolate slant in degrees of the environment's selected font.
5172 .
5173 See
5174 .BR \[rs]S .
5175 .
5176 .
5177 .TP
5178 .B \[rs]n[.sr]
5179 Interpolate the environment's most recently requested type size
5180 in typographical points.
5181 .
5182 This is a string-valued register.
5183 .
5184 .
5185 .TP
5186 .B \[rs]n[.ss]
5187 .TQ
5188 .B \[rs]n[.sss]
5189 Interpolate values of the environment's minimum inter-word space
5190 and supplemental inter-sentence space,
5191 respectively,
5192 in twelfths of the space width of the selected font.
5193 .
5194 .
5195 .TP
5196 .B \[rs]n[.sty]
5197 Interpolate the environment's selected abstract font style,
5198 if any.
5199 .
5200 This is a string-valued register.
5201 .
5202 .
5203 .TP
5204 .B \[rs]n[.tabs]
5205 Interpolate the environment's tab stop settings
5206 (if any)
5207 in a form suitable for passage to the
5208 .B ta
5209 request.
5210 .
5211 This is a string-valued register.
5212 .
5213 .
5214 .TP
5215 .B \[rs]n[.trap]
5216 Interpolate the name of the next vertical position trap
5217 after the vertical drawing position.
5218 .
5219 This is a string-valued register.
5220 .
5221 .
5222 .TP
5223 .B \[rs]n[.trunc]
5224 Interpolate amount of vertical space truncated by the most recently
5225 sprung page location trap,
5226 or,
5227 if the trap was sprung by an
5228 .B ne
5229 request,
5230 minus the amount of vertical motion produced by the
5231 .B ne
5232 request.
5233 .
5234 In other words,
5235 at the point a trap is sprung,
5236 .B \[rs]n[.trunc]
5237 represents the difference of what the vertical position would have
5238 been but for the trap,
5239 and what the vertical position actually is.
5240 .
5241 See
5242 .BR \[rs]n[.ne] .
5243 .
5244 .
5245 .TP
5246 .B \[rs]n[.U]
5247 Interpolate\~1 if in unsafe mode,
5248 0\~otherwise.
5249 .
5250 See
5251 .B \-U
5252 command-line option to
5253 .MR \%troff 1 .
5254 .
5255 .
5256 .TP
5257 .B \[rs]n[.vpt]
5258 Interpolate\~1 if vertical position traps are enabled,
5259 0\~otherwise.
5260 .
5261 .
5262 .TP
5263 .B \[rs]n[.warn]
5264 Interpolate warning mask.
5265 .
5266 See section \[lq]Warnings\[rq] of
5267 .MR \%troff 1 .
5268 .\" TODO: Maybe move that table to groff(7).
5269 .
5270 .
5271 .TP
5272 .B \[rs]n[.Y]
5273 Interpolate revision number of the running
5274 .I \%troff
5275 formatter.
5276 .
5277 For example,
5278 if the version number is 1.23.0,
5279 then
5280 .B \[rs]n[.Y]
5281 contains\~0.
5282 .
5283 Also see
5284 .B \[rs]n[.x]
5285 and
5286 .B \[rs]n[.y]
5287 above.
5288 .
5289 .
5290 .TP
5291 .B \[rs]n[.zoom]
5292 Interpolate magnification of the environment's selected font,
5293 in thousandths,
5294 or\~0 if magnification unused.
5295 .
5296 See
5297 .BR fzoom .
5298 .
5299 .
5300 .P
5301 The following (writable) registers are set by the
5302 .B psbb
5303 request.
5304 .
5305 .
5306 .TP 9n \" "\n[ury]" + 2n
5307 .B \[rs]n[llx]
5308 .TQ
5309 .B \[rs]n[lly]
5310 .TQ
5311 .B \[rs]n[urx]
5312 .TQ
5313 .B \[rs]n[ury]
5314 Interpolate the
5315 (upper,
5316 lower,
5317 left,
5318 right)
5319 bounding box values
5320 (in PostScript units) of the most recently processed PostScript image.
5321 .
5322 .
5323 .P
5324 The following (writable) registers are set by the
5325 .B \[rs]w
5326 escape sequence.
5327 .
5328 .
5329 .TP 9n \" "\n[ury]" + 2n
5330 .B \[rs]n[rst]
5331 .TQ
5332 .B \[rs]n[rsb]
5333 Like
5334 .B \[rs]n[st]
5335 and
5336 .BR \[rs]n[sb] ,
5337 but taking account of the heights and depths of glyphs.
5338 .
5339 In other words,
5340 these registers store the highest and lowest vertical positions attained
5341 by the argument formatted by the
5342 .B \[rs]w
5343 escape sequence,
5344 doing what AT&T
5345 .I troff \" AT&T
5346 documented
5347 .B \[rs]n[st]
5348 and
5349 .B \[rs]n[sb]
5350 as doing.
5351 .
5352 .
5353 .TP
5354 .B \[rs]n[ssc]
5355 The amount of
5356 (possibly negative)
5357 horizontal space to add to the last glyph before a subscript.
5358 .
5359 .
5360 .TP
5361 .B \[rs]n[skw]
5362 How far to right of the center of the last glyph in the
5363 .B \[rs]w
5364 argument,
5365 to place the center of an accent from a roman font over that glyph.
5366 .
5367 .
5368 .P
5369 Other writable registers are as follows.
5370 .
5371 Those relating to date and time are initialized using
5372 .MR localtime 3
5373 at formatter startup.
5374 .
5375 .
5376 .\" The `c.` register was documented in the January 1981 "Addendum to
5377 .\" the Nroff/Troff User's Manual" (presumably by Kernighan), and is
5378 .\" widely supported by descendants of his device-independent troff, but
5379 .\" appears to have been overlooked in his 1992 revision of CSTR #54.
5380 .TP 12n
5381 .B \[rs]n[c.]
5382 Interpolate input line number.
5383 .
5384 .B \[rs]n[.c]
5385 is a read-only alias of this register.
5386 .
5387 .
5388 .TP
5389 .B \[rs]n[hours]
5390 Interpolate number of hours elapsed since midnight.
5391 .
5392 .
5393 .TP
5394 .\" The `hp` register was documented in the original 1976 Ossanna troff
5395 .\" "Nroff/Troff User's Manual" and in the January 1981 "Addendum to
5396 .\" the Nroff/Troff User's Manual" (presumably by Kernighan), and is
5397 .\" widely supported by descendants of his device-independent troff, but
5398 .\" appears to have been overlooked in his 1992 revision of CSTR #54.
5399 .B \[rs]n[hp]
5400 Interpolate horizontal position relative to that at the start of the
5401 input line.
5402 .
5403 .
5404 .br
5405 .ne 3v
5406 .TP
5407 .B \[rs]n[lsn]
5408 .TQ
5409 .B \[rs]n[lss]
5410 Interpolate count of leading spaces on input line and amount of
5411 corresponding horizontal motion,
5412 respectively.
5413 .
5414 .
5415 .TP
5416 .B \[rs]n[minutes]
5417 Interpolate number of minutes elapsed in the hour.
5418 .
5419 .
5420 .TP
5421 .B \[rs]n[seconds]
5422 Interpolate number of seconds elapsed in the minute.
5423 .
5424 .
5425 .TP
5426 .B \[rs]n[systat]
5427 Interpolate return value of
5428 .MR system 3
5429 function executed by most recent
5430 .B sy
5431 request.
5432 .
5433 .
5434 .TP
5435 .B \[rs]n[slimit]
5436 Interpolates maximum quantity of objects on
5437 .IR \%troff 's
5438 internal input stack
5439 (default: 1000).
5440 .
5441 If non-positive,
5442 there is no limit:
5443 recursion can continue until program memory is exhausted.
5444 .
5445 .
5446 .TP
5447 .B \[rs]n[year]
5448 Interpolate Gregorian year.
5449 .
5450 AT&T
5451 .IR troff 's \" AT&T
5452 .B \[rs]n[yr]
5453 interpolates the Gregorian year minus 1900.
5454 .
5455 .
5456 .\" ====================================================================
5457 .SS Delimiters
5458 .\" ====================================================================
5459 .\" BEGIN Keep (roughly) parallel with relevant material from groff.texi
5460 .\" node "Compatibility Mode".
5461 AT&T
5462 .I troff \" AT&T
5463 recognized slightly varying sets of delimiters when expecting
5464 numerical expressions
5465 (as with the
5466 .B \[rs]h
5467 escape sequence),
5468 string expressions
5469 (as with the
5470 .B \[rs]w
5471 escape sequence
5472 and
5473 .B tl
5474 request),
5475 and output comparisons
5476 (as in
5477 .RB \[lq] ".if #foo#bar# .tm match" \[rq]).
5478 GNU
5479 .IR troff , \" GNU
5480 when not in compatibility mode,
5481 recognizes a single consistent set of delimiters.
5482 .
5483 Compatibility mode
5484 emulates
5485 AT&T
5486 .I troff \" AT&T
5487 only up to a point.
5488 GNU
5489 .I troff \" GNU
5490 accepts leaders and tabs as delimiters,
5491 as well as
5492 Control+D
5493 (EOT or EOF),
5494 Control+H
5495 (BS or backspace),
5496 and
5497 Control+L
5498 (FF or form feed),
5499 all of which,
5500 when used as delimiters,
5501 cause
5502 AT&T
5503 .I troff \" AT&T
5504 to behave in ways difficult to predict.
5505 .\" END Keep (roughly) parallel with relevant material from groff.texi
5506 .\" node "Compatibility Mode".
5507 .
5508 .
5509 .\" ====================================================================
5510 .SS Miscellaneous
5511 .\" ====================================================================
5512 .
5513 A font not listed in the output device's
5514 .I DESC
5515 file's
5516 .B fonts
5517 directive is automatically mounted at the next available font position
5518 when it is selected.
5519 .
5520 If you mount a font explicitly with the
5521 .B fp
5522 request,
5523 you should do so on the first unused position,
5524 which can be found in the
5525 .B .fp
5526 register.
5527 .
5528 .
5529 .P
5530 Unparameterized string interpolation does not conceal the arguments to a
5531 macro being interpreted.
5532 .
5533 Thus,
5534 in a macro definition,
5535 the call of another macro with the existing argument list,
5536 .
5537 .RS
5538 .EX
5539 .BI . xx\~ \[rs]\[rs]$@
5540 .EE
5541 .RE
5542 .
5543 is more efficiently done with
5544 .
5545 .RS
5546 .EX
5547 .BI \[rs]\[rs]*[ xx ]\[rs]\[rs]
5548 .EE
5549 .RE
5550 .
5551 (that is,
5552 with string interpolation).
5553 .
5554 The trailing backslashes prevent the final newline in the macro
5555 definition from being interpolated,
5556 potentially putting an unwanted blank line on the output.
5557 .
5558 See section \[lq]Punning Names\[rq] in
5559 .MR groff 7 .
5560 .
5561 .
5562 .\" XXX: Is this really not an AT&T troff feature?
5563 .br
5564 .ne 2v
5565 .P
5566 If a font description file contains pairwise kerning information,
5567 glyphs from that font are kerned.
5568 .
5569 Kerning between two glyphs can be inhibited by placing a dummy character
5570 .B \[rs]&
5571 between them.
5572 .
5573 .
5574 .P
5575 GNU
5576 .I troff \" GNU
5577 keeps track of the nesting depth of escape sequence
5578 interpolations and other uses of delimiters,
5579 as in the
5580 .B tl
5581 request and the output comparison operator
5582 (that is,
5583 input like
5584 .B \[aq]foo\[aq]bar\[aq]
5585 as a conditional expression),
5586 so the only characters you need to avoid using as
5587 delimiters are those that appear in the arguments you input,
5588 not any that result from interpolation.
5589 .
5590 Typically,
5591 .B \[aq]
5592 works fine.
5593 .
5594 Use visible characters as delimiters in GNU
5595 .IR troff , \" GNU
5596 not US-ASCII controls like BEL (Control+G).
5597 .
5598 The implementation of
5599 .B \[rs]$@
5600 ensures that the double quotes surrounding an argument appear at an
5601 interpolation depth different from that of the arguments themselves.
5602 .
5603 Similarly,
5604 in bracket-form escape sequences like
5605 .B \[rs]f\^[ZCMI],
5606 a right bracket
5607 .B ]
5608 does not end the sequence unless it occurs at the same interpolation
5609 depth as the
5610 .RB opening\~ [ .
5611 .
5612 In compatibility mode,
5613 no attention is paid to the interpolation depth.
5614 .
5615 .
5616 .P
5617 In
5618 GNU
5619 .IR troff , \" GNU
5620 the
5621 .B tr
5622 request can map characters to the unbreakable space escape sequence
5623 .B \[rs]\[ti]
5624 as a special case
5625 .RB ( tr
5626 normally operates only on
5627 .IR characters ).
5628 .
5629 This feature replaces the odd-parity
5630 .B tr
5631 mapping trick used in AT&T
5632 .I troff \" AT&T
5633 documents,
5634 where a character,
5635 often
5636 .BR \[ti] ,
5637 was \[lq]sacrificed\[rq] by mapping it to \[lq]nothing\[rq],
5638 drafting it into use as an unadjustable,
5639 unbreakable space.
5640 .
5641 (This feature was gratuitous even in early AT&T
5642 .I troff, \" AT&T
5643 which supported the
5644 .BI \[rs] space
5645 escape sequence by 1976.) \" see CSTR #54 of that year
5646 .
5647 Often,
5648 it makes more sense to use
5649 GNU
5650 .IR troff 's \" GNU
5651 .B \[rs]\[ti]
5652 escape sequence instead,
5653 which has been adopted by every other active
5654 .I troff
5655 implementation except that of Illumos,
5656 as well as by the
5657 .RI non -troff
5658 .IR mandoc .
5659 .
5660 Translation of a character to
5661 .B \[rs]\[ti]
5662 is generally unnecessary,
5663 but might be employed to obtain an unbreakable space when the escape
5664 character will subsequently be disabled.
5665 .
5666 .
5667 .P
5668 GNU
5669 .I troff \" GNU
5670 permits tabs and spaces after the first dot on a control line that ends
5671 a macro definition.
5672 .
5673 .
5674 .\" ====================================================================
5675 .SH "Formatter output"
5676 .\" ====================================================================
5677 .
5678 The page description language output by GNU
5679 .I troff \" GNU
5680 is modeled after that used by AT&T
5681 .I troff \" AT&T
5682 once the latter adopted a device-independent approach in the early
5683 1980s.
5684 .
5685 Only the differences are documented here.
5686 .
5687 For a fuller discussion,
5688 see
5689 .MR groff_out 5 .
5690 .\"
5691 .\"
5692 .\" XXX: This feature is unused and documenting it gives a valuable
5693 .\" hostage to fortune.
5694 .\".P
5695 .\"Note that single characters can have the eighth bit set, as can the
5696 .\"names of fonts and special characters.
5697 .
5698 .
5699 .br
5700 .ne 3v
5701 .P
5702 Glyph and font names can be of arbitrary length;
5703 postprocessors should not assume that they are at most two characters.
5704 .
5705 A glyph to be formatted is always drawn from the current font;
5706 in contrast to AT&T device-independent
5707 .IR troff , \" AT&T
5708 drivers need not search special fonts to find a glyph.
5709 .
5710 .
5711 .\" ====================================================================
5712 .SS Units
5713 .\" ====================================================================
5714 .
5715 The argument to the
5716 .BR s \~command
5717 is in scaled points
5718 (units of
5719 .RI points/ n ,
5720 where
5721 .I n
5722 is the argument to the
5723 .B sizescale
5724 command in the
5725 .I DESC
5726 file).
5727 .
5728 The argument to the
5729 .RB \[lq] "x H" \[rq]
5730 command is also in scaled points.
5731 .
5732 .
5733 .\" ====================================================================
5734 .SS "Simple commands"
5735 .\" ====================================================================
5736 .
5737 .\" BEGIN Keep in sync with relevant portions of section "Simple
5738 .\" commands" from groff_out(5).
5739 .P
5740 If the
5741 .B tcommand
5742 directive is present in the output device's
5743 .I DESC
5744 file,
5745 GNU
5746 .I troff \" GNU
5747 employs the following two commands.
5748 .
5749 .
5750 .TP
5751 .BI t\~ xyz\c
5752 \&.\|.\|.
5753 Typeset word
5754 .IR xyz ;
5755 that is,
5756 set a sequence of ordinary glyphs named
5757 .IR x ,
5758 .IR y ,
5759 .IR z ,
5760 \&.\|.\|.\|,
5761 terminated by a space or newline;
5762 an optional second integer argument is ignored
5763 (this allows the formatter to generate an even number of arguments).
5764 .\" XXX: Why?
5765 .
5766 Each glyph is set at the current drawing position,
5767 and the position is then advanced horizontally by the glyph's width.
5768 .
5769 A glyph's width is read from its metrics in the font description file,
5770 scaled to the current type size,
5771 and rounded to a multiple of the horizontal motion quantum.
5772 .
5773 Use the
5774 .B C
5775 command to emplace glyphs of special characters.
5776 .
5777 .
5778 .TP
5779 .BI u\~ "n xyz"\c
5780 \&.\|.\|.
5781 Typeset word
5782 .I xyz
5783 with track kerning.
5784 .
5785 As
5786 .BR t ,
5787 but after placing each glyph,
5788 the drawing position is further advanced horizontally
5789 .RI by\~ n
5790 basic units.
5791 .\" END Keep in sync with relevant portions of section "Simple commands"
5792 .\" from groff_out(5).
5793 .
5794 .
5795 .P
5796 New commands implement color support.
5797 .
5798 .
5799 .TP
5800 .BI mc\~ "cyan magenta yellow"
5801 .TQ
5802 .B md
5803 .TQ
5804 .BI mg\~ gray
5805 .TQ
5806 .BI mk\~ "cyan magenta yellow black"
5807 .TQ
5808 .BI mr\~ "red green blue"
5809 Set the components of the stroke color with respect to various color
5810 spaces.
5811 .
5812 .B md
5813 resets the stroke color to the default value.
5814 .
5815 The arguments are integers in the range 0 to 65535.
5816 .
5817 .
5818 .P
5819 A new device control subcommand is available.
5820 .
5821 .
5822 .TP
5823 .BI "x u\~" n
5824 If
5825 .I n
5826 is\~1,
5827 start underlining of spaces.
5828 .
5829 If
5830 .I n
5831 is\~0,
5832 stop underlining of spaces.
5833 .
5834 This facility is needed for the
5835 .B cu
5836 request in
5837 .I nroff \" mode
5838 mode and is ignored otherwise.
5839 .
5840 .
5841 .\" ====================================================================
5842 .SS "Extended drawing commands"
5843 .\" ====================================================================
5844 .
5845 GNU
5846 .I pic \" GNU
5847 does not produce
5848 .I \%troff
5849 escape sequences employing these extensions if its
5850 .B \-n
5851 option is given.
5852 .
5853 .
5854 .TP 8n \" "DE h v" + 2n
5855 .BI Df\~ n
5856 Set the shade of gray used to fill geometric objects to
5857 .IR n ,
5858 which must be an integer.
5859 .
5860 0 corresponds to white and 1000 to black.
5861 .
5862 A grayscale ramp spans the two.
5863 .
5864 A value outside this range uses the stroke color as the fill color.
5865 .
5866 The fill color is opaque.
5867 .
5868 Normally the default is black,
5869 but some drivers may provide a way of changing this.
5870 .
5871 .B Df
5872 is obsolete since 2002, \" commit ea5a42d080, 2002-01-24
5873 superseded by
5874 .B DFg
5875 below.
5876 .
5877 .
5878 .IP
5879 The corresponding
5880 .B \[rs]D\[aq]f\^\[aq]
5881 escape sequence should not be used:
5882 its argument is rounded to an integer multiple of the horizontal motion
5883 quantum,
5884 which can limit the precision
5885 .RI of\~ n .
5886 .
5887 .
5888 .TP
5889 .BI DC\~ d
5890 Draw a filled circle of diameter
5891 .I d
5892 with its leftmost point at the drawing position.
5893 .
5894 .
5895 .TP
5896 .BI DE\~ "h v"
5897 Draw a filled ellipse,
5898 of horizontal axis
5899 .I h
5900 and vertical axis
5901 .IR v ,
5902 with its leftmost point at the drawing position.
5903 .
5904 .
5905 .br
5906 .ne 4v
5907 .EQ
5908 delim $$
5909 .EN
5910 .TP
5911 .\" `BR`, not `BI`, here, because eqn will take care of font changes.
5912 .BR Dp\~ "$dx sub 1 ~ dy sub 1 ~ ldots ~ dx sub n ~ dy sub n$"
5913 Draw a polygon with,
5914 for $i = 1 , ldots , n + 1$,
5915 its
5916 .IR i th
5917 vertex at the drawing position
5918 .
5919 $+ sum from { j = 1 } to { i - 1 } ( dx sub j , dy sub j )$.
5920 .
5921 .\" The following is implied by the math above, but let's be kind.
5922 .I groff
5923 output drivers automatically close polygons,
5924 drawing a line from $( dx sub n , dy sub n )$ back to
5925 $( dx sub 1 , dy sub 1 )$.
5926 .
5927 The drawing position is left at the last
5928 .I specified
5929 vertex,
5930 but this may change in a future version of GNU
5931 .IR troff . \" GNU
5932 .
5933 Heirloom Doctools
5934 .IR troff , \" Heirloom
5935 like DWB
5936 .IR troff , \" DWB
5937 by default does not close the polygon.
5938 .
5939 In its
5940 .I groff
5941 compatibility mode,
5942 Heirloom closes the polygon but leaves the drawing position
5943 .IR unchanged \[em]that
5944 is,
5945 at the polygon's
5946 .I initial
5947 drawing position.
5948 .
5949 .
5950 .TP
5951 .BR DP\~ "$dx sub 1 ~ dy sub 1 ~ ldots ~ dx sub n ~ dy sub n$"
5952 As
5953 .BR Dp ,
5954 but draw a filled rather than a stroked polygon.
5955 .
5956 .
5957 .TP
5958 .BI Dt\~ n
5959 Set the line thickness to
5960 .IR n \~\c
5961 basic units.
5962 .
5963 AT&T
5964 .I troff \" AT&T
5965 output drivers use a thickness proportional to the type size;
5966 this is the GNU
5967 .I troff \" GNU
5968 default.
5969 .
5970 A
5971 .RI negative\~ n
5972 requests this explicitly.
5973 .
5974 .RI An\~ n
5975 of zero selects the smallest available line thickness.
5976 .
5977 .
5978 .P
5979 A difficulty arises in how the drawing position should be changed after
5980 the execution of these commands.
5981 .
5982 This has little importance to most users,
5983 since the output of GNU
5984 .I grn \" GNU
5985 and
5986 .I pic \" GNU
5987 does not depend on it.
5988 .
5989 Given a drawing command of the form
5990 .BI D z
5991 $x sub 1 ~ y sub 1 ~ ldots ~ x sub n ~ y sub n$,
5992 where
5993 .I z
5994 is not
5995 .B c
5996 or
5997 .BR e ,
5998 AT&T
5999 .I troff \" AT&T
6000 treats each $x sub i$ as a horizontal motion,
6001 each $y sub i$ as a vertical one,
6002 and therefore assumes that the width of the drawn object is
6003 $sum from { i = 1 } to n x sub i$,
6004 and its height is $sum from { i = 1 } to n y sub i$.
6005 .
6006 (Verify its assumption about height by examining the
6007 .B st
6008 and
6009 .B sb
6010 registers after using such a drawing command in a
6011 .B \[rs]w
6012 escape sequence).
6013 .
6014 Thus after executing a
6015 .BR D \~command
6016 of the form
6017 .BI D z
6018 $x sub 1 ~ y sub 1 ~ ldots ~ x sub n ~ y sub n$,
6019 the drawing position increases by
6020 .
6021 $( sum from { i = 1 } to n x sub i , sum from { i = 1 } to n y sub i )$.
6022 .EQ
6023 delim off
6024 .EN
6025 .
6026 For the sake of compatibility,
6027 GNU
6028 .I troff \" GNU
6029 follows this rule,
6030 even though it frustrates extensions to the
6031 .B D
6032 command that set drawing parameters rather than rendering objects,
6033 producing ugly results in the case of
6034 .B Dt
6035 and
6036 .BR Df ,
6037 or otherwise don't parameterize objects as a series of vertices,
6038 as with
6039 GNU
6040 .IR troff 's \" GNU
6041 filled ellipse,
6042 .BR DE .
6043 .
6044 In a future release,
6045 GNU
6046 .I troff \" GNU
6047 and its output drivers may abandon the application of this assumption to
6048 drawing commands not explicitly specified in the AT&T \[lq]Troff User's
6049 Manual\[rq].
6050 .
6051 You can ensure predictable output by enclosing drawing commands
6052 in the zero-motion escape sequence
6053 .BR \[rs]Z .
6054 .
6055 .
6056 .P
6057 GNU
6058 .I troff \" GNU
6059 implements fill color selection with another set of extensions.
6060 .
6061 .
6062 .TP
6063 .BI DFc\~ "cyan magenta yellow"
6064 .TQ
6065 .B DFd
6066 .TQ
6067 .BI DFg\~ gray
6068 .TQ
6069 .BI DFk\~ "cyan magenta yellow black"
6070 .TQ
6071 .BI DFr\~ "red green blue"
6072 Set the components of the fill color as described under the
6073 .B \[rs]M
6074 escape sequence above.
6075 .
6076 .B DFd
6077 restores the device's default fill color.
6078 .
6079 The drawing position is not updated,
6080 in contrast to
6081 .BR Df .
6082 .
6083 .
6084 .\" ====================================================================
6085 .SS "Device control syntax extension"
6086 .\" ====================================================================
6087 .
6088 GNU
6089 .I troff \" GNU
6090 introduces a line continuation convention,
6091 permitting the argument to the
6092 .B x X
6093 command to contain newlines.
6094 .
6095 A newline in the input is transformed to the sequence
6096 .RI \[lq] newline\c
6097 .BR + \[rq].
6098 .
6099 When interpreting an
6100 .B x X
6101 command,
6102 a postprocessor should therefore be prepared for a plus sign after a
6103 newline;
6104 if it occurs,
6105 preserve the newline,
6106 discard the plus sign,
6107 and continue to collect the input into the argument of the
6108 .B x X
6109 command.
6110 .
6111 A newline
6112 .I not
6113 followed by a plus sign terminates the
6114 .B x X
6115 command.
6116 .
6117 An application of this feature is the embedding of PostScript or PDF
6118 language command streams into
6119 .I troff \"
6120 output.
6121 .
6122 .
6123 .P
6124 GNU
6125 .I troff \" GNU
6126 guarantees that the first three output commands it emits are as follows.
6127 .
6128 .
6129 .P
6130 .RS
6131 .EX
6132 .RI x\~T\~ device
6133 .RI x\~res\~ n\~h\~v
6134 x init
6135 .EE
6136 .RE
6137 .
6138 .
6139 .br
6140 .ne 4v
6141 .\" ====================================================================
6142 .SH Debugging
6143 .\" ====================================================================
6144 .
6145 In addition to AT&T
6146 .IR troff 's \" AT&T
6147 debugging features,
6148 GNU
6149 .I troff \" GNU
6150 emits more error diagnostics when syntactical or semantic nonsense is
6151 encountered and supports several warning categories;
6152 the output of these can be selected with
6153 .RB \[lq] warn \[rq].
6154 .
6155 Also see the
6156 .BR \-E ,
6157 .BR \-w ,
6158 and
6159 .B \-W
6160 options of
6161 .MR \%troff 1 .
6162 .
6163 .
6164 .\" BEGIN Keep (roughly) parallel with relevant material from groff.texi
6165 .\" node "Debugging".
6166 .P
6167 A trace of the formatter's input processing stack
6168 can be emitted when errors or warnings occur
6169 by means of
6170 GNU
6171 .I troff \" GNU
6172 .B \-b
6173 option,
6174 or produced on demand with the
6175 .B \%backtrace
6176 request.
6177 .\" END Keep (roughly) parallel with relevant material from groff.texi
6178 .\" node "Debugging".
6179 .
6180 .
6181 .br
6182 .ne 2v
6183 .P
6184 .I groff
6185 also adds more flexible diagnostic output requests
6186 .RB ( tmc
6187 and
6188 .BR tm1 ).
6189 .
6190 .\" BEGIN Keep (roughly) parallel with relevant material from groff.texi
6191 .\" node "Debugging".
6192 Examine the state of the formatter with requests that write lists of
6193 .\" Deliberate desync with Texinfo: this is groff_diff(7); AT&T troff
6194 .\" already had `pm`.
6195 defined \" names---macros, strings, and diversions---
6196 colors
6197 .RB ( pcolor ),
6198 composite character mappings
6199 .RB ( pcomposite ),
6200 environments
6201 .RB ( pev ),
6202 font translations
6203 .RB ( pftr ),
6204 automatic hyphenation codes
6205 .RB ( pchar )
6206 and exceptions
6207 .RB ( phw ),
6208 registers
6209 .RB ( pnr ),
6210 open streams
6211 .RB ( pstream ),
6212 and
6213 page location traps
6214 .RB ( pwh ).
6215 .
6216 Requests can also disclose
6217 to the standard error stream
6218 the internal properties and representations of
6219 characters and classes
6220 .RB ( pchar ),
6221 macros
6222 (and strings and diversions)
6223 .RB ( pm ),
6224 and the list of output nodes corresponding to the pending input line
6225 .RB ( pline ).
6226 .\" END Keep (roughly) parallel with relevant material from groff.texi
6227 .\" node "Debugging".
6228 .
6229 .
6230 .\" ====================================================================
6231 .SH "Compatibility mode"
6232 .\" ====================================================================
6233 .
6234 Some syntactical and behavioral differences between AT&T and GNU
6235 .IR troff s \" generic
6236 are thought too important to neglect;
6237 GNU
6238 .I troff \" GNU
6239 therefore makes available a
6240 .I "compatibility mode"
6241 in an effort to keep documents prepared for AT&T
6242 .I troff \" AT&T
6243 rendering well.
6244 .
6245 .
6246 .P
6247 Identifiers of arbitrary length may be
6248 GNU
6249 .IR troff 's \" GNU
6250 most obvious innovation.
6251 .
6252 AT&T
6253 .I troff \" AT&T
6254 interprets
6255 .RB \[lq] .dsabcd \[rq]
6256 as defining a string
6257 .RB \[lq] ab \[rq]
6258 with contents
6259 .RB \[lq] cd \[rq].
6260 .
6261 Normally,
6262 GNU
6263 .I troff \" GNU
6264 interprets this input as calling a macro named
6265 .RB \[lq] dsabcd \[rq].
6266 .
6267 AT&T
6268 .I troff \" AT&T
6269 also interprets
6270 .B \[rs]*[
6271 and
6272 .B \[rs]n[
6273 as interpolating a string or register,
6274 respectively,
6275 named
6276 .RB \[lq] [ \[rq].
6277 .
6278 GNU
6279 .IR troff , \" GNU
6280 however,
6281 normally interprets
6282 .RB \[lq] [ \[rq]
6283 as bracketing a long name
6284 (with
6285 .RB \[lq] ] \[rq]
6286 at the distal end).
6287 .
6288 In compatibility mode,
6289 GNU
6290 .I troff \" GNU
6291 interprets names in the traditional way,
6292 they thus can be two characters long at most.
6293 .
6294 See the
6295 .B \-C
6296 option in
6297 .MR \%troff 1
6298 and,
6299 above,
6300 the
6301 .B .C
6302 and
6303 .B .cp
6304 registers,
6305 and
6306 .B cp
6307 and
6308 .RB \[lq] do \[rq]
6309 requests,
6310 for more on compatibility mode.
6311 .
6312 .
6313 .br
6314 .ne 2v
6315 .P
6316 The register
6317 .B \[rs]n[.cp]
6318 is specialized and may require a statement of rationale.
6319 .
6320 When writing macro packages or documents that use GNU
6321 .I troff \" GNU
6322 features and which may be mixed with other packages or documents that do
6323 not\[em]common scenarios include serial processing of man pages or use
6324 of the
6325 .RB \[lq] so \[rq]
6326 or
6327 .B mso
6328 requests\[em]you may desire correct operation regardless of
6329 compatibility mode enablement in the surrounding context.
6330 .
6331 It may occur to you to save the existing value of
6332 .B \[rs]n(.C
6333 into a register,
6334 say,
6335 .BR _C ,
6336 at the beginning of your file,
6337 turn compatibility mode off with
6338 .RB \[lq] .cp\~0 \[rq],
6339 then restore it from that register at the end with
6340 .RB \[lq] .cp\~\[rs]n(_C \[rq].
6341 .
6342 At the same time,
6343 a modular design of a document or macro package may lead you to multiple
6344 layers of inclusion.
6345 .
6346 You cannot use the same register name everywhere lest you
6347 \[lq]clobber\[rq] the value from a preceding or enclosing context.
6348 .
6349 The two-character register name space of AT&T
6350 .I troff \" AT&T
6351 is confining,
6352 but employing
6353 GNU
6354 .IR troff 's \" GNU
6355 more capacious one,
6356 as with
6357 .RB \[lq] ".nr _my_saved_C \[rs]n(.C" \[rq]
6358 does not work in compatibility mode;
6359 the register name is too long.
6360 .
6361 Employing the
6362 .RB \[lq] do \[rq]
6363 request is no help:
6364 .RB \[lq] ".do nr _my_saved_C \[rs]n(.C" \[rq]
6365 always saves zero to the register,
6366 because
6367 .RB \[lq] do \[rq]
6368 turns compatibility mode
6369 .I off
6370 while it interprets its argument list.
6371 .
6372 .
6373 .P
6374 GNU
6375 .I troff \" GNU
6376 normally tracks the interpolation depth of escape sequence parameters
6377 and other delimited structures,
6378 but not in compatibility mode.
6379 .
6380 See section \[lq]Miscellaneous\[rq] above.
6381 .
6382 .
6383 .P
6384 The escape sequences
6385 .BR \[rs]f ,
6386 .BR \[rs]H ,
6387 .BR \[rs]m ,
6388 .BR \[rs]M ,
6389 .BR \[rs]R ,
6390 .BR \[rs]s ,
6391 and
6392 .B \[rs]S
6393 are transparent to control character recognition
6394 at the beginning of an input line,
6395 or after the conditional expression of an
6396 .RB \[lq] if \^\[rq]
6397 or
6398 .B ie
6399 request,
6400 only in compatibility mode.
6401 .
6402 That is,
6403 upon interpreting them,
6404 GNU
6405 .I troff \" GNU
6406 normally no longer recognizes a control character on the input line;
6407 but in compatibility mode,
6408 it does,
6409 just like AT&T
6410 .I troff. \" AT&T
6411 .
6412 .
6413 .P
6414 Normally,
6415 the syntax form
6416 .BI \[rs]s n
6417 accepts only a single character
6418 (a digit)
6419 for
6420 .IR n ,
6421 consistently with other forms that originated in AT&T
6422 .IR troff , \" AT&T
6423 like
6424 .BR \[rs]* ,
6425 .BR \[rs]$ ,
6426 .BR \[rs]f ,
6427 .BR \[rs]g ,
6428 .BR \[rs]k ,
6429 .BR \[rs]n ,
6430 and
6431 .BR \[rs]z .
6432 .
6433 In compatibility mode only,
6434 a
6435 .RI non-zero\~ n
6436 must be in the range 4\[en]39.
6437 .
6438 Legacy documents relying upon this quirk of parsing should migrate
6439 to another
6440 .B \[rs]s
6441 form.
6442 .
6443 [Background:
6444 The Graphic Systems C/A/T phototypesetter
6445 (the original device target for AT&T
6446 .IR troff ) \" AT&T
6447 supported only a few discrete type sizes in the range 6\[en]36 points,
6448 so Ossanna contrived a special case in the parser to do what the user
6449 must have meant.
6450 .
6451 Kernighan warned of this in the 1992 revision of CSTR\~#54 (\[sc]2.3),
6452 and more recently,
6453 McIlroy referred to it as a \[lq]living fossil\[rq].]
6454 .
6455 .
6456 .\" ====================================================================
6457 .SH "Other differences"
6458 .\" ====================================================================
6459 .
6460 .\" BEGIN Keep in sync with groff.texi node "Other Differences".
6461 GNU
6462 .I troff \" GNU
6463 does not emit output if it has nothing to format.
6464 .
6465 For example,
6466 it treats an input document consisting solely of
6467 .B nr
6468 and
6469 .B tm
6470 requests as empty,
6471 and produces nothing on its standard output stream.
6472 .
6473 AT&T
6474 .I troff \" AT&T
6475 does,
6476 creating a blank page.
6477 .
6478 .
6479 .P
6480 Use of C0 control characters in identifiers is not portable;
6481 Solaris,
6482 Plan\~9,
6483 and Heirloom Doctools
6484 .IR troff s \" Solaris, Plan 9, Heirloom
6485 accept
6486 Control+B,
6487 Control+C,
6488 Control+E,
6489 Control+F,
6490 and
6491 Control+G (only);
6492 DWB\~3.3
6493 .I troff \" DWB
6494 does not.
6495 .
6496 GNU
6497 .I troff \" GNU
6498 rejects C0 controls in identifiers with an error diagnostic.
6499 .
6500 .
6501 .P
6502 Formatters that don't implement
6503 GNU
6504 .I troff \" GNU
6505 extension request names
6506 tend to ignore them,
6507 and if they don't support a
6508 GNU
6509 .I troff \" GNU
6510 extension escape sequence,
6511 they are liable to format its function selector character as text.
6512 .
6513 For example,
6514 .\" NESTED BEGIN Keep in sync with groff_man_style(7).
6515 the adjustable,
6516 non-breaking space escape sequence
6517 .B \[rs]\[ti]
6518 is also supported by Heirloom Doctools
6519 .I troff \" Heirloom
6520 050915 (September 2005),
6521 .I mandoc
6522 1.9.5 (2009-09-21),
6523 .I neatroff
6524 (commit 1c6ab0f6e,
6525 2016-09-13),
6526 and Plan\~9 from User Space
6527 .I troff \" Plan 9
6528 (commit 93f8143600,
6529 2022-08-12),
6530 but not by Solaris
6531 or Documenter's Workbench
6532 .IR troff s, \" DWB, Solaris
6533 which both render it as
6534 .RB \[lq] \[ti] \[rq].
6535 .\" as of this writing, 2022-08-13
6536 .\" NESTED END Keep in sync with groff_man_style(7).
6537 .
6538 The
6539 .B \[rs]A
6540 escape sequence
6541 (see subsection \[lq]Escape sequences\[rq] above)
6542 may be helpful in avoiding their use.
6543 .
6544 .
6545 .P
6546 AT&T
6547 .I troff \" AT&T
6548 discards trailing spaces from input lines,
6549 like GNU
6550 .IR troff , \" GNU
6551 but when it does so,
6552 AT&T
6553 .I troff \" AT&T
6554 also cancels end-of-sentence detection.
6555 .
6556 Use of the dummy character escape sequence
6557 .B \[rs]&
6558 is more portable.
6559 .
6560 .
6561 .P
6562 When adjusting output lines to both margins,
6563 AT&T
6564 .I troff \" AT&T
6565 at first adjusts spaces starting from the right;
6566 GNU
6567 .I troff \" GNU
6568 begins from the left.
6569 .
6570 Both implementations adjust spaces
6571 from opposite ends on alternating output lines
6572 in this adjustment mode
6573 to prevent \[lq]rivers\[rq] in the text.
6574 .
6575 .
6576 .br
6577 .ne 2v
6578 .P
6579 GNU
6580 .I troff \" GNU
6581 does not always hyphenate words as AT&T
6582 .I troff \" AT&T
6583 does.
6584 .
6585 The AT&T implementation uses a set of hard-coded rules
6586 specific to U.S.\& English,
6587 while GNU
6588 .I troff \" GNU
6589 uses language-specific hyphenation pattern files derived from \*[tx].
6590 .
6591 Some versions of
6592 .I troff \" generic
6593 reserved meager storage for hyphenation exception words
6594 (arguments to the
6595 .B hw
6596 request);
6597 GNU
6598 .I troff \" GNU
6599 has no such restriction.
6600 .
6601 When the
6602 .B hy
6603 request is invoked without an argument,
6604 GNU
6605 .I troff \" GNU
6606 sets the automatic hyphenation mode to the value of the
6607 .B \%.hydefault
6608 register;
6609 the AT&T implementation sets it to
6610 .RB \[lq] 1 \[rq],
6611 which is not suitable in GNU
6612 .I troff \" GNU
6613 for some languages,
6614 including English.
6615 .
6616 .
6617 .P
6618 Unlike
6619 GNU
6620 .IR troff , \" GNU
6621 AT&T
6622 .I troff \" AT&T
6623 does not recognize an occurrence of
6624 .B \[rs]%
6625 at the beginning of a word as suppressing its hyphenation;
6626 instead,
6627 it (uselessly) marks the start of the word
6628 as a potential hyphenation point,
6629 permitting output lines to end with hyphens
6630 that are not interior to a word.
6631 .
6632 .
6633 .P
6634 GNU
6635 .I troff \" GNU
6636 handles the dummy character
6637 .B \[rs]&
6638 differently from AT&T
6639 .I troff \" AT&T
6640 when it is followed by the hyphenation control escape sequence
6641 .B \[rs]%
6642 at the beginning of a word.
6643 .
6644 GNU
6645 .I troff \" GNU
6646 does not regard the dummy character as \[lq]starting\[rq] the word;
6647 AT&T
6648 .I troff \" AT&T
6649 does.
6650 .
6651 Further,
6652 Heirloom Doctools
6653 .I troff \" Heirloom
6654 does not honor an explicit hyphenation point marked with
6655 .B \[rs]%
6656 after a word-initial one.
6657 .\" The foregoing observations may have the same cause.
6658 .
6659 .
6660 .P
6661 GNU
6662 .I troff \" GNU
6663 interprets request arguments representing file names
6664 and system commands
6665 in the same way it does the
6666 .I contents
6667 argument to the
6668 .B ds
6669 and
6670 .RB \[lq] as \[rq]
6671 requests:
6672 it removes a leading neutral double quote
6673 .RB \[oq] \[dq] \[cq]
6674 from the argument to the
6675 .BR cf ,
6676 .BR nx ,
6677 .BR pi ,
6678 .RB \[lq] so \[rq],
6679 and
6680 .B sy
6681 requests,
6682 and the second argument
6683 (if present)
6684 to the
6685 .B lf
6686 request,
6687 permitting initial embedded spaces in it,
6688 and reads it to the end of the input line in copy mode.
6689 This difference permits the formatter to handle files
6690 with spaces in their names,
6691 but requires more care with trailing comments,
6692 and doubling of an initial neutral double quote
6693 .RB \[lq] \[dq] \[rq]
6694 if the file name has one.
6695 .
6696 .
6697 .P
6698 The existence of the
6699 .B .T
6700 string is a common feature of device-independent
6701 .IR troff s\[em]DWB\~3.3, \" others
6702 Solaris,
6703 Heirloom Doctools,
6704 and Plan\~9
6705 .I troff \" foreign
6706 all support it\[em]but valid values are specific to each implementation.
6707 .
6708 .
6709 .P
6710 The (read-only) register
6711 .B .T
6712 interpolates\~1
6713 if GNU
6714 .I troff \" GNU
6715 is run with the
6716 .B \-T
6717 option,
6718 and\~0 otherwise.
6719 In contrast,
6720 AT&T
6721 .I troff \" AT&T
6722 interpolated\~1 only if
6723 .I nroff \" AT&T
6724 was the formatter and was run with
6725 .BR \-T .
6726 .
6727 .
6728 .P
6729 AT&T
6730 .I troff \" AT&T
6731 ignored attempts to remove read-only registers;
6732 GNU
6733 .I troff \" GNU
6734 honors such requests.
6735 .
6736 .
6737 .P
6738 The
6739 .B lf
6740 request sets the number of the
6741 .I current
6742 input line in AT&T
6743 .IR troff ,\" AT&T
6744 and the
6745 .I next
6746 in GNU
6747 .IR troff .\" GNU
6748 .
6749 .
6750 .br
6751 .ne 2v
6752 .P
6753 AT&T
6754 .I troff
6755 had only environments named
6756 .RB \[lq] 0 \[rq],
6757 .RB \[lq] 1 \[rq],
6758 and
6759 .RB \[lq] 2 \[rq].
6760 .
6761 In GNU
6762 .IR troff ,
6763 any number of environments may exist,
6764 using any valid identifiers for their names.
6765 .
6766 .
6767 .P
6768 As noted above in \[lq]Fractional type sizes and new scaling units\[rq],
6769 AT&T
6770 .IR troff 's \" AT&T
6771 .B ps
6772 request ignores scaling units
6773 and thus
6774 .RB \[lq] .ps\~10u \[rq]
6775 sets the type size to 10\~points,
6776 whereas in GNU
6777 .I troff \" GNU
6778 it sets the type size to
6779 .RI 10\~ scaled
6780 points,
6781 possibly a much smaller measurement.
6782 .
6783 AT&T's behavior also means that
6784 .RB \[lq] .ps\~10p \[rq]
6785 and
6786 .RB \[lq] .ps\~10z \[rq]
6787 are portable.
6788 .
6789 .
6790 .P
6791 The
6792 .B ab
6793 request differs from AT&T
6794 .IR troff : \" AT&T
6795 GNU
6796 .I troff \" GNU
6797 writes no message to the standard error stream if no arguments are
6798 given,
6799 and it exits with a failure status instead of a successful one.
6800 .
6801 .
6802 .P
6803 The
6804 .B bp
6805 request differs from AT&T
6806 .IR troff : \" AT&T
6807 GNU
6808 .I troff \" GNU
6809 does not accept a scaling unit on the argument,
6810 a page number;
6811 the former does (uselessly).
6812 .
6813 .
6814 .P
6815 In AT&T
6816 .I troff \" AT&T
6817 the
6818 .B pm
6819 request reports
6820 macro,
6821 string,
6822 and
6823 diversion
6824 sizes in units of 128-byte blocks,
6825 and an argument reduces the report to a sum of the above in the same
6826 units.
6827 .
6828 GNU
6829 .I troff \" GNU
6830 reports their lengths in characters or nodes if given no arguments,
6831 and otherwise dumps
6832 the JSON-encoded name,
6833 contents,
6834 and other properties of each named argument.
6835 .
6836 .
6837 .P
6838 AT&T
6839 .I troff \" AT&T
6840 ignores the
6841 .B ss
6842 request if the output is a terminal device;
6843 GNU
6844 .I troff \" GNU
6845 rounds down the values of minimum inter-word and additional
6846 inter-sentence space each to the nearest multiple of\~12.
6847 .
6848 .
6849 .\" TODO: A lot of this discussion should move to "Using Symbols" and
6850 .\" "Gtroff Internals" (or whatever those sections get named once ported
6851 .\" to this man page).
6852 .P
6853 GNU
6854 .I troff \" GNU
6855 distinguishes characters from glyphs.
6856 .
6857 Characters can be ordinary,
6858 special,
6859 or indexed,
6860 and populate strings and macros.
6861 .
6862 Characters
6863 .I "per se"
6864 have not (yet) been formatted.
6865 .
6866 Glyphs represent graphemes
6867 (supplied by the output device)
6868 and populate diversions.
6869 .\" (recall @ref{Diversions}).
6870 .
6871 Formatting converts characters into
6872 (sequences of)
6873 glyphs.
6874 .
6875 GNU
6876 .I troff \" GNU
6877 stores properties of the environment
6878 that affect how a glyph is rendered with the glyph node's data.
6879 .
6880 Thus,
6881 subsequent formatting operations do not affect it,
6882 including
6883 .BR bd ,
6884 .BR cs ,
6885 .BR tkf ,
6886 .BR tr ,
6887 and
6888 .B fp
6889 requests.
6890 .
6891 Normally,
6892 a macro or string
6893 contains only a list of characters
6894 and a diversion
6895 contains only a list of nodes.
6896 However,
6897 applying the
6898 .B \%asciify
6899 or
6900 .B \%unformat
6901 requests to a diversion converts some of its nodes back into characters.
6902 .
6903 Where the formatter cannot recover the character representation
6904 of a node,
6905 it stores a null character in the character list
6906 corresponding to a single node in the node list.
6907 .
6908 Consequently,
6909 a glyph node does not behave as a character does
6910 in macro interpolation:
6911 it does not inherit special properties
6912 that the character from which it was constructed might have had.
6913 .
6914 .
6915 .P
6916 One way to format a backslash in most documents is with the
6917 .B \[rs]e
6918 escape sequence;
6919 this formats the glyph of the current escape character,
6920 regardless of whether it is used in a diversion;
6921 it also works in both GNU
6922 .I troff \" GNU
6923 and AT&T
6924 .IR troff . \" AT&T
6925 .
6926 (Naturally,
6927 if you've changed the escape character,
6928 you need to prefix the
6929 .RB \[lq] e \[rq]
6930 with whatever it is\[em]and you'll likely get something other than a
6931 backslash in the output.)
6932 .
6933 .
6934 .P
6935 The other correct way,
6936 appropriate in contexts independent of the backslash's common use as a
6937 .I roff
6938 escape character\[em]perhaps in discussion of character sets or other
6939 programming languages\[em]is the special character escape sequence
6940 .B \[rs](rs
6941 or
6942 .BR \[rs][rs] ,
6943 for \[lq]reverse solidus\[rq],
6944 from its name in the ECMA-6 and ISO\~10646 standards.
6945 .
6946 [AT&T
6947 .I troff 's \" AT&T
6948 font description files
6949 did not define the
6950 .B rs
6951 special character,
6952 but those of
6953 its descendant Heirloom Doctools
6954 .I troff \" Heirloom
6955 do,
6956 as of its 060716 release (July 2006).]
6957 .\" The foregoing once said "lineal" descendant; that appears not to be
6958 .\" true. Heirloom Doctools troff is based on Open Solaris troff, which
6959 .\" descends from DWB 2.0 troff (effectively a fork). "Lineal"
6960 .\" descendants of DWB 2.0 troff would be DWB 3.3 and, possibly, Plan 9
6961 .\" troff. (The accuracy of this last claim depends on the degree of
6962 .\" resemblance between Research Unix troff--the version maintained by
6963 .\" Kernighan--and DWB troff, of which 3.4 was the final release.)
6964 .
6965 .
6966 .P
6967 To store an escape sequence in a diversion that is interpreted when the
6968 diversion is interpolated,
6969 either use the traditional
6970 .B \[rs]!\&
6971 transparent output facility,
6972 or,
6973 if this is unsuitable,
6974 the new
6975 .B \[rs]?\&
6976 escape sequence.
6977 .
6978 See subsection \[lq]Escape sequences\[rq] above and sections
6979 \[lq]Diversions\[rq] and \[lq]Gtroff Internals\[rq] in
6980 .IR "Groff: The GNU Implementation of troff" ,
6981 the
6982 .I groff
6983 Texinfo manual.
6984 .
6985 .
6986 .P
6987 Like
6988 AT&T
6989 .I troff, \" AT&T
6990 GNU
6991 .I troff \" GNU
6992 maintains a buffer of device-independent output commands,
6993 populating the buffer as formatted output accumulates.
6994 GNU
6995 .I troff \" GNU
6996 always flushes this buffer when processing a break;
6997 AT&T
6998 .I troff \" AT&T
6999 does so according to no obvious schedule
7000 (perhaps,
7001 if the buffer is of fixed size,
7002 the formatter performs the flush when the buffer runs out of room).
7003 .
7004 .
7005 .P
7006 In the somewhat pathological case where a diversion exists
7007 containing a partially collected line
7008 and a partially collected line at the top-level diversion
7009 has never existed,
7010 AT&T
7011 .I troff \" AT&T
7012 outputs a partially collected but otherwise empty line
7013 (as if
7014 .RB \[lq] \[rs]c \[rq]
7015 were in the top-level diversion)
7016 at the end of input;
7017 GNU
7018 .I troff \" GNU
7019 does not.
7020 .\" END Keep in sync with groff.texi node "Other Differences".
7021 .
7022 .
7023 .\" ====================================================================
7024 .SS "Formatter output incompatibilities"
7025 .\" ====================================================================
7026 .
7027 Its extensions notwithstanding,
7028 GNU
7029 .IR troff 's \" GNU
7030 page description language
7031 has some incompatibilities with that of AT&T
7032 .IR troff , \" AT&T
7033 but better compatibility is sought;
7034 problem reports and patches are welcome.
7035 .
7036 The following incompatibilities are known.
7037 .
7038 .
7039 .IP \[bu] 3n
7040 The drawing position after rendering polygons is inconsistent with AT&T
7041 .I troff \" AT&T
7042 practice.
7043 .
7044 Other implementations have diverged on this point as well.
7045 .
7046 .
7047 .IP \[bu]
7048 The output cannot be easily rescaled to other devices as AT&T
7049 .IR troff 's \" AT&T
7050 could.
7051 .\" XXX: Why? What's the problem? sizescale? That could be written
7052 .\" into the output as a comment or x command. --GBR
7053 .
7054 .
7055 .\" ====================================================================
7056 .SH Authors
7057 .\" ====================================================================
7058 .
7059 This document was written by
7060 .MT jjc@\:jclark\:.com
7061 James Clark
7062 .ME ,
7063 .MT wl@\:gnu\:.org
7064 Werner Lemberg
7065 .ME ,
7066 .MT groff\-bernd\:.warken\-72@\:web\:.de
7067 Bernd Warken
7068 .ME ,
7069 and
7070 .MT g.branden\:.robinson@\:gmail\:.com
7071 G.\& Branden Robinson
7072 .ME .
7073 .
7074 .
7075 .\" ====================================================================
7076 .SH "See also"
7077 .\" ====================================================================
7078 .
7079 .IR "Groff: The GNU Implementation of troff" ,
7080 by Trent A.\& Fisher and Werner Lemberg,
7081 is the primary
7082 .I groff
7083 manual.
7084 .
7085 You can browse it interactively with \[lq]info groff\[rq].
7086 .
7087 .
7088 .br
7089 .ne 4v
7090 .P
7091 \[lq]Troff User's Manual\[rq]
7092 by Joseph F.\& Ossanna,
7093 1976
7094 (revised by Brian W.\& Kernighan,
7095 1992),
7096 AT&T Bell Laboratories Computing Science Technical Report No.\& 54,
7097 widely called simply \[lq]CSTR\~#54\[rq],
7098 documents the language,
7099 device and font description file formats,
7100 and page description language
7101 referred to collectively in
7102 .I groff
7103 documentation as AT&T
7104 .IR troff . \" AT&T
7105 .
7106 .
7107 .P
7108 \[lq]A Typesetter-independent TROFF\[rq]
7109 by Brian W.\& Kernighan,
7110 1982,
7111 AT&T Bell Laboratories Computing Science Technical Report No.\& 97,
7112 provides additional insights into the
7113 device and font description file formats
7114 and page description language.
7115 .
7116 .
7117 .P
7118 .MR groff 1 ,
7119 .MR groff 7 ,
7120 .MR roff 7
7121 .
7122 .
7123 .\" Clean up.
7124 .rm tx
7125 .rm ic
7126 .
7127 .\" Restore compatibility mode (for, e.g., Solaris 10/11).
7128 .cp \n[*groff_groff_diff_7_man_C]
7129 .do rr *groff_groff_diff_7_man_C
7130 .
7131 .
7132 .\" Local Variables:
7133 .\" fill-column: 72
7134 .\" mode: nroff
7135 .\" End:
7136 .\" vim: set filetype=groff textwidth=72: