Next: , Previous: , Up: Invoking groff   [Contents][Index]


2.5 Paper Format

In groff, the page dimensions for the formatter GNU troff and for output devices are handled separately. See Page Layout, for vertical manipulation of the page size, and See Line Layout, for horizontal changes. The papersize macro package, normally loaded by troffrc at startup, provides an interface for configuring page dimensions by convenient names, like ‘letter’ or ‘a4’; see groff_tmac(5). The default used by the formatter depends on its build configuration, but is usually one of the foregoing, as geographically appropriate.

It is up to each macro package to respect the page dimensions configured in this way.

For each output device, the size of the output medium can be set in its DESC file. Most output drivers also recognize a command-line option -p to override the default dimensions and an option -l to use landscape orientation. See DESC File Format, for a description of the papersize keyword, which takes an argument of the same form as -p. The output driver’s man page, such as grops(1), may also be helpful.

groff uses the command-line option -P to pass options to postprocessors; for example, use the following for PostScript output on A4 paper in landscape orientation.

groff -Tps -dpaper=a4l -P-pa4 -P-l -ms foo.ms > foo.ps