Commit | Line | Data |
---|---|---|
ff262511 KB |
1 | .\" %sccs.include.proprietary.roff% |
2 | .\" | |
f1da83b0 | 3 | .\" @(#)tt02 8.3 (Berkeley) %G% |
5c239298 KD |
4 | .\" |
5 | .NH | |
6 | Point Sizes; Line Spacing | |
7 | .PP | |
8 | As mentioned above, | |
9 | the command | |
10 | .BD .ps | |
11 | sets the point size. | |
12 | One point is 1/72 inch, | |
13 | so 6-point characters are at most 1/12 inch high, | |
14 | and 36-point characters are \(12 inch. | |
5bd2bee2 KM |
15 | Some sample point sizes are shown below. |
16 | These point sizes are selected to be approximately | |
17 | correct after the photo reduction process used to make this book. | |
5c239298 | 18 | .P1 1 |
5c239298 | 19 | .ps 7 |
5bd2bee2 KM |
20 | 6 point: Pack my box with five dozen liquor jugs. |
21 | .vs 13p | |
5c239298 | 22 | .ps 11 |
5bd2bee2 | 23 | 9 point: Pack my box with five dozen liquor jugs. |
5c239298 KD |
24 | .vs 14p |
25 | .ps 12 | |
5bd2bee2 KM |
26 | 10 point: Pack my box with five dozen liquor |
27 | .vs 15p | |
28 | .ps 13 | |
29 | 11 point: Pack my box with five dozen | |
30 | .vs 19p | |
31 | .ps 17 | |
5c239298 | 32 | 14 point: Pack my box with five |
5bd2bee2 KM |
33 | .vs 27p |
34 | \s1916 point\s24 20 point | |
35 | .vs 47p | |
f1da83b0 | 36 | .ps 43 |
5bd2bee2 | 37 | \s29 24\s0\s36 30\s0 36 |
5c239298 KD |
38 | .ps 10 |
39 | .vs 12p | |
40 | .P2 | |
41 | .PP | |
5bd2bee2 | 42 | Not all point sizes are supported. |
5c239298 KD |
43 | If the number after |
44 | .BD .ps | |
5bd2bee2 | 45 | is not a legal size, |
5c239298 | 46 | it is rounded up to the next valid value, |
5bd2bee2 | 47 | with a typical maximum of 72. |
5c239298 KD |
48 | If no number follows |
49 | .BD .ps , | |
50 | .UL troff | |
51 | reverts to the previous size, whatever it was. | |
52 | .UL troff | |
53 | begins with point size 10, | |
54 | which is usually fine. | |
5bd2bee2 KM |
55 | The original of this document (on 8.5 by 11 inch paper) is in 9 point |
56 | which becomes about 7\(12 points after photo reduction. | |
5c239298 KD |
57 | .PP |
58 | The point size can also be changed in the middle of a line | |
59 | or even a word | |
60 | with the in-line command | |
61 | .BD \es . | |
62 | To produce | |
63 | .P1 | |
64 | \s8UNIX\s10 runs on a \s8PDP-\s1011/45 | |
65 | .P2 | |
66 | type | |
67 | .P1 | |
68 | \es8UNIX\es10 runs on a \es8PDP-\es1011/45 | |
69 | .P2 | |
70 | As above, | |
71 | .BD \es | |
72 | should be followed by a legal point size, | |
73 | except that | |
74 | .BD \es0 | |
75 | causes the size to revert to | |
76 | its previous value. | |
77 | Notice that | |
78 | .BD \es1011 | |
79 | can be understood correctly as `size 10, followed by an 11', if the size is legal, | |
80 | but not otherwise. | |
81 | Be cautious with similar constructions. | |
82 | .PP | |
83 | Relative size changes are also legal and useful: | |
84 | .P1 | |
85 | \es\-2UNIX\es+2 | |
86 | .P2 | |
87 | temporarily decreases the size, whatever it is, by two points, then | |
88 | restores it. | |
89 | Relative size changes have the advantage that the size difference | |
90 | is independent of the starting size of the document. | |
91 | The amount of the relative change is restricted | |
92 | to a single digit. | |
93 | .WS | |
94 | .PP | |
95 | The other parameter that determines what the type looks like | |
96 | is the spacing between lines, | |
97 | which is set independently of the point size. | |
98 | Vertical spacing is measured from the bottom of one line to | |
99 | the bottom of the next. | |
100 | The command to control vertical spacing is | |
101 | .BD .vs . | |
102 | For running text, it is usually best to set the vertical spacing | |
103 | about 20% bigger than the character size. | |
104 | For example, so far in this document, we have used | |
105 | ``9 on 11'', that is, | |
106 | .P1 | |
107 | ^ps 9 | |
108 | ^vs 11p | |
109 | .P2 | |
110 | If we changed to | |
111 | .P1 | |
112 | ^ps 9 | |
113 | ^vs 9p | |
114 | .P2 | |
115 | .vs 9p | |
116 | .ne 3 | |
117 | the running text would look like this. | |
118 | After a few lines, you will agree it looks a little cramped. | |
119 | The right vertical spacing is partly a matter of taste, depending on how | |
120 | much text you want to squeeze into a given space, | |
121 | and partly a matter of traditional printing style. | |
122 | By default, | |
123 | .UL troff | |
124 | uses 10 on 12. | |
125 | .PP | |
126 | .vs 14p | |
127 | .ps 12 | |
128 | Point size and vertical spacing make a substantial difference in the amount of text | |
129 | per square inch. | |
130 | This is 12 on 14. | |
131 | .ne 2 | |
132 | .PP | |
133 | .ne 2 | |
134 | .ps 6 | |
135 | .vs 7p | |
136 | Point size and vertical spacing make a substantial difference in the amount of text | |
137 | per square inch. | |
138 | For example, | |
139 | 10 on 12 uses about twice as much space as 7 on 8. | |
140 | This is 6 on 7, which is even smaller. | |
141 | It packs a lot more words per line, | |
142 | but you can go blind trying to read it. | |
143 | .PP | |
144 | When used without arguments, | |
145 | .BD .ps | |
146 | and | |
147 | .BD .vs | |
148 | revert to the previous size and vertical spacing | |
149 | respectively. | |
150 | .WS | |
151 | .PP | |
152 | The command | |
153 | .BD .sp | |
154 | is used to get extra vertical space. | |
155 | Unadorned, | |
156 | it gives you one extra blank line (one | |
157 | .BD .vs , | |
158 | whatever that has been set to). | |
159 | Typically, that's more or less than you want, | |
160 | so | |
161 | .BD .sp | |
162 | can be followed by | |
163 | information about how much space you want _ | |
164 | .P1 | |
165 | ^sp 2i | |
166 | .P2 | |
167 | means `two inches of vertical space'. | |
168 | .P1 | |
169 | ^sp 2p | |
170 | .P2 | |
171 | means `two points of vertical space'; | |
172 | and | |
173 | .P1 | |
174 | ^sp 2 | |
175 | .P2 | |
176 | means `two vertical spaces' _ two of whatever | |
177 | .BD .vs | |
178 | is set to | |
179 | (this can also be made explicit with | |
180 | .BD .sp\ 2v ); | |
181 | .UL troff | |
182 | also understands decimal fractions in most places, | |
183 | so | |
184 | .P1 | |
185 | ^sp 1.5i | |
186 | .P2 | |
187 | is a space of 1.5 inches. | |
188 | These same scale factors can be used after | |
189 | .BD .vs | |
190 | to define line spacing, and in fact after most commands | |
191 | that deal with physical dimensions. | |
192 | .PP | |
193 | It should be noted that all size numbers are converted internally | |
194 | to `machine units', which are 1/432 inch | |
195 | (1/6 point). | |
196 | For most purposes, this is enough resolution | |
197 | that you don't have to worry about the accuracy of the representation. | |
198 | The situation is not quite so good vertically, | |
199 | where resolution is 1/144 inch | |
200 | (1/2 point). |