Space downwards distance. With no argument it advances 1 line. A negative argument causes
gtroffto move up the page the specified distance. If the argument is preceded by a ‘|’ thengtroffmoves that distance from the top of the page. This request causes a line break, and that adds the current line spacing to the space you have just specified. The default scaling indicator is ‘v’.For convenience you may wish to use the following macros to set the height of the next line at a given distance from the top or the bottom of the page:
.de y-from-top-down . sp |\\$1-\\n[.v]u .. . .de y-from-bot-up . sp |\\n[.p]u-\\$1-\\n[.v]u ..A call to ‘.y-from-bot-up 10c’ means that the bottom of the next line will be at 10cm from the paper edge at the bottom.
If a vertical trap is sprung during execution of
sp, the amount of vertical space after the trap is discarded. For example, this.de xxx .. . .wh 0 xxx . .pl 5v foo .sp 2 bar .sp 50 bazresults in
foo bar bazThe amount of discarded space is available in the number register
.trunc.To protect
spagainst vertical traps, use thevptrequest:.vpt 0 .sp -3 .vpt 1
Output nnn−1 blank lines after each line of text. With no argument,
gtroffuses the previous value before the lastlscall..ls 2 \" This causes double-spaced output .ls 3 \" This causes triple-spaced output .ls \" Again double-spacedThe line spacing is associated with the current environment (see Environments).
The read-only number register
.Lcontains the current line spacing setting.
See Changing Type Sizes, for the requests vs and pvs as
alternatives to ls.
Sometimes, extra vertical spacing is only needed occasionally, e.g. to allow space for a tall construct (like an equation). The
\xescape does this. The escape is given a numerical argument, usually enclosed in quotes (like ‘\x'3p'’); the default scaling indicator is ‘v’. If this number is positive extra vertical space is inserted below the current line. A negative number adds space above. If this escape is used multiple times on the same line, the maximum of the values is used.See Escapes, for details on parameter delimiting characters.
The
.aread-only number register contains the most recent (nonnegative) extra vertical line space.Using
\xcan be necessary in combination with the\bescape, as the following example shows.This is a test with the \[rs]b escape. .br This is a test with the \[rs]b escape. .br This is a test with \b'xyz'\x'-1m'\x'1m'. .br This is a test with the \[rs]b escape. .br This is a test with the \[rs]b escape.produces
This is a test with the \b escape. This is a test with the \b escape. x This is a test with y. z This is a test with the \b escape. This is a test with the \b escape.
Enable no-space mode. In this mode, spacing (either via
spor via blank lines) is disabled. Thebprequest to advance to the next page is also disabled, except if it is accompanied by a page number (see Page Control, for more information). This mode ends when actual text is output or thersrequest is encountered which ends no-space mode. The read-only number register.nsis set to 1 as long as no-space mode is active.This request is useful for macros that conditionally insert vertical space before the text starts (for example, a paragraph macro could insert some space except when it is the first paragraph after a section header).