I am trying to define the top (and bottom) margins in groff to 0cm.
For the page offset is easy to define whatever margin you want, but I am not being able to achieve the same for the top and bottom margins.
This is what I have tried:
.PH ""
\" ***************
\" PAGE DEFINITION
\" ***************
.pl 29.7c \" PAGE LENGTH
.po 1.5c \" PAGE OFFSET
.ll 18.0c \" LINE LENGTH
.nr pg*top-margin 0 \" MARGIN VARIABLES
.nr pg*foot-margin 0
.nr pg*block-size 0
.nr pg*footer-size 0 \" 1v+footer+even/odd footer+2v
.nr pg*header-size 0 \" 3v+header+even/odd header+2v
.nr pg*extra-footer-size 0
.nr pg*extra-header-size 0
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
.SK
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
After generating the ps file:
groff -Tps -P-pa4 -mmm sample3.mm > sample3.ps
this is the result, clearly the top margin is not 1.5cm as in the left margin:
mm
uses the.TP
macro to process the top of each page. This includes the vertical spacing at the top. Redefining this macro will stop any header space being reserved.For reference, the old mm manual states:
(my italicization)