Local Motions: Drawing lines and characters
Remember `Area = \(*pr\u2\d' and the big `P'
provides a host of commands for placing characters of any size
You can use them to draw special characters
or to tune your output for a particular appearance.
Most of these commands are straightforward, but messy to read
and tough to type correctly.
subscripts and superscripts are most easily done with
the half-line local motions
To go back up the page half a point-size, insert a
be used in pairs, as explained below.)
To make the `2' smaller, bracket it with
refer to the current point size,
be sure to put them either both inside or both outside
or you will get an unbalanced vertical motion.
Sometimes the space given by
command can be used to request an arbitrary amount of vertical motion.
causes motion up or down the page by the amount specified in
For example, to move the `P' down, we used
^in +0.6i (move paragraph in)
^ll \-0.3i (shorten lines)
\ev'2'\es36P\es0\ev'\-2'ater noster qui est
A minus sign causes upward motion, while
no sign or a plus sign means down the page.
causes an upward vertical motion
There are many other ways to specify the amount of motion _
Notice that the scale specifier
Any character can be used in place of the quotes;
this is also true of all other
commands described in this section.
does not take within-the-line vertical motions into account
when figuring out where it is on the page,
output lines can have unexpected positions
if the left and right ends aren't at the same
should always balance upward vertical motion in a line with
the same amount in the downward direction.
Arbitrary horizontal motions are also available _
except that the default scale factor is ems instead of line spaces.
causes a backwards motion of a tenth of an inch.
As a practical matter, consider printing the mathematical symbol
The default spacing is too wide, so
is used with the `width function'
to generate motions equal to the width
of some character string.
is a number equal to the width of `thing' in machine units
computations are ultimately done in these units.
To move horizontally the width of an `x',
the default scale factor for
all horizontal dimensions is
ems, so here we must have the
or the motion produced will be far too large.
is quite happy with the nested quotes, by the way,
so long as you don't leave any out.
As a live example of this kind of construction,
all of the command names in the text, like
were done by overstriking with a slight offset.
^sp\eh'\-\ew'.sp'u'\eh'1u'.sp
That is, put out `.sp', move left by the width of `.sp',
move right 1 unit, and print
(Of course there is a way to avoid typing that much input
for each command name, which we will discuss in Section 11.)
There are also several special-purpose
commands for local motion.
which is an unpaddable white space
of the same width as a digit.
`Unpaddable' means that it will never be widened
or split across a line by line justification and filling.
which is an unpaddable character the width of a space,
which is half that width,
which is one quarter of the width of a space,
(This last one is useful, for example, in entering
a text line which would otherwise begin with a `.'.)
characters to be overstruck,
This is nice for accents, as in
syst\eo"e\e(ga"me t\eo"e\e(aa"l\eo"e\e(aa"phonique
syst\o"e\(ga"me t\o"e\(aa"l\o"e\(aa"phonique
remember that each is just one character to
You can make your own overstrikes with another special convention,
suppresses the normal horizontal motion
after printing the single character
so another character can be laid on top of it.
Although sizes can be changed within
it centers the characters on the widest,
there can be no horizontal or vertical motions,
may be the only way to get what you want:
\s8\z\(sq\s14\z\(sq\s22\z\(sq\s36\(sq
\es8\ez\e(sq\es14\ez\e(sq\es22\ez\e(sq\es36\e(sq
is needed to leave room for the result.
As another example, an extra-heavy semicolon
\s+6\z,\v'-0.25m'.\v'0.25m'\s0 instead of ; or \s+6;\s0
can be constructed with a big comma and a big period above it:
\es+6\ez,\ev'\(mi0.25m'.\ev'0.25m'\es0
`0.25m' is an empirical constant.
A more ornate overstrike is given by the bracketing function
which piles up characters vertically,
centered on the current baseline.
Thus we can get big brackets,
constructing them with piled-up smaller pieces:
\b'\(lt\(lk\(lb' \b'\(lc\(lf' x \b'\(rc\(rf' \b'\(rt\(rk\(rb'
\eb\(fm\e(lt\e(lk\e(lb\(fm \eb\(fm\e(lc\e(lf\(fm x \eb\(fm\e(rc\e(rf\(fm \eb\(fm\e(rt\e(rk\e(rb\(fm
also provides a convenient facility for drawing horizontal and vertical
lines of arbitrary length with arbitrary characters.
draws a line one inch long, like this:
The length can be followed by
the character to use if the \(ru isn't appropriate;
draws a half-inch line of dots: \l'.5i.'.
except that it draws a vertical line instead of horizontal.