groff: Changing Type 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 (for both '.ps' and '\s'), or no argument (for '.ps'
only), goes back to the previous size.
Default scaling indicator of 'size' is 'z'. If 'size' is 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 (⇒
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]
⇒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 (⇒
Environments).
The effective vertical line spacing consists of four components.
Breaking a line causes the following actions (in the given order).
* Move the current point vertically by the "extra pre-vertical line
space". This is the minimum value of all '\x' escapes with a
negative argument in the current output line.
* Move the current point vertically by the vertical line spacing as
set with the 'vs' request.
* Output the current line.
* Move the current point vertically by the "extra post-vertical line
space". This is the maximum value of all '\x' escapes with a
positive argument in the line that has just been output.
* Move the current point vertically by the "post-vertical line
spacing" as set with the 'pvs' request.
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.
⇒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 (⇒Environments).