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