Removing the grohtml-old device driver which is now obsolete.
[s-roff.git] / src / roff / troff / troff.man
blob7fe052b4e61afeaf21681e16d3b69c9f63c52aff
1 .ig \"-*- nroff -*-
2 Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc.
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.
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.
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.
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
24 .de TQ
25 .br
26 .ns
27 .TP \\$1
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"
37 .\" The BSD man macros can't handle " in arguments to font change macros,
38 .\" so use \(ts instead of ".
39 .tr \(ts"
42 .TH @G@TROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
45 .SH NAME
48 @g@troff \- format documents
51 .SH SYNOPSIS
54 .nr a \n(.j
55 .ad l
56 .nr i \n(.i
57 .in +\w'\fB@g@troff 'u
58 .ti \niu
59 .B @g@troff
60 .de OP
61 .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
62 .el .RB "[\ " "\\$1" "\ ]"
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.
84 .SH DESCRIPTION
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.
96 .SH OPTIONS
99 .TP \w'\-dname=s'u+2n
100 .B \-a
101 Generate an
102 .SM ASCII
103 approximation of the typeset output.
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.
117 .B \-i
118 Read the standard input after all the named input files have been
119 processed.
121 .B \-v
122 Print the version number.
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.
133 .BI \-W name
134 Inhibit warning
135 .IR name .
136 Multiple
137 .B \-W
138 options are allowed.
140 .B \-E
141 Inhibit all error messages.
143 .B \-z
144 Suppress formatted output.
146 .B \-C
147 Enable compatibility mode.
149 .BI \-d cs
151 .BI \-d name = s
152 Define
153 .I c
155 .I name
156 to be a string
157 .IR s ;
158 .I c
159 must be a one letter name.
161 .BI \-f fam
163 .I fam
164 as the default font family.
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, @SYSTEMMACRODIR@, @LOCALMACRODIR@, and
179 @MACRODIR@.
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 ,
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.
193 .B \-R
194 Don't load
195 .B troffrc
197 .BR troffrc-end .
199 .BI \-n num
200 Number the first page
201 .IR num .
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
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.
224 .BI \-r cn
226 .BI \-r name = n
227 Set number register
228 .I c
230 .I name
232 .IR n ;
233 .I c
234 must be a one character name;
235 .I n
236 can be any troff numeric expression.
238 .BI \-T name
239 Prepare output for device
240 .IR name ,
241 rather than the default
242 .BR @DEVICE@ .
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.
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.
263 .SH USAGE
266 Only the features not in UNIX troff are described here.
268 .SS Long names
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:
278 .BI \e[ xxx ]
279 Print the special character called
280 .IR xxx .
282 .BI \ef[ xxx ]
283 Set font
284 .IR xxx .
286 .BI \e*[ xxx ]
287 Interpolate string
288 .IR xxx .
290 .BI \en[ xxx ]
291 Interpolate number register
292 .IR xxx .
294 .SS Fractional pointsizes
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.
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.
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.
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
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
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.
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
376 .B z
377 scale indicators.
379 .SS Numeric expressions
382 Spaces are permitted in a number expression within parentheses.
384 .B M
385 indicates a scale of 100ths of an em.
387 .IB e1 >? e2
388 The maximum of
389 .I e1
391 .IR e2 .
393 .IB e1 <? e2
394 The minimum of
395 .I e1
397 .IR e2 .
399 .BI ( c ; e )
400 Evaluate
401 .I e
402 using
403 .I c
404 as the default scaling indicator.
406 .I c
407 is missing, ignore scaling indicators in the evaluation of
408 .IR e .
410 .SS New escape sequences
413 .BI \eA' anything '
414 This expands to
415 .B 1
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
425 .I anything
426 is empty.
427 This is useful if you want to lookup user input in some sort of
428 associative table.
430 .BI \eB' anything '
431 This expands to
432 .B 1
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
441 .I anything
442 is empty.
444 .BI \eC' xxx '
445 Typeset character named
446 .IR xxx .
447 Normally it is more convenient to use
448 .BI \e[ xxx ]\fR.
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.
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:
462 \&.ds { \ev'\-.3m'\es'\eEn[.s]*6u/10u'
464 \&.ds } \es0\ev'.3m'
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).
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.
486 .B \eN
487 escape sequence can be conveniently used on conjunction with the
488 .B char
489 request:
493 \&.char \e[phone] \ef(ZD\eN'37'
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 \-\-\- ;
504 .B \eN
505 escape sequence is the only way to use these.
507 .BI \eR' name\ \(+-n '
508 This has the same effect as
511 .BI .nr\  name\ \(+-n
514 .BI \es( nn
516 .BI \es\(+-( nn
517 Set the point size to
518 .I nn
519 points;
520 .I nn
521 must be exactly two digits.
523 .BI \es[\(+- n ]
525 .BI \es\(+-[ n ]
527 .BI \es'\(+- n '
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 .
537 .BI \eV x
539 .BI \eV( xx
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.
549 .BI \eY x
551 .BI \eY( xx
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.
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.
575 .B \e$0
576 The name by which the current macro was invoked.
578 .B als
579 request can make a macro have more than one name.
581 .B \e$*
582 In a macro, the concatenation of all the arguments separated by spaces.
584 .B \e$@
585 In a macro, the concatenation of all the arguments with each surrounded by
586 double quotes, and separated by spaces. 
588 .BI \e$( nn
590 .BI \e$[ nnn ]
591 In a macro, this gives the
592 .IR nn -th
594 .IR nnn -th
595 argument.
596 Macros can have an unlimited number of arguments.
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
619 .ft B
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
642 will print
643 .BR 4 .
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.
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.
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.
684 .B \e~
685 This produces an unbreakable space that stretches like a normal inter-word
686 space when a line is adjusted.
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.
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.
703 .SS New requests
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.
713 .I yy
714 is undefined, a warning of type
715 .B reg
716 will be generated, and the request will be ignored.
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).
726 .I yy
727 is undefined, a warning of type
728 .B mac
729 will be generated, and the request will be ignored.
731 .BR de ,
732 .BR am ,
733 .BR di ,
734 .BR da ,
735 .BR ds ,
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.
742 .BI .asciify\  xx
743 This request `unformats' the diversion
744 .I xx
745 in such a way that
746 .SM ASCII
747 and space characters (and some escape sequences) that were formatted and
748 diverted into
749 .I xx
750 will be treated like ordinary input characters when
751 .I xx
752 is reread.
753 Useful for diversions in conjunction with the
754 .B .writem
755 request.
756 It can be also used for gross hacks; for example, this
759 .ne 7v+\n(.Vu
760 .ft B
762 \&.tr @.
763 \&.di x
764 \&@nr n 1
765 \&.br
766 \&.di
767 \&.tr @@
768 \&.asciify x
769 \&.x
773 will set register
774 .B n
775 to 1.
776 Note that glyph information (font, font size, etc.) is not preserved; use
777 .B .unformat
778 instead.
780 .B .backtrace
781 Print a backtrace of the input stack on stderr.
783 .BI .blm\  xx
784 Set the blank line macro to
785 .IR xx .
786 If there is a blank line macro,
787 it will be invoked when a blank line is encountered instead of the usual
788 troff behaviour.
790 .BI .box\  xx
792 .BI .boxa\  xx
793 These requests are similar to the
794 .B di
796 .B da
797 requests with the exception that a partially filled line will not become
798 part of the diversion (i.e., the diversion always starts with a new line)
799 but restored after ending the diversion, discarding the partially filled
800 line which possibly comes from the diversion.
802 .B .break
803 Break out of a while loop.
804 See also the
805 .B while
807 .B continue
808 requests.
809 Be sure not to confuse this with the
810 .B br
811 request.
813 .BI .cflags\  n\ c1\ c2\|.\|.\|.
814 Characters
815 .IR c1 ,
816 .IR c2 ,\|.\|.\|.
817 have properties determined by
818 .IR n ,
819 which is ORed from the following:
823 the character ends sentences
824 (initially characters
825 .B .?!\&
826 have this property);
829 lines can be broken before the character
830 (initially no characters have this property);
831 a line will not be broken at a character with this property
832 unless the characters on each side both have non-zero
833 hyphenation codes.
836 lines can be broken after the character
837 (initially characters
838 .B \-\e(hy\e(em
839 have this property);
840 a line will not be broken at a character with this property
841 unless the characters on each side both have non-zero
842 hyphenation codes.
845 the character overlaps horizontally
846 (initially characters
847 .B \e(ul\e(rn\e(ru
848 have this property);
851 the character overlaps vertically
852 (initially character
853 .B \e(br
854 has this property);
857 an end of sentence character followed by any number of characters
858 with this property will be treated
859 as the end of a sentence if followed by a newline or two spaces;
860 in other words
861 the character is transparent for the purposes of end of sentence
862 recognition;
863 this is the same as having a zero space factor in \*(tx
864 (initially characters
865 .B \(ts')]*\e(dg\e(rq
866 have this property).
869 .BI .char\  c\ string
870 Define character
871 .I c
872 to be
873 .IR string .
874 Every time character
875 .I c
876 needs to be printed,
877 .I string
878 will be processed in a temporary environment and the result
879 will be wrapped up into a single object.
880 Compatibility mode will be turned off
881 and the escape character will be set to
882 .B \e
883 while
884 .I string
885 is being processed.
886 Any emboldening, constant spacing or track kerning will be applied
887 to this object rather than to individual characters in
888 .IR string .
889 A character defined by this request can be used just like
890 a normal character provided by the output device.
891 In particular other characters can be translated to it
892 with the
893 .B tr
894 request;
895 it can be made the leader character by the
896 .B lc
897 request;
898 repeated patterns can be drawn with the character using the
899 .B \el
901 .B \eL
902 escape sequences;
903 words containing the character can be hyphenated
904 correctly, if the
905 .B hcode
906 request is used to give the character a hyphenation code.
907 There is a special anti-recursion feature: 
908 use of character within the character's definition
909 will be handled like normal characters not defined with
910 .BR char .
911 A character definition can be removed with the
912 .B rchar
913 request.
915 .BI .chop\  xx
916 Chop the last character off macro, string, or diversion
917 .IR xx .
918 This is useful for removing the newline from the end of diversions
919 that are to be interpolated as strings.
921 .BI .close\  stream
922 Close the stream named
923 .IR stream ;
924 .I stream
925 will no longer be an acceptable argument to the
926 .B write
927 request.
928 See the
929 .B open
930 request.
932 .B .continue
933 Finish the current iteration of a while loop.
934 See also the
935 .B while
937 .B break
938 requests.
940 .BI .cp\  n
942 .I n
943 is non-zero or missing, enable compatibility mode, otherwise
944 disable it.
945 In compatibility mode, long names are not recognised, and the
946 incompatibilities caused by long names do not arise.
948 .BI .dei\  xx\ yy
949 Define macro indirectly.
950 The following example
953 .ne 2v+\n(.Vu
954 .ft B
956 \&.ds xx aa
957 \&.ds yy bb
958 \&.dei xx yy
962 is equivalent to
966 \&.de aa bb
969 .BI .do\  xxx
970 Interpret
971 .I .xxx
972 with compatibility mode disabled.
973 For example,
977 \&.do fam T
979 would have the same effect as
982 \&.fam T
984 except that it would work even if compatibility mode had been enabled.
985 Note that the previous compatibility mode is restored before any files
986 sourced by
987 .I xxx
988 are interpreted.
991 .B .ecs
992 Save current escape character.
994 .B .ecr
995 Restore escape character saved with
996 .BR ecs .
997 Without a previous call to
998 .BR ecs ,
999 .RB ` \e '
1000 will be the new escape character.
1002 .BI .evc\  xx
1003 Copy the contents of environment
1004 .I xx
1005 to the current environment.
1006 No pushing or popping of environents will be done.
1008 .BI .fam\  xx
1009 Set the current font family to
1010 .IR xx .
1011 The current font family is part of the current environment.
1013 .I xx
1014 is missing, switch back to previous font family.
1015 See the description of the
1016 .B sty
1017 request for more information on font families.
1019 .BI .fspecial\  f\ s1\ s2\|.\|.\|.
1020 When the current font is
1021 .IR f ,
1022 fonts
1023 .IR s1 ,
1024 .IR s2 ,\|.\|.\|.
1025 will be special, that is, they will searched for characters not in
1026 the current font.
1027 Any fonts specified in the
1028 .B special
1029 request will be searched after fonts specified in the
1030 .B fspecial
1031 request.
1033 .BI .ftr\  f\ g
1034 Translate font
1035 .I f
1037 .IR g .
1038 Whenever a font named
1039 .I f
1040 is referred to in
1041 .B \ef
1042 escape sequence,
1043 or in the
1044 .BR ft ,
1045 .BR ul ,
1046 .BR bd ,
1047 .BR cs ,
1048 .BR tkf ,
1049 .BR special ,
1050 .BR fspecial ,
1051 .BR fp ,
1053 .BR sty
1054 requests,
1055 font
1056 .I g
1057 will be used.
1059 .I g
1060 is missing,
1061 or equal to
1062 .I f
1063 then font
1064 .I f
1065 will not be translated.
1067 .BI .hcode \ c1\ code1\ c2\ code2\|.\|.\|.
1068 Set the hyphenation code of character
1069 .I c1
1071 .I code1
1072 and that of
1073 .I c2
1075 .IR code2 .
1076 A hyphenation code must be a single input
1077 character (not a special character) other than a digit or a space.
1078 Initially each lower-case letter has a hyphenation code, which
1079 is itself, and each upper-case letter has a hyphenation code
1080 which is the lower case version of itself.
1081 See also the
1082 .B hpf
1083 request.
1085 .BI .hla\  lang
1086 Set the current hyphenation language to
1087 .IR lang .
1088 Hyphenation exceptions specified with the
1089 .B hw
1090 request and hyphenation patterns specified with the
1091 .B hpf
1092 request are both associated with the current hyphenation language.
1094 .B hla
1095 request is usually invoked by the
1096 .B troffrc
1097 file.
1099 .BI .hlm\  n
1100 Set the maximum number of consecutive hyphenated lines to
1101 .IR n .
1103 .I n
1104 is negative, there is no maximum.
1105 The default value is \-1.
1106 This value is associated with the current environment.
1107 Only lines output from an environment count towards the maximum associated
1108 with that environment.
1109 Hyphens resulting from
1110 .B \e%
1111 are counted; explicit hyphens are not.
1113 .BI .hpf\  file
1114 Read hyphenation patterns from
1115 .IR file ;
1116 this will be searched for in the same way that
1117 .IB name .tmac
1118 is searched for when the
1119 .BI \-m name
1120 option is specified.
1121 It should have the same format as the argument to
1122 the \epatterns primitive in \*(tx;
1123 the letters appearing in this file are interpreted as hyphenation
1124 codes.
1126 .B %
1127 character in the patterns file introduces a comment that continues
1128 to the end of the line.
1129 The set of hyphenation patterns is associated with the current language
1130 set by the
1131 .B hla
1132 request.
1134 .B hpf
1135 request
1136 is usually invoked by the
1137 .B troffrc
1138 file.
1140 .BI .hym\  n
1141 Set the
1142 .I hyphenation margin
1144 .IR n :
1145 when the current adjustment mode is not
1146 .BR b ,
1147 the line will not be hyphenated if the line is no more than
1148 .I n
1149 short.
1150 The default hyphenation margin is 0.
1151 The default scaling indicator for this request is
1152 .IR m .
1153 The hyphenation margin is associated with the current environment.
1154 The current hyphenation margin is available in the
1155 .B \en[.hym]
1156 register.
1158 .BI .hys\  n
1159 Set the
1160 .I hyphenation space
1162 .IR n :
1163 when the current adjustment mode is
1164 .B b
1165 don't hyphenate the line if the line can be justified by adding no more than
1166 .I n
1167 extra space to each word space.
1168 The default hyphenation space is 0.
1169 The default scaling indicator for this request is
1170 .BR m .
1171 The hyphenation space is associated with the current environment.
1172 The current hyphenation space is available in the
1173 .B \en[.hys]
1174 register.
1176 .BI .kern\  n
1178 .I n
1179 is non-zero or missing, enable pairwise kerning, otherwise disable it.
1181 .BI .length\  xx\ string
1182 Compute the length of
1183 .I string
1184 and return it in the number register
1185 .I xx
1186 (which is not necessarily defined before).
1188 .BI .linetabs\  n
1190 .I n
1191 is non-zero or missing, enable line-tabs mode, otherwise disable it (which
1192 is the default).
1193 In line-tabs mode, tab distances are computed relative to the (current)
1194 output line.
1195 Otherwise they are taken relative to the input line.
1196 For example, the following
1199 .ne 6v+\n(.Vu
1200 .ft B
1202 \&.ds x a\et\ec
1203 \&.ds y b\et\ec
1204 \&.ds z c
1205 \&.ta 1i 3i
1206 \e*x
1207 \e*y
1208 \e*z
1212 yields
1215 a         b         c
1218 In line-tabs mode, the same code gives
1221 a         b                   c
1224 Line-tabs mode is associated with the current environment; the read-only
1225 number register
1226 .B \\en[.linetabs]
1227 is set to\~1 if in line-tabs mode, and 0 otherwise.
1229 .BI .mso\  file
1230 The same as the
1231 .B so
1232 request except that
1233 .I file
1234 is searched for in the same directories as macro files for the
1236 .B \-m
1237 command line option.
1238 If the file name to be included
1239 has the form
1240 .IB name .tmac
1241 and it isn't found,
1242 .B mso
1243 tries to include
1244 .BI tmac. name
1245 instead and vice versa.
1247 .BI .nop \ anything
1248 Execute
1249 .IR anything .
1250 This is similar to `.if\ 1'.
1252 .B .nroff
1253 Make the
1254 .B n
1255 built-in condition true
1256 and the
1257 .B t
1258 built-in condition false.
1259 This can be reversed using the
1260 .B troff
1261 request.
1263 .BI .open\  stream\ filename
1264 Open
1265 .I filename
1266 for writing and associate the stream named
1267 .I stream
1268 with it.
1269 See also the
1270 .B close
1272 .B write
1273 requests.
1274 .TP 
1275 .BI .opena\  stream\ filename
1276 Like
1277 .BR open ,
1278 but if
1279 .I filename
1280 exists, append to it instead of truncating it.
1282 .B .pnr
1283 Print the names and contents of all currently defined number registers
1284 on stderr.
1286 .BI .psbb \ filename
1287 Get the bounding box of a PostScript image
1288 .IR filename .
1289 This file must conform to Adobe's Document Structuring Conventions; the
1290 command looks for a
1291 .B %%BoundingBox
1292 comment to extract the bounding box values.
1293 After a successful call, the coordinates (in PostScript units) of the lower
1294 left and upper right corner can be found in the registers
1295 .BR \en[llx] ,
1296 .BR \en[lly] ,
1297 .BR \en[urx] ,
1299 .BR \en[ury] ,
1300 respectively.
1301 If some error has occurred, the four registers are set to zero.
1303 .BI .pso \ command
1304 This behaves like the
1305 .B so
1306 request except that input comes from the standard output of
1307 .IR command .
1309 .B .ptr
1310 Print the names and positions of all traps (not including input line
1311 traps and diversion traps) on stderr.  Empty slots in the page trap
1312 list are printed as well, because they can affect the priority of
1313 subsequently planted traps.
1315 .BI .rchar\  c1\ c2\|.\|.\|.
1316 Remove the definitions of characters
1317 .IR c1 ,
1318 .IR c2 ,\|.\|.\|.
1319 This undoes the effect of a
1320 .B char
1321 request.
1323 .B .return
1324 Within a macro, return immediately.
1325 No effect otherwise.
1327 .B .rj
1329 .BI .rj\  n
1330 Right justify the next
1331 .I n
1332 input lines.
1333 Without an argument right justify the next input line.
1334 The number of lines to be right justified is available in the
1335 .B \en[.rj]
1336 register.
1337 This implicitly does
1338 .BR .ce\ 0 .
1340 .B ce
1341 request implicitly does
1342 .BR .rj\ 0 .
1344 .BI .rnn \ xx\ yy
1345 Rename number register
1346 .I xx
1348 .IR yy .
1350 .BI .shc\  c
1351 Set the soft hyphen character to
1352 .IR c .
1354 .I c
1355 is omitted,
1356 the soft hyphen character will be set to the default
1357 .BR \e(hy .
1358 The soft hyphen character is the character which will be inserted
1359 when a word is hyphenated at a line break.
1360 If the soft hyphen character does not exist in the font of the character
1361 immediately preceding a potential break point,
1362 then the line will not be broken at that point.
1363 Neither definitions (specified with the
1364 .B char
1365 request)
1366 nor translations (specified with the
1367 .B tr
1368 request)
1369 are considered when finding the soft hyphen character.
1371 .BI .shift\  n
1372 In a macro, shift the arguments by
1373 .I n
1374 positions:
1375 argument
1376 .I i
1377 becomes argument
1378 .IR i \- n ;
1379 arguments 1 to
1380 .I n
1381 will no longer be available.
1383 .I n
1384 is missing,
1385 arguments will be shifted by 1.
1386 Shifting by negative amounts is currently undefined.
1388 .BI .special\  s1\ s2\|.\|.\|.
1389 Fonts
1390 .IR s1 ,
1391 .IR s2 ,
1392 are special and will be searched for characters not in the
1393 current font.
1395 .BI .sty\  n\ f
1396 Associate style
1397 .I f
1398 with font position
1399 .IR n .
1400 A font position can be associated either with a font or
1401 with a style.
1402 The current font is the index of a font position and so is also
1403 either a font or a style.
1404 When it is a style, the font that is actually used is the font the
1405 name of which is the concatenation of the name of the current family
1406 and the name of the current style.
1407 For example, if the current font is 1 and font position 1 is
1408 associated with style
1409 .B R
1410 and the current
1411 font family is
1412 .BR T ,
1413 then font
1414 .BR TR
1415 will be used.
1416 If the current font is not a style, then the current family is ignored.
1417 When the requests
1418 .BR cs ,
1419 .BR bd ,
1420 .BR tkf ,
1421 .BR uf ,
1423 .B fspecial
1424 are applied to a style,
1425 then they will instead be applied to the member of the
1426 current family corresponding to that style.
1427 The default family can be set with the
1428 .B \-f
1429 option.
1430 The styles command in the
1431 .SM DESC
1432 file controls which font positions
1433 (if any) are initially associated with styles rather than fonts.
1435 .BI .substring\  xx\ n1\  [ n2 ]
1436 Replace the string in register
1437 .I xx
1438 with the substring defined by the indices
1439 .I n1
1441 .IR n2 .
1442 The first character in the string has index one.
1444 .I n2
1445 is omitted, it is taken to be equal to the string's length.  If the
1446 index value
1447 .I n1
1449 .I n2
1450 is negative or zero, it will be counted from the end of the string,
1451 going backwards: The last character has index 0, the character before
1452 the last character has index -1, etc.
1454 .BI .tkf\  f\ s1\ n1\ s2\ n2
1455 Enable track kerning for font
1456 .IR f .
1457 When the current font is
1458 .I f
1459 the width of every character will be increased by an amount
1460 between
1461 .I n1
1463 .IR n2 ;
1464 when the current point size is less than or equal to
1465 .I s1
1466 the width will be increased by
1467 .IR n1 ;
1468 when it is greater than or equal to
1469 .I s2
1470 the width will be increased by
1471 .IR n2 ;
1472 when the point size is greater than or equal to
1473 .I s1
1474 and less than or equal to
1475 .I s2
1476 the increase in width is a linear function of the point size.
1478 .BI .tm1\  string
1479 Similar to the
1480 .B tm
1481 request,
1482 .I string
1483 is read in copy mode and written on the standard error, but an initial
1484 double quote in
1485 .I string
1486 is stripped off to allow initial blanks.
1488 .BI .tmc\  string
1489 Similar to
1490 .BR tm1
1491 but without writing a final newline.
1493 .BI .trf\  filename
1494 Transparently output the contents of file
1495 .IR filename .
1496 Each line is output as it would be were it preceded by
1497 .BR \e! ;
1498 however, the lines are not subject to copy-mode interpretation.
1499 If the file does not end with a newline, then a newline will
1500 be added.
1501 For example, you can define a macro
1502 .I x
1503 containing the contents of file
1504 .IR f ,
1505 using
1508 .BI .di\  x
1510 .BI .trf\  f
1512 .B .di
1514 Unlike with the
1515 .B cf
1516 request,
1517 the file cannot contain characters such as
1518 .SM NUL
1519 that are not legal troff input characters.
1522 .B .trnt abcd
1523 This is the same as the
1524 .B tr
1525 request except that the translations do not apply to text that is
1526 transparently throughput into a diversion with
1527 .BR \e! .
1528 For example,
1532 .ft B
1533 \&.tr ab
1534 \&.di x
1535 \e!.tm a
1536 \&.di
1537 \&.x
1541 will print
1542 .BR b ;
1544 .B trnt
1545 is used instead of
1546 .B tr
1547 it will print
1548 .BR a .
1551 .B .troff
1552 Make the
1553 .B n
1554 built-in condition false,
1555 and the
1556 .B t
1557 built-in condition true.
1558 This undoes the effect of the
1559 .B nroff
1560 request.
1562 .BI .unformat\  xx
1563 This request `unformats' the diversion
1564 .IR xx .
1565 Contrary to the
1566 .B .asciify
1567 request, which tries to convert formatted elements of the diversion back
1568 to input tokens as much as possible,
1569 .B .unformat
1570 will only handle tabs and spaces between words (usually caused by spaces
1571 or newlines in the input) specially.
1572 The former are treated as if they were input tokens, and the latter are
1573 stretchable again.
1574 Note that the vertical size of lines is not preserved.
1575 Glyph information (font, font size, space width, etc.) is retained.
1576 Useful in conjunction with the
1577 .B .box
1579 .B .boxa
1580 requests.
1582 .BI .vpt\  n
1583 Enable vertical position traps if
1584 .I n
1585 is non-zero, disable them otherwise.
1586 Vertical position traps are traps set by the
1587 .B wh
1589 .B dt
1590 requests.
1591 Traps set by the
1592 .B it
1593 request are not vertical position traps.
1594 The parameter that controls whether vertical position traps are enabled
1595 is global.
1596 Initially vertical position traps are enabled.
1598 .BI .warn\  n
1599 Control warnings.
1600 .I n
1601 is the sum of the numbers associated with each warning that is to be enabled;
1602 all other warnings will be disabled.
1603 The number associated with each warning is listed in the `Warnings' section.
1604 For example,
1605 .B .warn 0
1606 will disable all warnings, and
1607 .B .warn 1
1608 will disable all warnings except that about missing characters.
1610 .I n
1611 is not given,
1612 all warnings will be enabled.
1614 .BI .while \ c\ anything
1615 While condition
1616 .I c
1617 is true, accept
1618 .I anything
1619 as input;
1620 .I c
1621 can be any condition acceptable to an
1622 .B if
1623 request;
1624 .I anything
1625 can comprise multiple lines if the first line starts with
1626 .B \e{
1627 and the last line ends with
1628 .BR \e} .
1629 See also the
1630 .B break
1632 .B continue
1633 requests.
1635 .BI .write\  stream\ anything
1636 Write
1637 .I anything
1638 to the stream named
1639 .IR stream .
1640 .I stream
1641 must previously have been the subject of an
1642 .B open
1643 request.
1644 .I anything
1645 is read in copy mode;
1646 a leading
1647 .B \(ts
1648 will be stripped.
1650 .BI .writem\  stream\ xx
1651 Write the contents of the macro or string
1652 .I xx
1653 to the stream named
1654 .IR stream .
1655 .I stream
1656 must previously have been the subject of an
1657 .B open
1658 request.
1659 .I xx
1660 is read in copy mode.
1662 .SS Extended requests
1665 .BI .cf\  filename
1666 When used in a diversion, this will embed in the diversion an object which,
1667 when reread, will cause the contents of
1668 .I filename
1669 to be transparently copied through to the output.
1670 In UNIX troff, the
1671 contents of
1672 .I filename
1673 is immediately copied through to the output regardless of whether
1674 there is a current diversion; this behaviour is so anomalous that it
1675 must be considered a bug.
1677 .BI .ev\  xx
1679 .I xx
1680 is not a number, this will switch to a named environment called
1681 .IR xx .
1682 The environment should be popped with a matching
1683 .B ev
1684 request without any arguments, just as for numbered environments.
1685 There is no limit on the number of named environments; they will be
1686 created the first time that they are referenced.
1688 .BI .fp\  n\ f1\ f2
1690 .B fp
1691 request has an optional third argument.
1692 This argument gives the external name of the font,
1693 which is used for finding the font description file.
1694 The second argument gives the internal name of the font
1695 which is used to refer to the font in troff after it has been mounted.
1696 If there is no third argument then the internal name will be used
1697 as the external name.
1698 This feature allows you to use fonts with long names in compatibility mode.
1700 .BI .ss\  m\ n
1701 When two arguments are given to the
1702 .B ss
1703 request, the second argument gives the
1704 .IR "sentence space size" .
1705 If the second argument is not given, the sentence space size
1706 will be the same as the word space size.
1707 Like the word space size, the sentence space is in units of
1708 one twelfth of the spacewidth parameter for the current font.
1709 Initially both the word space size and the sentence
1710 space size are 12.
1711 Contrary to UNIX troff, GNU troff handles this request in nroff mode
1712 also (if not in compatibility mode); a given value is then rounded down
1713 to the nearest multiple of\~12.
1714 The sentence space size is used in two circumstances:
1715 if the end of a sentence occurs at the end of a line in fill mode, then
1716 both an inter-word space and a sentence space will be added;
1717 if two spaces follow the end of a sentence in the middle of a line,
1718 then the second space will be a sentence space.
1719 Note that the behaviour of UNIX troff will be exactly
1720 that exhibited by GNU troff if a second argument is never given to the
1721 .B ss
1722 request.
1723 In GNU troff, as in UNIX troff, you should always
1724 follow a sentence with either a newline or two spaces.
1726 .BI .ta\  n1\ n2\|.\|.\|.nn \ T\  r1\ r2\|.\|.\|.\|rn
1727 Set tabs at positions
1728 .IR n1 ,
1729 .IR n2 ,\|.\|.\|.\|,
1730 .I nn
1731 and then set tabs at
1732 .IR nn + r1 ,
1733 .IR nn + r2 ,\|.\|.\|.\|.\|,
1734 .IR nn + rn
1735 and then at
1736 .IR nn + rn + r1 ,
1737 .IR nn + rn + r2 ,\|.\|.\|.\|,
1738 .IR nn + rn + rn ,
1739 and so on.
1740 For example,
1744 \&.ta T .5i
1746 will set tabs every half an inch.
1749 .SS New number registers
1751 The following read-only registers are available:
1753 .B \en[.C]
1754 1 if compatibility mode is in effect, 0 otherwise.
1756 .B \en[.cdp]
1757 The depth of the last character added to the current environment.
1758 It is positive if the character extends below the baseline.
1760 .B \en[.ce]
1761 The number of lines remaining to be centered, as set by the
1762 .B ce
1763 request.
1765 .B \en[.cht]
1766 The height of the last character added to the current environment.
1767 It is positive if the character extends above the baseline.
1769 .B \en[.csk]
1770 The skew of the last character added to the current environment.
1772 .I skew
1773 of a character is how far to the right of the center of a character
1774 the center of an accent over that character should be placed.
1776 .B \en[.ev]
1777 The name or number of the current environment.
1778 This is a string-valued register.
1780 .B \en[.fam]
1781 The current font family.
1782 This is a string-valued register.
1784 .B \en[.fp]
1785 The number of the next free font position.
1787 .B \en[.g]
1788 Always 1.
1789 Macros should use this to determine whether they are running
1790 under GNU troff.
1792 .B \en[.hla]
1793 The current hyphenation language as set by the
1794 .B hla
1795 request.
1797 .B \en[.hlc]
1798 The number of immediately preceding consecutive hyphenated lines.
1800 .B \en[.hlm]
1801 The maximum allowed number of consecutive hyphenated lines, as set by the
1802 .B hlm
1803 request.
1805 .B \en[.hy]
1806 The current hyphenation flags (as set by the
1807 .B hy
1808 request).
1810 .B \en[.hym]
1811 The current hyphenation margin (as set by the
1812 .B hym
1813 request).
1815 .B \en[.hys]
1816 The current hyphenation space (as set by the
1817 .B hys
1818 request).
1820 .B \en[.in]
1821 The indent that applies to the current output line.
1823 .B \en[.int]
1824 Set to a positive value if last output line is interrupted (i.e., if it
1825 contains
1826 .IR \ec ).
1828 .B \en[.kern]
1829 .B 1
1830 if pairwise kerning is enabled,
1831 .B 0
1832 otherwise.
1834 .B \en[.lg]
1835 The current ligature mode (as set by the
1836 .B lg
1837 request).
1839 .B \en[.linetabs]
1840 The current line-tabs mode (as set by the
1841 .B linetabs
1842 request).
1844 .B \en[.ll]
1845 The line length that applies to the current output line.
1847 .B \en[.lt]
1848 The title length as set by the
1849 .B lt
1850 request.
1852 .B \en[.ne]
1853 The amount of space that was needed in the last
1854 .B ne
1855 request that caused a trap to be sprung.
1856 Useful in conjunction with the
1857 .B \en[.trunc]
1858 register.
1860 .B \en[.pn]
1861 The number of the next page:
1862 either the value set by a
1863 .B pn
1864 request, or the number of the current page plus 1.
1866 .B \en[.ps]
1867 The current pointsize in scaled points.
1869 .B \en[.psr]
1870 The last-requested pointsize in scaled points.
1872 .B \en[.rj]
1873 The number of lines to be right-justified as set by the
1874 .B rj
1875 request.
1877 .B \en[.sr]
1878 The last requested pointsize in points as a decimal fraction.
1879 This is a string-valued register.
1881 .B \en[.tabs]
1882 A string representation of the current tab settings suitable for use as
1883 an argument to the
1884 .B ta
1885 request.
1887 .B \en[.trunc]
1888 The amount of vertical space truncated by the most recently sprung
1889 vertical position trap, or,
1890 if the trap was sprung by a
1891 .B ne
1892 request,
1893 minus the amount of vertical motion produced by the
1894 .B ne
1895 request.
1896 In other words, at the point a trap is sprung, it represents the difference
1897 of what the vertical position would have been but for the trap,
1898 and what the vertical position actually is.
1899 Useful in conjunction with the
1900 .B \en[.ne]
1901 register.
1903 .B \en[.ss]
1905 .B \en[.sss]
1906 These give the values of the parameters set by the
1907 first and second arguments of the
1908 .B ss
1909 request.
1911 .B \en[.vpt]
1912 1 if vertical position traps are enabled, 0 otherwise.
1914 .B \en[.warn]
1915 The sum of the numbers associated with each of the currently enabled
1916 warnings.
1917 The number associated with each warning is listed in the `Warnings'
1918 subsection.
1920 .B \en[.x]
1921 The major version number.
1922 For example, if the version number is
1923 .B 1.03
1924 then
1925 .B \en[.x]
1926 will contain
1927 .BR 1 .
1929 .B \en[.y]
1930 The minor version number.
1931 For example, if the version number is
1932 .B 1.03
1933 then
1934 .B \en[.y]
1935 will contain
1936 .BR 03 .
1938 .B \en[.Y]
1939 The revision number of groff.
1941 .B \en[llx]
1943 .B \en[lly]
1945 .B \en[urx]
1947 .B \en[ury]
1948 These four registers are set by the
1949 .B \&.psbb
1950 request and contain the bounding box values (in PostScript units) of a given
1951 PostScript image.
1953 The following read/write registers are set by the
1954 .B \ew
1955 escape sequence:
1957 .B \en[rst]
1959 .B \en[rsb]
1960 Like the
1961 .B st
1963 .B sb
1964 registers, but takes account of the heights and depths of characters.
1966 .B \en[ssc]
1967 The amount of horizontal space (possibly negative) that should
1968 be added to the last character before a subscript.
1970 .B \en[skw]
1971 How far to right of the center of the last character
1972 in the
1973 .B \ew
1974 argument,
1975 the center of an accent from a roman font should be placed over that character.
1977 Other available read/write number registers are:
1979 .B \en[c.]
1980 The current input line number.
1981 .B \en[.c]
1982 is a read-only alias to this register.
1984 .B \en[hp]
1985 The current horizontal position at input line.
1987 .B \en[systat]
1988 The return value of the system() function executed by the last
1989 .B sy
1990 request.
1992 .B \en[slimit]
1993 If greater than 0, the maximum number of objects on the input stack.
1994 If less than or equal to 0, there is no limit on the number of objects
1995 on the input stack.  With no limit, recursion can continue until
1996 virtual memory is exhausted.
1998 .B \en[year]
1999 The current year.
2000 Note that the traditional
2001 .B troff
2002 number register
2003 .B \en[yr]
2004 is the current year minus 1900.
2006 .SS Miscellaneous
2008 .B @g@troff
2009 predefines a single (read/write) string-based register,
2010 .BR \e*(.T ,
2011 which contains the argument given to the
2012 .B -T
2013 command line option, namely the current output device (for example,
2014 .I latin1
2016 .IR ascii ).
2017 Note that this is not the same as the (read-only) number register
2018 .B \en[.T]
2019 which is defined to be\ 1 if
2020 .B troff
2021 is called with the
2022 .B -T
2023 command line option, and zero otherwise.  This behaviour is different to
2024 UNIX troff.
2026 Fonts not listed in the
2027 .SM DESC
2028 file are automatically mounted on the next available font position
2029 when they are referenced.
2030 If a font is to be mounted explicitly with the
2031 .B fp
2032 request on an unused font position,
2033 it should be mounted on the first unused font position,
2034 which can be found in the
2035 .B \en[.fp]
2036 register;
2037 although
2038 .B troff
2039 does not enforce this strictly,
2040 it will not allow a font to be mounted at a position whose number is much
2041 greater than that of any currently used position.
2043 Interpolating a string does not hide existing macro arguments.
2044 Thus in a macro, a more efficient way of doing
2046 .BI . xx\  \e\e$@
2050 .BI \e\e*[ xx ]\e\e  
2052 If the font description file contains pairwise kerning information,
2053 characters from that font will be kerned.
2054 Kerning between two characters can be inhibited by placing a
2055 .B \e&
2056 between them.
2058 In a string comparison in a condition, 
2059 characters that appear at different input levels
2060 to the first delimiter character will not be recognised
2061 as the second or third delimiters.
2062 This applies also to the
2063 .B tl
2064 request.
2065 In a
2066 .B \ew
2067 escape sequence,
2068 a character that appears at a different input level to
2069 the starting delimiter character will not be recognised
2070 as the closing delimiter character.
2071 When decoding a macro argument that is delimited
2072 by double quotes, a character that appears at a different
2073 input level to the starting delimiter character will not
2074 be recognised as the closing delimiter character.
2075 The implementation of
2076 .B \e$@
2077 ensures that the double quotes surrounding an argument
2078 will appear the same input level, which will be different
2079 to the input level of the argument itself.
2080 In a long escape name
2081 .B ]
2082 will not be recognized as a closing delimiter except
2083 when it occurs at the same input level as the opening
2084 .BR ] .
2085 In compatibility mode, no attention is paid to the input-level.
2087 There are some new types of condition:
2089 .BI .if\ r xxx
2090 True if there is a number register named
2091 .IR xxx .
2093 .BI .if\ d xxx
2094 True if there is a string, macro, diversion, or request named
2095 .IR xxx .
2097 .BI .if\ c ch
2098 True if there is a character
2099 .IR ch
2100 available;
2101 .I ch
2102 is either an
2103 .SM ASCII
2104 character
2105 or a special character
2106 .BI \e( xx
2108 .BI \e[ xxx ]\fR;
2109 the condition will also be true if
2110 .I ch
2111 has been defined by the
2112 .B char
2113 request.
2116 .B tr
2117 request can now map characters onto
2118 .BR \e~ .
2120 .SS Warnings
2122 The warnings that can be given by
2123 .B troff
2124 are divided into the following categories.
2125 The name associated with each warning is used by the
2126 .B \-w
2128 .B \-W
2129 options;
2130 the number is used by the
2131 .B warn
2132 request, and by the
2133 .B .warn
2134 register.
2135 .nr x \w'\fBright-brace'+1n+\w'0000'u
2136 .ta \nxuR
2137 .TP \nxu+3n
2138 .BR char \t1
2139 Non-existent characters.
2140 This is enabled by default.
2142 .BR number \t2
2143 Invalid numeric expressions.
2144 This is enabled by default.
2146 .BR break \t4
2147 In fill mode, lines which could not be broken so that their length was
2148 less than the line length.
2149 This is enabled by default.
2151 .BR delim \t8
2152 Missing or mismatched closing delimiters.
2154 .BR el \t16
2155 Use of the
2156 .B el
2157 request with no matching
2158 .B ie
2159 request.
2161 .BR scale \t32
2162 Meaningless scaling indicators.
2164 .BR range \t64
2165 Out of range arguments.
2167 .BR syntax \t128
2168 Dubious syntax in numeric expressions.
2170 .BR di \t256
2171 Use of
2172 .B di
2174 .B da
2175 without an argument when there is no current diversion.
2177 .BR mac \t512
2178 Use of undefined strings, macros and diversions.
2179 When an undefined string, macro or diversion is used,
2180 that string is automatically defined as empty.
2181 So, in most cases, at most one warning will be given for
2182 each name.
2184 .BR reg \t1024
2185 Use of undefined number registers.
2186 When an undefined number register is used,
2187 that register is automatically defined to have a value of 0.
2188 a definition is automatically made with a value of 0.
2189 So, in most cases, at most one warning will be given for
2190 use of a particular name.
2192 .BR tab \t2048
2193 Inappropriate use of a tab character.
2194 Either use of a tab character where a number was expected,
2195 or use of tab character in an unquoted macro argument.
2197 .BR right-brace \t4096
2198 Use of
2199 .B \e}
2200 where a number was expected.
2202 .BR missing \t8192
2203 Requests that are missing non-optional arguments.
2205 .BR input \t16384
2206 Illegal input characters.
2208 .BR escape \t32768
2209 Unrecognized escape sequences.
2210 When an unrecognized escape sequence is encountered,
2211 the escape character is ignored.
2213 .BR space \t65536
2214 Missing space between a request or macro and its argument.
2215 This warning will be given 
2216 when an undefined name longer than two characters is encountered,
2217 and the first two characters of the name make a defined name.
2218 The request or macro will not be invoked.
2219 When this warning is given, no macro is automatically defined.
2220 This is enabled by default.
2221 This warning will never occur in compatibility mode.
2223 .BR font \t131072
2224 Non-existent fonts.
2225 This is enabled by default.
2227 .BR ig \t262144
2228 Illegal escapes in text ignored with the
2229 .B ig
2230 request.
2231 These are conditions that are errors when they do not occur
2232 in ignored text.
2234 There are also names that can be used to refer to groups of warnings:
2236 .B all
2237 All warnings except
2238 .BR di ,
2239 .B mac
2241 .BR reg .
2242 It is intended that this covers all warnings
2243 that are useful with traditional macro packages.
2245 .B w
2246 All warnings.
2248 .SS Incompatibilities
2251 Long names cause some incompatibilities.
2252 UNIX troff will interpret
2255 \&.dsabcd
2257 as defining a string
2258 .B ab
2259 with contents
2260 .BR cd .
2261 Normally, GNU troff will interpret this as a call of a macro named
2262 .BR dsabcd .
2263 Also UNIX troff will interpret
2264 .B \e*[
2266 .B \en[
2267 as references to a string or number register called
2268 .BR [ .
2269 In GNU troff, however, this will normally be interpreted as the start
2270 of a long name.
2272 .I compatibility mode
2273 GNU troff will interpret these things in the traditional way.
2274 In compatibility mode, however, long names are not recognised.
2275 Compatibility mode can be turned on with the
2276 .B \-C
2277 command line option, and turned on or off with the
2278 .B cp
2279 request.
2280 The number register
2281 .B \en[.C]
2282 is 1 if compatibility mode is on, 0 otherwise.
2284 GNU troff
2285 does not allow the use of the escape sequences
2286 .BR \\e\e|\e^\e&\e}\e{\e (space) \e'\e`\e-\e_\e!\e%\ec
2287 in names of strings, macros, diversions, number registers,
2288 fonts or environments; UNIX troff does.
2290 .B \eA
2291 escape sequence may be helpful in avoiding use of these
2292 escape sequences in names.
2294 Fractional pointsizes cause one noteworthy incompatibility.
2295 In UNIX troff the
2296 .B ps 
2297 request ignores scale indicators and so
2299 .B .ps\ 10u
2301 will set the pointsize to 10 points, whereas in
2302 GNU troff it will set the pointsize to 10 scaled points.
2304 In GNU troff there is a fundamental difference between unformatted,
2305 input characters, and formatted, output characters.
2306 Everything that affects how an output character
2307 will be output is stored with the character; once an output
2308 character has been constructed it is unaffected by any subsequent
2309 requests that are executed, including
2310 .BR bd ,
2311 .BR cs ,
2312 .BR tkf ,
2313 .BR tr ,
2315 .B fp
2316 requests.
2317 Normally output characters are constructed from input
2318 characters at the moment immediately before the character
2319 is added to the current output line.
2320 Macros, diversions and strings are all, in fact, the same type
2321 of object; they contain lists of input characters and output
2322 characters in any combination.
2323 An output character does not behave like an input character
2324 for the purposes of macro processing; it does not inherit any
2325 of the special properties that the input character from which it
2326 was constructed might have had.
2327 For example,
2330 .ft B
2331 \&.di x
2332 \e\e\e\e
2333 \&.br
2334 \&.di
2335 \&.x
2339 will print
2340 .B \e\e
2341 in GNU troff;
2342 each pair of input
2343 .BR \e s
2344 is turned into one output
2345 .B \e
2346 and the resulting output
2347 .BR \e s
2348 are not interpreted as escape characters when they are reread.
2349 UNIX troff would interpret them as escape characters
2350 when they were reread and would end up printing one
2351 .BR \e .
2352 The correct way to obtain a printable
2353 .B \e
2354 is to use the
2355 .B \ee
2356 escape sequence: this will always print a single instance of the
2357 current escape character, regardless of whether or not it is used in a
2358 diversion; it will also work in both GNU troff and UNIX troff.
2359 If you wish for some reason to store in a diversion an escape
2360 sequence that will be interpreted when the diversion is reread,
2361 you can either use the traditional
2362 .B \e!\&
2363 transparent output facility, or, if this is unsuitable, the new
2364 .B \e?\&
2365 escape sequence.
2368 .SH ENVIRONMENT
2373 .B GROFF_TMAC_PATH
2374 A colon separated list of directories in which to search for
2375 macro files.
2376 .B troff
2377 will scan directories given in
2379 .B \-M
2380 option before these, and in standard directories (current directory if in
2381 unsafe mode, home directory,
2382 .BR @LOCALMACRODIR@ ,
2383 .BR @SYSTEMMACRODIR@ ,
2384 .BR @MACRODIR@ )
2385 after these.
2388 .B GROFF_TYPESETTER
2389 Default device.
2392 .B GROFF_FONT_PATH
2393 A colon separated list of directories in which to search for the
2394 .BI dev name
2395 directory.
2396 .B troff
2397 will scan directories given in the
2398 .B \-F
2399 option before these, and in standard directories
2400 .RB ( @FONTPATH@ )
2401 after these.
2404 .SH FILES
2407 .Tp \w'@FONTDIR@/devname/DESC'u+3n
2408 .B @MACRODIR@/troffrc
2409 Initialization file (called before any other macro package).
2411 .B @MACRODIR@/troffrc-end
2412 Initialization file (called after any other macro package).
2414 .BI @MACRODIR@/ name .tmac
2416 .BI @MACRODIR@/tmac. name
2417 Macro files
2419 .BI @FONTDIR@/dev name /DESC
2420 Device description file for device
2421 .IR name .
2423 .BI @FONTDIR@/dev name / F
2424 Font file for font
2425 .I F
2426 of device
2427 .IR name .
2429 Note that
2430 .B troffrc
2432 .B troffrc-end
2433 are neither searched in the current nor in the home directory by default for
2434 security reasons (even if the
2435 .B \-U
2436 option is given).
2437 Use the
2438 .B \-M
2439 command line option or the
2440 .B GROFF_TMAC_PATH
2441 environment variable to add these directories to the search path if
2442 necessary.
2445 .SH "SEE ALSO"
2448 .BR groff (@MAN1EXT@),
2449 .BR @g@tbl (@MAN1EXT@),
2450 .BR @g@pic (@MAN1EXT@),
2451 .BR @g@eqn (@MAN1EXT@),
2452 .BR @g@refer (@MAN1EXT@),
2453 .BR @g@soelim (@MAN1EXT@),
2454 .BR @g@grn (@MAN1EXT@),
2455 .BR grops (@MAN1EXT@),
2456 .BR grodvi (@MAN1EXT@),
2457 .BR grotty (@MAN1EXT@),
2458 .BR grohtml (@MAN1EXT@),
2459 .BR grolj4 (@MAN1EXT@),
2460 .BR groff_font (@MAN5EXT@),
2461 .BR groff_out (@MAN5EXT@),
2462 .BR groff_char (@MAN7EXT@)