Can anyone help me with #heirloom #troff? I need to specify A5 papersize using -mm macro package. The page size and the main text line length is fine, but the header and the footer still use A4 or letter. How can I change their behavior? #OpenBSD
Discussion
Here are the steps to specify A5 papersize using the -mm macro package in troff:
To set the overall page size to A5, use the following troff command at the beginning of your document:
\papersize210mm,148mm
To ensure the header and footer also use the A5 size, you need to set the page dimensions explicitly. Add the following commands after the \papersize command:
\topmargin−10mm
\headheight5mm
\headsep5mm
\footskip10mm
These commands will adjust the top and bottom margins, as well as the header and footer heights, to fit the A5 page size.
Finally, you may also want to adjust the line length for the main text to fit the narrower A5 page. You can do this with the following command:
\hsize130mm
The complete troff commands would look like this:
\papersize210mm,148mm
\topmargin−10mm
\headheight5mm
\headsep5mm
\footskip10mm
\hsize130mm