1 .\" This module is believed to contain source code proprietary to AT&T.
2 .\" Use and redistribution is subject to the Berkeley Software License
3 .\" Agreement and your Software Agreement with AT&T (Western Electric).
5 .\" @(#)tt06 8.1 (Berkeley) 6/8/93
6 .\" Copyright (C) Caldera International Inc. 2001-2002. All rights reserved.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions are
12 .\" Redistributions of source code and documentation must retain the above
13 .\" copyright notice, this list of conditions and the following
16 .\" Redistributions in binary form must reproduce the above copyright
17 .\" notice, this list of conditions and the following disclaimer in the
18 .\" documentation and/or other materials provided with the distribution.
20 .\" All advertising materials mentioning features or use of this software
21 .\" must display the following acknowledgement:
23 .\" This product includes software developed or owned by Caldera
24 .\" International, Inc. Neither the name of Caldera International, Inc.
25 .\" nor the names of other contributors may be used to endorse or promote
26 .\" products derived from this software without specific prior written
29 .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
30 .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
31 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33 .\" DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE
34 .\" FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
35 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
37 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
39 .\" OR OTHERWISE) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
40 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 Local Motions: Drawing lines and characters
47 Remember `Area = \(*pr\u2\d' and the big `P'
51 provides a host of commands for placing characters of any size
53 You can use them to draw special characters
54 or to tune your output for a particular appearance.
55 Most of these commands are straightforward, but messy to read
56 and tough to type correctly.
60 subscripts and superscripts are most easily done with
61 the half-line local motions
65 To go back up the page half a point-size, insert a
74 be used in pairs, as explained below.)
83 To make the `2' smaller, bracket it with
89 refer to the current point size,
90 be sure to put them either both inside or both outside
92 or you will get an unbalanced vertical motion.
94 Sometimes the space given by
98 isn't the right amount.
101 command can be used to request an arbitrary amount of vertical motion.
106 causes motion up or down the page by the amount specified in
108 For example, to move the `P' down, we used
111 ^in +0.6i (move paragraph in)
112 ^ll \-0.3i (shorten lines)
113 ^ti \-0.3i (move P back)
114 \ev'2'\es36P\es0\ev'\-2'ater noster qui est
117 A minus sign causes upward motion, while
118 no sign or a plus sign means down the page.
121 causes an upward vertical motion
124 There are many other ways to specify the amount of motion _
130 and so on are all legal.
131 Notice that the scale specifier
137 goes inside the quotes.
138 Any character can be used in place of the quotes;
139 this is also true of all other
141 commands described in this section.
145 does not take within-the-line vertical motions into account
146 when figuring out where it is on the page,
147 output lines can have unexpected positions
148 if the left and right ends aren't at the same
156 should always balance upward vertical motion in a line with
157 the same amount in the downward direction.
159 Arbitrary horizontal motions are also available _
161 is quite analogous to
163 except that the default scale factor is ems instead of line spaces.
168 causes a backwards motion of a tenth of an inch.
169 As a practical matter, consider printing the mathematical symbol
171 The default spacing is too wide, so
177 to produce >\h'-.3m'>.
181 is used with the `width function'
183 to generate motions equal to the width
184 of some character string.
189 is a number equal to the width of `thing' in machine units
193 computations are ultimately done in these units.
194 To move horizontally the width of an `x',
199 As we mentioned above,
200 the default scale factor for
201 all horizontal dimensions is
203 ems, so here we must have the
206 or the motion produced will be far too large.
208 is quite happy with the nested quotes, by the way,
209 so long as you don't leave any out.
211 As a live example of this kind of construction,
212 all of the command names in the text, like
214 were done by overstriking with a slight offset.
219 ^sp\eh'\-\ew'.sp'u'\eh'1u'.sp
221 That is, put out `.sp', move left by the width of `.sp',
222 move right 1 unit, and print
224 (Of course there is a way to avoid typing that much input
225 for each command name, which we will discuss in Section 11.)
228 There are also several special-purpose
230 commands for local motion.
233 which is an unpaddable white space
234 of the same width as a digit.
235 `Unpaddable' means that it will never be widened
236 or split across a line by line justification and filling.
240 which is an unpaddable character the width of a space,
242 which is half that width,
244 which is one quarter of the width of a space,
247 which has zero width.
249 (This last one is useful, for example, in entering
250 a text line which would otherwise begin with a `.'.)
256 \eo'set of characters'
259 characters to be overstruck,
260 centered on the widest.
261 This is nice for accents, as in
263 syst\eo"e\e(ga"me t\eo"e\e(aa"l\eo"e\e(aa"phonique
267 syst\o"e\(ga"me t\o"e\(aa"l\o"e\(aa"phonique
277 remember that each is just one character to
280 You can make your own overstrikes with another special convention,
282 the zero-motion command.
284 suppresses the normal horizontal motion
285 after printing the single character
287 so another character can be laid on top of it.
288 Although sizes can be changed within
290 it centers the characters on the widest,
292 there can be no horizontal or vertical motions,
295 may be the only way to get what you want:
298 \s8\z\(sq\s14\z\(sq\s22\z\(sq\s36\(sq
303 \es8\ez\e(sq\es14\ez\e(sq\es22\ez\e(sq\es36\e(sq
307 is needed to leave room for the result.
309 As another example, an extra-heavy semicolon
312 \s+6\z,\v'-0.25m'.\v'0.25m'\s0 instead of ; or \s+6;\s0
314 can be constructed with a big comma and a big period above it:
316 \es+6\ez,\ev'\(mi0.25m'.\ev'0.25m'\es0
318 `0.25m' is an experimentally-derived constant.
320 A more ornate overstrike is given by the bracketing function
322 which piles up characters vertically,
323 centered on the current baseline.
324 Thus we can get big brackets,
325 constructing them with piled-up smaller pieces:
329 \b'\(lt\(lk\(lb' \b'\(lc\(lf' x \b'\(rc\(rf' \b'\(rt\(rk\(rb'
332 by typing in only this:
335 \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
339 also provides a convenient facility for drawing horizontal and vertical
340 lines of arbitrary length with arbitrary characters.
342 draws a line one inch long, like this:
344 The length can be followed by
345 the character to use if the \(ru isn't appropriate;
347 draws a half-inch line of dots: \l'.5i.'.
350 is entirely analogous,
351 except that it draws a vertical line instead of horizontal.