|
|
1.1 ! root 1: .\" @(#)m3 6.2 (Berkeley) 4/17/86 ! 2: .\" ! 3: .tr | ! 4: .rm mx ! 5: .mh ! 6: Tabs, Leaders, and Fields ! 7: .sc ! 8: Tabs and leaders. ! 9: The \s-1ASCII\s+1 horizontal tab character and the \s-1ASCII\s+1 ! 10: \s-1SOH\s+1 (hereafter known as the \fIleader\fR character) ! 11: can both be used to generate either horizontal motion or ! 12: a string of repeated characters. ! 13: The length of the generated entity is governed ! 14: by internal \fItab stops\fR specifiable ! 15: with \fBta\fR. ! 16: The default difference is that tabs generate motion and leaders generate ! 17: a string of periods; ! 18: \fBtc\fR and \fBlc\fR ! 19: offer the choice of repeated character or motion. ! 20: There are three types of internal tab stops\(em\ ! 21: \fIleft\fR adjusting, \fIright\fR adjusting, ! 22: and \fIcentering\fR. ! 23: In the following table: ! 24: \fID\fR is the distance from the current position on the \fIinput\fR line ! 25: (where a tab or leader was found) ! 26: to the next tab stop; ! 27: \fInext-string\fR consists ! 28: of the input characters following the tab (or leader) up to the next tab (or leader) or end of line; ! 29: and ! 30: \fIW\fR is the width of \fInext-string\fR. ! 31: .TS ! 32: center box; ! 33: c2|c2|c ! 34: c2|c2|c ! 35: c2|c2|l. ! 36: Tab Length of motion or Location of ! 37: type repeated characters \fInext-string\fR ! 38: _ ! 39: Left \fID\fR Following \fID\fR ! 40: Right \fID\-W\fR Right adjusted within \fID\fR ! 41: Centered \fID\-W\(sl\fR2 Centered on right end of \fID\fR ! 42: .TE ! 43: The length of generated motion is allowed to be negative, but ! 44: that of a repeated character string cannot be. ! 45: Repeated character strings contain an integer number of characters, and ! 46: any residual distance is prepended as motion. ! 47: Tabs or leaders found after the last tab stop are ignored, but may be used ! 48: as \fInext-string\fR terminators. ! 49: .pg ! 50: Tabs and leaders are not interpreted in \fIcopy mode\fR. ! 51: \fB\et\fR and \fB\ea\fR always generate a non-interpreted ! 52: tab and leader respectively, and ! 53: are equivalent to actual tabs and leaders in \fIcopy mode\fR. ! 54: .sc ! 55: Fields. ! 56: A \fIfield\fR is contained between ! 57: a \fIpair\fR of \fIfield delimiter\fR characters, ! 58: and consists of sub-strings ! 59: separated by \fIpadding\fR indicator characters. ! 60: The field length is the distance on the ! 61: \fIinput\fR line from the position where the field begins to the next tab stop. ! 62: The difference between the total length of all the sub-strings ! 63: and the field length is incorporated as horizontal ! 64: padding space that is divided among the indicated ! 65: padding places. ! 66: The incorporated padding is allowed to be negative. ! 67: For example, ! 68: if the field delimiter is \fB#\fR and the padding indicator is \fB^\fR, ! 69: \fB#^\fIxxx\fB^\fIright\|\fB#\fR ! 70: specifies a right-adjusted string with the string \fIxxx\fR centered ! 71: in the remaining space. ! 72: .h1 ! 73: .bt ! 74: \fB&ta\fI|Nt|...\fR 8n;|0.5in none E,\fBm\fR \ ! 75: Set tab stops and types. ! 76: \fIt=\fBR\fR, right adjusting; ! 77: \fIt=\fBC\fR, centering; ! 78: \fIt\fR absent, left adjusting. ! 79: \*(TR tab stops are preset every 0.5in.; ! 80: \*(NR every 8 character widths. ! 81: The stop values are separated by spaces, and ! 82: a value preceded by \fB+\fR ! 83: is treated as an increment to the previous stop value. ! 84: .bt ! 85: \fB&tc\fI|c\fR none none E \ ! 86: The tab repetition character becomes \fIc\fR, ! 87: or is removed specifying motion. ! 88: .bt ! 89: \fB&lc\fI|c\fR \fB.\fR none E \ ! 90: The leader repetition character becomes \fIc\fR, ! 91: or is removed specifying motion. ! 92: .bt ! 93: \fB&fc\fI|a|b\fR off off - \ ! 94: The field delimiter is set to \fIa\fR; ! 95: the padding indicator is set to the \fIspace\fR character or to ! 96: \fIb\fR, if given. ! 97: In the absence of arguments the field mechanism is turned off. ! 98: .mh ! 99: Input and Output Conventions and Character Translations ! 100: .sc ! 101: Input character translations. ! 102: Ways of inputting the graphic character set were ! 103: discussed in \(sc2.1. ! 104: The \s-1ASCII\s+1 control characters horizontal tab (\(sc9.1), ! 105: \s-1SOH\s+1 (\(sc9.1), and backspace (\(sc10.3) are discussed elsewhere. ! 106: The newline delimits input lines. ! 107: In addition, ! 108: \s-1STX\s+1, \s-1ETX\s+1, \s-1ENQ\s+1, \s-1ACK\s+1, and \s-1BEL\s+1 ! 109: are accepted, ! 110: and may be used as delimiters or translated into a graphic with \fBtr\fR (\(sc10.5). ! 111: \fIAll\fR others are ignored. ! 112: .pg ! 113: The \fIescape\fR character \fB\e\fR ! 114: introduces \fIescape sequences\fR\(em\ ! 115: causes the following character to mean ! 116: another character, or to indicate ! 117: some function. ! 118: A complete list of such sequences is given in the Summary and Index on page 6. ! 119: \fB\e\fR ! 120: should not be confused with the \s-1ASCII\s+1 control character \s-1ESC\s+1 of the ! 121: same name. ! 122: The escape character \fB\e\fR can be input with the sequence \fB\e\e\fR. ! 123: The escape character can be changed with \fBec\fR, ! 124: and all that has been said about the default \fB\e\fR becomes true ! 125: for the new escape character. ! 126: \fB\ee\fR can be used to print whatever the current escape character is. ! 127: If necessary or convenient, the escape mechanism may be turned off with \fBeo\fR, ! 128: and restored with \fBec\fR. ! 129: .h1 ! 130: .bt ! 131: \fB&ec\fI|c\fR \fB\e\fR \fB\e\fR - \ ! 132: Set escape character to \fB\e\fR, or to \fIc\fR, if given. ! 133: .bt ! 134: \fB&eo\fR on - - Turn escape mechanism off. ! 135: .sc ! 136: Ligatures. ! 137: .lg0 ! 138: Five ligatures are available ! 139: in the current \*(TR character set \(em ! 140: \fB\(fi\fR, \fB\(fl\fR, \fB\(ff\fR, \fB\(Fi\fR, and \fB\(Fl\fR. ! 141: They may be input (even in \*(NR) by ! 142: \fB\e(fi\fR, \fB\e(fl\fR, \fB\e(ff\fR, \fB\e(Fi\fR, and \fB\e(Fl\fR respectively. ! 143: .lg ! 144: The ligature mode is normally on in \*(TR, and \fIautomatically\fR invokes ! 145: ligatures during input. ! 146: .h1 ! 147: .bt ! 148: \fB&lg\fI|N\fR off;|on on - Ligature mode ! 149: is turned on if \fIN\fR is absent or non-zero, ! 150: and turned off if \fIN\(eq\^\fR0. ! 151: If \fIN\fR\(eq\^2, only the two-character ligatures are automatically invoked. ! 152: Ligature mode is inhibited for ! 153: request, macro, string, register, or file names, ! 154: and in \fIcopy mode\fR. ! 155: No effect in \*(NR. ! 156: .sc ! 157: Backspacing, underlining, overstriking, etc. ! 158: Unless in \fIcopy mode\fR, the \s-1ASCII\s+1 backspace character is replaced ! 159: by a backward horizontal motion having the width of the ! 160: space character. ! 161: Underlining as a form of line-drawing is discussed in \(sc12.4. ! 162: A generalized overstriking function is described in \(sc12.1. ! 163: .pg ! 164: \*(NR automatically underlines ! 165: characters in the \fIunderline\fR font, ! 166: specifiable with \fBuf\fR, ! 167: normally Times Italic on font position 2 (see \(sc2.2). ! 168: In addition to \fBft\fR and \fB\ef\fIF\fR, ! 169: the underline font may be selected by \fBul\fR and \fBcu\fR. ! 170: Underlining is restricted to an output-device-dependent ! 171: subset of \fIreasonable\fR characters. ! 172: .h1 ! 173: .bt ! 174: \fB&ul\fI|N\fR off \fIN\(eq\fR1 E \ ! 175: Underline in \*(NR (italicize in \*(TR) the next \fIN\fR ! 176: input text lines. ! 177: Actually, switch to \fIunderline\fR font, saving the ! 178: current font for later restoration; ! 179: \fIother\fR font changes within the span of a \fBul\fR ! 180: will take effect, ! 181: but the restoration will undo the last change. ! 182: Output generated by \fBtl\fR (\(sc14) \fIis\fR affected by the ! 183: font change, but does \fInot\fR decrement \fIN\fR. ! 184: If \fIN\fR\^>\^1, there is the risk that ! 185: a trap interpolated macro may provide text ! 186: lines within the span; ! 187: environment switching can prevent this. ! 188: .bt ! 189: \fB&cu\fI|N\fR off \fIN\(eq\fR1 E \ ! 190: A variant of \fBul\fR that causes \fIevery\fR character to be underlined in \*(NR. ! 191: Identical to \fBul\fR in \*(TR. ! 192: .bt ! 193: \fB&uf\fI|F\fR Italic Italic - \ ! 194: Underline font set to \fIF\fR. ! 195: In \*(NR, ! 196: \fIF\fR may \fInot\fR be on position 1 (initially Times Roman). ! 197: .sc ! 198: Control characters. ! 199: Both the control character \fB.\fR and the \fIno-break\fR ! 200: control character \fB\'\fR may be changed, if desired. ! 201: Such a change must be compatible with the design ! 202: of any macros used in the span of the change, ! 203: and ! 204: particularly of any trap-invoked macros. ! 205: .h1 ! 206: .bt ! 207: \fB&cc\fI|c\fR \fB.\fR \fB.\fR E \ ! 208: The basic control character is set to \fIc\fR, ! 209: or reset to "\fB.\fR". ! 210: .bt ! 211: \fB&c2\fI|c\fR \fB\' \'\fR E The \fInobreak\fR control character is set ! 212: to \fIc\fR, or reset to "\fB\'\fR". ! 213: .sc ! 214: Output translation. ! 215: One character can be made a stand-in for another character using \fBtr\fR. ! 216: All text processing (e. g. character comparisons) takes place ! 217: with the input (stand-in) character which appears to have the width of the final ! 218: character. ! 219: The graphic translation occurs at the moment of output ! 220: (including diversion). ! 221: .h1 ! 222: .bt ! 223: \fB&tr\fI|abcd....\fR none - O Translate \ ! 224: \fIa\fR into \fIb\fR, \fIc\fR into \fId\fR, etc. ! 225: If an odd number of characters is given, ! 226: the last one will be mapped into the space character. ! 227: To be consistent, a particular translation ! 228: must stay in effect from \fIinput\fR to \fIoutput\fR time. ! 229: .sc ! 230: Transparent throughput. ! 231: An input line beginning with a \fB\e!\fR is read in \fIcopy mode\fR and \fItransparently\fR output ! 232: (without the initial \fB\e!\fR); ! 233: the text processor is otherwise unaware of the line's presence. ! 234: This mechanism may be used to pass control information to a post-processor ! 235: or to imbed control lines in a macro created by a diversion. ! 236: .sc ! 237: Comments and concealed newlines. ! 238: An uncomfortably long input line that must stay ! 239: one line (e. g. a string definition, or nofilled text) ! 240: can be split into many physical lines by ending all but ! 241: the last one with the escape \fB\e\fR. ! 242: The sequence \fB\e\fR(newline) is \fIalways\fR ignored\(em\ ! 243: except in a comment. ! 244: Comments may be imbedded at the \fIend\fR of any line by ! 245: prefacing them with \fB\e"\fR. ! 246: The newline at the end of a comment cannot be concealed. ! 247: A line beginning with \fB\e"\fR will appear as a blank line and ! 248: behave like \fB.sp|1\fR; ! 249: a comment can be on a line by itself by beginning the line with \fB.\e"\fR. ! 250: .mh ! 251: Local Horizontal and Vertical Motions, and the Width Function ! 252: .sc ! 253: Local Motions. ! 254: The functions \fB\ev\'\fIN\fB\|\'\fR and ! 255: \fB\eh\'\fIN\fB\|\'\fR ! 256: can be used for \fIlocal\fR vertical and horizontal motion respectively. ! 257: The distance \fIN\fR may be negative; the \fIpositive\fR directions ! 258: are \fIrightward\fR and \fIdownward\fR. ! 259: A \fIlocal\fR motion is one contained \fIwithin\fR a line. ! 260: To avoid unexpected vertical dislocations, it is necessary that ! 261: the \fInet\fR vertical local motion within a word in filled text ! 262: and otherwise within a line balance to zero. ! 263: The above and certain other escape sequences providing local motion are ! 264: summarized in the following table. ! 265: .tr || ! 266: .ds X \0\0\0 ! 267: .TS ! 268: center box; ! 269: c2|cs2||c2|cs2 ! 270: c1|c2c2||c2|c2c2. ! 271: Vertical Effect in Horizontal Effect in ! 272: Local Motion \*(TR \*(NR Local Motion \*(TR \*(NR ! 273: _ ! 274: .sp.4 ! 275: .TC ! 276: l2|ls2||l2|ls2. ! 277: \fB\*X\ev\'\fIN\|\^\fB\'\fR Move distance \fIN\fR \ ! 278: \fB\*X\eh\'\fIN\|\^\fB\'\fR Move distance \fIN\fR ! 279: .TC ! 280: _2|_2_2||l2|ls2. ! 281: \fB\*X\e\fR(space) Unpaddable space-size space ! 282: .TC ! 283: l2|l2|l2||l2|ls2. ! 284: \fB\*X\eu\fR \(12 em up \(12 line up \fB\*X\e0\fR Digit-size space ! 285: .TC ! 286: l2|l2|l2||_2|_2_2. ! 287: \fB\*X\ed\fR \(12 em down \(12 line down ! 288: .TC ! 289: l2|l2|l2||l2|l2|l2. ! 290: \fB\*X\er\fR 1 em up 1 line up \fB\*X\e\||\fR 1\(sl6 em space ignored ! 291: \fB\*X\e^\fR 1\(sl12 em space ignored ! 292: .sp.4 ! 293: .TE ! 294: .rm X ! 295: .tr | ! 296: As an example, ! 297: \fBE\s-2\v'-.4m'2\v'.4m'\s+2\fR ! 298: could be generated by the sequence ! 299: \fBE\es\-2\ev\'\-0.4m\'2\ev\'0.4m\'\es+2\fR; ! 300: it should be noted in this example that ! 301: the 0.4|em vertical motions are at the smaller size. ! 302: .sc ! 303: Width Function. ! 304: The \fIwidth\fR function \fB\ew\'\fIstring\fB\|\'\fR ! 305: generates the numerical width of \fIstring\fR (in basic units). ! 306: Size and font changes may be safely imbedded in \fIstring\fR, ! 307: and will not affect the current environment. ! 308: For example, ! 309: \&\fB.ti|\-\\w\'1.|\'u\fR could be used to ! 310: temporarily indent leftward a distance equal to the ! 311: size of the string "\fB1.|\fR". ! 312: .pg ! 313: The width function also sets three number registers. ! 314: The registers \fBst\fR and \fBsb\fR are set respectively to the highest and ! 315: lowest extent of \fIstring\fR relative to the baseline; ! 316: then, for example, ! 317: the total \fIheight\fR of the string is \fB\en(stu\-\en(sbu\fR. ! 318: In \*(TR the number register \fBct\fR is set to a value ! 319: between 0|and|3: ! 320: 0 means that all of the characters in \fIstring\fR were short lower ! 321: case characters without descenders (like \fBe\fR); ! 322: 1 means that at least one character has a descender (like \fBy\fR); ! 323: 2 means that at least one character is tall (like \fBH\fR); ! 324: and 3 means that both tall characters and characters with ! 325: descenders are present. ! 326: .sc ! 327: Mark horizontal place. ! 328: The escape sequence \fB\ek\fIx\fR will cause the \fIcurrent\fR horizontal ! 329: position in the \fIinput line\fR to be stored in register \fIx\fR. ! 330: As an example, ! 331: the construction \fB\ekx\fIword\|\fB\eh\'\|~\|\enxu+2u\'\fIword\fB\fR ! 332: will embolden \fIword\fR by backing up to almost its beginning and overprinting it, ! 333: resulting in \kz\fIword\fR\h'|\nzu+2u'\fIword\fR. ! 334: .mh ! 335: Overstrike, Bracket, Line-drawing, and Zero-width Functions ! 336: .sc ! 337: Overstriking. ! 338: Automatically centered overstriking of up to nine characters ! 339: is provided by the \fIoverstrike\fR function ! 340: \fB\eo\'\fIstring\fB\|\'\fR. ! 341: The characters in \fIstring\fR are overprinted with centers aligned; the total width ! 342: is that of the widest character. ! 343: \fIstring\fR should \fInot\fR contain local vertical motion. ! 344: As examples, ! 345: \fB\eo\'e\e\'\'\fR produces \fB\o'e\''\fR, and ! 346: \fB\eo\'\e(mo\e(sl\'\fR produces \fB\o'\(mo\(sl'\fR. ! 347: .sc ! 348: Zero-width characters. ! 349: The function \fB\ez\fIc\fR will output \fIc\fR without spacing over ! 350: it, and can be used to produce left-aligned overstruck ! 351: combinations. ! 352: As examples, ! 353: \fB\ez\e(ci\e(pl\fR will produce \fB\z\(ci\(pl\fR, and ! 354: \fB\e(br\ez\e(rn\e(ul\e(br\fR will produce the smallest possible ! 355: constructed box \fB\(br\z\(rn\(ul\(br\fR\|. ! 356: .sc ! 357: Large Brackets. ! 358: The Special Mathematical Font contains a number of bracket construction pieces ! 359: (\|\|\|\(lt\|\|\|\(lb\|\|\|\(rt\|\|\|\(rb\|\|\|\(lk\|\|\|\(rk\|\|\|\(bv\|\|\|\(lf\|\|\|\(rf\|\|\|\(lc\|\|\|\(rc\|\|) ! 360: that can be combined into various bracket styles. ! 361: The function \fB\eb\'\fIstring\fB\|\'\fR may be used to pile ! 362: up vertically the characters in \fIstring\fR ! 363: (the first character on top and the last at the bottom); ! 364: the characters are vertically separated by 1|em and the total ! 365: pile is centered 1\(sl2\|em above the current baseline ! 366: (\(12 line in \*(NR). ! 367: For example, ! 368: \fB\eb\'\|\e(lc\e(lf\|\'E\e\|~\|\eb\'\|\e(rc\e(rf\|\'\|\ex\'\|\-0.5m\'\|\ex\'0.5m\'\|\fR ! 369: produces ! 370: \x'-.5m'\x'.5m'\fB\b'\(lc\(lf'E\|\b'\(rc\(rf'\fR. ! 371: .sc ! 372: Line drawing. ! 373: .tr && ! 374: The function \fB\e\|l\|\'\fINc\fB\|\'\fR will draw a string of repeated \fIc\fR\|'s towards the right for a distance \fIN\fR. ! 375: (\|\fB\el\fR is \fB\e\fR(lower case L). ! 376: If \fIc\fR looks like a continuation of ! 377: an expression for \fIN\fR, it may insulated from \fIN\fR with a \fB\e&\fR. ! 378: If \fIc\fR is not specified, the \fB\(ru\fR (baseline rule) is used ! 379: (underline character in \*(NR). ! 380: If \fIN\fR is negative, a backward horizontal motion ! 381: of size \fIN\fR is made \fIbefore\fR drawing the string. ! 382: Any space resulting from \fIN\fR\|\(sl(size of \fIc\fR) having a remainder is put at the beginning (left end) ! 383: of the string. ! 384: In the case of characters ! 385: that are designed to be connected such as ! 386: baseline-rule\ \fB\(ru\fR\|, ! 387: underrule\ \fB\(ul\fR\|, ! 388: and ! 389: root-en\ \fB\(rn\fR\|, ! 390: the remainder space is covered by over-lapping. ! 391: If \fIN\fR is \fIless\fR than the width of \fIc\fR, ! 392: a single \fIc\fR is centered on a distance \fIN\fR. ! 393: As an example, a macro to underscore a string can be written ! 394: .br ! 395: .tr &. ! 396: .x1 ! 397: .ftB ! 398: .ne 2.1 ! 399: &de us ! 400: \e\e$1\e\|l\|\'\|~\|0\e(ul\' ! 401: && ! 402: .ftR ! 403: .x2 ! 404: .ne2.1 ! 405: .de xu ! 406: \\$1\l'|0\(ul' ! 407: .. ! 408: or one to draw a box around a string ! 409: .x1 ! 410: .ftB ! 411: &de bx ! 412: \e(br\e\|~\|\e\e$1\e\|~\|\e(br\e\|l\|\'\|~\|0\e(rn\'\e\|l\|\'\|~\|0\e(ul\' ! 413: && ! 414: .ftR ! 415: .x2 ! 416: .de bx ! 417: \(br\|\\$1\|\(br\l'|0\(rn'\l'|0\(ul' ! 418: .. ! 419: such that ! 420: .x1 ! 421: .ftB ! 422: &us "underlined words" ! 423: .ftR ! 424: .x2 ! 425: and ! 426: .x1 ! 427: .ftB ! 428: &bx "words in a box" ! 429: .ftR ! 430: .x2 ! 431: yield ! 432: .xu "underlined words" ! 433: and ! 434: .bx "words in a box" ! 435: \h'-\w'.'u'. ! 436: .pg ! 437: The function \fB\eL\'\|\fINc\fB\|\'\fR will draw a vertical line consisting ! 438: of the (optional) character \fIc\fR stacked vertically apart 1\|em ! 439: (1 line in \*(NR), ! 440: with the first two characters overlapped, ! 441: if necessary, to form a continuous line. ! 442: The default character is the \fIbox rule\fR |\(br| (\fB\|\e(br\fR); ! 443: the other suitable character is the \fIbold vertical\fR \|\(bv\| (\fB\|\e(bv\fR). ! 444: The line is begun without any initial motion relative to the ! 445: current base line. ! 446: A positive \fIN\fR specifies a line drawn downward and ! 447: a negative \fIN\fR specifies a line drawn upward. ! 448: After the line is drawn \fIno\fR compensating ! 449: motions are made; ! 450: the instantaneous baseline is at the \fIend\fR of the line. ! 451: .pg ! 452: .de eb ! 453: .sp -1 ! 454: .nf ! 455: \h'-.5n'\L'|\\nzu-1'\l'\\n(.lu+1n\(ul'\L'-|\\nzu+1'\l'|0u-.5n\(ul' ! 456: .fi ! 457: .. ! 458: .ne 2i ! 459: .mk z ! 460: The horizontal and vertical line drawing functions may be used ! 461: in combination to produce large boxes. ! 462: The zero-width \fIbox-rule\fR and the \(12-em wide \fIunderrule\fR ! 463: were \fIdesigned\fR to form corners when using 1-em vertical ! 464: spacings. ! 465: For example the macro ! 466: .x1 ! 467: .ftB ! 468: \&.de eb ! 469: \&.sp \-1 \e"compensate for next automatic base-line spacing ! 470: \&.nf \e"avoid possibly overflowing word buffer ! 471: .tr || ! 472: \&\eh\'\-.5n\'\eL\'\||\|\e\enau\-1\'\el\'\e\en(.lu+1n\e(ul\'\eL\'\-\||\|\e\enau+1\'\el\'\||\|0u\-.5n\e(ul\' \e"draw box ! 473: .tr | ! 474: .lg0 ! 475: \&.fi ! 476: .lg ! 477: \&.. ! 478: .ftR ! 479: .x2 ! 480: will draw a box around some text whose beginning vertical place was ! 481: saved in number register \fIa\fR ! 482: (e. g. using \fB.mk|a\fR) ! 483: as done for this paragraph. ! 484: .eb
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.