.tr | .mh Hyphenation. .pg The automatic hyphenation may be switched off and on. When switched on with hy, several variants may be set. A hyphenation indicator character may be imbedded in a word to specify desired hyphenation points, or may be prepended to suppress hyphenation. In addition, the user may specify a small exception word list. .pg Only words that consist of a central alphabetic string surrounded by (usually null) non-alphabetic strings are considered candidates for automatic hyphenation. Words that were input containing hyphens (minus), em-dashes (\e(em), or hyphenation indicator characters\ \(emsuch as mother-in-law\(em\ are always subject to splitting after those characters, whether or not automatic hyphenation is on or off. .h1 .bt &nh hyphenate - E \ Automatic hyphenation is turned off. .bt &hyN on,N=1 on,N=1 E \ Automatic hyphenation is turned on for N\|\(>=1, or off for N=\|0. If N=\|2, last lines (ones that will cause a trap) are not hyphenated. For N=\|4 and 8, the last and first two characters respectively of a word are not split off. These values are additive; i.|e. N=\|14 will invoke all three restrictions. .bt &hc|c \e% \e% E Hyphenation indicator character is set to c or to the default \e%. The indicator does not appear in the output. .bt &hw|word1|... ignored - Specify hyphenation points in words with imbedded minus signs. Versions of a word with terminal s are implied; i.|e. dig-it implies dig-its. This list is examined initially and after each suffix stripping. The space available is small\(emabout 128 characters. .mh Three Part Titles. .pg The titling function tl provides for automatic placement of three fields at the left, center, and right of a line with a title-length specifiable with lt. tl may be used anywhere, and is independent of the normal text collecting process. A common use is in header and footer macros. .h1 .bt &tl|\'left\|\'center\|\'right\|\' - - \ The strings left, center, and right are respectively left-adjusted, centered, and right-adjusted in the current title-length. Any of the strings may be empty, and overlapping is permitted. If the page-number character (initially %) is found within any of the fields it is replaced by the current page number having the format assigned to register %. Any character may be used as the string delimiter. .bt &pc|c % off - The page number character is set to c, or removed. The page-number register remains %. .bt <|\(+-N 6.5\|in previous E,m Length of title set to \(+-N. The line-length and the title-length are independent. Indents do not apply to titles; page-offsets do. .mh Output Line Numbering. .pg .nm 1 3 Automatic sequence numbering of output lines may be requested with nm. When in effect, a three-digit, arabic number plus a digit-space is prepended to output text lines. The text lines are thus offset by four digit-spaces, and otherwise retain their line length; a reduction in line length may be desired to keep the right margin aligned with an earlier margin. Blank lines, other vertical spaces, and lines generated by tl are not numbered. Numbering can be temporarily suspended with nn, or with an .nm followed by a later .nm|+0. In addition, a line number indent I, and the number-text separation S may be specified in digit-spaces. Further, it can be specified that only those line numbers that are multiples of some number M are to be printed (the others will appear as blank number fields).
.nm .h1 .bt &nm|\(+-N|M|S|I off E \ Line number mode. If \(+-N is given, line numbering is turned on, and the next output line numbered is numbered \(+-N. Default values are M=\|1, S=\|1, and I=\|0. Parameters corresponding to missing arguments are unaffected; a non-numeric argument is considered missing. In the absence of all arguments, numbering is turned off; the next line number is preserved for possible further use in number register ln. .bt &nn|N - N=1 E The next N text output lines are not numbered. .pg .nm +0 As an example, the paragraph portions of this section are numbered with M=\|3: \fB.nm|1|3 was placed at the beginning; \fB.nm was placed at the end of the first paragraph; and .nm|+0 was placed in front of this paragraph; and .nm finally placed at the end. Line lengths were also changed (by \ew\'0000\'u) to keep the right side aligned. Another example is \fB.nm|+5|5|x|3 which turns on numbering with the line number of the next line to be 5 greater than the last numbered line, with M=\|5, with spacing S untouched, and with the indent I set to 3.
.nm .mh Conditional Acceptance of Input .pg In the following, c is a one-character, built-in condition name, ! signifies not, N is a numerical expression, string1 and string2 are strings delimited by any non-blank, non-numeric character not in the strings, and anything represents what is conditionally accepted. .h1 .bt &if|c|anything - - If condition c true, accept anything as input; in multi-line case use \e{anything\|\e}. .bt &if|!c|anything - - If condition c false, accept anything. .bt &if|N|anything - u If expression N > 0, accept anything. .bt &if|!N|anything - u If expression N \(<= 0, accept anything. .bt &if|\|\'string1\|\'string2\|\'|anything - If string1 identical to string2, accept anything. .bt &if|!\|\'string1\|\'string2\|\'|anything - If string1 not identical to string2, accept anything. .bt &ie|c|anything - u If portion of if-else; all above forms (like if). .bt &el|anything - - Else portion of if-else. .pg The built-in condition names are:
Condition |
Name True If |
o Current page number is odd |
e Current page number is even |
t Formatter is \*(TR |
n Formatter is \*(NR |
.mc .bt &tm|string - newline - \ After skipping initial blanks, string (rest of the line) is read in copy mode and written on the user's terminal. (see \(sc21). .bt &ig|yy - .yy=.. - Ignore \ input lines. ig behaves exactly like de (\(sc7) except that the input is discarded. The input is read in copy mode, and any auto-incremented registers will be affected. .bt &pm|t - all - \ Print macros. The names and sizes of all of the defined macros and strings are printed on the user's terminal; if t is given, only the total of the sizes is printed. The sizes is given in blocks of 128 characters. .bt &ab|string - - - \ Print string on standard error and terminate immediately. The default string is "User Abort". Does not cause a break. Only output preceding the last break is written. .bt .lg0 &fl - - B \c .lg Flush output buffer. Used in interactive debugging to force output. .mh Output and Error Messages. .pg The output from tm, pm, ab and the prompt from rd, as well as various error messages are written onto \s-1UNIX\s+1's standard error output. The latter is different from the standard output, where \*(NR formatted output goes. By default, both are written onto the user's terminal, but they can be independently redirected. .pg Various error conditions may occur during the operation of \*(NR and \*(TR. Certain less serious errors having only local impact do not cause processing to terminate. Two examples are word overflow, caused by a word that is too large to fit into the word buffer (in fill mode), and line overflow, caused by an output line that grew too large to fit in the line buffer; in both cases, a message is printed, the offending excess is discarded, and the affected word or line is marked at the point of truncation with a \(** in \*(NR and a \(lh in \*(TR. The philosophy is to continue processing, if possible, on the grounds that output useful for debugging may be produced. If a serious error occurs, processing terminates, and an appropriate message is printed. Examples are the inability to create, read, or write files, and the exceeding of certain internal limits that make future output unlikely to be useful.