NAME
mpm – macros for page makeup

SYNOPSIS
troff –mpm file ...

DESCRIPTION
This macro package defines troff macros compatible with ms(6). These macros provide extra information for and quietly invoke a program for automatic page makeup, including figure placement, widow avoidance, and vertical justification. Vertical padding space may be added before .PP, .LP, .IP, .QP, .SH, .NH, and around .DS/.DE, .EQ/.EN, .TS/.TE, .PS/.PE, .P1/.P2, .QS/.QE.

The following macros are different from or not part of –ms. Values denoted n have default value 1v.

.BP,    .FL, .FC Begin page, flush figures, flush column.
.KF m    Floating keep, with preferred center at vertical position m; default is top margin.
.NE n    Start new page if remaining vertical space on this page is less than n .
.P1     Begin a program display (Courier font).
.P2     End program display.
.P3     Insert optional break point in program display.
.SP n    Add paddable space of height n.
.Tm any text
Cause page number and any text to appear on the standard error output.
.X any text
Cause any text to be presented to the hidden page–makeup program as part of a device–dependent output sequence x X any text. Equivalent to \X'any text'.

Useful number registers:
HM    header margin; default 1 inch.
FM    footer margin; default 1 inch.
FO    page footer; default 10 inches.
%#    Page number of current page.
dP,dVShrinkage of point size and vertical spacing for .P1, in points.

Useful strings:
%e,%oEven and odd page title commands, as .tl ''''.

Page layout is automatic. The primary control is to move floating figures forward or backwards in the input; this will eventually change the layout, perhaps in the desired way. Position arguments on .KF commands will also help.

FILES
/sys/lib/tmac/tmac.pm
/bin/aux/pm

SEE ALSO
ms(6), troff(1)

BUGS
Compatibility with –ms is imperfect. Among the missing: lines that separate footnotes from the body of text, keeps that can be declared to occupy a separate page, disused document styles such as ``Engineer's Notes,'' and, for the moment, all document styles except the –ms default.
Only single and double column output are supported.
Copyright © 2025 Plan 9 Foundation