gtroff provides some very primitive operations for controlling
page layout.
Set the page length to length (or increment or decrement the current value by length). This is the length of the physical output page. The default scaling indicator is ‘v’.
The current setting can be found in the read-only number register ‘.p’.
Note that this only specifies the size of the page, not the top and bottom margins. Those are not set by
gtroffdirectly. See Traps, for further information on how to do this.Negative
plvalues are possible also, but not very useful: No trap is sprung, and each line is output on a single page (thus suppressing all vertical spacing).If no argument or an invalid argument is given,
plsets the page length to 11i.
gtroff provides several operations which help in setting up top
and bottom titles (or headers and footers).
Print a title line. It consists of three parts: a left justified portion, a centered portion, and a right justified portion. The argument separator ‘'’ can be replaced with any character not occurring in the title line. The ‘%’ character is replaced with the current page number. This character can be changed with the
pcrequest (see below).Without argument,
tlis ignored.Some notes:
- The line length set by the
llrequest is not honoured bytl; use theltrequest (described below) instead, to control line length for text set bytl.- A title line is not restricted to the top or bottom of a page.
tlprints the title line immediately, ignoring a partially filled line (which stays untouched).- It is not an error to omit closing delimiters. For example, ‘.tl /foo’ is equivalent to ‘.tl /foo///’: It prints a title line with the left justified word ‘foo’; the centered and right justfied parts are empty.
tlaccepts the same parameter delimiting characters as the\Aescape; see Escapes.
The title line is printed using its own line length, which is specified (or incremented or decremented) with the
ltrequest. Initially, the title line length is set to 6.5i. If a negative line length is specified (which is not allowed),gtroffemits a warning of type ‘range’ and sets the title line length to zero. The default scaling indicator is ‘m’. Ifltis called without an argument, the title length is reset to the previous value before the last call tolt.The current setting of this is available in the
.ltread-only number register; it is associated with the current environment (see Environments).
Change (increase or decrease) the page number of the next page. The only argument is the page number; the request is ignored without a parameter.
The read-only number register
.pncontains the number of the next page: either the value set by apnrequest, or the number of the current page plus 1.
Change the page number character (used by the
tlrequest) to a different character. With no argument, this mechanism is disabled. Note that this doesn't affect the number register%.
See Traps.