SYNOPSIS
From man(1):
-l
Format and display local manual files instead of searching through the system's manual collection.
-t
Use groff -mandoc to format the manual page to stdout.
From groff_tmac(5):
papersize
This macro file is already loaded at start-up by troff so it isn't necessary to call it explicitly. It provides an interface to set the paper size on the command line with the option -dpaper=size. Possible values for size are the same as the predefined papersize values in the DESC file (only lowercase; see groff_font(5) for more) except a7–d7. An appended l (ell) character denotes landscape orientation. Examples: a4, c3l, letterl.
Most output drivers need additional command-line switches -p and -l to override the default paper length and orientation as set in the driver-specific DESC file. For example, use the following for PS output on A4 paper in landscape orientation:
sh# groff -Tps -dpaper=a4l -P-pa4 -P-l -ms foo.ms > foo.ps
THE PROBLEM
I would like to use these to format local and system man pages to print out, but want to switch the paper size from letter to A4. Unfortunately I couldn't find anything in man(1) about passing options to the underlying roff formatter.
Right now I can use
zcat `man -w man` | groff -tman -dpaper=a4 -P-pa4
to format man(1) on stdout
, but that's kind of long and I'd rather have man build the pipeline for me if I can. In addition the above pipeline might need changing for more complicated man pages, and while I could use grog, even it doesn't detect things like accented characters (for groff's -k option), while man does (perhaps using locale settings).