%sccs.include.proprietary.roff%

@(#)tt02 8.3 (Berkeley) 05/20/94

Point Sizes; Line Spacing

As mentioned above, the command .ps sets the point size. One point is 1/72 inch, so 6-point characters are at most 1/12 inch high, and 36-point characters are \(12 inch. Some sample point sizes are shown below. These point sizes are selected to be approximately correct after the photo reduction process used to make this book.

1 1 6 point: Pack my box with five dozen liquor jugs. .vs 13p 9 point: Pack my box with five dozen liquor jugs. .vs 14p 10 point: Pack my box with five dozen liquor .vs 15p 11 point: Pack my box with five dozen .vs 19p 14 point: Pack my box with five .vs 27p \s1916 point\s24 20 point .vs 47p \s29 24\s0\s36 30\s0 36 .vs 12p

2

Not all point sizes are supported. If the number after .ps is not a legal size, it is rounded up to the next valid value, with a typical maximum of 72. If no number follows .ps , troff reverts to the previous size, whatever it was. troff begins with point size 10, which is usually fine. The original of this document (on 8.5 by 11 inch paper) is in 9 point which becomes about 7\(12 points after photo reduction.

The point size can also be changed in the middle of a line or even a word with the in-line command \es . To produce

1 \s8UNIX\s10 runs on a \s8PDP-\s1011/45

2 type

1 \es8UNIX\es10 runs on a \es8PDP-\es1011/45

2 As above, \es should be followed by a legal point size, except that \es0 causes the size to revert to its previous value. Notice that \es1011 can be understood correctly as `size 10, followed by an 11', if the size is legal, but not otherwise. Be cautious with similar constructions.

Relative size changes are also legal and useful:

1 \es-2UNIX\es+2

2 temporarily decreases the size, whatever it is, by two points, then restores it. Relative size changes have the advantage that the size difference is independent of the starting size of the document. The amount of the relative change is restricted to a single digit. .WS

The other parameter that determines what the type looks like is the spacing between lines, which is set independently of the point size. Vertical spacing is measured from the bottom of one line to the bottom of the next. The command to control vertical spacing is .vs . For running text, it is usually best to set the vertical spacing about 20% bigger than the character size. For example, so far in this document, we have used ``9 on 11'', that is,

1 ^ps 9 ^vs 11p

2 If we changed to

1 ^ps 9 ^vs 9p

2 .vs 9p the running text would look like this. After a few lines, you will agree it looks a little cramped. The right vertical spacing is partly a matter of taste, depending on how much text you want to squeeze into a given space, and partly a matter of traditional printing style. By default, troff uses 10 on 12.

.vs 14p Point size and vertical spacing make a substantial difference in the amount of text per square inch. This is 12 on 14.

.vs 7p Point size and vertical spacing make a substantial difference in the amount of text per square inch. For example, 10 on 12 uses about twice as much space as 7 on 8. This is 6 on 7, which is even smaller. It packs a lot more words per line, but you can go blind trying to read it.

When used without arguments, .ps and .vs revert to the previous size and vertical spacing respectively. .WS

The command .sp is used to get extra vertical space. Unadorned, it gives you one extra blank line (one .vs , whatever that has been set to). Typically, that's more or less than you want, so .sp can be followed by information about how much space you want _

1 ^sp 2i

2 means `two inches of vertical space'.

1 ^sp 2p

2 means `two points of vertical space'; and

1 ^sp 2

2 means `two vertical spaces' _ two of whatever .vs is set to (this can also be made explicit with .sp 2v ); troff also understands decimal fractions in most places, so

1 ^sp 1.5i

2 is a space of 1.5 inches. These same scale factors can be used after .vs to define line spacing, and in fact after most commands that deal with physical dimensions.

It should be noted that all size numbers are converted internally to `machine units', which are 1/432 inch (1/6 point). For most purposes, this is enough resolution that you don't have to worry about the accuracy of the representation. The situation is not quite so good vertically, where resolution is 1/144 inch (1/2 point).