A device’s page dimensions in the aforementioned DESC are used if
declared there. groff
’s build process configures a default page
format and writes it to typesetters’ DESC files. This
installation’s default is documented in gtroff(1). If the
DESC file lacks this information, the formatter and output driver
use a page length of ‘11i’ (eleven inches) for compatibility with
AT&T troff
.
In the formatter, the pl
request changes the page length, but
macro packages often do not support alteration of the paper format
within a document. One might, for instance, want to switch between
portrait and landscape orientations. Macro packages lack a consistent
approach to configuration of parameters dependent on the paper format;
some, like ms, benefit from a preamble in the document prior to
the first macro call, while others, like mm, instead require the
specification of registers on the command line,
or otherwise before its macro file is interpreted,
to configure page dimensions.
Output drivers for typesetters also recognize command-line options -p to override the default page dimensions and -l to use landscape orientation. The output driver’s man page, such as grops(1), may be helpful.
groff
’s -d paper
command-line option is a convenient
means of setting the paper format; see groff_tmac(5).
Combine it with appropriate -P options for the output driver,
overriding its defaults. The following command formats for PostScript
on A4 paper in landscape orientation.
$ groff -T ps -d paper=a4l -P -pa4 -P -l -m s my.ms >my.ps