Tabs, Leaders, and Fields
The \s-1ASCII\s+1 horizontal tab character and the \s-1ASCII\s+1
\s-1SOH\s+1 (hereafter known as the \fIleader\fR character)
can both be used to generate either horizontal motion or
a string of repeated characters.
The length of the generated entity is governed
by internal \fItab stops\fR specifiable
The default difference is that tabs generate motion and leaders generate
offer the choice of repeated character or motion.
There are three types of internal tab stops\(em\
\fIleft\fR adjusting, \fIright\fR adjusting,
\fID\fR is the distance from the current position on the \fIinput\fR line
(where a tab or leader was found)
\fInext-string\fR consists
of the input characters following the tab (or leader) up to the next tab (or leader) or end of line;
\fIW\fR is the width of \fInext-string\fR.
Tab Length of motion or Location of
type repeated characters \fInext-string\fR
Left \fID\fR Following \fID\fR
Right \fID\-W\fR Right adjusted within \fID\fR
Centered \fID\-W\(sl\fR2 Centered on right end of \fID\fR
The length of generated motion is allowed to be negative, but
that of a repeated character string cannot be.
Repeated character strings contain an integer number of characters, and
any residual distance is prepended as motion.
Tabs or leaders found after the last tab stop are ignored, but may be used
as \fInext-string\fR terminators.
Tabs and leaders are not interpreted in \fIcopy mode\fR.
\fB\et\fR and \fB\ea\fR always generate a non-interpreted
tab and leader respectively, and
are equivalent to actual tabs and leaders in \fIcopy mode\fR.
A \fIfield\fR is contained between
a \fIpair\fR of \fIfield delimiter\fR characters,
and consists of sub-strings
separated by \fIpadding\fR indicator characters.
The field length is the distance on the
\fIinput\fR line from the position where the field begins to the next tab stop.
The difference between the total length of all the sub-strings
and the field length is incorporated as horizontal
padding space that is divided among the indicated
The incorporated padding is allowed to be negative.
if the field delimiter is \fB#\fR and the padding indicator is \fB^\fR,
\fB#^\fIxxx\fB^\fIright\|\fB#\fR
specifies a right-adjusted string with the string \fIxxx\fR centered
\fB&ta\fI|Nt|...\fR 0.8;|0.5in none E,\fBm\fR \
\fIt=\fBR\fR, right adjusting;
\fIt\fR absent, left adjusting.
\*(TR tab stops are preset every 0.5in.;
The stop values are separated by spaces, and
a value preceded by \fB+\fR
is treated as an increment to the previous stop value.
\fB&tc\fI|c\fR none none E \
The tab repetition character becomes \fIc\fR,
or is removed specifying motion.
\fB&lc\fI|c\fR \fB.\fR none E \
The leader repetition character becomes \fIc\fR,
or is removed specifying motion.
\fB&fc\fI|a|b\fR off off - \
The field delimiter is set to \fIa\fR;
the padding indicator is set to the \fIspace\fR character or to
In the absence of arguments the field mechanism is turned off.
Input and Output Conventions and Character Translations
Input character translations.
Ways of inputting the graphic character set were
The \s-1ASCII\s+1 control characters horizontal tab (\(sc9.1),
\s-1SOH\s+1 (\(sc9.1), and backspace (\(sc10.3) are discussed elsewhere.
The newline delimits input lines.
\s-1STX\s+1, \s-1ETX\s+1, \s-1ENQ\s+1, \s-1ACK\s+1, and \s-1BEL\s+1
and may be used as delimiters or translated into a graphic with \fBtr\fR (\(sc10.5).
\fIAll\fR others are ignored.
The \fIescape\fR character \fB\e\fR
introduces \fIescape sequences\fR\(em\
causes the following character to mean
another character, or to indicate
A complete list of such sequences is given in the Summary and Index on page 6.
should not be confused with the \s-1ASCII\s+1 control character \s-1ESC\s+1 of the
The escape character \fB\e\fR can be input with the sequence \fB\e\e\fR.
The escape character can be changed with \fBec\fR,
and all that has been said about the default \fB\e\fR becomes true
for the new escape character.
\fB\ee\fR can be used to print whatever the current escape character is.
If necessary or convenient, the escape mechanism may be turned off with \fBeo\fR,
and restored with \fBec\fR.
\fB&ec\fI|c\fR \fB\e\fR \fB\e\fR - \
Set escape character to \fB\e\fR, or to \fIc\fR, if given.
\fB&eo\fR on - - Turn escape mechanism off.
Five ligatures are available
in the current \*(TR character set \(em
\fB\(fi\fR, \fB\(fl\fR, \fB\(ff\fR, \fB\(Fi\fR, and \fB\(Fl\fR.
They may be input (even in \*(NR) by
\fB\e(fi\fR, \fB\e(fl\fR, \fB\e(ff\fR, \fB\e(Fi\fR, and \fB\e(Fl\fR respectively.
The ligature mode is normally on in \*(TR, and \fIautomatically\fR invokes
\fB&lg\fI|N\fR off;|on on - Ligature mode
is turned on if \fIN\fR is absent or non-zero,
and turned off if \fIN\(eq\^\fR0.
If \fIN\fR\(eq\^2, only the two-character ligatures are automatically invoked.
Ligature mode is inhibited for
request, macro, string, register, or file names,
Backspacing, underlining, overstriking, etc.
Unless in \fIcopy mode\fR, the \s-1ASCII\s+1 backspace character is replaced
by a backward horizontal motion having the width of the
Underlining as a form of line-drawing is discussed in \(sc12.4.
A generalized overstriking function is described in \(sc12.1.
\*(NR automatically underlines
characters in the \fIunderline\fR font,
specifiable with \fBuf\fR,
normally that on font position 2 (normally Times Italic, see \(sc2.2).
In addition to \fBft\fR and \fB\ef\fIF\fR,
the underline font may be selected by \fBul\fR and \fBcu\fR.
Underlining is restricted to an output-device-dependent
subset of \fIreasonable\fR characters.
\fB&ul\fI|N\fR off \fIN\(eq\fR1 E \
Underline in \*(NR (italicize in \*(TR) the next \fIN\fR
Actually, switch to \fIunderline\fR font, saving the
current font for later restoration;
\fIother\fR font changes within the span of a \fBul\fR
but the restoration will undo the last change.
Output generated by \fBtl\fR (\(sc14) \fIis\fR affected by the
font change, but does \fInot\fR decrement \fIN\fR.
If \fIN\fR\^>\^1, there is the risk that
a trap interpolated macro may provide text
environment switching can prevent this.
\fB&cu\fI|N\fR off \fIN\(eq\fR1 E \
A variant of \fBul\fR that causes \fIevery\fR character to be underlined in \*(NR.
Identical to \fBul\fR in \*(TR.
\fB&uf\fI|F\fR Italic Italic - \
Underline font set to \fIF\fR.
\fIF\fR may \fInot\fR be on position 1 (initially Times Roman).
Both the control character \fB.\fR and the \fIno-break\fR
control character \fB\'\fR may be changed, if desired.
Such a change must be compatible with the design
of any macros used in the span of the change,
particularly of any trap-invoked macros.
\fB&cc\fI|c\fR \fB.\fR \fB.\fR E \
The basic control character is set to \fIc\fR,
\fB&c2\fI|c\fR \fB\' \'\fR E The \fInobreak\fR control character is set
to \fIc\fR, or reset to "\fB\'\fR".
One character can be made a stand-in for another character using \fBtr\fR.
All text processing (e. g. character comparisons) takes place
with the input (stand-in) character which appears to have the width of the final
The graphic translation occurs at the moment of output
\fB&tr\fI|abcd....\fR none - O Translate \
\fIa\fR into \fIb\fR, \fIc\fR into \fId\fR, etc.
If an odd number of characters is given,
the last one will be mapped into the space character.
To be consistent, a particular translation
must stay in effect from \fIinput\fR to \fIoutput\fR time.
An input line beginning with a \fB\e!\fR is read in \fIcopy mode\fR and \fItransparently\fR output
(without the initial \fB\e!\fR);
the text processor is otherwise unaware of the line's presence.
This mechanism may be used to pass control information to a post-processor
or to imbed control lines in a macro created by a diversion.
Comments and concealed newlines.
An uncomfortably long input line that must stay
one line (e. g. a string definition, or nofilled text)
can be split into many physical lines by ending all but
the last one with the escape \fB\e\fR.
The sequence \fB\e\fR(newline) is \fIalways\fR ignored\(em\
Comments may be imbedded at the \fIend\fR of any line by
prefacing them with \fB\e"\fR.
The newline at the end of a comment cannot be concealed.
A line beginning with \fB\e"\fR will appear as a blank line and
a comment can be on a line by itself by beginning the line with \fB.\e"\fR.
Local Horizontal and Vertical Motions, and the Width Function
The functions \fB\ev\'\fIN\fB\|\'\fR and
can be used for \fIlocal\fR vertical and horizontal motion respectively.
The distance \fIN\fR may be negative; the \fIpositive\fR directions
are \fIrightward\fR and \fIdownward\fR.
A \fIlocal\fR motion is one contained \fIwithin\fR a line.
To avoid unexpected vertical dislocations, it is necessary that
the \fInet\fR vertical local motion within a word in filled text
and otherwise within a line balance to zero.
The above and certain other escape sequences providing local motion are
summarized in the following table.
Vertical Effect in Horizontal Effect in
Local Motion \*(TR \*(NR Local Motion \*(TR \*(NR
\fB\*X\ev\'\fIN\|\^\fB\'\fR Move distance \fIN\fR \
\fB\*X\eh\'\fIN\|\^\fB\'\fR Move distance \fIN\fR
x x x \fB\*X\e\fR(space) Unpaddable space-size space
\fB\*X\eu\fR \(12 em up \(12 line up \fB\*X\e0\fR Digit-size space
\fB\*X\ed\fR \(12 em down \(12 line down x x x
\fB\*X\er\fR 1 em up 1 line up \fB\*X\e\||\fR 1\(sl6 em space ignored
\fB\*X\e^\fR 1\(sl12 em space ignored
\fBE\s-2\v'-.4m'2\v'.4m'\s+2\fR
could be generated by the sequence
\fBE\es\-2\ev\'\-0.4m\'2\ev\'0.4m\'\es+2\fR;
it should be noted in this example that
the 0.4|em vertical motions are at the smaller size.
The \fIwidth\fR function \fB\ew\'\fIstring\fB\|\'\fR
generates the numerical width of \fIstring\fR (in basic units).
Size and font changes may be safely imbedded in \fIstring\fR,
and will not affect the current environment.
\&\fB.ti|\-\\w\'1.|\'u\fR could be used to
temporarily indent leftward a distance equal to the
size of the string "\fB1.|\fR".
The width function also sets three number registers.
The registers \fBst\fR and \fBsb\fR are set respectively to the highest and
lowest extent of \fIstring\fR relative to the baseline;
the total \fIheight\fR of the string is \fB\en(stu\-\en(sbu\fR.
In \*(TR the number register \fBct\fR is set to a value
0 means that all of the characters in \fIstring\fR were short lower
case characters without descenders (like \fBe\fR);
1 means that at least one character has a descender (like \fBy\fR);
2 means that at least one character is tall (like \fBH\fR);
and 3 means that both tall characters and characters with
The escape sequence \fB\ek\fIx\fR will cause the \fIcurrent\fR horizontal
position in the \fIinput line\fR to be stored in register \fIx\fR.
the construction \fB\ekx\fIword\|\fB\eh\'\|~\|\enxu+2u\'\fIword\fB\fR
will embolden \fIword\fR by backing up to almost its beginning and overprinting it,
resulting in \kz\fIword\fR\h'|\nzu+2u'\fIword\fR.
Overstrike, Bracket, Line-drawing, and Zero-width Functions
Automatically centered overstriking of up to nine characters
is provided by the \fIoverstrike\fR function
\fB\eo\'\fIstring\fB\|\'\fR.
The characters in \fIstring\fR overprinted with centers aligned; the total width
is that of the widest character.
\fIstring\fR should \fInot\fR contain local vertical motion.
\fB\eo\'e\e\'\'\fR produces \fB\o'e\''\fR, and
\fB\eo\'\e(mo\e(sl\'\fR produces \fB\o'\(mo\(sl'\fR.
The function \fB\ez\fIc\fR will output \fIc\fR without spacing over
it, and can be used to produce left-aligned overstruck
\fB\ez\e(ci\e(pl\fR will produce \fB\z\(ci\(pl\fR, and
\fB\e(br\ez\e(rn\e(ul\e(br\fR will produce the smallest possible
constructed box \fB\(br\z\(rn\(ul\(br\fR\|.
The Special Mathematical Font contains a number of bracket construction pieces
(\|\|\(lt\|\|\(lb\|\|\(rt\|\|\(rb\|\|\(lk\|\|\(rk\|\|\(bv\|\|\(lf\|\|\(rf\|\|\(lc\|\|\(rc\|\|)
that can be combined into various bracket styles.
The function \fB\eb\'\fIstring\fB\|\'\fR may be used to pile
up vertically the characters in \fIstring\fR
(the first character on top and the last at the bottom);
the characters are vertically separated by 1|em and the total
pile is centered 1\(sl2\|em above the current baseline
\fB\eb\'\|\e(lc\e(lf\|\'E\e\|~\|\eb\'\|\e(rc\e(rf\|\'\|\ex\'\|\-0.5m\'\|\ex\'0.5m\'\|\fR
\x'-.5m'\x'.5m'\fB\b'\(lc\(lf'E\|\b'\(rc\(rf'\fR.
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.
(\|\fB\el\fR is \fB\e\fR(lower case L).
If \fIc\fR looks like a continuation of
an expression for \fIN\fR, it may insulated from \fIN\fR with a \fB\e&\fR.
If \fIc\fR is not specified, the \fB\(ru\fR (baseline rule) is used
(underline character in \*(NR).
If \fIN\fR is negative, a backward horizontal motion
of size \fIN\fR is made \fIbefore\fR drawing the string.
Any space resulting from \fIN\fR\|\(sl(size of \fIc\fR) having a remainder is put at the beginning (left end)
In the case of characters
that are designed to be connected such as
baseline-rule\ \fB\(ru\fR\|,
the remainder space is covered by over-lapping.
If \fIN\fR is \fIless\fR than the width of \fIc\fR,
a single \fIc\fR is centered on a distance \fIN\fR.
As an example, a macro to underscore a string can be written
\e\e$1\e\|l\|\'\|~\|0\e(ul\'
or one to draw a box around a string
\e(br\e\|~\|\e\e$1\e\|~\|\e(br\e\|l\|\'\|~\|0\e(rn\'\e\|l\|\'\|~\|0\e(ul\'
\(br\|\\$1\|\(br\l'|0\(rn'\l'|0\(ul'
The function \fB\eL\'\|\fINc\fB\|\'\fR will draw a vertical line consisting
of the (optional) character \fIc\fR stacked vertically apart 1\|em
with the first two characters overlapped,
if necessary, to form a continuous line.
The default character is the \fIbox rule\fR |\(br| (\fB\|\e(br\fR);
the other suitable character is the \fIbold vertical\fR \|\(bv\| (\fB\|\e(bv\fR).
The line is begun without any initial motion relative to the
A positive \fIN\fR specifies a line drawn downward and
a negative \fIN\fR specifies a line drawn upward.
After the line is drawn \fIno\fR compensating
the instantaneous baseline is at the \fIend\fR of the line.
\h'-.5n'\L'|\\nzu-1'\l'\\n(.lu+1n\(ul'\L'-|\\nzu+1'\l'|0u-.5n\(ul'
The horizontal and vertical line drawing functions may be used
in combination to produce large boxes.
The zero-width \fIbox-rule\fR and the \(12-em wide \fIunderrule\fR
were \fIdesigned\fR to form corners when using 1-em vertical
\&.sp \-1 \e"compensate for next automatic base-line spacing
\&.nf \e"avoid possibly overflowing word buffer
\&\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
will draw a box around some text whose beginning vertical place was
saved in number register \fIa\fR
(e. g. using \fB.mk|a\fR)
as done for this paragraph.