Next: , Previous: , Up: Manipulating Type Size and Vertical Spacing   [Contents][Index]


5.20.1 Changing the Type Size

Request: .ps [size]
Request: .ps +size
Request: .ps -size
Escape sequence: \ssize
Register: \n[.s]

Use the ps request or the \s escape sequence to change (increase, decrease) the type size (in scaled points). Specify size as either an absolute type size, or as a relative change from the current size. ps with no argument restores the previous size. The ps request’s default scaling unit is ‘z’. The requested size is rounded to the nearest valid size (with ties rounding down) within the limits supported by the device. If the requested size is non-positive, it is treated as 1u.

Type size alteration is incorrectly documented in the AT&T troff manual, which claims “if [the requested size] is invalid, the next larger valid size will result, with a maximum of 36”.84

The read-only string-valued register .s interpolates the type size in points as a decimal fraction; it is associated with the environment (see Environments). To obtain the type size in scaled points, interpolate the .ps register instead (see Using Fractional Type Sizes).

The \s escape sequence supports a variety of syntax forms.

\sn

Set the type size to n points. n must be a single digit. If n is 0, restore the previous size.

\s+n
\s-n

Increase or decrease the type size by n points. n must be exactly one digit.

\s(nn

Set the type size to nn points. nn must be exactly two digits.

\s+(nn
\s-(nn
\s(+nn
\s(-nn

Alter the type size in points by the two-digit value nn.

See Using Fractional Type Sizes, for further syntactical forms of the \s escape sequence that additionally accept decimal fractions.

snap, snap,
.ps +2
grin, grin,
.ps +2
wink, wink, \s+2nudge, nudge,\s+8 say no more!
.ps 10

The \s escape sequence affects the environment immediately and doesn’t produce an input token. Consequently, it can be used in requests like mc, which expects a single character as an argument, to change the type size on the fly.

.mc \s[20]x\s[0]
Request: .sizes s1 s2 … sn [0]

The DESC file specifies which type sizes are allowed by the output device; see DESC File Format. Use the sizes request to change this set of permissible sizes. Arguments are in scaled points; see Using Fractional Type Sizes. Each can be a single type size (such as ‘12000’), or a range of sizes (such as ‘4000-72000’). You can optionally end the list with a ‘0’.


Next: , Previous: , Up: Manipulating Type Size and Vertical Spacing   [Contents][Index]