Next: , Previous: Sizes, Up: Sizes


5.18.1 Changing Type Sizes

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

Use the ps request or the \s escape to change (increase, decrease) the type size (in points). Specify size as either an absolute point size, or as a relative change from the current size. The size 0, or no argument, goes back to the previous size.

Default scaling indicator of size is ‘z’. If size is zero or negative, it is set to 1u.

The read-only number register .s returns the point size in points as a decimal fraction. This is a string. To get the point size in scaled points, use the .ps register instead.

.s is associated with the current environment (see Environments).

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

The \s escape may be called in a variety of ways. Much like other escapes there must be a way to determine where the argument ends and the text begins. Any of the following forms are valid:

\sn
Set the point size to n points. n must be either 0 or in the range 4 to 39.
\s+n
\s-n
Increase or decrease the point size by n points. n must be exactly one digit.
\s(nn
Set the point size to nn points. nn must be exactly two digits.
\s+(nn
\s-(nn
\s(+nn
\s(-nn
Increase or decrease the point size by nn points. nn must be exactly two digits.

Note that \s doesn't produce an input token in gtroff. As a consequence, it can be used in requests like mc (which expects a single character as an argument) to change the font on the fly:

          
          .mc \s[20]x\s[0]

See Fractional Type Sizes, for yet another syntactical form of using the \s escape.

— Request: .sizes s1 s2 ... sn [0]

Some devices may only have certain permissible sizes, in which case gtroff rounds to the nearest permissible size. The DESC file specifies which sizes are permissible for the device.

Use the sizes request to change the permissible sizes for the current output device. Arguments are in scaled points; the sizescale line in the DESC file for the output device provides the scaling factor. For example, if the scaling factor is 1000, then the value 12000 is 12 points.

Each argument can be a single point size (such as ‘12000’), or a range of sizes (such as ‘4000-72000’). You can optionally end the list with a zero.

— Request: .vs [space]
— Request: .vs +space
— Request: .vs -space
— Register: \n[.v]

Change (increase, decrease) the vertical spacing by space. The default scaling indicator is ‘p’.

If vs is called without an argument, the vertical spacing is reset to the previous value before the last call to vs.

gtroff creates a warning of type ‘range’ if space is negative; the vertical spacing is then set to smallest positive value, the vertical resolution (as given in the .V register).

Note that ‘.vs 0 isn't saved in a diversion since it doesn't result in a vertical motion. You explicitly have to repeat this command before inserting the diversion.

The read-only number register .v contains the current vertical spacing; it is associated with the current environment (see Environments).

The effective vertical line spacing consists of four components. Breaking a line causes the following actions (in the given order).

It is usually better to use vs or pvs instead of ls to produce double-spaced documents: vs and pvs have a finer granularity for the inserted vertical space compared to ls; furthermore, certain preprocessors assume single-spacing.

See Manipulating Spacing, for more details on the \x escape and the ls request.

— Request: .pvs [space]
— Request: .pvs +space
— Request: .pvs -space
— Register: \n[.pvs]

Change (increase, decrease) the post-vertical spacing by space. The default scaling indicator is ‘p’.

If pvs is called without an argument, the post-vertical spacing is reset to the previous value before the last call to pvs.

gtroff creates a warning of type ‘range’ if space is zero or negative; the vertical spacing is then set to zero.

The read-only number register .pvs contains the current post-vertical spacing; it is associated with the current environment (see Environments).