OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / GNU_groff / original / man1 / troff.1
1 .ig
2 Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc.
3
4 Permission is granted to make and distribute verbatim copies of
5 this manual provided the copyright notice and this permission notice
6 are preserved on all copies.
7
8 Permission is granted to copy and distribute modified versions of this
9 manual under the conditions for verbatim copying, provided that the
10 entire resulting derived work is distributed under the terms of a
11 permission notice identical to this one.
12
13 Permission is granted to copy and distribute translations of this
14 manual into another language, under the above conditions for modified
15 versions, except that this permission notice may be included in
16 translations approved by the Free Software Foundation instead of in
17 the original English.
18 ..
19 .
20 .\" define a string tx for the TeX logo
21 .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
22 .el .ds tx TeX
23 .
24 .de TQ
25 .br
26 .ns
27 .TP \\$1
28 ..
29 .
30 .\" Like TP, but if specified indent is more than half
31 .\" the current line-length - indent, use the default indent.
32 .de Tp
33 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
34 .el .TP "\\$1"
35 ..
36 .
37 .\" The BSD man macros can't handle " in arguments to font change macros,
38 .\" so use \(ts instead of ".
39 .tr \(ts"
40 .
41 .
42 .TH TROFF 1 "27 June 2001" "Groff Version 1.17.2"
43 .
44 .
45 .SH NAME
46 .
47 .
48 troff \- format documents
49 .
50 .
51 .SH SYNOPSIS
52 .
53 .
54 .nr a \n(.j
55 .ad l
56 .nr i \n(.i
57 .in +\w'\fBtroff 'u
58 .ti \niu
59 .B troff
60 .de OP
61 .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
62 .el .RB "[\ " "\\$1" "\ ]"
63 ..
64 .OP \-abivzCERU
65 .OP \-w name
66 .OP \-W name
67 .OP \-d cs
68 .OP \-f fam
69 .OP \-m name
70 .OP \-n num
71 .OP \-o list
72 .OP \-r cn
73 .OP \-T name
74 .OP \-F dir
75 .OP \-M dir
76 .RI "[\ " files\|.\|.\|. "\ ]"
77 .br
78 .ad \na
79 .PP
80 It is possible to have whitespace between a command line option and its
81 parameter.
82 .
83 .
84 .SH DESCRIPTION
85 .
86 .
87 This manual page describes the GNU version of
88 .BR troff ,
89 which is part of the groff document formatting system.
90 It is highly compatible with UNIX troff.
91 Usually it should be invoked using the groff command, which will
92 also run preprocessors and postprocessors in the appropriate
93 order and with the appropriate options.
94 .
95 .
96 .SH OPTIONS
97 .
98 .
99 .TP \w'\-dname=s'u+2n
100 .B \-a
101 Generate an
102 .SM ASCII
103 approximation of the typeset output.
104 .TP
105 .B \-b
106 Print a backtrace with each warning or error message.  This backtrace
107 should help track down the cause of the error.  The line numbers given
108 in the backtrace may not always be correct:
109 .BR troff 's
110 idea of line numbers
111 gets confused by
112 .B as
113 or 
114 .B am
115 requests.
116 .TP
117 .B \-i
118 Read the standard input after all the named input files have been
119 processed.
120 .TP
121 .B \-v
122 Print the version number.
123 .TP
124 .BI \-w name
125 Enable warning
126 .IR  name .
127 Available warnings are described in
128 the Warnings subsection below.
129 Multiple
130 .B \-w
131 options are allowed.
132 .TP
133 .BI \-W name
134 Inhibit warning
135 .IR name .
136 Multiple
137 .B \-W
138 options are allowed.
139 .TP
140 .B \-E
141 Inhibit all error messages.
142 .TP
143 .B \-z
144 Suppress formatted output.
145 .TP
146 .B \-C
147 Enable compatibility mode.
148 .TP
149 .BI \-d cs
150 .TQ
151 .BI \-d name = s
152 Define
153 .I c
154 or
155 .I name
156 to be a string
157 .IR s ;
158 .I c
159 must be a one letter name.
160 .TP
161 .BI \-f fam
162 Use
163 .I fam
164 as the default font family.
165 .TP
166 .BI \-m name
167 Read in the file
168 .IB name .tmac\fR.
169 If it isn't found, try
170 .BI tmac. name
171 instead.
172 It will be first searched for in directories given with the
173 .B \-M
174 command line option, then in directories given
175 in the
176 .B GROFF_TMAC_PATH
177 environment variable, then in the current directory (only if in unsafe
178 mode), the home directory, /usr/lib/groff/site-tmac, /usr/share/groff/site-tmac, and
179 /usr/share/groff/1.17.2/tmac.
180 .TP
181 .B \-U
182 Unsafe mode.
183 This will enable the following requests:
184 .BR .open ,
185 .BR .opena ,
186 .BR .pso ,
187 .BR .sy ,
188 and
189 .BR .pi .
190 For security reasons, these potentially dangerous requests are disabled
191 otherwise.  It will also add the current directory to the macro search path.
192 .TP
193 .B \-R
194 Don't load
195 .B troffrc
196 and
197 .BR troffrc-end .
198 .TP
199 .BI \-n num
200 Number the first page
201 .IR num .
202 .TP
203 .BI \-o list
204 Output only pages in
205 .IR list ,
206 which is a comma-separated list of page ranges;
207 .I n
208 means print page
209 .IR n ,
210 .IB m \- n
211 means print every page between
212 .I m
213 and
214 .IR n ,
215 .BI \- n
216 means print every page up to
217 .IR n ,
218 .IB n \-
219 means print every page from
220 .IR n .
221 .B Troff
222 will exit after printing the last page in the list.
223 .TP
224 .BI \-r cn
225 .TQ
226 .BI \-r name = n
227 Set number register
228 .I c
229 or
230 .I name
231 to
232 .IR n ;
233 .I c
234 must be a one character name;
235 .I n
236 can be any troff numeric expression.
237 .TP
238 .BI \-T name
239 Prepare output for device
240 .IR name ,
241 rather than the default
242 .BR ps .
243 .TP
244 .BI \-F dir
245 Search in directory (or directory path)
246 .I dir
247 for subdirectories
248 .BI dev name
249 .RI ( name
250 is the name of the device) and there for the
251 .B DESC
252 file and font files.
253 .I dir
254 is scanned before all other font directories.
255 .TP
256 .BI \-M dir
257 Search directory (or directory path)
258 .I dir
259 for macro files.
260 This is scanned before all other macro directories.
261 .
262 .
263 .SH USAGE
264 .
265 .
266 Only the features not in UNIX troff are described here.
267 .
268 .SS Long names
269 .
270 The names of number registers, fonts, strings/macros/diversions,
271 special characters can be of any length. In escape sequences, where
272 you can use 
273 .BI ( xx
274 for a two character name, you can use
275 .BI [ xxx ]
276 for a name of arbitrary length:
277 .TP
278 .BI \e[ xxx ]
279 Print the special character called
280 .IR xxx .
281 .TP
282 .BI \ef[ xxx ]
283 Set font
284 .IR xxx .
285 .TP
286 .BI \e*[ xxx ]
287 Interpolate string
288 .IR xxx .
289 .TP
290 .BI \en[ xxx ]
291 Interpolate number register
292 .IR xxx .
293 .
294 .SS Fractional pointsizes
295 .
296 A
297 .I
298 scaled point
299 is equal to 1/sizescale
300 points, where
301 sizescale is specified in the
302 .B DESC
303 file (1 by default).
304 There is a new scale indicator
305 .B z
306 which has the effect of multiplying by sizescale.
307 Requests and escape sequences in troff 
308 interpret arguments that represent a pointsize as being in units
309 of scaled points, but they evaluate each such argument
310 using a default scale indicator of
311 .BR z .
312 Arguments treated in this way are
313 the argument to the
314 .B ps
315 request,
316 the third argument to the
317 .B cs
318 request,
319 the second and fourth arguments to the
320 .B tkf
321 request,
322 the argument to the
323 .B \eH
324 escape sequence,
325 and those variants of the
326 .B \es
327 escape sequence that take a numeric expression as their argument.
328 .LP
329 For example, suppose sizescale is 1000;
330 then a scaled point will be equivalent to a millipoint;
331 the request
332 .B .ps 10.25
333 is equivalent to
334 .B .ps 10.25z
335 and so sets the pointsize to 10250 scaled points,
336 which is equal to 10.25 points.
337 .LP
338 The number register
339 .B \en[.s]
340 returns the pointsize in points as decimal fraction.
341 There is also a new number register
342 .B \en[.ps]
343 that returns the pointsize in scaled points.
344 .LP
345 It would make no sense to use the
346 .B z
347 scale indicator in a numeric expression
348 whose default scale indicator was neither
349 .B u
350 nor
351 .BR z ,
352 and so
353 .B troff
354 disallows this.
355 Similarly it would make no sense to use a scaling indicator
356 other than
357 .B z
358 or
359 .B u
360 in a numeric expression whose default scale indicator was
361 .BR z ,
362 and so
363 .B troff
364 disallows this as well.
365 .LP
366 There is also new scale indicator
367 .B s
368 which multiplies by the number of units in a scaled point.
369 So, for example,
370 .B \en[.ps]s
371 is equal to
372 .BR 1m .
373 Be sure not to confuse the
374 .B s
375 and
376 .B z
377 scale indicators.
378 .
379 .SS Numeric expressions
380 .
381 .LP
382 Spaces are permitted in a number expression within parentheses.
383 .LP
384 .B M
385 indicates a scale of 100ths of an em.
386 .TP
387 .IB e1 >? e2
388 The maximum of
389 .I e1
390 and
391 .IR e2 .
392 .TP
393 .IB e1 <? e2
394 The minimum of
395 .I e1
396 and
397 .IR e2 .
398 .TP
399 .BI ( c ; e )
400 Evaluate
401 .I e
402 using
403 .I c
404 as the default scaling indicator.
405 If
406 .I c
407 is missing, ignore scaling indicators in the evaluation of
408 .IR e .
409 .
410 .SS New escape sequences
411 .
412 .TP
413 .BI \eA' anything '
414 This expands to
415 .B 1
416 or
417 .B 0
418 according as
419 .I anything
420 is or is not acceptable as the name of a string, macro, diversion,
421 number register, environment or font.
422 It will return
423 .B 0
424 if
425 .I anything
426 is empty.
427 This is useful if you want to lookup user input in some sort of
428 associative table.
429 .TP
430 .BI \eB' anything '
431 This expands to
432 .B 1
433 or
434 .B 0
435 according as
436 .I anything
437 is or is not a valid numeric expression.
438 It will return
439 .B 0
440 if
441 .I anything
442 is empty.
443 .TP
444 .BI \eC' xxx '
445 Typeset character named
446 .IR xxx .
447 Normally it is more convenient to use
448 .BI \e[ xxx ]\fR.
449 But
450 .B \eC
451 has the advantage that it is compatible with recent versions of
452 .SM UNIX
453 and is available in compatibility mode.
454 .TP
455 .B \eE
456 This is equivalent to an escape character,
457 but it's not interpreted in copy-mode.
458 For example, strings to start and end superscripting could be defined
459 like this:
460 .RS
461 .IP
462 \&.ds { \ev'\-.3m'\es'\eEn[.s]*6u/10u'
463 .br
464 \&.ds } \es0\ev'.3m'
465 .LP
466 The use of
467 .B \eE
468 ensures that these definitions will work even if
469 .B \e*{
470 gets interpreted in copy-mode
471 (for example, by being used in a macro argument).
472 .RE
473 .TP
474 .BI \eN' n '
475 Typeset the character with code
476 .I n
477 in the current font.
478 .I n
479 can be any integer.
480 Most devices only have characters with codes between 0 and 255.
481 If the current font does not contain a character with that code,
482 special fonts will
483 .I not
484 be searched.
485 The
486 .B \eN
487 escape sequence can be conveniently used on conjunction with the
488 .B char
489 request:
490 .RS
491 .IP
492 .B
493 \&.char \e[phone] \ef(ZD\eN'37'
494 .RE
495 .IP
496 The code of each character is given in the fourth column in the font
497 description file after the
498 .B charset
499 command.
500 It is possible to include unnamed characters in the font description
501 file by using a name of
502 .BR \-\-\- ;
503 the
504 .B \eN
505 escape sequence is the only way to use these.
506 .TP
507 .BI \eR' name\ \(+-n '
508 This has the same effect as
509 .RS
510 .IP
511 .BI .nr\  name\ \(+-n
512 .RE
513 .TP
514 .BI \es( nn
515 .TQ
516 .BI \es\(+-( nn
517 Set the point size to
518 .I nn
519 points;
520 .I nn
521 must be exactly two digits.
522 .TP
523 .BI \es[\(+- n ]
524 .TQ
525 .BI \es\(+-[ n ]
526 .TQ
527 .BI \es'\(+- n '
528 .TQ
529 .BI \es\(+-' n '
530 Set the point size to
531 .I n
532 scaled points;
533 .I n
534 is a numeric expression with a default scale indicator of
535 .BR z .
536 .TP
537 .BI \eV x
538 .TQ
539 .BI \eV( xx
540 .TQ
541 .BI \eV[ xxx ]
542 Interpolate the contents of the environment variable
543 .IR xxx ,
544 as returned by
545 .BR getenv (3).
546 .B \eV
547 is interpreted in copy-mode.
548 .TP
549 .BI \eY x
550 .TQ
551 .BI \eY( xx
552 .TQ
553 .BI \eY[ xxx ]
554 This is approximately equivalent to
555 .BI \eX'\e*[ xxx ]'\fR.
556 However the contents of the string or macro
557 .I xxx
558 are not interpreted;
559 also it is permitted for
560 .I xxx
561 to have been defined as a macro and thus contain newlines
562 (it is not permitted for the argument to
563 .B \eX
564 to contain newlines).
565 The inclusion of newlines requires an extension to the UNIX troff output
566 format, and will confuse drivers that do not know about this
567 extension.
568 .TP
569 .BI \eZ' anything '
570 Print anything and then restore the horizontal and vertical
571 position;
572 .I anything
573 may not contain tabs or leaders.
574 .TP
575 .B \e$0
576 The name by which the current macro was invoked.
577 The
578 .B als
579 request can make a macro have more than one name.
580 .TP
581 .B \e$*
582 In a macro, the concatenation of all the arguments separated by spaces.
583 .TP
584 .B \e$@
585 In a macro, the concatenation of all the arguments with each surrounded by
586 double quotes, and separated by spaces. 
587 .TP
588 .BI \e$( nn
589 .TQ
590 .BI \e$[ nnn ]
591 In a macro, this gives the
592 .IR nn -th
593 or
594 .IR nnn -th
595 argument.
596 Macros can have an unlimited number of arguments.
597 .TP
598 .BI \e? anything \e?
599 When used in a diversion, this will transparently embed
600 .I anything
601 in the diversion.
602 .I anything
603 is read in copy mode.
604 When the diversion is reread,
605 .I anything
606 will be interpreted.
607 .I anything
608 may not contain newlines; use
609 .B \e!\&
610 if you want to embed newlines in a diversion.
611 The escape sequence
612 .B \e?\&
613 is also recognised in copy mode and turned into a single internal
614 code; it is this code that terminates
615 .IR anything .
616 Thus
617 .RS
618 .RS
619 .ft B
620 .nf
621 .ne 15
622 \&.nr x 1
623 \&.nf
624 \&.di d
625 \e?\e\e?\e\e\e\e?\e\e\e\e\e\e\e\enx\e\e\e\e?\e\e?\e?
626 \&.di
627 \&.nr x 2
628 \&.di e
629 \&.d
630 \&.di
631 \&.nr x 3
632 \&.di f
633 \&.e
634 \&.di
635 \&.nr x 4
636 \&.f
637 .fi
638 .ft
639 .RE
640 .RE
641 .IP
642 will print
643 .BR 4 .
644 .TP
645 .B \e/
646 This increases the width of the preceding character so that
647 the spacing between that character and the following character
648 will be correct if the following character is a roman character.
649 For example, if an italic f is immediately followed by a roman
650 right parenthesis, then in many fonts the top right portion of the f
651 will overlap the top left of the right parenthesis producing \fIf\fR)\fR,
652 which is ugly.
653 Inserting
654 .B \e/
655 produces
656 .ie \n(.g \fIf\/\fR)\fR
657 .el \fIf\|\fR)\fR
658 and avoids this problem.
659 It is a good idea to use this escape sequence whenever an
660 italic character is immediately followed by a roman character without any
661 intervening space.
662 .TP
663 .B \e,
664 This modifies the spacing of the following character so that the spacing
665 between that character and the preceding character will correct if
666 the preceding character is a roman character.
667 For example, inserting
668 .B \e,
669 between the parenthesis and the f changes
670 \fR(\fIf\fR to
671 .ie \n(.g \fR(\,\fIf\fR.
672 .el \fR(\^\fIf\fR.
673 It is a good idea to use this escape sequence whenever a
674 roman character is immediately followed by an italic character without any
675 intervening space.
676 .TP
677 .B \e)
678 Like
679 .B \e&
680 except that it behaves like a character declared with the
681 .B cflags
682 request to be transparent for the purposes of end of sentence recognition.
683 .TP
684 .B \e~
685 This produces an unbreakable space that stretches like a normal inter-word
686 space when a line is adjusted.
687 .TP
688 .B \e:
689 This causes the insertion of a zero-width break point.
690 It is equal to
691 .B \e%
692 but without insertion of a soft hyphen character.
693 .TP
694 .B \e#
695 Everything up to and including the next newline is ignored.
696 This is interpreted in copy mode.
697 This is like
698 .B \e"
699 except that
700 .B \e"
701 does not ignore the terminating newline.
702 .
703 .SS New requests
704 .
705 .TP
706 .BI .aln\  xx\ yy
707 Create an alias
708 .I xx
709 for number register object named
710 .IR yy .
711 The new name and the old name will be exactly equivalent.
712 If
713 .I yy
714 is undefined, a warning of type
715 .B reg
716 will be generated, and the request will be ignored.
717 .TP
718 .BI .als\  xx\ yy
719 Create an alias
720 .I xx
721 for request, string, macro, or diversion object named
722 .IR yy .
723 The new name and the old name will be exactly equivalent (it is similar to a
724 hard rather than a soft link).
725 If
726 .I yy
727 is undefined, a warning of type
728 .B mac
729 will be generated, and the request will be ignored.
730 The
731 .BR de ,
732 .BR am ,
733 .BR di ,
734 .BR da ,
735 .BR ds ,
736 and
737 .B as
738 requests only create a new object if the name of the macro, diversion
739 or string diversion is currently undefined or if it is defined to be a
740 request; normally they modify the value of an existing object.
741 .TP
742 .BI .am1\  xx\ yy
743 Similar to
744 .BR .am , 
745 but compatibility mode is switched off during execution.
746 On entry, the current compatibility mode is saved and restored at exit.
747 .TP
748 .BI .asciify\  xx
749 This request `unformats' the diversion
750 .I xx
751 in such a way that
752 .SM ASCII
753 and space characters (and some escape sequences) that were formatted and
754 diverted into
755 .I xx
756 will be treated like ordinary input characters when
757 .I xx
758 is reread.
759 Useful for diversions in conjunction with the
760 .B .writem
761 request.
762 It can be also used for gross hacks; for example, this
763 .RS
764 .IP
765 .ne 7v+\n(.Vu
766 .ft B
767 .nf
768 \&.tr @.
769 \&.di x
770 \&@nr n 1
771 \&.br
772 \&.di
773 \&.tr @@
774 \&.asciify x
775 \&.x
776 .fi
777 .RE
778 .IP
779 will set register
780 .B n
781 to 1.
782 Note that glyph information (font, font size, etc.) is not preserved; use
783 .B .unformat
784 instead.
785 .TP
786 .B .backtrace
787 Print a backtrace of the input stack on stderr.
788 .TP
789 .BI .blm\  xx
790 Set the blank line macro to
791 .IR xx .
792 If there is a blank line macro,
793 it will be invoked when a blank line is encountered instead of the usual
794 troff behaviour.
795 .TP
796 .BI .box\  xx
797 .TQ
798 .BI .boxa\  xx
799 These requests are similar to the
800 .B di
801 and
802 .B da
803 requests with the exception that a partially filled line will not become
804 part of the diversion (i.e., the diversion always starts with a new line)
805 but restored after ending the diversion, discarding the partially filled
806 line which possibly comes from the diversion.
807 .TP
808 .B .break
809 Break out of a while loop.
810 See also the
811 .B while
812 and
813 .B continue
814 requests.
815 Be sure not to confuse this with the
816 .B br
817 request.
818 .TP
819 .B .brp
820 This is the same as
821 .BR \ep .
822 .TP
823 .BI .cflags\  n\ c1\ c2\|.\|.\|.
824 Characters
825 .IR c1 ,
826 .IR c2 ,\|.\|.\|.
827 have properties determined by
828 .IR n ,
829 which is ORed from the following:
830 .RS
831 .TP
832 1
833 the character ends sentences
834 (initially characters
835 .B .?!\&
836 have this property);
837 .TP
838 2
839 lines can be broken before the character
840 (initially no characters have this property);
841 a line will not be broken at a character with this property
842 unless the characters on each side both have non-zero
843 hyphenation codes.
844 .TP
845 4
846 lines can be broken after the character
847 (initially characters
848 .B \-\e(hy\e(em
849 have this property);
850 a line will not be broken at a character with this property
851 unless the characters on each side both have non-zero
852 hyphenation codes.
853 .TP
854 8
855 the character overlaps horizontally
856 (initially characters
857 .B \e(ul\e(rn\e(ru
858 have this property);
859 .TP
860 16
861 the character overlaps vertically
862 (initially character
863 .B \e(br
864 has this property);
865 .TP
866 32
867 an end of sentence character followed by any number of characters
868 with this property will be treated
869 as the end of a sentence if followed by a newline or two spaces;
870 in other words
871 the character is transparent for the purposes of end of sentence
872 recognition;
873 this is the same as having a zero space factor in \*(tx
874 (initially characters
875 .B \(ts')]*\e(dg\e(rq
876 have this property).
877 .RE
878 .TP
879 .BI .char\  c\ string
880 Define character
881 .I c
882 to be
883 .IR string .
884 Every time character
885 .I c
886 needs to be printed,
887 .I string
888 will be processed in a temporary environment and the result
889 will be wrapped up into a single object.
890 Compatibility mode will be turned off
891 and the escape character will be set to
892 .B \e
893 while
894 .I string
895 is being processed.
896 Any emboldening, constant spacing or track kerning will be applied
897 to this object rather than to individual characters in
898 .IR string .
899 A character defined by this request can be used just like
900 a normal character provided by the output device.
901 In particular other characters can be translated to it
902 with the
903 .B tr
904 request;
905 it can be made the leader character by the
906 .B lc
907 request;
908 repeated patterns can be drawn with the character using the
909 .B \el
910 and
911 .B \eL
912 escape sequences;
913 words containing the character can be hyphenated
914 correctly, if the
915 .B hcode
916 request is used to give the character a hyphenation code.
917 There is a special anti-recursion feature: 
918 use of character within the character's definition
919 will be handled like normal characters not defined with
920 .BR char .
921 A character definition can be removed with the
922 .B rchar
923 request.
924 .TP
925 .BI .chop\  xx
926 Chop the last character off macro, string, or diversion
927 .IR xx .
928 This is useful for removing the newline from the end of diversions
929 that are to be interpolated as strings.
930 .TP
931 .BI .close\  stream
932 Close the stream named
933 .IR stream ;
934 .I stream
935 will no longer be an acceptable argument to the
936 .B write
937 request.
938 See the
939 .B open
940 request.
941 .TP
942 .B .continue
943 Finish the current iteration of a while loop.
944 See also the
945 .B while
946 and
947 .B break
948 requests.
949 .TP
950 .BI .cp\  n
951 If
952 .I n
953 is non-zero or missing, enable compatibility mode, otherwise
954 disable it.
955 In compatibility mode, long names are not recognised, and the
956 incompatibilities caused by long names do not arise.
957 .TP
958 .BI .dei\  xx\ yy
959 Define macro indirectly.
960 The following example
961 .RS
962 .IP
963 .ne 2v+\n(.Vu
964 .ft B
965 .nf
966 \&.ds xx aa
967 \&.ds yy bb
968 \&.dei xx yy
969 .fi
970 .RE
971 .IP
972 is equivalent to
973 .RS
974 .IP
975 .B
976 \&.de aa bb
977 .RE
978 .TP
979 .BI .de1\  xx\ yy
980 Similar to
981 .BR .de , 
982 but compatibility mode is switched off during execution.
983 On entry, the current compatibility mode is saved and restored at exit.
984 .TP
985 .BI .do\  xxx
986 Interpret
987 .I .xxx
988 with compatibility mode disabled.
989 For example,
990 .RS
991 .IP
992 .B
993 \&.do fam T
994 .LP
995 would have the same effect as
996 .IP
997 .B
998 \&.fam T
999 .LP
1000 except that it would work even if compatibility mode had been enabled.
1001 Note that the previous compatibility mode is restored before any files
1002 sourced by
1003 .I xxx
1004 are interpreted.
1005 .RE
1006 .TP
1007 .B .ecs
1008 Save current escape character.
1009 .TP
1010 .B .ecr
1011 Restore escape character saved with
1012 .BR ecs .
1013 Without a previous call to
1014 .BR ecs ,
1015 .RB ` \e '
1016 will be the new escape character.
1017 .TP
1018 .BI .evc\  xx
1019 Copy the contents of environment
1020 .I xx
1021 to the current environment.
1022 No pushing or popping of environents will be done.
1023 .TP
1024 .BI .fam\  xx
1025 Set the current font family to
1026 .IR xx .
1027 The current font family is part of the current environment.
1028 If
1029 .I xx
1030 is missing, switch back to previous font family.
1031 See the description of the
1032 .B sty
1033 request for more information on font families.
1034 .TP
1035 .BI .fspecial\  f\ s1\ s2\|.\|.\|.
1036 When the current font is
1037 .IR f ,
1038 fonts
1039 .IR s1 ,
1040 .IR s2 ,\|.\|.\|.
1041 will be special, that is, they will searched for characters not in
1042 the current font.
1043 Any fonts specified in the
1044 .B special
1045 request will be searched after fonts specified in the
1046 .B fspecial
1047 request.
1048 .TP
1049 .BI .ftr\  f\ g
1050 Translate font
1051 .I f
1052 to
1053 .IR g .
1054 Whenever a font named
1055 .I f
1056 is referred to in
1057 .B \ef
1058 escape sequence,
1059 or in the
1060 .BR ft ,
1061 .BR ul ,
1062 .BR bd ,
1063 .BR cs ,
1064 .BR tkf ,
1065 .BR special ,
1066 .BR fspecial ,
1067 .BR fp ,
1068 or
1069 .BR sty
1070 requests,
1071 font
1072 .I g
1073 will be used.
1074 If
1075 .I g
1076 is missing,
1077 or equal to
1078 .I f
1079 then font
1080 .I f
1081 will not be translated.
1082 .TP
1083 .BI .hcode \ c1\ code1\ c2\ code2\|.\|.\|.
1084 Set the hyphenation code of character
1085 .I c1
1086 to
1087 .I code1
1088 and that of
1089 .I c2
1090 to
1091 .IR code2 .
1092 A hyphenation code must be a single input
1093 character (not a special character) other than a digit or a space.
1094 Initially each lower-case letter has a hyphenation code, which
1095 is itself, and each upper-case letter has a hyphenation code
1096 which is the lower case version of itself.
1097 See also the
1098 .B hpf
1099 request.
1100 .TP
1101 .BI .hla\  lang
1102 Set the current hyphenation language to
1103 .IR lang .
1104 Hyphenation exceptions specified with the
1105 .B hw
1106 request and hyphenation patterns specified with the
1107 .B hpf
1108 request are both associated with the current hyphenation language.
1109 The
1110 .B hla
1111 request is usually invoked by the
1112 .B troffrc
1113 file.
1114 .TP
1115 .BI .hlm\  n
1116 Set the maximum number of consecutive hyphenated lines to
1117 .IR n .
1118 If
1119 .I n
1120 is negative, there is no maximum.
1121 The default value is \-1.
1122 This value is associated with the current environment.
1123 Only lines output from an environment count towards the maximum associated
1124 with that environment.
1125 Hyphens resulting from
1126 .B \e%
1127 are counted; explicit hyphens are not.
1128 .TP
1129 .BI .hpf\  file
1130 Read hyphenation patterns from
1131 .IR file ;
1132 this will be searched for in the same way that
1133 .IB name .tmac
1134 is searched for when the
1135 .BI \-m name
1136 option is specified.
1137 It should have the same format as the argument to
1138 the \epatterns primitive in \*(tx;
1139 the letters appearing in this file are interpreted as hyphenation
1140 codes.
1141 A
1142 .B %
1143 character in the patterns file introduces a comment that continues
1144 to the end of the line.
1145 The set of hyphenation patterns is associated with the current language
1146 set by the
1147 .B hla
1148 request.
1149 The
1150 .B hpf
1151 request
1152 is usually invoked by the
1153 .B troffrc
1154 file.
1155 .TP
1156 .BI .hym\  n
1157 Set the
1158 .I hyphenation margin
1159 to
1160 .IR n :
1161 when the current adjustment mode is not
1162 .BR b ,
1163 the line will not be hyphenated if the line is no more than
1164 .I n
1165 short.
1166 The default hyphenation margin is 0.
1167 The default scaling indicator for this request is
1168 .IR m .
1169 The hyphenation margin is associated with the current environment.
1170 The current hyphenation margin is available in the
1171 .B \en[.hym]
1172 register.
1173 .TP
1174 .BI .hys\  n
1175 Set the
1176 .I hyphenation space
1177 to
1178 .IR n :
1179 when the current adjustment mode is
1180 .B b
1181 don't hyphenate the line if the line can be justified by adding no more than
1182 .I n
1183 extra space to each word space.
1184 The default hyphenation space is 0.
1185 The default scaling indicator for this request is
1186 .BR m .
1187 The hyphenation space is associated with the current environment.
1188 The current hyphenation space is available in the
1189 .B \en[.hys]
1190 register.
1191 .TP
1192 .BI .kern\  n
1193 If
1194 .I n
1195 is non-zero or missing, enable pairwise kerning, otherwise disable it.
1196 .TP
1197 .BI .length\  xx\ string
1198 Compute the length of
1199 .I string
1200 and return it in the number register
1201 .I xx
1202 (which is not necessarily defined before).
1203 .TP
1204 .BI .linetabs\  n
1205 If
1206 .I n
1207 is non-zero or missing, enable line-tabs mode, otherwise disable it (which
1208 is the default).
1209 In line-tabs mode, tab distances are computed relative to the (current)
1210 output line.
1211 Otherwise they are taken relative to the input line.
1212 For example, the following
1213 .RS
1214 .IP
1215 .ne 6v+\n(.Vu
1216 .ft B
1217 .nf
1218 \&.ds x a\et\ec
1219 \&.ds y b\et\ec
1220 \&.ds z c
1221 \&.ta 1i 3i
1222 \e*x
1223 \e*y
1224 \e*z
1225 .fi
1226 .RE
1227 .IP
1228 yields
1229 .RS
1230 .IP
1231 a         b         c
1232 .RE
1233 .IP
1234 In line-tabs mode, the same code gives
1235 .RS
1236 .IP
1237 a         b                   c
1238 .RE
1239 .IP
1240 Line-tabs mode is associated with the current environment; the read-only
1241 number register
1242 .B \\en[.linetabs]
1243 is set to\~1 if in line-tabs mode, and 0 otherwise.
1244 .TP
1245 .BI .mso\  file
1246 The same as the
1247 .B so
1248 request except that
1249 .I file
1250 is searched for in the same directories as macro files for the
1251 the
1252 .B \-m
1253 command line option.
1254 If the file name to be included
1255 has the form
1256 .IB name .tmac
1257 and it isn't found,
1258 .B mso
1259 tries to include
1260 .BI tmac. name
1261 instead and vice versa.
1262 .TP
1263 .BI .nop \ anything
1264 Execute
1265 .IR anything .
1266 This is similar to `.if\ 1'.
1267 .TP
1268 .B .nroff
1269 Make the
1270 .B n
1271 built-in condition true
1272 and the
1273 .B t
1274 built-in condition false.
1275 This can be reversed using the
1276 .B troff
1277 request.
1278 .TP
1279 .BI .open\  stream\ filename
1280 Open
1281 .I filename
1282 for writing and associate the stream named
1283 .I stream
1284 with it.
1285 See also the
1286 .B close
1287 and
1288 .B write
1289 requests.
1290 .TP 
1291 .BI .opena\  stream\ filename
1292 Like
1293 .BR open ,
1294 but if
1295 .I filename
1296 exists, append to it instead of truncating it.
1297 .TP
1298 .B .pnr
1299 Print the names and contents of all currently defined number registers
1300 on stderr.
1301 .TP
1302 .BI .psbb \ filename
1303 Get the bounding box of a PostScript image
1304 .IR filename .
1305 This file must conform to Adobe's Document Structuring Conventions; the
1306 command looks for a
1307 .B %%BoundingBox
1308 comment to extract the bounding box values.
1309 After a successful call, the coordinates (in PostScript units) of the lower
1310 left and upper right corner can be found in the registers
1311 .BR \en[llx] ,
1312 .BR \en[lly] ,
1313 .BR \en[urx] ,
1314 and
1315 .BR \en[ury] ,
1316 respectively.
1317 If some error has occurred, the four registers are set to zero.
1318 .TP
1319 .BI .pso \ command
1320 This behaves like the
1321 .B so
1322 request except that input comes from the standard output of
1323 .IR command .
1324 .TP
1325 .B .ptr
1326 Print the names and positions of all traps (not including input line
1327 traps and diversion traps) on stderr.  Empty slots in the page trap
1328 list are printed as well, because they can affect the priority of
1329 subsequently planted traps.
1330 .TP
1331 .BI .rchar\  c1\ c2\|.\|.\|.
1332 Remove the definitions of characters
1333 .IR c1 ,
1334 .IR c2 ,\|.\|.\|.
1335 This undoes the effect of a
1336 .B char
1337 request.
1338 .TP
1339 .B .return
1340 Within a macro, return immediately.
1341 No effect otherwise.
1342 .TP
1343 .B .rj
1344 .TQ
1345 .BI .rj\  n
1346 Right justify the next
1347 .I n
1348 input lines.
1349 Without an argument right justify the next input line.
1350 The number of lines to be right justified is available in the
1351 .B \en[.rj]
1352 register.
1353 This implicitly does
1354 .BR .ce\ 0 .
1355 The
1356 .B ce
1357 request implicitly does
1358 .BR .rj\ 0 .
1359 .TP
1360 .BI .rnn \ xx\ yy
1361 Rename number register
1362 .I xx
1363 to
1364 .IR yy .
1365 .TP
1366 .BI .shc\  c
1367 Set the soft hyphen character to
1368 .IR c .
1369 If
1370 .I c
1371 is omitted,
1372 the soft hyphen character will be set to the default
1373 .BR \e(hy .
1374 The soft hyphen character is the character which will be inserted
1375 when a word is hyphenated at a line break.
1376 If the soft hyphen character does not exist in the font of the character
1377 immediately preceding a potential break point,
1378 then the line will not be broken at that point.
1379 Neither definitions (specified with the
1380 .B char
1381 request)
1382 nor translations (specified with the
1383 .B tr
1384 request)
1385 are considered when finding the soft hyphen character.
1386 .TP
1387 .BI .shift\  n
1388 In a macro, shift the arguments by
1389 .I n
1390 positions:
1391 argument
1392 .I i
1393 becomes argument
1394 .IR i \- n ;
1395 arguments 1 to
1396 .I n
1397 will no longer be available.
1398 If
1399 .I n
1400 is missing,
1401 arguments will be shifted by 1.
1402 Shifting by negative amounts is currently undefined.
1403 .TP
1404 .BI .special\  s1\ s2\|.\|.\|.
1405 Fonts
1406 .IR s1 ,
1407 .IR s2 ,
1408 are special and will be searched for characters not in the
1409 current font.
1410 .TP
1411 .BI .sty\  n\ f
1412 Associate style
1413 .I f
1414 with font position
1415 .IR n .
1416 A font position can be associated either with a font or
1417 with a style.
1418 The current font is the index of a font position and so is also
1419 either a font or a style.
1420 When it is a style, the font that is actually used is the font the
1421 name of which is the concatenation of the name of the current family
1422 and the name of the current style.
1423 For example, if the current font is 1 and font position 1 is
1424 associated with style
1425 .B R
1426 and the current
1427 font family is
1428 .BR T ,
1429 then font
1430 .BR TR
1431 will be used.
1432 If the current font is not a style, then the current family is ignored.
1433 When the requests
1434 .BR cs ,
1435 .BR bd ,
1436 .BR tkf ,
1437 .BR uf ,
1438 or
1439 .B fspecial
1440 are applied to a style,
1441 then they will instead be applied to the member of the
1442 current family corresponding to that style.
1443 The default family can be set with the
1444 .B \-f
1445 option.
1446 The styles command in the
1447 .SM DESC
1448 file controls which font positions
1449 (if any) are initially associated with styles rather than fonts.
1450 .TP
1451 .BI .substring\  xx\ n1\  [ n2 ]
1452 Replace the string in register
1453 .I xx
1454 with the substring defined by the indices
1455 .I n1
1456 and
1457 .IR n2 .
1458 The first character in the string has index one.
1459 If
1460 .I n2
1461 is omitted, it is taken to be equal to the string's length.  If the
1462 index value
1463 .I n1
1464 or
1465 .I n2
1466 is negative or zero, it will be counted from the end of the string,
1467 going backwards: The last character has index 0, the character before
1468 the last character has index -1, etc.
1469 .TP
1470 .BI .tkf\  f\ s1\ n1\ s2\ n2
1471 Enable track kerning for font
1472 .IR f .
1473 When the current font is
1474 .I f
1475 the width of every character will be increased by an amount
1476 between
1477 .I n1
1478 and
1479 .IR n2 ;
1480 when the current point size is less than or equal to
1481 .I s1
1482 the width will be increased by
1483 .IR n1 ;
1484 when it is greater than or equal to
1485 .I s2
1486 the width will be increased by
1487 .IR n2 ;
1488 when the point size is greater than or equal to
1489 .I s1
1490 and less than or equal to
1491 .I s2
1492 the increase in width is a linear function of the point size.
1493 .TP
1494 .BI .tm1\  string
1495 Similar to the
1496 .B tm
1497 request,
1498 .I string
1499 is read in copy mode and written on the standard error, but an initial
1500 double quote in
1501 .I string
1502 is stripped off to allow initial blanks.
1503 .TP
1504 .BI .tmc\  string
1505 Similar to
1506 .BR tm1
1507 but without writing a final newline.
1508 .TP
1509 .BI .trf\  filename
1510 Transparently output the contents of file
1511 .IR filename .
1512 Each line is output as it would be were it preceded by
1513 .BR \e! ;
1514 however, the lines are not subject to copy-mode interpretation.
1515 If the file does not end with a newline, then a newline will
1516 be added.
1517 For example, you can define a macro
1518 .I x
1519 containing the contents of file
1520 .IR f ,
1521 using
1522 .RS
1523 .IP
1524 .BI .di\  x
1525 .br
1526 .BI .trf\  f
1527 .br
1528 .B .di
1529 .LP
1530 Unlike with the
1531 .B cf
1532 request,
1533 the file cannot contain characters such as
1534 .SM NUL
1535 that are not legal troff input characters.
1536 .RE
1537 .TP
1538 .B .trnt abcd
1539 This is the same as the
1540 .B tr
1541 request except that the translations do not apply to text that is
1542 transparently throughput into a diversion with
1543 .BR \e! .
1544 For example,
1545 .RS
1546 .IP
1547 .nf
1548 .ft B
1549 \&.tr ab
1550 \&.di x
1551 \e!.tm a
1552 \&.di
1553 \&.x
1554 .fi
1555 .ft
1556 .LP
1557 will print
1558 .BR b ;
1559 if
1560 .B trnt
1561 is used instead of
1562 .B tr
1563 it will print
1564 .BR a .
1565 .RE
1566 .TP
1567 .B .troff
1568 Make the
1569 .B n
1570 built-in condition false,
1571 and the
1572 .B t
1573 built-in condition true.
1574 This undoes the effect of the
1575 .B nroff
1576 request.
1577 .TP
1578 .BI .unformat\  xx
1579 This request `unformats' the diversion
1580 .IR xx .
1581 Contrary to the
1582 .B .asciify
1583 request, which tries to convert formatted elements of the diversion back
1584 to input tokens as much as possible,
1585 .B .unformat
1586 will only handle tabs and spaces between words (usually caused by spaces
1587 or newlines in the input) specially.
1588 The former are treated as if they were input tokens, and the latter are
1589 stretchable again.
1590 Note that the vertical size of lines is not preserved.
1591 Glyph information (font, font size, space width, etc.) is retained.
1592 Useful in conjunction with the
1593 .B .box
1594 and
1595 .B .boxa
1596 requests.
1597 .TP
1598 .BI .vpt\  n
1599 Enable vertical position traps if
1600 .I n
1601 is non-zero, disable them otherwise.
1602 Vertical position traps are traps set by the
1603 .B wh
1604 or
1605 .B dt
1606 requests.
1607 Traps set by the
1608 .B it
1609 request are not vertical position traps.
1610 The parameter that controls whether vertical position traps are enabled
1611 is global.
1612 Initially vertical position traps are enabled.
1613 .TP
1614 .BI .warn\  n
1615 Control warnings.
1616 .I n
1617 is the sum of the numbers associated with each warning that is to be enabled;
1618 all other warnings will be disabled.
1619 The number associated with each warning is listed in the `Warnings' section.
1620 For example,
1621 .B .warn 0
1622 will disable all warnings, and
1623 .B .warn 1
1624 will disable all warnings except that about missing characters.
1625 If
1626 .I n
1627 is not given,
1628 all warnings will be enabled.
1629 .TP
1630 .BI .while \ c\ anything
1631 While condition
1632 .I c
1633 is true, accept
1634 .I anything
1635 as input;
1636 .I c
1637 can be any condition acceptable to an
1638 .B if
1639 request;
1640 .I anything
1641 can comprise multiple lines if the first line starts with
1642 .B \e{
1643 and the last line ends with
1644 .BR \e} .
1645 See also the
1646 .B break
1647 and
1648 .B continue
1649 requests.
1650 .TP
1651 .BI .write\  stream\ anything
1652 Write
1653 .I anything
1654 to the stream named
1655 .IR stream .
1656 .I stream
1657 must previously have been the subject of an
1658 .B open
1659 request.
1660 .I anything
1661 is read in copy mode;
1662 a leading
1663 .B \(ts
1664 will be stripped.
1665 .TP
1666 .BI .writem\  stream\ xx
1667 Write the contents of the macro or string
1668 .I xx
1669 to the stream named
1670 .IR stream .
1671 .I stream
1672 must previously have been the subject of an
1673 .B open
1674 request.
1675 .I xx
1676 is read in copy mode.
1677 .
1678 .SS Extended requests
1679 .
1680 .TP
1681 .BI .cf\  filename
1682 When used in a diversion, this will embed in the diversion an object which,
1683 when reread, will cause the contents of
1684 .I filename
1685 to be transparently copied through to the output.
1686 In UNIX troff, the
1687 contents of
1688 .I filename
1689 is immediately copied through to the output regardless of whether
1690 there is a current diversion; this behaviour is so anomalous that it
1691 must be considered a bug.
1692 .TP
1693 .BI .ev\  xx
1694 If
1695 .I xx
1696 is not a number, this will switch to a named environment called
1697 .IR xx .
1698 The environment should be popped with a matching
1699 .B ev
1700 request without any arguments, just as for numbered environments.
1701 There is no limit on the number of named environments; they will be
1702 created the first time that they are referenced.
1703 .TP
1704 .BI .fp\  n\ f1\ f2
1705 The
1706 .B fp
1707 request has an optional third argument.
1708 This argument gives the external name of the font,
1709 which is used for finding the font description file.
1710 The second argument gives the internal name of the font
1711 which is used to refer to the font in troff after it has been mounted.
1712 If there is no third argument then the internal name will be used
1713 as the external name.
1714 This feature allows you to use fonts with long names in compatibility mode.
1715 .TP
1716 .BI .ss\  m\ n
1717 When two arguments are given to the
1718 .B ss
1719 request, the second argument gives the
1720 .IR "sentence space size" .
1721 If the second argument is not given, the sentence space size
1722 will be the same as the word space size.
1723 Like the word space size, the sentence space is in units of
1724 one twelfth of the spacewidth parameter for the current font.
1725 Initially both the word space size and the sentence
1726 space size are 12.
1727 Contrary to UNIX troff, GNU troff handles this request in nroff mode
1728 also; a given value is then rounded down to the nearest multiple of\~12.
1729 The sentence space size is used in two circumstances:
1730 if the end of a sentence occurs at the end of a line in fill mode, then
1731 both an inter-word space and a sentence space will be added;
1732 if two spaces follow the end of a sentence in the middle of a line,
1733 then the second space will be a sentence space.
1734 Note that the behaviour of UNIX troff will be exactly
1735 that exhibited by GNU troff if a second argument is never given to the
1736 .B ss
1737 request.
1738 In GNU troff, as in UNIX troff, you should always
1739 follow a sentence with either a newline or two spaces.
1740 .TP
1741 .BI .ta\  n1\ n2\|.\|.\|.nn \ T\  r1\ r2\|.\|.\|.\|rn
1742 Set tabs at positions
1743 .IR n1 ,
1744 .IR n2 ,\|.\|.\|.\|,
1745 .I nn
1746 and then set tabs at
1747 .IR nn + r1 ,
1748 .IR nn + r2 ,\|.\|.\|.\|.\|,
1749 .IR nn + rn
1750 and then at
1751 .IR nn + rn + r1 ,
1752 .IR nn + rn + r2 ,\|.\|.\|.\|,
1753 .IR nn + rn + rn ,
1754 and so on.
1755 For example,
1756 .RS
1757 .IP
1758 .B
1759 \&.ta T .5i
1760 .LP
1761 will set tabs every half an inch.
1762 .RE
1763 .
1764 .SS New number registers
1765 .
1766 The following read-only registers are available:
1767 .TP
1768 .B \en[.C]
1769 1 if compatibility mode is in effect, 0 otherwise.
1770 .TP
1771 .B \en[.cdp]
1772 The depth of the last character added to the current environment.
1773 It is positive if the character extends below the baseline.
1774 .TP
1775 .B \en[.ce]
1776 The number of lines remaining to be centered, as set by the
1777 .B ce
1778 request.
1779 .TP
1780 .B \en[.cht]
1781 The height of the last character added to the current environment.
1782 It is positive if the character extends above the baseline.
1783 .TP
1784 .B \en[.csk]
1785 The skew of the last character added to the current environment.
1786 The
1787 .I skew
1788 of a character is how far to the right of the center of a character
1789 the center of an accent over that character should be placed.
1790 .TP
1791 .B \en[.ev]
1792 The name or number of the current environment.
1793 This is a string-valued register.
1794 .TP
1795 .B \en[.fam]
1796 The current font family.
1797 This is a string-valued register.
1798 .TP
1799 .B \en[.fp]
1800 The number of the next free font position.
1801 .TP
1802 .B \en[.g]
1803 Always 1.
1804 Macros should use this to determine whether they are running
1805 under GNU troff.
1806 .TP
1807 .B \en[.hla]
1808 The current hyphenation language as set by the
1809 .B hla
1810 request.
1811 .TP
1812 .B \en[.hlc]
1813 The number of immediately preceding consecutive hyphenated lines.
1814 .TP
1815 .B \en[.hlm]
1816 The maximum allowed number of consecutive hyphenated lines, as set by the
1817 .B hlm
1818 request.
1819 .TP
1820 .B \en[.hy]
1821 The current hyphenation flags (as set by the
1822 .B hy
1823 request).
1824 .TP
1825 .B \en[.hym]
1826 The current hyphenation margin (as set by the
1827 .B hym
1828 request).
1829 .TP
1830 .B \en[.hys]
1831 The current hyphenation space (as set by the
1832 .B hys
1833 request).
1834 .TP
1835 .B \en[.in]
1836 The indent that applies to the current output line.
1837 .TP
1838 .B \en[.int]
1839 Set to a positive value if last output line is interrupted (i.e., if it
1840 contains
1841 .IR \ec ).
1842 .TP
1843 .B \en[.kern]
1844 .B 1
1845 if pairwise kerning is enabled,
1846 .B 0
1847 otherwise.
1848 .TP
1849 .B \en[.lg]
1850 The current ligature mode (as set by the
1851 .B lg
1852 request).
1853 .TP
1854 .B \en[.linetabs]
1855 The current line-tabs mode (as set by the
1856 .B linetabs
1857 request).
1858 .TP
1859 .B \en[.ll]
1860 The line length that applies to the current output line.
1861 .TP
1862 .B \en[.lt]
1863 The title length as set by the
1864 .B lt
1865 request.
1866 .TP
1867 .B \en[.ne]
1868 The amount of space that was needed in the last
1869 .B ne
1870 request that caused a trap to be sprung.
1871 Useful in conjunction with the
1872 .B \en[.trunc]
1873 register.
1874 .TP
1875 .B \en[.ns]
1876 .B 1
1877 if no-space mode is active,
1878 .B 0
1879 otherwise.
1880 .TP
1881 .B \en[.pn]
1882 The number of the next page:
1883 either the value set by a
1884 .B pn
1885 request, or the number of the current page plus 1.
1886 .TP
1887 .B \en[.ps]
1888 The current pointsize in scaled points.
1889 .TP
1890 .B \en[.psr]
1891 The last-requested pointsize in scaled points.
1892 .TP
1893 .B \en[.rj]
1894 The number of lines to be right-justified as set by the
1895 .B rj
1896 request.
1897 .TP
1898 .B \en[.sr]
1899 The last requested pointsize in points as a decimal fraction.
1900 This is a string-valued register.
1901 .TP
1902 .B \en[.tabs]
1903 A string representation of the current tab settings suitable for use as
1904 an argument to the
1905 .B ta
1906 request.
1907 .TP
1908 .B \en[.trunc]
1909 The amount of vertical space truncated by the most recently sprung
1910 vertical position trap, or,
1911 if the trap was sprung by a
1912 .B ne
1913 request,
1914 minus the amount of vertical motion produced by the
1915 .B ne
1916 request.
1917 In other words, at the point a trap is sprung, it represents the difference
1918 of what the vertical position would have been but for the trap,
1919 and what the vertical position actually is.
1920 Useful in conjunction with the
1921 .B \en[.ne]
1922 register.
1923 .TP
1924 .B \en[.ss]
1925 .TQ
1926 .B \en[.sss]
1927 These give the values of the parameters set by the
1928 first and second arguments of the
1929 .B ss
1930 request.
1931 .TP
1932 .B \en[.vpt]
1933 1 if vertical position traps are enabled, 0 otherwise.
1934 .TP
1935 .B \en[.warn]
1936 The sum of the numbers associated with each of the currently enabled
1937 warnings.
1938 The number associated with each warning is listed in the `Warnings'
1939 subsection.
1940 .TP
1941 .B \en[.x]
1942 The major version number.
1943 For example, if the version number is
1944 .B 1.03
1945 then
1946 .B \en[.x]
1947 will contain
1948 .BR 1 .
1949 .TP
1950 .B \en[.y]
1951 The minor version number.
1952 For example, if the version number is
1953 .B 1.03
1954 then
1955 .B \en[.y]
1956 will contain
1957 .BR 03 .
1958 .TP
1959 .B \en[.Y]
1960 The revision number of groff.
1961 .TP
1962 .B \en[llx]
1963 .TQ
1964 .B \en[lly]
1965 .TQ
1966 .B \en[urx]
1967 .TQ
1968 .B \en[ury]
1969 These four registers are set by the
1970 .B \&.psbb
1971 request and contain the bounding box values (in PostScript units) of a given
1972 PostScript image.
1973 .LP
1974 The following read/write registers are set by the
1975 .B \ew
1976 escape sequence:
1977 .TP
1978 .B \en[rst]
1979 .TQ
1980 .B \en[rsb]
1981 Like the
1982 .B st
1983 and
1984 .B sb
1985 registers, but takes account of the heights and depths of characters.
1986 .TP
1987 .B \en[ssc]
1988 The amount of horizontal space (possibly negative) that should
1989 be added to the last character before a subscript.
1990 .TP
1991 .B \en[skw]
1992 How far to right of the center of the last character
1993 in the
1994 .B \ew
1995 argument,
1996 the center of an accent from a roman font should be placed over that character.
1997 .LP
1998 Other available read/write number registers are:
1999 .TP
2000 .B \en[c.]
2001 The current input line number.
2002 .B \en[.c]
2003 is a read-only alias to this register.
2004 .TP
2005 .B \en[hp]
2006 The current horizontal position at input line.
2007 .TP
2008 .B \en[systat]
2009 The return value of the system() function executed by the last
2010 .B sy
2011 request.
2012 .TP
2013 .B \en[slimit]
2014 If greater than 0, the maximum number of objects on the input stack.
2015 If less than or equal to 0, there is no limit on the number of objects
2016 on the input stack.  With no limit, recursion can continue until
2017 virtual memory is exhausted.
2018 .TP
2019 .B \en[year]
2020 The current year.
2021 Note that the traditional
2022 .B troff
2023 number register
2024 .B \en[yr]
2025 is the current year minus 1900.
2026 .
2027 .SS Miscellaneous
2028 .
2029 .B troff
2030 predefines a single (read/write) string-based register,
2031 .BR \e*(.T ,
2032 which contains the argument given to the
2033 .B -T
2034 command line option, namely the current output device (for example,
2035 .I latin1
2036 or
2037 .IR ascii ).
2038 Note that this is not the same as the (read-only) number register
2039 .B \en[.T]
2040 which is defined to be\ 1 if
2041 .B troff
2042 is called with the
2043 .B -T
2044 command line option, and zero otherwise.  This behaviour is different to
2045 UNIX troff.
2046 .LP
2047 Fonts not listed in the
2048 .SM DESC
2049 file are automatically mounted on the next available font position
2050 when they are referenced.
2051 If a font is to be mounted explicitly with the
2052 .B fp
2053 request on an unused font position,
2054 it should be mounted on the first unused font position,
2055 which can be found in the
2056 .B \en[.fp]
2057 register;
2058 although
2059 .B troff
2060 does not enforce this strictly,
2061 it will not allow a font to be mounted at a position whose number is much
2062 greater than that of any currently used position.
2063 .LP
2064 Interpolating a string does not hide existing macro arguments.
2065 Thus in a macro, a more efficient way of doing
2066 .IP
2067 .BI . xx\  \e\e$@
2068 .LP
2069 is
2070 .IP
2071 .BI \e\e*[ xx ]\e\e  
2072 .LP
2073 If the font description file contains pairwise kerning information,
2074 characters from that font will be kerned.
2075 Kerning between two characters can be inhibited by placing a
2076 .B \e&
2077 between them.
2078 .LP
2079 In a string comparison in a condition, 
2080 characters that appear at different input levels
2081 to the first delimiter character will not be recognised
2082 as the second or third delimiters.
2083 This applies also to the
2084 .B tl
2085 request.
2086 In a
2087 .B \ew
2088 escape sequence,
2089 a character that appears at a different input level to
2090 the starting delimiter character will not be recognised
2091 as the closing delimiter character.
2092 When decoding a macro argument that is delimited
2093 by double quotes, a character that appears at a different
2094 input level to the starting delimiter character will not
2095 be recognised as the closing delimiter character.
2096 The implementation of
2097 .B \e$@
2098 ensures that the double quotes surrounding an argument
2099 will appear the same input level, which will be different
2100 to the input level of the argument itself.
2101 In a long escape name
2102 .B ]
2103 will not be recognized as a closing delimiter except
2104 when it occurs at the same input level as the opening
2105 .BR ] .
2106 In compatibility mode, no attention is paid to the input-level.
2107 .LP
2108 There are some new types of condition:
2109 .TP
2110 .BI .if\ r xxx
2111 True if there is a number register named
2112 .IR xxx .
2113 .TP
2114 .BI .if\ d xxx
2115 True if there is a string, macro, diversion, or request named
2116 .IR xxx .
2117 .TP
2118 .BI .if\ c ch
2119 True if there is a character
2120 .IR ch
2121 available;
2122 .I ch
2123 is either an
2124 .SM ASCII
2125 character
2126 or a special character
2127 .BI \e( xx
2128 or
2129 .BI \e[ xxx ]\fR;
2130 the condition will also be true if
2131 .I ch
2132 has been defined by the
2133 .B char
2134 request.
2135 .LP
2136 The
2137 .B tr
2138 request can now map characters onto
2139 .BR \e~ .
2140 .
2141 .SS Warnings
2142 .
2143 The warnings that can be given by
2144 .B troff
2145 are divided into the following categories.
2146 The name associated with each warning is used by the
2147 .B \-w
2148 and
2149 .B \-W
2150 options;
2151 the number is used by the
2152 .B warn
2153 request, and by the
2154 .B .warn
2155 register.
2156 .nr x \w'\fBright-brace'+1n+\w'0000'u
2157 .ta \nxuR
2158 .TP \nxu+3n
2159 .BR char \t1
2160 Non-existent characters.
2161 This is enabled by default.
2162 .TP
2163 .BR number \t2
2164 Invalid numeric expressions.
2165 This is enabled by default.
2166 .TP
2167 .BR break \t4
2168 In fill mode, lines which could not be broken so that their length was
2169 less than the line length.
2170 This is enabled by default.
2171 .TP
2172 .BR delim \t8
2173 Missing or mismatched closing delimiters.
2174 .TP
2175 .BR el \t16
2176 Use of the
2177 .B el
2178 request with no matching
2179 .B ie
2180 request.
2181 .TP
2182 .BR scale \t32
2183 Meaningless scaling indicators.
2184 .TP
2185 .BR range \t64
2186 Out of range arguments.
2187 .TP
2188 .BR syntax \t128
2189 Dubious syntax in numeric expressions.
2190 .TP
2191 .BR di \t256
2192 Use of
2193 .B di
2194 or
2195 .B da
2196 without an argument when there is no current diversion.
2197 .TP
2198 .BR mac \t512
2199 Use of undefined strings, macros and diversions.
2200 When an undefined string, macro or diversion is used,
2201 that string is automatically defined as empty.
2202 So, in most cases, at most one warning will be given for
2203 each name.
2204 .TP
2205 .BR reg \t1024
2206 Use of undefined number registers.
2207 When an undefined number register is used,
2208 that register is automatically defined to have a value of 0.
2209 a definition is automatically made with a value of 0.
2210 So, in most cases, at most one warning will be given for
2211 use of a particular name.
2212 .TP
2213 .BR tab \t2048
2214 Inappropriate use of a tab character.
2215 Either use of a tab character where a number was expected,
2216 or use of tab character in an unquoted macro argument.
2217 .TP
2218 .BR right-brace \t4096
2219 Use of
2220 .B \e}
2221 where a number was expected.
2222 .TP
2223 .BR missing \t8192
2224 Requests that are missing non-optional arguments.
2225 .TP
2226 .BR input \t16384
2227 Illegal input characters.
2228 .TP
2229 .BR escape \t32768
2230 Unrecognized escape sequences.
2231 When an unrecognized escape sequence is encountered,
2232 the escape character is ignored.
2233 .TP
2234 .BR space \t65536
2235 Missing space between a request or macro and its argument.
2236 This warning will be given 
2237 when an undefined name longer than two characters is encountered,
2238 and the first two characters of the name make a defined name.
2239 The request or macro will not be invoked.
2240 When this warning is given, no macro is automatically defined.
2241 This is enabled by default.
2242 This warning will never occur in compatibility mode.
2243 .TP
2244 .BR font \t131072
2245 Non-existent fonts.
2246 This is enabled by default.
2247 .TP
2248 .BR ig \t262144
2249 Illegal escapes in text ignored with the
2250 .B ig
2251 request.
2252 These are conditions that are errors when they do not occur
2253 in ignored text.
2254 .LP
2255 There are also names that can be used to refer to groups of warnings:
2256 .TP
2257 .B all
2258 All warnings except
2259 .BR di ,
2260 .B mac
2261 and
2262 .BR reg .
2263 It is intended that this covers all warnings
2264 that are useful with traditional macro packages.
2265 .TP
2266 .B w
2267 All warnings.
2268 .
2269 .SS Incompatibilities
2270 .
2271 .LP
2272 Long names cause some incompatibilities.
2273 UNIX troff will interpret
2274 .IP
2275 .B
2276 \&.dsabcd
2277 .LP
2278 as defining a string
2279 .B ab
2280 with contents
2281 .BR cd .
2282 Normally, GNU troff will interpret this as a call of a macro named
2283 .BR dsabcd .
2284 Also UNIX troff will interpret
2285 .B \e*[
2286 or
2287 .B \en[
2288 as references to a string or number register called
2289 .BR [ .
2290 In GNU troff, however, this will normally be interpreted as the start
2291 of a long name.
2292 In
2293 .I compatibility mode
2294 GNU troff will interpret these things in the traditional way.
2295 In compatibility mode, however, long names are not recognised.
2296 Compatibility mode can be turned on with the
2297 .B \-C
2298 command line option, and turned on or off with the
2299 .B cp
2300 request.
2301 The number register
2302 .B \en[.C]
2303 is 1 if compatibility mode is on, 0 otherwise.
2304 .LP
2305 GNU troff
2306 does not allow the use of the escape sequences
2307 .BR \\e\e|\e^\e&\e}\e{\e (space) \e'\e`\e-\e_\e!\e%\ec
2308 in names of strings, macros, diversions, number registers,
2309 fonts or environments; UNIX troff does.
2310 The
2311 .B \eA
2312 escape sequence may be helpful in avoiding use of these
2313 escape sequences in names.
2314 .LP
2315 Fractional pointsizes cause one noteworthy incompatibility.
2316 In UNIX troff the
2317 .B ps 
2318 request ignores scale indicators and so
2319 .IP
2320 .B .ps\ 10u
2321 .LP
2322 will set the pointsize to 10 points, whereas in
2323 GNU troff it will set the pointsize to 10 scaled points.
2324 .LP
2325 In GNU troff there is a fundamental difference between unformatted,
2326 input characters, and formatted, output characters.
2327 Everything that affects how an output character
2328 will be output is stored with the character; once an output
2329 character has been constructed it is unaffected by any subsequent
2330 requests that are executed, including
2331 .BR bd ,
2332 .BR cs ,
2333 .BR tkf ,
2334 .BR tr ,
2335 or
2336 .B fp
2337 requests.
2338 Normally output characters are constructed from input
2339 characters at the moment immediately before the character
2340 is added to the current output line.
2341 Macros, diversions and strings are all, in fact, the same type
2342 of object; they contain lists of input characters and output
2343 characters in any combination.
2344 An output character does not behave like an input character
2345 for the purposes of macro processing; it does not inherit any
2346 of the special properties that the input character from which it
2347 was constructed might have had.
2348 For example,
2349 .IP
2350 .nf
2351 .ft B
2352 \&.di x
2353 \e\e\e\e
2354 \&.br
2355 \&.di
2356 \&.x
2357 .ft
2358 .fi
2359 .LP
2360 will print
2361 .B \e\e
2362 in GNU troff;
2363 each pair of input
2364 .BR \e s
2365 is turned into one output
2366 .B \e
2367 and the resulting output
2368 .BR \e s
2369 are not interpreted as escape characters when they are reread.
2370 UNIX troff would interpret them as escape characters
2371 when they were reread and would end up printing one
2372 .BR \e .
2373 The correct way to obtain a printable
2374 .B \e
2375 is to use the
2376 .B \ee
2377 escape sequence: this will always print a single instance of the
2378 current escape character, regardless of whether or not it is used in a
2379 diversion; it will also work in both GNU troff and UNIX troff.
2380 If you wish for some reason to store in a diversion an escape
2381 sequence that will be interpreted when the diversion is reread,
2382 you can either use the traditional
2383 .B \e!\&
2384 transparent output facility, or, if this is unsuitable, the new
2385 .B \e?\&
2386 escape sequence.
2387 .
2388 .
2389 .SH ENVIRONMENT
2390 .
2391 .
2392 .TP
2393 .SM
2394 .B GROFF_TMAC_PATH
2395 A colon separated list of directories in which to search for
2396 macro files.
2397 .B troff
2398 will scan directories given in
2399 the
2400 .B \-M
2401 option before these, and in standard directories (current directory if in
2402 unsafe mode, home directory,
2403 .BR /usr/share/groff/site-tmac ,
2404 .BR /usr/lib/groff/site-tmac ,
2405 .BR /usr/share/groff/1.17.2/tmac )
2406 after these.
2407 .TP
2408 .SM
2409 .B GROFF_TYPESETTER
2410 Default device.
2411 .TP
2412 .SM
2413 .B GROFF_FONT_PATH
2414 A colon separated list of directories in which to search for the
2415 .BI dev name
2416 directory.
2417 .B troff
2418 will scan directories given in the
2419 .B \-F
2420 option before these, and in standard directories
2421 .RB ( /usr/share/groff/1.17.2/font:/usr/lib/font )
2422 after these.
2423 .
2424 .
2425 .SH FILES
2426 .
2427 .
2428 .Tp \w'/usr/share/groff/1.17.2/font/devname/DESC'u+3n
2429 .B /usr/share/groff/1.17.2/tmac/troffrc
2430 Initialization file (called before any other macro package).
2431 .TP
2432 .B /usr/share/groff/1.17.2/tmac/troffrc-end
2433 Initialization file (called after any other macro package).
2434 .TP
2435 .BI /usr/share/groff/1.17.2/tmac/ name .tmac
2436 .TQ
2437 .BI /usr/share/groff/1.17.2/tmac/tmac. name
2438 Macro files
2439 .TP
2440 .BI /usr/share/groff/1.17.2/font/dev name /DESC
2441 Device description file for device
2442 .IR name .
2443 .TP
2444 .BI /usr/share/groff/1.17.2/font/dev name / F
2445 Font file for font
2446 .I F
2447 of device
2448 .IR name .
2449 .LP
2450 Note that
2451 .B troffrc
2452 and
2453 .B troffrc-end
2454 are neither searched in the current nor in the home directory by default for
2455 security reasons (even if the
2456 .B \-U
2457 option is given).
2458 Use the
2459 .B \-M
2460 command line option or the
2461 .B GROFF_TMAC_PATH
2462 environment variable to add these directories to the search path if
2463 necessary.
2464 .
2465 .
2466 .SH "SEE ALSO"
2467 .
2468 .
2469 .BR groff (7)
2470 -- This is a short but complete reference of all requests, registers, and
2471 escapes.
2472 .PP
2473 .BR groff (1),
2474 .BR tbl (1),
2475 .BR pic (1),
2476 .BR eqn (1),
2477 .BR refer (1),
2478 .BR soelim (1),
2479 .BR grn (1),
2480 .BR grops (1),
2481 .BR grodvi (1),
2482 .BR grotty (1),
2483 .BR grohtml (1),
2484 .BR grolj4 (1),
2485 .BR groff_font (5),
2486 .BR groff_out (5),
2487 .BR groff_char (7)
2488 .
2489 .\" Local Variables:
2490 .\" mode: nroff
2491 .\" End: