groff: remove version tag from directory
[dragonfly.git] / contrib / groff / man / groff_diff.man
1 '\" e
2 .\" The above line should force the use of eqn as a preprocessor
3 .ig
4 groff_diff.man
5
6 Last update : 26 Jul 2004
7
8 This file is part of groff, the GNU roff type-setting system.
9 It is the source of the man-page groff_diff(7).
10
11 Copyright (C) 1989, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12 written by James Clark
13
14 modified by Werner Lemberg <wl@gnu.org>
15             Bernd Warken <bwarken@mayn.de>
16
17 Permission is granted to copy, distribute and/or modify this document
18 under the terms of the GNU Free Documentation License, Version 1.1 or
19 any later version published by the Free Software Foundation; with the
20 Invariant Sections being this .ig-section and AUTHORS, with no
21 Front-Cover Texts, and with no Back-Cover Texts.
22
23 A copy of the Free Documentation License is included as a file called
24 FDL in the main directory of the groff source package.
25 ..
26 .
27 .\" --------------------------------------------------------------------
28 .\" Setup
29 .\" --------------------------------------------------------------------
30 .
31 .do nr groff_diff_C \n[.C]
32 .cp 0
33 .
34 .mso www.tmac
35 .
36 .if n \{\
37 .  mso tty-char.tmac
38 .  ftr CR R
39 .  ftr CI I
40 .  ftr CB B
41 .\}
42 .
43 .if '\*[.T]'dvi' \
44 .  ftr CB CW
45 .
46 .\" define a string tx for the TeX logo
47 .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
48 .el   .ds tx TeX
49 .
50 .
51 .\" --------------------------------------------------------------------
52 .\" start of macro definitions
53 .
54 .eo
55 .
56 .de c
57 ..
58 .
59 .de TQ
60 .  br
61 .  ns
62 .  TP \$1
63 ..
64 .de Text
65 .  RI "\$*"
66 ..
67 .de Topic
68 .  TP 2m
69 .  Text \[bu]
70 ..
71 .de squoted
72 .  ds @arg1 \$1
73 .  shift
74 .\"  Text \[oq]\f[CB]\*[@arg1]\f[]\[cq]\$*
75 .  Text \[oq]\f[B]\*[@arg1]\f[]\[cq]\$*
76 .  rm @arg1
77 ..
78 .c A shell command line
79 .de ShellCommand
80 .  br
81 .  IR "shell#" "\h'1m'\f[CB]\$*\f[]\/"
82 ..
83 .c reference of a request or macro
84 .de request
85 .  ds @arg1 \$1
86 .  shift 1
87 .\"  Text \f[CB]\*[@arg1]\f[]\$*
88 .  Text \f[B]\*[@arg1]\f[]\$*
89 .  rm @arg1
90 ..
91 .als option request
92 .
93 .c representation of an escape sequence
94 .de esc
95 .  ds @arg1 \$1
96 .  shift
97 .\"  Text \f[CB]\[rs]\*[@arg1]\f[]\$*
98 .  Text \f[B]\[rs]\*[@arg1]\&\f[]\$*
99 .  rm @arg1
100 ..
101 .ec
102 .\" end of macro definitions
103 .
104 .\" from old groff_out.man
105 .ie \n(.g \
106 .  ds ic \/
107 .el \
108 .  ds ic \^
109 .
110 .
111 .\" --------------------------------------------------------------------
112 .\" Title
113 .\" --------------------------------------------------------------------
114 .
115 .TH GROFF_DIFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
116 .SH NAME
117 groff_diff \- differences between GNU troff and classical troff
118 .
119 .
120 .\" --------------------------------------------------------------------
121 .SH DESCRIPTION
122 .\" --------------------------------------------------------------------
123 .
124 This manual page describes the language differences between
125 .IR groff ,
126 the GNU
127 .I roff
128 text processing system and the classical
129 .I roff
130 formatter of the freely available Unix\~7 of the 1970s, documented in
131 the
132 .I Troff User's Manual
133 by
134 .I Osanna
135 and
136 .IR Kernighan .
137 This inludes the roff language as well as the intermediate output
138 format (troff output).
139 .
140 .P
141 The section
142 .I SEE ALSO
143 gives pointers to both the classical
144 .I roff
145 and the modern
146 .I groff
147 documentation.
148 .
149 .
150 .\" --------------------------------------------------------------------
151 .SH "GROFF LANGUAGE"
152 .\" --------------------------------------------------------------------
153 .
154 In this section, all additional features of
155 .I groff
156 compared to the classical Unix\~7
157 .I troff
158 are described in detail.
159 .
160 .
161 .\" --------------------------------------------------------------------
162 .SS "Long names"
163 .\" --------------------------------------------------------------------
164 .
165 The names of number registers, fonts, strings/\:macros/\:diversions,
166 special characters (glyphs), and colors can be of any length.
167 .
168 In escape sequences, additionally to the classical
169 .BI ( xx
170 construction for a two-character name, you can use
171 .BI [ xxx ]
172 for a name of arbitrary length.
173 .
174 .TP
175 .BI \[rs][ xxx ]
176 Print the special character (glyph) called
177 .IR xxx .
178 .
179 .TP
180 .BI \[rs][ "comp1 comp2 .\|.\|." ]
181 Print composite glyph consisting of multiple components.
182 .
183 Example: `\[rs][A\~ho]' is capital letter A with ogonek which finally maps
184 to glyph name `u0041_0328'.
185 .
186 See the
187 .I groff info file
188 for details how a glyph name for a composite glyph is constructed, and
189 .BR groff_char (@MAN7EXT@)
190 for list of glyph name components used composite glyph names.
191 .
192 .TP
193 .BI \[rs]f[ xxx ]
194 Set font
195 .IR xxx .
196 .
197 Additionally,
198 .B \[rs]f[]
199 is a new syntax equal to
200 .BR \[rs]fP ,
201 i.e., to return to the previous font.
202 .
203 .TP
204 .BI \[rs]*[ "xxx arg1 arg2 .\|.\|." ]
205 Interpolate string
206 .IR xxx ,
207 taking
208 .IR arg1 ,
209 .IR arg2 ,
210 .I .\|.\|.\&
211 as arguments.
212 .
213 .TP
214 .BI \[rs]n[ xxx ]
215 Interpolate number register
216 .IR xxx .
217 .
218 .
219 .\" --------------------------------------------------------------------
220 .SS "Fractional pointsizes"
221 .\" --------------------------------------------------------------------
222 .
223 A
224 .I scaled point
225 is equal to
226 .B 1/sizescale
227 points, where
228 .B sizescale
229 is specified in the
230 .B DESC
231 file (1 by default).
232 .
233 There is a new scale indicator
234 .B z
235 that has the effect of multiplying by sizescale.
236 .
237 Requests and escape sequences in troff interpret arguments that
238 represent a pointsize as being in units of scaled points, but they
239 evaluate each such argument using a default scale indicator of
240 .BR z .
241 Arguments treated in this way are the argument to the
242 .B ps
243 request, the third argument to the
244 .B cs
245 request, the second and fourth arguments to the
246 .B tkf
247 request, the argument to the
248 .B \[rs]H
249 escape sequence, and those variants of the
250 .B \[rs]s
251 escape sequence that take a numeric expression as their argument.
252 .
253 .P
254 For example, suppose sizescale is 1000; then a scaled point will be
255 equivalent to a millipoint; the call
256 .B .ps\ 10.25
257 is equivalent to
258 .B .ps\ 10.25z
259 and so sets the pointsize to 10250 scaled points, which is equal to
260 10.25 points.
261 .
262 .P
263 The number register
264 .B \[rs]n[.s]
265 returns the pointsize in points as decimal fraction.
266 .
267 There is also a new number register
268 .B \[rs]n[.ps]
269 that returns the pointsize in scaled points.
270 .
271 .P
272 It would make no sense to use the
273 .B z
274 scale indicator in a numeric expression whose default scale indicator
275 was neither
276 .B u
277 nor
278 .BR z ,
279 and so
280 .B troff
281 disallows this.
282 .
283 Similarly it would make no sense to use a scaling indicator other than
284 .B z
285 or
286 .B u
287 in a numeric expression whose default scale indicator was
288 .BR z ,
289 and so
290 .B troff
291 disallows this as well.
292 .
293 .P
294 There is also new scale indicator\~\c
295 .B s
296 which multiplies by the number of units in a scaled point.
297 .
298 So, for example,
299 .B \[rs]n[.ps]s
300 is equal to
301 .BR 1m .
302 Be sure not to confuse the
303 .B s
304 and
305 .B z
306 scale indicators.
307 .
308 .
309 .\" --------------------------------------------------------------------
310 .SS "Numeric expressions"
311 .\" --------------------------------------------------------------------
312 .
313 Spaces are permitted in a number expression within parentheses.
314 .
315 .P
316 .B M
317 indicates a scale of 100ths of an em.
318 .B f
319 indicates a scale of 65536 units, providing fractions for color
320 definitions with the
321 .B defcolor
322 request.
323 .
324 For example, 0.5f = 32768u.
325 .
326 .TP
327 .IB e1 >? e2
328 The maximum of
329 .I e1
330 and
331 .IR e2 .
332 .
333 .TP
334 .IB e1 <? e2
335 The minimum of
336 .I e1
337 and
338 .IR e2 .
339 .
340 .TP
341 .BI ( c ; e )
342 Evaluate
343 .I e
344 using
345 .I c
346 as the default scaling indicator.
347 .
348 If
349 .I c
350 is missing, ignore scaling indicators in the evaluation of
351 .IR e .
352 .
353 .
354 .\" --------------------------------------------------------------------
355 .SS "New escape sequences"
356 .\" --------------------------------------------------------------------
357 .
358 .TP
359 .BI \[rs]A' anything '
360 This expands to
361 .B 1
362 or
363 .B 0
364 resp., depending on whether
365 .I anything
366 is or is not acceptable as the name of a string, macro, diversion, number
367 register, environment, font, or color.
368 It will return\~\c
369 .B 0
370 if
371 .I anything
372 is empty.
373 .
374 This is useful if you want to lookup user input in some sort of
375 associative table.
376 .
377 .TP
378 .BI \[rs]B' anything '
379 This expands to
380 .B 1
381 or
382 .B 0
383 resp., depending on whether
384 .I anything
385 is or is not a valid numeric expression.
386 .
387 It will return\~\c
388 .B 0
389 if
390 .I anything
391 is empty.
392 .
393 .TP
394 .BI \[rs]C' xxx '
395 Typeset glyph named
396 .IR xxx .
397 Normally it is more convenient to use
398 .BI \[rs][ xxx ]\f[R].
399 But
400 .B \[rs]C
401 has the advantage that it is compatible with recent versions of
402 .SM UNIX
403 and is available in compatibility mode.
404 .
405 .TP
406 .B \[rs]E
407 This is equivalent to an escape character, but it is not interpreted in
408 copy-mode.
409 .
410 For example, strings to start and end superscripting could be defined
411 like this
412 .
413 .RS
414 .IP
415 .ft CB
416 .Text .ds { \[rs]v'\-.3m'\[rs]s'\[rs]En[.s]*6u/10u'
417 .br
418 .Text .ds } \[rs]s0\[rs]v'.3m'
419 .ft
420 .
421 .P
422 The use of
423 .B \[rs]E
424 ensures that these definitions will work even if
425 .B \[rs]*{
426 gets interpreted in copy-mode (for example, by being used in a macro
427 argument).
428 .RE
429 .
430 .TP
431 .BI \[rs]F f
432 .TQ
433 .BI \[rs]F( fm
434 .TQ
435 .BI \[rs]F[ fam ]
436 Change font family.
437 .
438 This is the same as the
439 .B fam
440 request.
441 .
442 .B \[rs]F[]
443 switches back to the previous color (note that
444 .B \[rs]FP
445 won't work; it selects font family `P' instead).
446 .
447 .TP
448 .BI \[rs]m x
449 .TQ
450 .BI \[rs]m( xx
451 .TQ
452 .BI \[rs]m[ xxx ]
453 Set drawing color.
454 .B \[rs]m[]
455 switches back to the previous color.
456 .
457 .TP
458 .BI \[rs]M x
459 .TQ
460 .BI \[rs]M( xx
461 .TQ
462 .BI \[rs]M[ xxx ]
463 Set background color for filled objects drawn with the
464 .BI \[rs]D' .\|.\|. '
465 commands.
466 .B \[rs]M[]
467 switches back to the previous color.
468 .
469 .TP
470 .BI \[rs]N' n '
471 Typeset the glyph with index
472 .I n
473 in the current font.
474 .I n
475 can be any integer.
476 .
477 Most devices only have glyphs with indices between 0 and 255.
478 .
479 If the current font does not contain a glyph with that code,
480 special fonts will
481 .I not
482 be searched.
483 .
484 The
485 .B \[rs]N
486 escape sequence can be conveniently used in conjunction with the
487 .B char
488 request, for example
489 .
490 .RS
491 .ft CB
492 .IP
493 .Text .char \[rs][phone] \[rs]f(ZD\[rs]N'37'
494 .ft
495 .RE
496 .
497 .IP
498 The index of each glyph is given in the fourth column in the font
499 description file after the
500 .B charset
501 command.
502 .
503 It is possible to include unnamed glyphs in the font description
504 file by using a name of
505 .BR \-\-\- ;
506 the
507 .B \[rs]N
508 escape sequence is the only way to use these.
509 .
510 .TP
511 .BI \[rs]O n
512 .TQ
513 .BI \[rs]O[ n ]
514 Suppressing troff output.
515 .
516 The escapes
517 .BR \[rs]02 ,
518 .BR \[rs]O3 ,
519 .BR \[rs]O4 ,
520 and
521 .B \[rs]O5
522 are intended for internal use by
523 .BR \%grohtml .
524 .
525 .RS
526 .TP
527 .B \[rs]O0
528 Disable any ditroff glyphs from being emitted to the device driver,
529 provided that the escape occurs at the outer level (see
530 .B \[rs]O3
531 and
532 .BR \[rs]O4 ).
533 .
534 .TP
535 .B \[rs]O1
536 Enable output of glyphs, provided that the escape occurs at the outer
537 level.
538 .IP
539 .B \[rs]O0
540 and
541 .B \[rs]O1
542 also reset the registers
543 .BR \[rs]n[opminx] ,
544 .BR \[rs]n[opminy] ,
545 .BR \[rs]n[opmaxx] ,
546 and
547 .B \[rs]n[opmaxy]
548 to\~-1.
549 .
550 These four registers mark the top left and bottom right hand corners
551 of a box which encompasses all written glyphs.
552 .
553 .TP
554 .B \[rs]O2
555 Provided that the escape occurs at the outer level, enable output of
556 glyphs and also write out to stderr the page number and four registers
557 encompassing the glyphs previously written since the last call to
558 .BR \[rs]O .
559 .
560 .TP
561 .B \[rs]O3
562 Begin a nesting level.
563 .
564 At start-up,
565 .B troff
566 is at outer level.
567 .
568 This is really an internal mechanism for
569 .B \%grohtml
570 while producing images.
571 .
572 They are generated by running the troff source through
573 .B troff
574 to the postscript device and
575 .B ghostscript
576 to produce images in PNG format.
577 .
578 The
579 .B \[rs]O3
580 escape will start a new page if the device is not html (to reduce the
581 possibility of images crossing a page boundary).
582 .
583 .TP
584 .B \[rs]O4
585 End a nesting level.
586 .
587 .TP
588 .BI \[rs]O5[ Pfilename ]
589 This escape is
590 .B \%grohtml
591 specific.
592 .
593 Provided that this escape occurs at the outer nesting level, write
594 .I filename
595 to stderr.
596 .
597 The position of the image,
598 .IR P ,
599 must be specified and must be one of l, r, c, or i (left, right,
600 centered, inline).
601 .
602 .I filename
603 will be associated with the production of the next inline image.
604 .RE
605 .
606 .TP
607 .BI \[rs]R' name\ \[+-]n '
608 This has the same effect as
609 .
610 .RS
611 .IP
612 .BI .nr\  name\ \[+-]n
613 .RE
614 .
615 .TP
616 .BI \[rs]s( nn
617 .TQ
618 .BI \[rs]s\[+-]( nn
619 Set the point size to
620 .I nn
621 points;
622 .I nn
623 must be exactly two digits.
624 .
625 .TP
626 .BI \[rs]s[\[+-] n ]
627 .TQ
628 .BI \[rs]s\[+-][ n ]
629 .TQ
630 .BI \[rs]s'\[+-] n '
631 .TQ
632 .BI \[rs]s\[+-]' n '
633 Set the point size to
634 .I n
635 scaled points;
636 .I n
637 is a numeric expression with a default scale indicator of\~\c
638 .BR z .
639 .
640 .TP
641 .BI \[rs]V x
642 .TQ
643 .BI \[rs]V( xx
644 .TQ
645 .BI \[rs]V[ xxx ]
646 Interpolate the contents of the environment variable
647 .IR xxx ,
648 as returned by
649 .BR getenv (3).
650 .B \[rs]V
651 is interpreted in copy-mode.
652 .
653 .TP
654 .BI \[rs]Y x
655 .TQ
656 .BI \[rs]Y( xx
657 .TQ
658 .BI \[rs]Y[ xxx ]
659 This is approximately equivalent to
660 .BI \[rs]X'\[rs]*[ xxx ]'\f[R].
661 However the contents of the string or macro
662 .I xxx
663 are not interpreted; also it is permitted for
664 .I xxx
665 to have been defined as a macro and thus contain newlines (it is not
666 permitted for the argument to
667 .B \[rs]X
668 to contain newlines).
669 .
670 The inclusion of newlines requires an extension to the UNIX troff
671 output format, and will confuse drivers that do not know about this
672 extension.
673 .
674 .TP
675 .BI \[rs]Z' anything '
676 Print anything and then restore the horizontal and vertical position;
677 .I anything
678 may not contain tabs or leaders.
679 .
680 .TP
681 .B \[rs]$0
682 The name by which the current macro was invoked.
683 .
684 The
685 .B als
686 request can make a macro have more than one name.
687 .
688 .TP
689 .B \[rs]$*
690 In a macro or string, the concatenation of all the arguments separated
691 by spaces.
692 .
693 .TP
694 .B \[rs]$@
695 In a macro or string, the concatenation of all the arguments with each
696 surrounded by double quotes, and separated by spaces.
697 .
698 .TP
699 .BI \[rs]$( nn
700 .TQ
701 .BI \[rs]$[ nnn ]
702 In a macro or string, this gives the
703 .IR nn -th
704 or
705 .IR nnn -th
706 argument.
707 .
708 Macros and strings can have an unlimited number of arguments.
709 .
710 .TP
711 .BI \[rs]? anything \[rs]?
712 When used in a diversion, this will transparently embed
713 .I anything
714 in the diversion.
715 .I anything
716 is read in copy mode.
717 .
718 When the diversion is reread,
719 .I anything
720 will be interpreted.
721 .I anything
722 may not contain newlines; use
723 .B \[rs]!\&
724 if you want to embed newlines in a diversion.
725 .
726 The escape sequence
727 .B \[rs]?\&
728 is also recognised in copy mode and turned into a single internal
729 code; it is this code that terminates
730 .IR anything .
731 Thus
732 .
733 .RS
734 .IP
735 .ne 14v+\n(.Vu
736 .ft CB
737 .nf
738 .Text .nr x 1
739 .Text .nf
740 .Text .di d
741 .Text \[rs]?\[rs]\[rs]?\[rs]\[rs]\[rs]\[rs]?\[rs]\[rs]\[rs]\[rs]\[rs]\[rs]\[rs]\c
742 .Text \[rs]nx\[rs]\[rs]\[rs]\[rs]?\[rs]\[rs]?\[rs]?
743 .Text .di
744 .Text .nr x 2
745 .Text .di e
746 .Text .d
747 .Text .di
748 .Text .nr x 3
749 .Text .di f
750 .Text .e
751 .Text .di
752 .Text .nr x 4
753 .Text .f
754 .fi
755 .ft
756 .RE
757 .
758 .IP
759 will print\~\c
760 .BR 4 .
761 .
762 .TP
763 .B \[rs]/
764 This increases the width of the preceding glyph so that the
765 spacing between that glyph and the following glyph will be
766 correct if the following glyph is a roman glyph.
767 .
768 .if t \{\
769 .  nop For example, if an italic f is immediately followed by a roman
770 .  nop right parenthesis, then in many fonts the top right portion of
771 .  nop the f will overlap the top left of the right parenthesis
772 .  nop producing \f[I]f\f[R])\f[R], which is ugly.
773 .  nop Inserting
774 .  B \[rs]/
775 .  nop produces
776 .  ie \n(.g \f[I]f\/\f[R])\f[R]
777 .  el       \f[I]f\|\f[R])\f[R]
778 .  nop and avoids this problem.
779 .\}
780 It is a good idea to use this escape sequence whenever an italic
781 glyph is immediately followed by a roman glyph without any
782 intervening space.
783 .
784 .TP
785 .B \[rs],
786 This modifies the spacing of the following glyph so that the
787 spacing between that glyph and the preceding glyph will
788 correct if the preceding glyph is a roman glyph.
789 .
790 .if t \{\
791 .  nop For example, inserting
792 .  B \[rs],
793 .  nop between the parenthesis and the f changes
794 .  nop \f[R](\f[I]f\f[R] to
795 .  ie \n(.g \f[R](\,\f[I]f\f[R].
796 .  el       \f[R](\^\f[I]f\f[R].
797 .\}
798 It is a good idea to use this escape sequence whenever a roman
799 glyph is immediately followed by an italic glyph without any
800 intervening space.
801 .
802 .TP
803 .B \[rs])
804 Like
805 .B \[rs]&
806 except that it behaves like a character declared with the
807 .B cflags
808 request to be transparent for the purposes of end-of-sentence
809 recognition.
810 .
811 .TP
812 .B \[rs]~
813 This produces an unbreakable space that stretches like a normal
814 inter-word space when a line is adjusted.
815 .
816 .TP
817 .B \[rs]:
818 This causes the insertion of a zero-width break point.
819 .
820 It is equal to
821 .B \[rs]%
822 within a word but without insertion of a soft hyphen character.
823 .
824 .TP
825 .B \[rs]#
826 Everything up to and including the next newline is ignored.
827 .
828 This is interpreted in copy mode.
829 .
830 It is like
831 .B \[rs]"
832 except that
833 .B \[rs]"
834 does not ignore the terminating newline.
835 .
836 .
837 .\" --------------------------------------------------------------------
838 .SS "New requests"
839 .\" --------------------------------------------------------------------
840 .
841 .TP
842 .BI .aln\  xx\ yy
843 Create an alias
844 .I xx
845 for number register object named
846 .IR yy .
847 The new name and the old name will be exactly equivalent.
848 .
849 If
850 .I yy
851 is undefined, a warning of type
852 .B reg
853 will be generated, and the request will be ignored.
854 .
855 .TP
856 .BI .als\  xx\ yy
857 Create an alias
858 .I xx
859 for request, string, macro, or diversion object named
860 .IR yy .
861 .
862 The new name and the old name will be exactly equivalent (it is
863 similar to a hard rather than a soft link).
864 .
865 If
866 .I yy
867 is undefined, a warning of type
868 .B mac
869 will be generated, and the request will be ignored.
870 .
871 The
872 .BR de ,
873 .BR am ,
874 .BR di ,
875 .BR da ,
876 .BR ds ,
877 and
878 .B as
879 requests only create a new object if the name of the macro, diversion
880 or string diversion is currently undefined or if it is defined to be a
881 request; normally they modify the value of an existing object.
882 .
883 .TP
884 .BI .am1\  xx\ yy
885 Similar to
886 .BR .am , 
887 but compatibility mode is switched off during execution.
888 .
889 To be more precise, a `compatibility save' token is inserted at the
890 beginning of the macro addition, and a `compatibility restore' token at
891 the end.
892 .
893 As a consequence, the requests
894 .BR am ,
895 .BR am1 ,
896 .BR de ,
897 and
898 .B de1
899 can be intermixed freely since the compatibility save/\:restore tokens
900 only affect the macro parts defined by
901 .B .am1
902 and
903 .BR .ds1 .
904 .
905 .TP
906 .BI .ami\  xx\ yy
907 Append to macro indirectly.
908 .
909 See the
910 .B dei
911 request below for more information.
912 .
913 .TP
914 .BI .ami1\  xx\ yy
915 Same as the
916 .B ami
917 request but compatibility mode is switched off during execution.
918 .
919 .TP
920 .BI .as1\  xx\ yy
921 Similar to
922 .BR .as , 
923 but compatibility mode is switched off during expansion.
924 .
925 To be more precise, a `compatibility save' token is inserted at the
926 beginning of the string, and a `compatibility restore' token at the end.
927 .
928 As a consequence, the requests
929 .BR as ,
930 .BR as1 ,
931 .BR ds ,
932 and
933 .B ds1
934 can be intermixed freely since the compatibility save/\:restore tokens
935 only affect the (sub)strings defined by
936 .B as1
937 and
938 .BR ds1 .
939 .
940 .TP
941 .BI .asciify\  xx
942 This request `unformats' the diversion
943 .I xx
944 in such a way that
945 .SM ASCII
946 and space characters (and some escape sequences) that were formatted
947 and diverted into
948 .I xx
949 will be treated like ordinary input characters when
950 .I xx
951 is reread.
952 Useful for diversions in conjunction with the
953 .B .writem
954 request.
955 .
956 It can be also used for gross hacks; for example, this
957 .
958 .RS
959 .IP
960 .ne 7v+\n(.Vu
961 .ft CB
962 .nf
963 .Text .tr @.
964 .Text .di x
965 .Text @nr n 1
966 .Text .br
967 .Text .di
968 .Text .tr @@
969 .Text .asciify x
970 .Text .x
971 .fi
972 .ft
973 .RE
974 .
975 .IP
976 will set register\~\c
977 .B n
978 to\~1.
979 .
980 Note that glyph information (font, font size, etc.) is not preserved;
981 use
982 .B .unformat
983 instead.
984 .
985 .TP
986 .B .backtrace
987 Print a backtrace of the input stack on stderr.
988 .
989 .TP
990 .BI .blm\  xx
991 Set the blank line macro to
992 .IR xx .
993 If there is a blank line macro, it will be invoked when a blank line
994 is encountered instead of the usual troff behaviour.
995 .
996 .TP
997 .BI .box\  xx
998 .TQ
999 .BI .boxa\  xx
1000 These requests are similar to the
1001 .B di
1002 and
1003 .B da
1004 requests with the exception that a partially filled line will not
1005 become part of the diversion (i.e., the diversion always starts with a
1006 new line) but restored after ending the diversion, discarding the
1007 partially filled line which possibly comes from the diversion.
1008 .
1009 .TP
1010 .B .break
1011 Break out of a while loop.
1012 .
1013 See also the
1014 .B while
1015 and
1016 .B continue
1017 requests.
1018 .
1019 Be sure not to confuse this with the
1020 .B br
1021 request.
1022 .
1023 .TP
1024 .B .brp
1025 This is the same as
1026 .BR \[rs]p .
1027 .
1028 .TP
1029 .BI .cflags\  n\ c1\ c2\|.\|.\|.\&
1030 Characters
1031 .IR c1 ,
1032 .IR c2 ,\|.\|.\|.\&
1033 have properties determined by
1034 .IR n ,
1035 which is ORed from the following:
1036 .
1037 .RS
1038 .IP 1
1039 The character ends sentences (initially characters
1040 .B .?!\&
1041 have this property).
1042 .
1043 .IP 2
1044 Lines can be broken before the character (initially no characters have
1045 this property); a line will not be broken at a character with this
1046 property unless the characters on each side both have non-zero
1047 hyphenation codes.
1048 .
1049 .IP 4
1050 Lines can be broken after the character (initially characters
1051 .B \-\[rs][hy]\[rs][em]
1052 have this property); a line will not be broken at a character with
1053 this property unless the characters on each side both have non-zero
1054 hyphenation codes.
1055 .
1056 .IP 8
1057 The character overlaps horizontally (initially characters
1058 .B \[rs][ul]\[rs][rn]\[rs][ru]\[rs][radicalex]\[rs][sqrtex]
1059 have this property).
1060 .
1061 .IP 16
1062 The character overlaps vertically (initially character
1063 .B \[rs][br]
1064 has this property).
1065 .
1066 .IP 32
1067 An end-of-sentence character followed by any number of characters with
1068 this property will be treated as the end of a sentence if followed by
1069 a newline or two spaces; in other words the character is transparent
1070 for the purposes of end-of-sentence recognition; this is the same as
1071 having a zero space factor in \*[tx] (initially characters
1072 .B \[dq]')]*\[rs](dg\[rs](rq
1073 have this property).
1074 .RE
1075 .
1076 .TP
1077 .BI .char\  c\ string
1078 Define glyph
1079 .I c
1080 to be
1081 .IR string .
1082 Every time glyph
1083 .I c
1084 needs to be printed,
1085 .I string
1086 will be processed in a temporary environment and the result will be
1087 wrapped up into a single object.
1088 .
1089 Compatibility mode will be turned off and the escape character will be
1090 set to
1091 .B \[rs]
1092 while
1093 .I string
1094 is being processed.
1095 .
1096 Any emboldening, constant spacing or track kerning will be applied to
1097 this object rather than to individual glyphs in
1098 .IR string .
1099 .
1100 .IP
1101 A glyph defined by this request can be used just like a normal
1102 glyph provided by the output device.
1103 .
1104 In particular other characters can be translated to it with the
1105 .B tr
1106 request; it can be made the leader character by the
1107 .B lc
1108 request; repeated patterns can be drawn with the character using the
1109 .B \[rs]l
1110 and
1111 .B \[rs]L
1112 escape sequences; words containing the character can be hyphenated
1113 correctly, if the
1114 .B hcode
1115 request is used to give the character a hyphenation code.
1116 .
1117 .IP
1118 There is a special anti-recursion feature: Use of glyph within the
1119 glyph's definition will be handled like normal glyphs not
1120 defined with
1121 .BR char .
1122 .IP
1123 A glyph definition can be removed with the
1124 .B rchar
1125 request.
1126 .
1127 .TP
1128 .BI .chop\  xx
1129 Chop the last element off macro, string, or diversion
1130 .IR xx .
1131 This is useful for removing the newline from the end of diversions
1132 that are to be interpolated as strings.
1133 .
1134 .TP
1135 .BI .close\  stream
1136 Close the stream named
1137 .IR stream ;
1138 .I stream
1139 will no longer be an acceptable argument to the
1140 .B write
1141 request.
1142 .
1143 See the
1144 .B open
1145 request.
1146 .
1147 .TP
1148 .BI .composite\  glyph1\ glyph2
1149 Map glyph name
1150 .I glyph1
1151 to glyph name
1152 .I glyph2
1153 if it is used in
1154 .BI \[rs][ ... ]
1155 with more than one component.
1156 .
1157 .TP
1158 .B .continue
1159 Finish the current iteration of a while loop.
1160 .
1161 See also the
1162 .B while
1163 and
1164 .B break
1165 requests.
1166 .
1167 .TP
1168 .BI .color\  n
1169 If
1170 .I n
1171 is non-zero or missing, enable colors (this is the default), otherwise
1172 disable them.
1173 .
1174 .TP
1175 .BI .cp\  n
1176 If
1177 .I n
1178 is non-zero or missing, enable compatibility mode, otherwise disable
1179 it.
1180 .
1181 In compatibility mode, long names are not recognised, and the
1182 incompatibilities caused by long names do not arise.
1183 .
1184 .TP
1185 .BI .defcolor\  xxx\ scheme\ color_components
1186 Define color.
1187 .I scheme
1188 can be one of the following values:
1189 .B rgb
1190 (three components),
1191 .B cym
1192 (three components),
1193 .B cmyk
1194 (four components), and
1195 .B gray
1196 or
1197 .B grey
1198 (one component).
1199 .
1200 Color components can be given either as a hexadecimal string or as
1201 positive decimal integers in the range 0-65535.
1202 .
1203 A hexadecimal string contains all color components concatenated; it
1204 must start with either
1205 .B #
1206 or
1207 .BR ## .
1208 The former specifies hex values in the range 0-255 (which are
1209 internally multiplied by\~257), the latter in the range 0-65535.
1210 .
1211 Examples: #FFC0CB (pink), ##ffff0000ffff (magenta).
1212 .
1213 A new scaling indicator\~\c
1214 .B f
1215 has been introduced which multiplies its value by\~65536; this makes
1216 it convenient to specify color components as fractions in the range 0
1217 to\~1.
1218 .
1219 Example:
1220 .
1221 .RS
1222 .IP
1223 .ft CB
1224 .Text .defcolor darkgreen rgb 0.1f 0.5f 0.2f
1225 .br
1226 .ft
1227 .RE
1228 .
1229 .IP
1230 Note that
1231 .B f
1232 is the default scaling indicator for the
1233 .B defcolor
1234 request, thus the above statement is equivalent to
1235 .
1236 .RS
1237 .IP
1238 .ft CB
1239 .Text .defcolor darkgreen rgb 0.1 0.5 0.2
1240 .br
1241 .ft
1242 .RE
1243 .
1244 .IP
1245 The color named
1246 .B default
1247 (which is device-specific) can't be redefined.
1248 .
1249 It is possible that the default color for
1250 .esc M
1251 and
1252 .esc m
1253 is not the same.
1254 .
1255 .TP
1256 .BI .de1\  xx\ yy
1257 Similar to
1258 .BR .de , 
1259 but compatibility mode is switched off during execution.
1260 .
1261 On entry, the current compatibility mode is saved and restored at exit.
1262 .
1263 .TP
1264 .BI .dei\  xx\ yy
1265 Define macro indirectly.
1266 .
1267 The following example
1268 .
1269 .RS
1270 .IP
1271 .ne 2v+\n(.Vu
1272 .ft CB
1273 .nf
1274 .Text .ds xx aa
1275 .Text .ds yy bb
1276 .Text .dei xx yy
1277 .fi
1278 .ft
1279 .RE
1280 .
1281 .IP
1282 is equivalent to
1283 .
1284 .RS
1285 .IP
1286 .ft CB
1287 .Text .de aa bb
1288 .br
1289 .ft
1290 .RE
1291 .
1292 .TP
1293 .BI .dei1\  xx\ yy
1294 Similar to the
1295 .B dei
1296 request but compatibility mode is switched off during execution.
1297 .
1298 .TP
1299 .BI .do\  xxx
1300 Interpret
1301 .I .xxx
1302 with compatibility mode disabled.
1303 .
1304 For example,
1305 .
1306 .RS
1307 .
1308 .IP
1309 .ft CB
1310 .Text .do fam T
1311 .br
1312 .ft
1313 .
1314 .P
1315 would have the same effect as
1316 .
1317 .IP
1318 .ft CB
1319 .Text .fam T
1320 .br
1321 .ft
1322 .
1323 .P
1324 except that it would work even if compatibility mode had been enabled.
1325 .
1326 Note that the previous compatibility mode is restored before any files
1327 sourced by
1328 .I xxx
1329 are interpreted.
1330 .
1331 .RE
1332 .
1333 .TP
1334 .BI .ds1\  xx\ yy
1335 Similar to
1336 .BR .ds , 
1337 but compatibility mode is switched off during expansion.
1338 .
1339 To be more precise, a `compatibility save' token is inserted at the
1340 beginning of the string, and a `compatibility restore' token at the end.
1341 .
1342 .TP
1343 .B .ecs
1344 Save current escape character.
1345 .
1346 .TP
1347 .B .ecr
1348 Restore escape character saved with
1349 .BR ecs .
1350 Without a previous call to
1351 .BR ecs ,
1352 .RB ` \[rs] '
1353 will be the new escape character.
1354 .
1355 .TP
1356 .BI .evc\  xx
1357 Copy the contents of environment
1358 .I xx
1359 to the current environment.
1360 .
1361 No pushing or popping of environments will be done.
1362 .
1363 .TP
1364 .BI .fam\  xx
1365 Set the current font family to
1366 .IR xx .
1367 The current font family is part of the current environment.
1368 If
1369 .I xx
1370 is missing, switch back to previous font family.
1371 .
1372 The value at start-up is `T'.
1373 .
1374 See the description of the
1375 .B sty
1376 request for more information on font families.
1377 .
1378 .TP
1379 .BI .fchar\  c\ string
1380 Define fallback glyph
1381 .I c
1382 to be
1383 .IR string .
1384 .
1385 The syntax of this request is the same as the
1386 .B char
1387 request; the only difference is that a glyph defined with
1388 .B char
1389 hides the glyph with the same name in the current font, whereas a
1390 glyph defined with
1391 .B fchar
1392 is checked only if the particular glyph isn't found in the current font.
1393 .
1394 This test happens before checking special fonts.
1395 .
1396 .TP
1397 .BI .fcolor\  c
1398 Set the fill color to
1399 .IR c .
1400 If
1401 .I c
1402 is missing,
1403 switch to the previous fill color.
1404 .
1405 .TP
1406 .BI .fschar\  f\ c\ string
1407 Define fallback glyph
1408 .I c
1409 for font
1410 .I f
1411 to be
1412 .IR string .
1413 .
1414 The syntax of this request is the same as the
1415 .B char
1416 request (with an additional argument to specify the font); a glyph
1417 defined with
1418 .B fschar
1419 is searched after the list of fonts declared with the
1420 .B fspecial
1421 request but before the list of fonts declared with
1422 .BR special .
1423 .
1424 .TP
1425 .BI .fspecial\  f\ s1\ s2\|.\|.\|.\&
1426 When the current font is
1427 .IR f ,
1428 fonts
1429 .IR s1 ,
1430 .IR s2 ,\|.\|.\|.\&
1431 will be special, that is, they will searched for glyphs not in
1432 the current font.
1433 .
1434 Any fonts specified in the
1435 .B special
1436 request will be searched after fonts specified in the
1437 .B fspecial
1438 request.
1439 .
1440 Without argument, reset the list of global special fonts to be empty.
1441 .
1442 .TP
1443 .BI .ftr\  f\ g
1444 Translate font
1445 .I f
1446 to
1447 .IR g .
1448 Whenever a font named
1449 .I f
1450 is referred to in an
1451 .B \[rs]f
1452 escape sequence, in the
1453 .B F
1454 and
1455 .B S
1456 conditional operators, or in the
1457 .BR ft ,
1458 .BR ul ,
1459 .BR bd ,
1460 .BR cs ,
1461 .BR tkf ,
1462 .BR special ,
1463 .BR fspecial ,
1464 .BR fp ,
1465 or
1466 .BR sty
1467 requests, font
1468 .I g
1469 will be used.
1470 If
1471 .I g
1472 is missing, or equal to
1473 .I f
1474 then font
1475 .I f
1476 will not be translated.
1477 .
1478 .TP
1479 .BI .gcolor\  c
1480 Set the glyph color to
1481 .IR c .
1482 If
1483 .I c
1484 is missing,
1485 switch to the previous glyph color.
1486 .
1487 .TP
1488 .BI .hcode \ c1\ code1\ c2\ code2\|.\|.\|.\&
1489 Set the hyphenation code of character
1490 .I c1
1491 to
1492 .I code1
1493 and that of
1494 .I c2
1495 to
1496 .IR code2 .
1497 A hyphenation code must be a single input character (not a special
1498 character) other than a digit or a space.
1499 .
1500 Initially each lower-case letter \%a-z has a hyphenation code, which is
1501 itself, and each upper-case letter \%A-Z has a hyphenation code which is
1502 the lower-case version of itself.
1503 .
1504 See also the
1505 .B hpf
1506 request.
1507 .
1508 .TP
1509 .BI .hla\  lang
1510 Set the current hyphenation language to
1511 .IR lang .
1512 Hyphenation exceptions specified with the
1513 .B hw
1514 request and hyphenation patterns specified with the
1515 .B hpf
1516 request are both associated with the current hyphenation language.
1517 .
1518 The
1519 .B hla
1520 request is usually invoked by the
1521 .B troffrc
1522 file.
1523 .
1524 .TP
1525 .BI .hlm\  n
1526 Set the maximum number of consecutive hyphenated lines to\~\c
1527 .IR n .
1528 If
1529 .I n
1530 is negative, there is no maximum.
1531 .
1532 The default value is\~\-1.
1533 .
1534 This value is associated with the current environment.
1535 .
1536 Only lines output from an environment count towards the maximum
1537 associated with that environment.
1538 .
1539 Hyphens resulting from
1540 .B \[rs]%
1541 are counted; explicit hyphens are not.
1542 .
1543 .TP
1544 .BI .hpf\  file
1545 Read hyphenation patterns from
1546 .IR file ;
1547 this will be searched for in the same way that
1548 .IB name .tmac
1549 is searched for when the
1550 .BI \-m name
1551 option is specified.
1552 .
1553 It should have the same format as (simple) \*[tx] patterns files.
1554 .
1555 More specifically, the following scanning rules are implemented.
1556 .
1557 .RS
1558 .IP \[bu]
1559 A percent sign starts a comment (up to the end of the line) even if
1560 preceded by a backslash.
1561 .
1562 .IP \[bu]
1563 No support for `digraphs' like
1564 .BR \[rs]$ .
1565 .
1566 .IP \[bu]
1567 .BI ^^ xx
1568 .RI ( x
1569 is 0-9 or a-f) and
1570 .BI ^^ x
1571 (character code of\~\c
1572 .I x
1573 in the range 0-127) are recognized; other use of
1574 .B ^
1575 causes an error.
1576 .
1577 .IP \[bu]
1578 No macro expansion.
1579 .
1580 .IP \[bu]
1581 .B hpf
1582 checks for the expression
1583 .B \[rs]patterns{.\|.\|.}
1584 (possibly with whitespace before and after the braces).
1585 .
1586 Everything between the braces is taken as hyphenation patterns.
1587 .
1588 Consequently,
1589 .B {
1590 and
1591 .B }
1592 are not allowed in patterns.
1593 .
1594 .IP \[bu]
1595 Similarly,
1596 .B \[rs]hyphenation{.\|.\|.}
1597 gives a list of hyphenation exceptions.
1598 .
1599 .IP \[bu]
1600 .B \[rs]endinput
1601 is recognized also.
1602 .
1603 .IP \[bu]
1604 For backwards compatibility, if
1605 .B \[rs]patterns
1606 is missing, the whole file is treated as a list of hyphenation patterns
1607 (only recognizing the
1608 .BR % \~\c
1609 character as the start of a comment).
1610 .RE
1611 .
1612 .IP
1613 Use the
1614 .B hpfcode
1615 request to map the encoding used in hyphenation patterns files to
1616 .BR groff 's
1617 input encoding.
1618 .IP
1619 The set of hyphenation patterns is associated with the current language
1620 set by the
1621 .B hla
1622 request.
1623 .
1624 The
1625 .B hpf
1626 request is usually invoked by the
1627 .B troffrc
1628 file; a second call replaces the old patterns with the new ones.
1629 .
1630 .TP
1631 .BI .hpfa\  file
1632 The same as
1633 .B hpf
1634 except that the hyphenation patterns from
1635 .I file
1636 are appended to the patterns already loaded in the current language.
1637 .
1638 .TP
1639 .BI .hpfcode\  a\ b\ c\ d\ .\|.\|.
1640 After reading a hyphenation patterns file with the
1641 .B hpf
1642 or
1643 .B hpfa
1644 request, convert all characters with character code\~\c
1645 .I a
1646 in the recently read patterns to character code\~\c
1647 .IR b ,
1648 character code\~\c
1649 .I c
1650 to\~\c
1651 .IR d ,
1652 etc.
1653 .
1654 Initially, all character codes map to themselves.
1655 .
1656 The arguments of
1657 .B hpfcode
1658 must be integers in the range 0 to\~255.
1659 .
1660 Note that it is even possible to use character codes which are invalid in
1661 .B groff
1662 otherwise.
1663 .
1664 .TP
1665 .BI .hym\  n
1666 Set the
1667 .I hyphenation margin
1668 to\~\c
1669 .IR n :
1670 when the current adjustment mode is not\~\c
1671 .BR b ,
1672 the line will not be hyphenated if the line is no more than
1673 .I n
1674 short.
1675 .
1676 The default hyphenation margin is\~0.
1677 .
1678 The default scaling indicator for this request is\~\c
1679 .IR m .
1680 The hyphenation margin is associated with the current environment.
1681 .
1682 The current hyphenation margin is available in the
1683 .B \[rs]n[.hym]
1684 register.
1685 .
1686 .TP
1687 .BI .hys\  n
1688 Set the
1689 .I hyphenation space
1690 to\~\c
1691 .IR n :
1692 when the current adjustment mode is\~\c
1693 .B b
1694 don't hyphenate the line if the line can be justified by adding no
1695 more than
1696 .I n
1697 extra space to each word space.
1698 .
1699 The default hyphenation space is\~0.
1700 .
1701 The default scaling indicator for this request is\~\c
1702 .BR m .
1703 The hyphenation space is associated with the current environment.
1704 .
1705 The current hyphenation space is available in the
1706 .B \[rs]n[.hys]
1707 register.
1708 .
1709 .TP
1710 .BI .itc\  n\ macro
1711 Variant of
1712 .B .it
1713 for which a line interrupted with
1714 .B \[rs]c
1715 counts as one input line.
1716 .
1717 .TP
1718 .BI .kern\  n
1719 If
1720 .I n
1721 is non-zero or missing, enable pairwise kerning, otherwise disable it.
1722 .
1723 .TP
1724 .BI .length\  xx\ string
1725 Compute the length of
1726 .I string
1727 and return it in the number register
1728 .I xx
1729 (which is not necessarily defined before).
1730 .
1731 .TP
1732 .BI .linetabs\  n
1733 If
1734 .I n
1735 is non-zero or missing, enable line-tabs mode, otherwise disable it
1736 (which is the default).
1737 .
1738 In line-tabs mode, tab distances are computed relative to the
1739 (current) output line.
1740 .
1741 Otherwise they are taken relative to the input line.
1742 .
1743 For example, the following
1744 .
1745 .RS
1746 .IP
1747 .ne 6v+\n(.Vu
1748 .ft CB
1749 .nf
1750 .Text .ds x a\[rs]t\[rs]c
1751 .Text .ds y b\[rs]t\[rs]c
1752 .Text .ds z c
1753 .Text .ta 1i 3i
1754 .Text \[rs]*x
1755 .Text \[rs]*y
1756 .Text \[rs]*z
1757 .fi
1758 .ft
1759 .RE
1760 .
1761 .IP
1762 yields
1763 .
1764 .RS
1765 .IP
1766 a         b         c
1767 .RE
1768 .
1769 .IP
1770 In line-tabs mode, the same code gives
1771 .
1772 .RS
1773 .IP
1774 a         b                   c
1775 .RE
1776 .
1777 .IP
1778 Line-tabs mode is associated with the current environment; the
1779 read-only number register
1780 .B \\[rs]n[.linetabs]
1781 is set to\~1 if in line-tabs mode, and 0 otherwise.
1782 .
1783 .TP
1784 .BI .mso\  file
1785 The same as the
1786 .B so
1787 request except that
1788 .I file
1789 is searched for in the same directories as macro files for the the
1790 .B \-m
1791 command line option.
1792 .
1793 If the file name to be included has the form
1794 .IB name .tmac
1795 and it isn't found,
1796 .B mso
1797 tries to include
1798 .BI tmac. name
1799 instead and vice versa.
1800 .
1801 .TP
1802 .BI .nop \ anything
1803 Execute
1804 .IR anything .
1805 This is similar to `.if\ 1'.
1806 .
1807 .TP
1808 .B .nroff
1809 Make the
1810 .B n
1811 built-in condition true and the
1812 .B t
1813 built-in condition false.
1814 .
1815 This can be reversed using the
1816 .B troff
1817 request.
1818 .
1819 .TP
1820 .BI .open\  stream\ filename
1821 Open
1822 .I filename
1823 for writing and associate the stream named
1824 .I stream
1825 with it.
1826 .
1827 See also the
1828 .B close
1829 and
1830 .B write
1831 requests.
1832 .
1833 .TP 
1834 .BI .opena\  stream\ filename
1835 Like
1836 .BR open ,
1837 but if
1838 .I filename
1839 exists, append to it instead of truncating it.
1840 .
1841 .TP
1842 .BI .output\  string
1843 Emit
1844 .I string
1845 directly to the intermediate output (subject to copy-mode interpretation);
1846 this is similar to
1847 .B \[rs]!
1848 used at the top level.
1849 .
1850 An initial double quote in
1851 .I string
1852 is stripped off to allow initial blanks.
1853 .
1854 .TP
1855 .B .pnr
1856 Print the names and contents of all currently defined number registers
1857 on stderr.
1858 .
1859 .TP
1860 .BI .psbb \ filename
1861 Get the bounding box of a PostScript image
1862 .IR filename .
1863 This file must conform to Adobe's Document Structuring Conventions;
1864 the command looks for a
1865 .B \%%%BoundingBox
1866 comment to extract the bounding box values.
1867 .
1868 After a successful call, the coordinates (in PostScript units) of the
1869 lower left and upper right corner can be found in the registers
1870 .BR \[rs]n[llx] ,
1871 .BR \[rs]n[lly] ,
1872 .BR \[rs]n[urx] ,
1873 and
1874 .BR \[rs]n[ury] ,
1875 respectively.
1876 .
1877 If some error has occurred, the four registers are set to zero.
1878 .
1879 .TP
1880 .BI .pso \ command
1881 This behaves like the
1882 .B so
1883 request except that input comes from the standard output of
1884 .IR command .
1885 .
1886 .TP
1887 .B .ptr
1888 Print the names and positions of all traps (not including input line
1889 traps and diversion traps) on stderr.
1890 .
1891 Empty slots in the page trap list are printed as well, because they
1892 can affect the priority of subsequently planted traps.
1893 .
1894 .TP
1895 .BI .pvs \ \[+-]n
1896 Set the post-vertical line space to
1897 .IR n ;
1898 default scale indicator is\~\c
1899 .BR p .
1900 .
1901 This value will be added to each line after it has been output.
1902 .
1903 With no argument, the post-vertical line space is set to its previous
1904 value.
1905 .
1906 .IP
1907 The total vertical line spacing consists of four components:
1908 .B .vs
1909 and
1910 .B \[rs]x
1911 with a negative value which are applied before the line is output, and
1912 .B .pvs
1913 and
1914 .B \[rs]x
1915 with a positive value which are applied after the line is output.
1916 .
1917 .TP
1918 .BI .rchar\  c1\ c2\|.\|.\|.\&
1919 Remove the definitions of glyphs
1920 .IR c1 ,
1921 .IR c2 ,\|.\|.\|.
1922 This undoes the effect of a
1923 .B char
1924 request.
1925 .
1926 .TP
1927 .B .return
1928 Within a macro, return immediately.
1929 .
1930 If called with an argument, return twice, namely from the current macro and
1931 from the macro one level higher.
1932 .
1933 No effect otherwise.
1934 .
1935 .TP
1936 .BI .rfschar\  c1\ c2\|.\|.\|.\&
1937 Remove the font-specific definitions of glyphs
1938 .IR c1 ,
1939 .IR c2 ,\|.\|.\|.
1940 This undoes the effect of a
1941 .B fschar
1942 request.
1943 .
1944 .TP
1945 .B .rj
1946 .TQ
1947 .BI .rj \~n
1948 Right justify the next
1949 .IR n \~\c
1950 input lines.
1951 .
1952 Without an argument right justify the next input line.
1953 .
1954 The number of lines to be right justified is available in the
1955 .B \[rs]n[.rj]
1956 register.
1957 .
1958 This implicitly does
1959 .BR .ce \~0 .
1960 The
1961 .B ce
1962 request implicitly does
1963 .BR .rj \~0 .
1964 .
1965 .TP
1966 .BI .rnn \ xx\ yy
1967 Rename number register
1968 .I xx
1969 to
1970 .IR yy .
1971 .
1972 .TP
1973 .BI .schar\  c\ string
1974 Define global fallback glyph
1975 .I c
1976 to be
1977 .IR string .
1978 .
1979 The syntax of this request is the same as the
1980 .B char
1981 request; a glyph defined with
1982 .B schar
1983 is searched after the list of fonts declared with the
1984 .B special
1985 request but before the mounted special fonts.
1986 .
1987 .TP
1988 .BI .shc\  c
1989 Set the soft hyphen character to
1990 .IR c .
1991 If
1992 .I c
1993 is omitted, the soft hyphen character will be set to the default
1994 .BR \[rs](hy .
1995 The soft hyphen character is the glyph which will be inserted when
1996 a word is hyphenated at a line break.
1997 .
1998 If the soft hyphen character does not exist in the font of the
1999 glyph immediately preceding a potential break point, then the line
2000 will not be broken at that point.
2001 .
2002 Neither definitions (specified with the
2003 .B char
2004 request) nor translations (specified with the
2005 .B tr
2006 request) are considered when finding the soft hyphen character.
2007 .
2008 .TP
2009 .BI .shift\  n
2010 In a macro, shift the arguments by
2011 .I n
2012 positions: argument\~\c
2013 .I i
2014 becomes argument
2015 .IR i \- n ;
2016 arguments 1 to\~\c
2017 .I n
2018 will no longer be available.
2019 .
2020 If
2021 .I n
2022 is missing, arguments will be shifted by\~1.
2023 .
2024 Shifting by negative amounts is currently undefined.
2025 .
2026 .TP
2027 .BI .sizes\  s1\ s2\|.\|.\|.\|sn\  [0]
2028 This command is similar to the
2029 .B sizes
2030 command of a
2031 .B DESC
2032 file.
2033 .
2034 It sets the available font sizes for the current font to
2035 .IR s1 ,
2036 .IR s2 ,\|.\|.\|.\|,\~ sn
2037 scaled points.
2038 .
2039 The list of sizes can be terminated by an optional\~\c
2040 .BR 0 .
2041 .
2042 Each
2043 .I si
2044 can also be a range of sizes
2045 .IR m - n .
2046 .
2047 Contrary to the font file command, the list can't extend over more
2048 than a single line.
2049 .
2050 .TP
2051 .BI .special\  s1\ s2\|.\|.\|.\&
2052 Fonts
2053 .IR s1 ,
2054 .IR s2 ,
2055 are special and will be searched for glyphs not in the current
2056 font.
2057 .
2058 Without arguments, reset the list of special fonts to be empty.
2059 .
2060 .TP
2061 .BI .spreadwarn\  limit
2062 Make
2063 .B troff
2064 emit a warning if the additional space inserted for each space between
2065 words in an output line is larger or equal to
2066 .IR limit .
2067 .
2068 A negative value is changed to zero; no argument toggles the warning on
2069 and off without changing
2070 .IR limit .
2071 .
2072 The default scaling indicator is\~\c
2073 .BR m .
2074 .
2075 At startup,
2076 .B spreadwarn
2077 is deactivated, and
2078 .I limit
2079 is set to 3m.
2080 .
2081 For example,
2082 .B .spreadwarn\ 0.2m
2083 will cause a warning if
2084 .B troff
2085 must add 0.2m or more for each interword space in a line.
2086 .
2087 This request is active only if text is justified to both margins (using
2088 .BR .ad\ b ).
2089 .
2090 .TP
2091 .BI .sty\  n\ f
2092 Associate style\~\c
2093 .I f
2094 with font position\~\c
2095 .IR n .
2096 A font position can be associated either with a font or with a style.
2097 .
2098 The current font is the index of a font position and so is also either
2099 a font or a style.
2100 .
2101 When it is a style, the font that is actually used is the font the
2102 name of which is the concatenation of the name of the current family
2103 and the name of the current style.
2104 .
2105 For example, if the current font is\~1 and font position\~1 is
2106 associated with style\~\c
2107 .B R
2108 and the current font family is\~\c
2109 .BR T ,
2110 then font
2111 .BR TR
2112 will be used.
2113 .
2114 If the current font is not a style, then the current family is ignored.
2115 .
2116 When the requests
2117 .BR cs ,
2118 .BR bd ,
2119 .BR tkf ,
2120 .BR uf ,
2121 or
2122 .B fspecial
2123 are applied to a style, then they will instead be applied to the
2124 member of the current family corresponding to that style.
2125 .
2126 The default family can be set with the
2127 .B \-f
2128 option.
2129 .
2130 The
2131 .B styles
2132 command in the
2133 .SM DESC
2134 file controls which font positions (if any) are initially associated
2135 with styles rather than fonts.
2136 .
2137 .TP
2138 .BI .substring\  xx\ n1\  [ n2 ]
2139 Replace the string named
2140 .I xx
2141 with the substring defined by the indices
2142 .I n1
2143 and
2144 .IR n2 .
2145 The first character in the string has index\~0.
2146 .
2147 If
2148 .I n2
2149 is omitted, it is taken to be equal to the string's length.
2150 .
2151 If the index value
2152 .I n1
2153 or
2154 .I n2
2155 is negative, it will be counted from the end of the string,
2156 going backwards:
2157 .
2158 The last character has index\~-1, the character before the last
2159 character has index\~-2, etc.
2160 .
2161 .TP
2162 .BI .tkf\  f\ s1\ n1\ s2\ n2
2163 Enable track kerning for font
2164 .IR f .
2165 When the current font is
2166 .I f
2167 the width of every glyph will be increased by an amount between
2168 .I n1
2169 and
2170 .IR n2 ;
2171 when the current point size is less than or equal to
2172 .I s1
2173 the width will be increased by
2174 .IR n1 ;
2175 when it is greater than or equal to
2176 .I s2
2177 the width will be increased by
2178 .IR n2 ;
2179 when the point size is greater than or equal to
2180 .I s1
2181 and less than or equal to
2182 .I s2
2183 the increase in width is a linear function of the point size.
2184 .
2185 .TP
2186 .BI .tm1\  string
2187 Similar to the
2188 .B tm
2189 request,
2190 .I string
2191 is read in copy mode and written on the standard error, but an initial
2192 double quote in
2193 .I string
2194 is stripped off to allow initial blanks.
2195 .
2196 .TP
2197 .BI .tmc\  string
2198 Similar to
2199 .B tm1
2200 but without writing a final newline.
2201 .
2202 .TP
2203 .BI .trf\  filename
2204 Transparently output the contents of file
2205 .IR filename .
2206 Each line is output as if preceded by
2207 .BR \[rs]! ;
2208 however, the lines are not subject to copy-mode interpretation.
2209 .
2210 If the file does not end with a newline, then a newline will be added.
2211 .
2212 For example, you can define a macro\~\c
2213 .I x
2214 containing the contents of file\~\c
2215 .IR f ,
2216 using
2217 .
2218 .RS
2219 .IP
2220 .ne 2v+\n(.Vu
2221 .ft CB
2222 .nf
2223 .Text .di x
2224 .Text .trf f
2225 .Text .di
2226 .fi
2227 .ft
2228 .RE
2229 .
2230 .IP
2231 Unlike with the
2232 .B cf
2233 request, the file cannot contain characters such as
2234 .SM NUL
2235 that are not legal troff input characters.
2236 .
2237 .TP
2238 .BI .trin\  abcd
2239 This is the same as the
2240 .B tr
2241 request except that the
2242 .B asciify
2243 request will use the character code (if any) before the character
2244 translation.
2245 .
2246 Example:
2247 .
2248 .RS
2249 .IP
2250 .nf
2251 .ft CB
2252 .Text .trin ax
2253 .Text .di xxx
2254 .Text a
2255 .Text .br
2256 .Text .di
2257 .Text .xxx
2258 .Text .trin aa
2259 .Text .asciify xxx
2260 .Text .xxx
2261 .fi
2262 .ft
2263 .RE
2264 .
2265 .IP
2266 The result is
2267 .BR x\ a .
2268 .
2269 Using
2270 .BR tr ,
2271 the result would be
2272 .BR x\ x .
2273 .
2274 .TP
2275 .BI .trnt\  abcd
2276 This is the same as the
2277 .B tr
2278 request except that the translations do not apply to text that is
2279 transparently throughput into a diversion with
2280 .BR \[rs]! .
2281 For example,
2282 .
2283 .RS
2284 .IP
2285 .nf
2286 .ft CB
2287 .Text .tr ab
2288 .Text .di x
2289 .Text \[rs]!.tm a
2290 .Text .di
2291 .Text .x
2292 .fi
2293 .ft
2294 .RE
2295 .
2296 .IP
2297 will print\~\c
2298 .BR b ;
2299 if
2300 .B trnt
2301 is used instead of
2302 .B tr
2303 it will print\~\c
2304 .BR a .
2305 .RE
2306 .
2307 .TP
2308 .B .troff
2309 Make the
2310 .B n
2311 built-in condition false, and the
2312 .B t
2313 built-in condition true.
2314 .
2315 This undoes the effect of the
2316 .B nroff
2317 request.
2318 .
2319 .TP
2320 .BI .unformat\  xx
2321 This request `unformats' the diversion
2322 .IR xx .
2323 Contrary to the
2324 .B .asciify
2325 request, which tries to convert formatted elements of the diversion
2326 back to input tokens as much as possible,
2327 .B .unformat
2328 will only handle tabs and spaces between words (usually caused by
2329 spaces or newlines in the input) specially.
2330 .
2331 The former are treated as if they were input tokens, and the latter
2332 are stretchable again.
2333 .
2334 Note that the vertical size of lines is not preserved.
2335 .
2336 Glyph information (font, font size, space width, etc.) is retained.
2337 .
2338 Useful in conjunction with the
2339 .B .box
2340 and
2341 .B .boxa
2342 requests.
2343 .
2344 .TP
2345 .BI .vpt\  n
2346 Enable vertical position traps if
2347 .I n
2348 is non-zero, disable them otherwise.
2349 .
2350 Vertical position traps are traps set by the
2351 .B wh
2352 or
2353 .B dt
2354 requests.
2355 .
2356 Traps set by the
2357 .B it
2358 request are not vertical position traps.
2359 .
2360 The parameter that controls whether vertical position traps are
2361 enabled is global.
2362 .
2363 Initially vertical position traps are enabled.
2364 .
2365 .TP
2366 .BI .warn\  n
2367 Control warnings.
2368 .I n
2369 is the sum of the numbers associated with each warning that is to be
2370 enabled; all other warnings will be disabled.
2371 .
2372 The number associated with each warning is listed in
2373 .BR @g@troff (@MAN1EXT@).
2374 .
2375 For example,
2376 .B .warn\~0
2377 will disable all warnings, and
2378 .B .warn\~1
2379 will disable all warnings except that about missing glyphs.
2380 .
2381 If
2382 .I n
2383 is not given, all warnings will be enabled.
2384 .
2385 .TP
2386 .BI .warnscale\  si
2387 Set the scaling indicator used in warnings to
2388 .IR si .
2389 .
2390 Valid values for
2391 .I si
2392 are
2393 .BR u ,
2394 .BR i ,
2395 .BR c ,
2396 .BR p ,
2397 and
2398 .BR P .
2399 .
2400 At startup, it is set to\~\c
2401 .BR i .
2402 .
2403 .TP
2404 .BI .while \ c\ anything
2405 While condition\~\c
2406 .I c
2407 is true, accept
2408 .I anything
2409 as input;
2410 .IR c \~\c
2411 can be any condition acceptable to an
2412 .B if
2413 request;
2414 .I anything
2415 can comprise multiple lines if the first line starts with
2416 .B \[rs]{
2417 and the last line ends with
2418 .BR \[rs]} .
2419 See also the
2420 .B break
2421 and
2422 .B continue
2423 requests.
2424 .
2425 .TP
2426 .BI .write\  stream\ anything
2427 Write
2428 .I anything
2429 to the stream named
2430 .IR stream .
2431 .I stream
2432 must previously have been the subject of an
2433 .B open
2434 request.
2435 .I anything
2436 is read in copy mode;
2437 a leading\~\c
2438 .B \[dq]
2439 will be stripped.
2440 .
2441 .TP
2442 .BI .writec\  stream\ anything
2443 Similar to
2444 .B write
2445 but without writing a final newline.
2446 .
2447 .TP
2448 .BI .writem\  stream\ xx
2449 Write the contents of the macro or string
2450 .I xx
2451 to the stream named
2452 .IR stream .
2453 .I stream
2454 must previously have been the subject of an
2455 .B open
2456 request.
2457 .I xx
2458 is read in copy mode.
2459 .
2460 .
2461 .\" --------------------------------------------------------------------
2462 .SS "Extended escape sequences"
2463 .\" --------------------------------------------------------------------
2464 .
2465 .TP
2466 .BI \[rs]D' .\|.\|. '
2467 All drawing commands of groff's intermediate output are accepted.
2468 .
2469 See subsection
2470 .B "Drawing Commands"
2471 below for more information.
2472 .
2473 .
2474 .\" --------------------------------------------------------------------
2475 .SS "Extended requests"
2476 .\" --------------------------------------------------------------------
2477 .
2478 .TP
2479 .BI .cf\  filename
2480 When used in a diversion, this will embed in the diversion an object
2481 which, when reread, will cause the contents of
2482 .I filename
2483 to be transparently copied through to the output.
2484 .
2485 In UNIX troff, the contents of
2486 .I filename
2487 is immediately copied through to the output regardless of whether
2488 there is a current diversion; this behaviour is so anomalous that it
2489 must be considered a bug.
2490 .
2491 .TP
2492 .BI .de\  xx\ yy
2493 .TQ
2494 .BI .am\  xx\ yy
2495 .TQ
2496 .BI .ds\  xx\ yy
2497 .TQ
2498 .BI .as\  xx\ yy
2499 In compatibility mode, these requests behaves similar to
2500 .BR .de1 ,
2501 .BR .am1 ,
2502 .BR .ds1 ,
2503 and
2504 .BR .as1 ,
2505 respectively: A `compatibility save' token is inserted at the
2506 beginning, and a `compatibility restore' token at the end, with
2507 compatibility mode switched on during execution.
2508 .
2509 .TP
2510 .BI .ev\  xx
2511 If
2512 .I xx
2513 is not a number, this will switch to a named environment called
2514 .IR xx .
2515 The environment should be popped with a matching
2516 .B ev
2517 request without any arguments, just as for numbered environments.
2518 .
2519 There is no limit on the number of named environments; they will be
2520 created the first time that they are referenced.
2521 .
2522 .TP
2523 .BI .ss\  m\ n
2524 When two arguments are given to the
2525 .B ss
2526 request, the second argument gives the
2527 .IR "sentence space size" .
2528 If the second argument is not given, the sentence space size
2529 will be the same as the word space size.
2530 .
2531 Like the word space size, the sentence space is in units of
2532 one twelfth of the spacewidth parameter for the current font.
2533 .
2534 Initially both the word space size and the sentence
2535 space size are\~12.
2536 .
2537 Contrary to UNIX troff, GNU troff handles this request in nroff mode
2538 also; a given value is then rounded down to the nearest multiple
2539 of\~12.
2540 .
2541 The sentence space size is used in two circumstances.
2542 .
2543 If the end of a sentence occurs at the end of a line in fill mode,
2544 then both an inter-word space and a sentence space will be added; if
2545 two spaces follow the end of a sentence in the middle of a line, then
2546 the second space will be a sentence space.
2547 .
2548 Note that the behaviour of UNIX troff will be exactly that exhibited
2549 by GNU troff if a second argument is never given to the
2550 .B ss
2551 request.
2552 .
2553 In GNU troff, as in UNIX troff, you should always follow a sentence
2554 with either a newline or two spaces.
2555 .
2556 .TP
2557 .BI .ta\  n1\ n2\|.\|.\|.nn \ T\  r1\ r2\|.\|.\|.\|rn
2558 Set tabs at positions
2559 .IR n1 ,
2560 .IR n2 ,\|.\|.\|.\|,
2561 .I nn
2562 and then set tabs at
2563 .IR nn + r1 ,
2564 .IR nn + r2 ,\|.\|.\|.\|,
2565 .IR nn + rn
2566 and then at
2567 .IR nn + rn + r1 ,
2568 .IR nn + rn + r2 ,\|.\|.\|.\|,
2569 .IR nn + rn + rn ,
2570 and so on.
2571 For example,
2572 .
2573 .RS
2574 .IP
2575 .ft CB
2576 .Text .ta T .5i
2577 .br
2578 .ft
2579 .
2580 .P
2581 will set tabs every half an inch.
2582 .RE
2583 .
2584 .
2585 .\" --------------------------------------------------------------------
2586 .SS "New number registers"
2587 .\" --------------------------------------------------------------------
2588 .
2589 The following read-only registers are available:
2590 .
2591 .TP
2592 .B \[rs]n[.C]
2593 1\~if compatibility mode is in effect, 0\~otherwise.
2594 .
2595 .TP
2596 .B \[rs]n[.cdp]
2597 The depth of the last glyph added to the current environment.
2598 .
2599 It is positive if the glyph extends below the baseline.
2600 .
2601 .TP
2602 .B \[rs]n[.ce]
2603 The number of lines remaining to be centered, as set by the
2604 .B ce
2605 request.
2606 .
2607 .TP
2608 .B \[rs]n[.cht]
2609 The height of the last glyph added to the current environment.
2610 .
2611 It is positive if the glyph extends above the baseline.
2612 .
2613 .TP
2614 .B \[rs]n[.color]
2615 1\~if colors are enabled, 0\~otherwise.
2616 .
2617 .TP
2618 .B \[rs]n[.csk]
2619 The skew of the last glyph added to the current environment.
2620 .
2621 The
2622 .I skew
2623 of a glyph is how far to the right of the center of a glyph
2624 the center of an accent over that glyph should be placed.
2625 .
2626 .TP
2627 .B \[rs]n[.ev]
2628 The name or number of the current environment.
2629 .
2630 This is a string-valued register.
2631 .
2632 .TP
2633 .B \[rs]n[.fam]
2634 The current font family.
2635 .
2636 This is a string-valued register.
2637 .
2638 .TP
2639 .B \[rs]n[.fn]
2640 The current (internal) real font name.
2641 .
2642 This is a string-valued register.
2643 .
2644 If the current font is a style, the value of
2645 .B \[rs]n[.fn]
2646 is the proper concatenation of family and style name.
2647 .
2648 .TP
2649 .B \[rs]n[.fp]
2650 The number of the next free font position.
2651 .
2652 .TP
2653 .B \[rs]n[.g]
2654 Always\~1.
2655 .
2656 Macros should use this to determine whether they are running under GNU
2657 troff.
2658 .
2659 .TP
2660 .B \[rs]n[.height]
2661 The current height of the font as set with
2662 .BR \[rs]H .
2663 .
2664 .TP
2665 .B \[rs]n[.hla]
2666 The current hyphenation language as set by the
2667 .B hla
2668 request.
2669 .
2670 .TP
2671 .B \[rs]n[.hlc]
2672 The number of immediately preceding consecutive hyphenated lines.
2673 .
2674 .TP
2675 .B \[rs]n[.hlm]
2676 The maximum allowed number of consecutive hyphenated lines, as set by
2677 the
2678 .B hlm
2679 request.
2680 .
2681 .TP
2682 .B \[rs]n[.hy]
2683 The current hyphenation flags (as set by the
2684 .B hy
2685 request).
2686 .
2687 .TP
2688 .B \[rs]n[.hym]
2689 The current hyphenation margin (as set by the
2690 .B hym
2691 request).
2692 .
2693 .TP
2694 .B \[rs]n[.hys]
2695 The current hyphenation space (as set by the
2696 .B hys
2697 request).
2698 .
2699 .TP
2700 .B \[rs]n[.in]
2701 The indent that applies to the current output line.
2702 .
2703 .TP
2704 .B \[rs]n[.int]
2705 Set to a positive value if last output line is interrupted (i.e., if
2706 it contains
2707 .IR \[rs]c ).
2708 .
2709 .TP
2710 .B \[rs]n[.kern]
2711 1\~if pairwise kerning is enabled, 0\~otherwise.
2712 .
2713 .TP
2714 .B \[rs]n[.lg]
2715 The current ligature mode (as set by the
2716 .B lg
2717 request).
2718 .
2719 .TP
2720 .B \[rs]n[.linetabs]
2721 The current line-tabs mode (as set by the
2722 .B linetabs
2723 request).
2724 .
2725 .TP
2726 .B \[rs]n[.ll]
2727 The line length that applies to the current output line.
2728 .
2729 .TP
2730 .B \[rs]n[.lt]
2731 The title length as set by the
2732 .B lt
2733 request.
2734 .
2735 .TP
2736 .B \[rs]n[.m]
2737 The name of the current drawing color.
2738 .
2739 This is a string-valued register.
2740 .
2741 .TP
2742 .B \[rs]n[.M]
2743 The name of the current background color.
2744 .
2745 This is a string-valued register.
2746 .
2747 .TP
2748 .B \[rs]n[.ne]
2749 The amount of space that was needed in the last
2750 .B ne
2751 request that caused a trap to be sprung.
2752 .
2753 Useful in conjunction with the
2754 .B \[rs]n[.trunc]
2755 register.
2756 .
2757 .TP
2758 .B \[rs]n[.ns]
2759 1\~if no-space mode is active, 0\~otherwise.
2760 .
2761 .TP
2762 .B \[rs]n[.pe]
2763 1\~during a page ejection caused by the
2764 .B bp
2765 request, 0\~otherwise.
2766 .
2767 .TP
2768 .B \[rs]n[.pn]
2769 The number of the next page, either the value set by a
2770 .B pn
2771 request, or the number of the current page plus\~1.
2772 .
2773 .TP
2774 .B \[rs]n[.ps]
2775 The current pointsize in scaled points.
2776 .
2777 .TP
2778 .B \[rs]n[.psr]
2779 The last-requested pointsize in scaled points.
2780 .
2781 .TP
2782 .B \[rs]n[.pvs]
2783 The current post-vertical line space as set with the
2784 .B pvs
2785 request.
2786 .
2787 .TP
2788 .B \[rs]n[.rj]
2789 The number of lines to be right-justified as set by the
2790 .B rj
2791 request.
2792 .
2793 .TP
2794 .B \[rs]n[.slant]
2795 The slant of the current font as set with
2796 .BR \[rs]S .
2797 .
2798 .TP
2799 .B \[rs]n[.sr]
2800 The last requested pointsize in points as a decimal fraction.
2801 .
2802 This is a string-valued register.
2803 .
2804 .TP
2805 .B \[rs]n[.ss]
2806 .TQ
2807 .B \[rs]n[.sss]
2808 These give the values of the parameters set by the first and second
2809 arguments of the
2810 .B ss
2811 request.
2812 .
2813 .TP
2814 .B \[rs]n[.sty]
2815 The current font style.
2816 .
2817 This is a string-valued register.
2818 .
2819 .TP
2820 .B \[rs]n[.tabs]
2821 A string representation of the current tab settings suitable for use
2822 as an argument to the
2823 .B ta
2824 request.
2825 .
2826 .TP
2827 .B \[rs]n[.trunc]
2828 The amount of vertical space truncated by the most recently sprung
2829 vertical position trap, or, if the trap was sprung by a
2830 .B ne
2831 request, minus the amount of vertical motion produced by the
2832 .B ne
2833 request.
2834 .
2835 In  other  words, at the point  a  trap is  sprung,  it represents the
2836 difference of  what the vertical position  would have been but for the
2837 trap, and what the vertical position actually is.
2838 .
2839 Useful in conjunction with the
2840 .B \[rs]n[.ne]
2841 register.
2842 .
2843 .TP
2844 .B \[rs]n[.U]
2845 Set to 1 if in safer mode and to 0 if in unsafe mode (as given with the
2846 .B \-U
2847 command line option).
2848 .
2849 .TP
2850 .B \[rs]n[.vpt]
2851 1\~if vertical position traps are enabled, 0\~otherwise.
2852 .
2853 .TP
2854 .B \[rs]n[.warn]
2855 The sum of the numbers associated with each of the currently enabled
2856 warnings.
2857 .
2858 The number associated with each warning is listed in
2859 .BR @g@troff (@MAN1EXT@).
2860 .
2861 .TP
2862 .B \[rs]n[.x]
2863 The major version number.
2864 .
2865 For example, if the version number is 1.03, then
2866 .B \[rs]n[.x]
2867 will contain\~1.
2868 .
2869 .TP
2870 .B \[rs]n[.y]
2871 The minor version number.
2872 .
2873 For example, if the version number is 1.03, then
2874 .B \[rs]n[.y]
2875 will contain\~03.
2876 .
2877 .TP
2878 .B \[rs]n[.Y]
2879 The revision number of groff.
2880 .
2881 .TP
2882 .B \[rs]n[llx]
2883 .TQ
2884 .B \[rs]n[lly]
2885 .TQ
2886 .B \[rs]n[urx]
2887 .TQ
2888 .B \[rs]n[ury]
2889 These four registers are set by the
2890 .B .psbb
2891 request and contain the bounding box values (in PostScript units) of a
2892 given PostScript image.
2893 .
2894 .P
2895 The following read/write registers are set by the
2896 .B \[rs]w
2897 escape sequence:
2898 .
2899 .TP
2900 .B \[rs]n[rst]
2901 .TQ
2902 .B \[rs]n[rsb]
2903 Like the
2904 .B st
2905 and
2906 .B sb
2907 registers, but take account of the heights and depths of glyphs.
2908 .
2909 .TP
2910 .B \[rs]n[ssc]
2911 The amount of horizontal space (possibly negative) that should be
2912 added to the last glyph before a subscript.
2913 .
2914 .TP
2915 .B \[rs]n[skw]
2916 How far to right of the center of the last glyph in the
2917 .B \[rs]w
2918 argument, the center of an accent from a roman font should be placed
2919 over that glyph.
2920 .
2921 .P
2922 Other available read/write number registers are:
2923 .
2924 .TP
2925 .B \[rs]n[c.]
2926 The current input line number.
2927 .B \[rs]n[.c]
2928 is a read-only alias to this register.
2929 .
2930 .TP
2931 .B \[rs]n[hours]
2932 The number of hours past midnight.
2933 .
2934 Initialized at start-up.
2935 .
2936 .TP
2937 .B \[rs]n[hp]
2938 The current horizontal position at input line.
2939 .
2940 .TP
2941 .B \[rs]n[minutes]
2942 The number of minutes after the hour.
2943 .
2944 Initialized at start-up.
2945 .
2946 .TP
2947 .B \[rs]n[seconds]
2948 The number of seconds after the minute.
2949 .
2950 Initialized at start-up.
2951 .
2952 .TP
2953 .B \[rs]n[systat]
2954 The return value of the system() function executed by the last
2955 .B sy
2956 request.
2957 .
2958 .TP
2959 .B \[rs]n[slimit]
2960 If greater than\~0, the maximum number of objects on the input stack.
2961 .
2962 If less than or equal to\~0, there is no limit on the number of
2963 objects on the input stack.
2964 .
2965 With no limit, recursion can continue until virtual memory is
2966 exhausted.
2967 .
2968 .TP
2969 .B \[rs]n[year]
2970 The current year.
2971 .
2972 Note that the traditional
2973 .B troff
2974 number register
2975 .B \[rs]n[yr]
2976 is the current year minus 1900.
2977 .
2978 .
2979 .\" --------------------------------------------------------------------
2980 .SS Miscellaneous
2981 .\" --------------------------------------------------------------------
2982 .
2983 .B @g@troff
2984 predefines a single (read/write) string-based register,
2985 .BR \[rs]*(.T ,
2986 which contains the argument given to the
2987 .B \-T
2988 command line option, namely the current output device (for example,
2989 .I latin1
2990 or
2991 .IR ascii ).
2992 Note that this is not the same as the (read-only) number register
2993 .B \[rs]n[.T]
2994 which is defined to be\~1 if
2995 .B troff
2996 is called with the
2997 .B \-T
2998 command line option, and zero otherwise.
2999 .
3000 This behaviour is different to UNIX troff.
3001 .
3002 .P
3003 Fonts not listed in the
3004 .SM DESC
3005 file are automatically mounted on the next available font position
3006 when they are referenced.
3007 .
3008 If a font is to be mounted explicitly with the
3009 .B fp
3010 request on an unused font position, it should be mounted on the first
3011 unused font position, which can be found in the
3012 .B \[rs]n[.fp]
3013 register; although
3014 .B troff
3015 does not enforce this strictly, it will not allow a font to be mounted
3016 at a position whose number is much greater than that of any currently
3017 used position.
3018 .
3019 .P
3020 Interpolating a string does not hide existing macro arguments.
3021 .
3022 Thus in a macro, a more efficient way of doing
3023 .
3024 .IP
3025 .BI . xx\  \[rs]\[rs]$@
3026 .P
3027 is
3028 .
3029 .IP
3030 .BI \[rs]\[rs]*[ xx ]\[rs]\[rs]  
3031 .
3032 .P
3033 If the font description file contains pairwise kerning information,
3034 glyphs from that font will be kerned.
3035 .
3036 Kerning between two glyphs can be inhibited by placing a
3037 .B \[rs]&
3038 between them.
3039 .
3040 .P
3041 In a string comparison in a condition, characters that appear at
3042 different input levels to the first delimiter character will not be
3043 recognised as the second or third delimiters.
3044 .
3045 This applies also to the
3046 .B tl
3047 request.
3048 .
3049 In a
3050 .B \[rs]w
3051 escape sequence, a character that appears at a different input level
3052 to the starting delimiter character will not be recognised as the
3053 closing delimiter character.
3054 .
3055 The same is true for
3056 .BR \[rs]A ,
3057 .BR \[rs]b ,
3058 .BR \[rs]B ,
3059 .BR \[rs]C ,
3060 .BR \[rs]l ,
3061 .BR \[rs]L ,
3062 .BR \[rs]o ,
3063 .BR \[rs]X ,
3064 and
3065 .BR \[rs]Z .
3066 .
3067 When decoding a macro or string argument that is delimited by double
3068 quotes, a character that appears at a different input level to the starting
3069 delimiter character will not be recognised as the closing delimiter
3070 character.
3071 .
3072 The implementation of
3073 .B \[rs]$@
3074 ensures that the double quotes surrounding an argument will appear the
3075 same input level, which will be different to the input level of the
3076 argument itself.
3077 .
3078 In a long escape name
3079 .B ]
3080 will not be recognized as a closing delimiter except when it occurs at
3081 the same input level as the opening
3082 .BR ] .
3083 .
3084 In compatibility mode, no attention is paid to the input-level.
3085 .
3086 .P
3087 There are some new types of condition:
3088 .
3089 .TP
3090 .BI .if\ r xxx
3091 True if there is a number register named
3092 .IR xxx .
3093 .
3094 .TP
3095 .BI .if\ d xxx
3096 True if there is a string, macro, diversion, or request named
3097 .IR xxx .
3098 .
3099 .TP
3100 .BI .if\ m xxx
3101 True if there is a color named
3102 .IR xxx .
3103 .
3104 .TP
3105 .BI .if\ c ch
3106 True if there is a glyph
3107 .IR ch
3108 available;
3109 .I ch
3110 is either an
3111 .SM ASCII
3112 character or a glyph (special character)
3113 .BI \[rs]( xx
3114 or
3115 .BI \[rs][ xxx ]\f[R];
3116 the condition will also be true if
3117 .I ch
3118 has been defined by the
3119 .B char
3120 request.
3121 .
3122 .TP
3123 .BI .if\ F f
3124 True if font
3125 .I f
3126 exists.
3127 .
3128 .B f
3129 is handled as if it was opened with the
3130 .B ft
3131 request (this is, font translation and styles are applied), without
3132 actually mounting it.
3133 .
3134 .TP
3135 .BI .if\ S s
3136 True if style
3137 .I s
3138 has been registered.
3139 .
3140 Font translation is applied.
3141 .
3142 .P
3143 The
3144 .B tr
3145 request can now map characters onto
3146 .BR \[rs]~ .
3147 .
3148 .P
3149 It is now possible to have whitespace between the first and second dot
3150 (or the name of the ending macro) to end a macro definition.
3151 .
3152 Example:
3153 .
3154 .IP
3155 .ne 6v+\n(.Vu
3156 .ft CB
3157 .nf
3158 .Text .if t \[rs]{\[rs]
3159 .Text .  de bar
3160 .Text .    nop Hello, I'm `bar'.
3161 .Text .  .
3162 .Text .\[rs]}
3163 .fi
3164 .
3165 .
3166 .\" --------------------------------------------------------------------
3167 .SH "INTERMEDIATE OUTPUT FORMAT"
3168 .\" --------------------------------------------------------------------
3169 .
3170 This section describes the format output by GNU troff.
3171 .
3172 The output format used by GNU troff is very similar to that used
3173 by Unix device-independent troff.
3174 .
3175 Only the differences are documented here.
3176 .
3177 .
3178 .\" --------------------------------------------------------------------
3179 .SS "Units"
3180 .\" --------------------------------------------------------------------
3181 .
3182 The argument to the
3183 .B s
3184 command is in scaled points (units of
3185 .RI points/ n ,
3186 where
3187 .I n
3188 is the argument to the
3189 .B sizescale
3190 command  in the DESC file).
3191 .
3192 The argument to the
3193 .B x\ Height
3194 command is also in scaled points.
3195 .
3196 .
3197 .\" --------------------------------------------------------------------
3198 .SS "Text Commands"
3199 .\" --------------------------------------------------------------------
3200 .
3201 .TP
3202 .BI N n
3203 Print glyph with index\~\c
3204 .I n
3205 (a non-negative integer) of the current font.
3206 .
3207 .P
3208 If the
3209 .B tcommand
3210 line is present in the DESC file, troff will use the following two
3211 commands.
3212 .
3213 .TP
3214 .BI t xxx
3215 .I xxx
3216 is any sequence of characters terminated by a space or a newline (to
3217 be more precise, it is a sequence of glyphs which are accessed with
3218 the corresponding characters); the first character should be printed at
3219 the current position, the current horizontal position should be increased
3220 by the width of the first character, and so on for each character.
3221 .
3222 The width of the glyph is that given in the font file,
3223 appropriately scaled for the current point size, and rounded so that
3224 it is a multiple of the horizontal resolution.
3225 .
3226 Special characters cannot be printed using this command.
3227 .
3228 .TP
3229 .BI u n\ xxx
3230 This is same as the
3231 .B t
3232 command except that after printing each character, the current
3233 horizontal position is increased by the sum of the width of that
3234 character and
3235 .IR n .
3236 .
3237 .P
3238 Note that single characters can have the eighth bit set, as can the
3239 names of fonts and special characters.
3240 .
3241 .P
3242 The names of glyphs and fonts can be of arbitrary length; drivers
3243 should not assume that they will be only two characters long.
3244 .
3245 .P
3246 When a glyph is to be printed, that glyph will always be
3247 in the current font.
3248 .
3249 Unlike device-independent troff, it is not necessary for drivers to
3250 search special fonts to find a glyph.
3251 .
3252 .P
3253 For color support, some new commands have been added:
3254 .
3255 .TP
3256 .Text \f[B]mc \f[I]cyan magenta yellow\f[R]
3257 .TQ
3258 .Text \f[B]md\f[R]
3259 .TQ
3260 .Text \f[B]mg \f[I]gray\f[R]
3261 .TQ
3262 .Text \f[B]mk \f[I]cyan magenta yellow black\f[R]
3263 .TQ
3264 .Text \f[B]mr \f[I]red green blue\f[R]
3265 Set the color components of the current drawing color, using various
3266 color schemes.
3267 .
3268 .B md
3269 resets the drawing color to the default value.
3270 .
3271 The arguments are integers in the range 0 to 65536.
3272 .
3273 .P
3274 The
3275 .B x
3276 device control command has been extended.
3277 .
3278 .TP
3279 .Text \f[B]x u \f[I]n\f[R]
3280 If
3281 .I n
3282 is\~1, start underlining of spaces.
3283 .
3284 If
3285 .I n
3286 is\~0, stop underlining of spaces.
3287 .
3288 This is needed for the
3289 .B cu
3290 request in nroff mode and is ignored otherwise.
3291 .
3292 .
3293 .\" --------------------------------------------------------------------
3294 .SS "Drawing Commands"
3295 .\" --------------------------------------------------------------------
3296 .
3297 The
3298 .B D
3299 drawing command has been extended.
3300 .
3301 These extensions will not be used by GNU pic if the
3302 .B \-n
3303 option is given.
3304 .
3305 .TP
3306 .Text \f[B]Df \f[I]n\f[R]\*[ic]\[rs]n
3307 Set the shade of gray to be used for filling solid objects to
3308 .IR n ;
3309 .I n
3310 must be an integer between 0 and 1000, where 0 corresponds solid white
3311 and 1000 to solid black, and values in between correspond to
3312 intermediate shades of gray.
3313 .
3314 This applies only to solid circles, solid ellipses and solid
3315 polygons.
3316 .
3317 By default, a level of 1000 will be used.
3318 .
3319 Whatever color a solid object has, it should completely obscure
3320 everything beneath it.
3321 .
3322 A value greater than 1000 or less than 0 can also be used: this means
3323 fill with the shade of gray that is currently being used for lines and
3324 text.
3325 .
3326 Normally this will be black, but some drivers may provide a way of
3327 changing this.
3328 .
3329 .IP
3330 The corresponding
3331 .BI \[rs]D'f .\|.\|. '
3332 command shouldn't be used since its argument is always rounded to an
3333 integer multiple of the horizontal resolution which can lead to
3334 surprising results.
3335 .
3336 .TP
3337 .Text \f[B]DC \f[I]d\f[R]\*[ic]\[rs]n
3338 Draw a solid circle with a diameter of
3339 .I d
3340 with the leftmost point at the current position.
3341 .
3342 .TP
3343 .Text \f[B]DE \f[I]dx dy\f[R]\*[ic]\[rs]n
3344 Draw a solid ellipse with a horizontal diameter of
3345 .I dx
3346 and a vertical diameter of
3347 .I dy
3348 with the leftmost point at the current position.
3349 .EQ
3350 delim $$
3351 .EN
3352 .
3353 .TP
3354 .Text \f[B]Dp\f[R] $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\[rs]n
3355 Draw a polygon with, for $i = 1 ,..., n+1$, the
3356 .IR i -th
3357 vertex at the current position 
3358 .
3359 $+ sum from j=1 to i-1 ( dx sub j , dy sub j )$.
3360 .
3361 At the moment, GNU pic only uses this command to generate triangles
3362 and rectangles.
3363 .
3364 .TP
3365 .Text \f[B]DP\f[R] $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\[rs]n
3366 .
3367 Like
3368 .B Dp
3369 but draw a solid rather than outlined polygon.
3370 .
3371 .TP
3372 .Text \f[B]Dt \f[I]n\f[R]\*[ic]\[rs]n
3373 Set the current line thickness to
3374 .I n
3375 machine units.
3376 .
3377 Traditionally Unix troff drivers use a line thickness proportional to
3378 the current point size; drivers should continue to do this if no
3379 .B Dt
3380 command has been given, or if a
3381 .B Dt
3382 command has been given with a negative value of
3383 .IR n .
3384 A zero value of
3385 .I n
3386 selects the smallest available line thickness.
3387 .
3388 .P
3389 A difficulty arises in how the current position should be changed after
3390 the execution of these commands.
3391 .
3392 This is not of great importance since the code generated by GNU pic
3393 does not depend on this.
3394 .
3395 Given a drawing command of the form
3396 .IP
3397 \f[B]\[rs]D\[fm]\f[I]c\f[R] $x sub 1$ $y sub 1$ $x sub 2$ $y sub 2$ $...$ $x sub n$ $y sub n$\[fm]
3398 .
3399 .P
3400 where
3401 .I c
3402 is not one of
3403 .BR c ,
3404 .BR e ,
3405 .BR l ,
3406 .BR a ,
3407 or
3408 .BR ~ ,
3409 Unix troff will treat each of the $x sub i$ as a horizontal quantity,
3410 and each of the $y sub i$ as a vertical quantity and will assume that
3411 the width of the drawn object is $sum from i=1 to n x sub i$,
3412 and that the height is $sum from i=1 to n y sub i$.
3413 .
3414 (The assumption about the height can be seen by examining the
3415 .B st
3416 and
3417 .B sb
3418 registers after using such a
3419 .B D
3420 command in a \[rs]w escape sequence).
3421 .
3422 This rule also holds for all the original drawing commands with the
3423 exception of
3424 .BR De .
3425 For the sake of compatibility GNU troff also follows this rule, even
3426 though it produces an ugly result in the case of the
3427 .B Dt
3428 and
3429 .BR Df ,
3430 and, to a lesser extent,
3431 .B DE
3432 commands.
3433 .
3434 Thus after executing a
3435 .B D
3436 command of the form
3437 .IP
3438 \f[B]D\f[I]c\f[R] $x sub 1$ $y sub 1$ $x sub 2$ $y sub 2$ $...$ \c
3439 $x sub n$ $y sub n$\[rs]n
3440 .
3441 .P
3442 the current position should be increased by
3443 .
3444 $( sum from i=1 to n x sub i , sum from i=1 to n y sub i )$.
3445 .
3446 .P
3447 Another set of extensions is
3448 .
3449 .TP
3450 .Text \f[B]DFc \f[I]cyan magenta yellow\f[R]\*[ic]\[rs]n
3451 .TQ
3452 .Text \f[B]DFd\f[R]\*[ic]\[rs]n
3453 .TQ
3454 .Text \f[B]DFg \f[I]gray\f[R]\*[ic]\[rs]n
3455 .TQ
3456 .Text \f[B]DFk \f[I]cyan magenta yellow black\f[R]\*[ic]\[rs]n
3457 .TQ
3458 .Text \f[B]DFr \f[I]red green blue\f[R]\*[ic]\[rs]n
3459 Set the color components of the filling color similar to the
3460 .B m
3461 commands above.
3462 .
3463 .P
3464 The current position isn't changed by those colour commands (contrary to
3465 .BR Df ).
3466 .
3467 .
3468 .\" --------------------------------------------------------------------
3469 .SS "Device Control Commands"
3470 .\" --------------------------------------------------------------------
3471 .
3472 There is a continuation convention which permits the argument to the
3473 .B x\ X
3474 command to contain newlines: when outputting the argument to the
3475 .B x\ X
3476 command, GNU troff will follow each newline in the argument with a
3477 .B +
3478 character (as usual, it will terminate the entire argument with a
3479 newline); thus if the line after the line containing the
3480 .B x\ X
3481 command starts with
3482 .BR + ,
3483 then the newline ending the line containing the
3484 .B x\ X
3485 command should be treated as part of the argument to the
3486 .B x\ X
3487 command, the
3488 .B +
3489 should be ignored, and the part of the line following the
3490 .B +
3491 should be treated like the part of the line following the
3492 .B x\ X
3493 command.
3494 .
3495 .P
3496 The first three output commands are guaranteed to be:
3497 .IP
3498 .BI x\ T\  device
3499 .br
3500 .BI x\ res\  n\ h\ v
3501 .br
3502 .B x init
3503 .
3504 .
3505 .\" --------------------------------------------------------------------
3506 .SH INCOMPATIBILITIES
3507 .\" --------------------------------------------------------------------
3508 .
3509 In spite of the many extensions, groff has retained compatibility to
3510 classical troff to a large degree.
3511 .
3512 For the cases where the extensions lead to collisions, a special
3513 compatibility mode with the restricted, old functionality was created
3514 for groff.
3515 .
3516 .
3517 .\" --------------------------------------------------------------------
3518 .SS "Groff Language"
3519 .\" --------------------------------------------------------------------
3520 .
3521 .I groff
3522 provides a
3523 .B compatibility mode
3524 that allows to process roff code written for classical
3525 .B troff
3526 or for other implementations of roff in a consistent way.
3527 .
3528 .P
3529 Compatibility mode can be turned on with the
3530 .option \-C
3531 command line option, and turned on or off with the
3532 .request .cp
3533 request.
3534 .
3535 The number register
3536 .esc n(.C
3537 is\~1 if compatibility mode is on, 0\~otherwise.
3538 .
3539 .P
3540 This became necessary because the GNU concept for long names causes
3541 some incompatibilities.
3542 .I Classical troff
3543 interprets
3544 .IP
3545 .request .dsabcd
3546 .
3547 .P
3548 as defining a string
3549 .B ab
3550 with contents
3551 .BR cd .
3552 In
3553 .IR groff
3554 mode, this will be considered as a call of a macro named
3555 .request dsabcd .
3556 .
3557 .P
3558 Also
3559 .I classical troff
3560 interprets
3561 .esc *[
3562 or
3563 .esc n[
3564 as references to a string or number register called
3565 .request [
3566 while
3567 .I groff
3568 takes this as the start of a long name.
3569 .
3570 .P
3571 In
3572 .IR "compatibility mode" ,
3573 groff interprets these things in the traditional way; so long
3574 names are not recognized.
3575 .
3576 .P
3577 On the other hand, groff in
3578 .I GNU native mode
3579 does not allow to use the single-character escapes
3580 .esc \[rs]
3581 (backslash),
3582 .esc |
3583 (vertical bar),
3584 .esc ^
3585 (caret),
3586 .esc &
3587 (ampersand),
3588 .esc {
3589 (opening brace),
3590 .esc }
3591 (closing brace),
3592 .squoted "\[rs]\ "
3593 (space),
3594 .esc '
3595 (single quote),
3596 .esc `
3597 (backquote),
3598 .esc \-
3599 (minus),
3600 .esc _
3601 (underline),
3602 .esc !
3603 (bang),
3604 .esc %
3605 (percent),
3606 and
3607 .esc c
3608 (character c) in names of strings, macros, diversions, number
3609 registers, fonts or environments, whereas
3610 .I classical troff
3611 does.
3612 .
3613 .P
3614 The
3615 .esc A
3616 escape sequence can be helpful in avoiding these escape sequences in
3617 names.
3618 .
3619 .P
3620 Fractional pointsizes cause one noteworthy incompatibility.
3621 .
3622 In
3623 .I classical
3624 .IR troff ,
3625 the
3626 .request ps
3627 request ignores scale indicators and so
3628 .RS
3629 .P
3630 .B .ps\~10u
3631 .RE
3632 .
3633 .P
3634 will set the pointsize to 10\~points, whereas in groff native mode the
3635 pointsize will be set to 10\~scaled points.
3636 .
3637 .P
3638 In
3639 .IR groff ,
3640 there is a fundamental difference between unformatted input
3641 characters, and formatted output characters (glyphs).
3642 .
3643 Everything that affects how a glyph will be output is
3644 stored with the glyph; once a glyph has been
3645 constructed it is unaffected by any subsequent requests that are
3646 executed, including the
3647 .request bd ,
3648 .request cs ,
3649 .request tkf ,
3650 .request tr ,
3651 or
3652 .request fp
3653 requests.
3654 .
3655 .P
3656 Normally glyphs are constructed from input characters at
3657 the moment immediately before the glyph is added to the current
3658 output line.
3659 .
3660 Macros, diversions and strings are all, in fact, the same type of
3661 object; they contain lists of input characters and glyphs
3662 in any combination.
3663 .
3664 .P
3665 Special characters can be both; before being added to the output, they
3666 act as input entities, afterwards they denote glyphs.
3667 .
3668 .P
3669 A glyph does not behave like an input character for the
3670 purposes of macro processing; it does not inherit any of the special
3671 properties that the input character from which it was constructed
3672 might have had.
3673 .
3674 The following example will make things clearer.
3675 .
3676 .P
3677 .RS
3678 .nf
3679 .ft CB
3680 .Text .di x
3681 .Text \[rs]\[rs]\[rs]\[rs]
3682 .Text .br
3683 .Text .di
3684 .Text .x
3685 .ft
3686 .fi
3687 .RE
3688 .
3689 .P
3690 With
3691 .I GNU troff
3692 this will be printed as
3693 .esc \[rs] .
3694 So each pair of input backslashes
3695 .squoted \[rs]\[rs]
3696 is turned into a single output backslash glyph
3697 .squoted \[rs]
3698 and the resulting output backslashes are not interpreted as escape
3699 characters when they are reread.
3700 .
3701 .P
3702 .I Classical troff
3703 would interpret them as escape characters when they were reread and
3704 would end up printing a single backslash
3705 .squoted \[rs] .
3706 .
3707 .P
3708 In GNU, the correct way to get a printable version of the backslash
3709 character
3710 .squoted \[rs]
3711 is the
3712 .esc (rs
3713 escape sequence, but classical troff does not provide a clean feature
3714 for getting a non-syntactical backslash.
3715 .
3716 A close method is the printable version of the current escape
3717 character using the
3718 .esc e
3719 escape sequence; this works if the current escape character is not
3720 redefined.
3721 .
3722 It works in both GNU mode and compatibility mode, while dirty tricks
3723 like specifying a sequence of multiple backslashes do not work
3724 reliably; for the different handling in diversions, macro definitions,
3725 or text mode quickly leads to a confusion about the necessary number of
3726 backslashes.
3727 .
3728 .P
3729 To store an escape sequence in a diversion that will be interpreted
3730 when the diversion is reread, either the traditional
3731 .esc !
3732 transparent output facility or the
3733 new
3734 .esc ?
3735 escape sequence can be used.
3736 .
3737 .
3738 .\" --------------------------------------------------------------------
3739 .SS "Intermediate Output"
3740 .\" --------------------------------------------------------------------
3741 .
3742 The groff intermediate output format is in a state of evolution.
3743 .
3744 So far it has some incompatibilities, but it is intended to establish
3745 a full compatibility to the classical troff output format.
3746 .
3747 Actually the following incompatibilities exist:
3748 .
3749 .Topic
3750 The positioning after the drawing of the polygons conflicts with the
3751 classical definition.
3752 .
3753 .Topic
3754 The intermediate output cannot be rescaled to other devices as
3755 classical "device-independent" troff did.
3756 .
3757 .
3758 .\" --------------------------------------------------------------------
3759 .SH AUTHORS
3760 .\" --------------------------------------------------------------------
3761 .
3762 Copyright (C) 1989, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
3763 .
3764 .P
3765 This document is distributed under the terms of the FDL (GNU Free
3766 Documentation License) version 1.1 or later.
3767 .
3768 You should have received a copy of the FDL on your system, it is also
3769 available on-line at the
3770 .URL http://\:www.gnu.org/\:copyleft/\:fdl.html "GNU copyleft site" .
3771 .
3772 This document was written by James Clark, with modifications by
3773 .MTO wl@gnu.org "Werner Lemberg"
3774 and
3775 .MTO bwarken@mayn.de "Bernd Warken" .
3776 .
3777 .P
3778 This document is part of
3779 .IR groff ,
3780 the GNU roff distribution.
3781 .
3782 Formerly, the contents of this document was kept in the manual
3783 page
3784 .BR @g@troff (@MAN1EXT@).
3785 Only the parts dealing with the language aspects of the different
3786 .I roff
3787 systems were carried over into this document.
3788 .
3789 The
3790 .I troff
3791 command line options and warnings are still documented in
3792 .BR @g@troff (@MAN1EXT@).
3793 .
3794 .\" --------------------------------------------------------------------
3795 .SH "SEE ALSO"
3796 .\" --------------------------------------------------------------------
3797 .
3798 The
3799 .I groff info
3800 .IR file ,
3801 cf.\&
3802 .BR info (1)
3803 presents all groff documentation within a single document.
3804 .
3805 .TP
3806 .BR groff (@MAN1EXT@)
3807 A list of all documentation around
3808 .IR groff .
3809 .
3810 .TP
3811 .BR groff (@MAN7EXT@)
3812 A description of the
3813 .I groff
3814 language, including a short, but complete reference of all predefined
3815 requests, registers, and escapes of plain
3816 .IR groff .
3817 From the command line, this is called using
3818 .
3819 .IP
3820 .ShellCommand man\~7\~groff
3821 .
3822 .TP
3823 .BR roff (@MAN7EXT@)
3824 A survey of
3825 .I roff
3826 systems, including pointers to further historical documentation.
3827 .
3828 .TP
3829 .RI [ CSTR\~#54\/ ]
3830 The
3831 .I Nroff/\:Troff User's Manual
3832 by
3833 .I J.\& F.\& Osanna
3834 of 1976 in the revision of
3835 .I Brian Kernighan
3836 of 1992, being the
3837 .URL http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz \
3838      "classical troff documentation" .
3839 .
3840 .cp \n[groff_diff_C]
3841 .
3842 .\" --------------------------------------------------------------------
3843 .\" Emacs variables
3844 .\" --------------------------------------------------------------------
3845 .
3846 .\" Local Variables:
3847 .\" mode: nroff
3848 .\" End: