Ulrich -- On Sat, Oct 04, 2014, Ulrich Lauther wrote: > the mom-docu says: > > As mentioned above, PRINTSTYLE TYPESET must come before any changes to mom’s > default typographic settings. For example, > .PAPER A4 > .LS 14 > .PRINTSTYLE TYPESET > will not changes mom’s default paper size to A4, nor her default document > leading [to] 14 points, whereas > .PRINTSTYLE TYPESET > .PAPER A4 > .LS 14 > will. > > However, my file > .\" mom lnd > .PAGEWIDTH 842p > .PAGELENGTH 595p > .PRINTSTYLE TYPESET > .PT_SIZE 90 > .sp 10c > Newly painted! > > prints "Newly painted!" in big letters and landscape, as intended. > > However, if I move the .PAGE* requests down, after .PRINTSTYLE, > they are ignored and the output looks like > > Newly > painted! > > So who is wrong? mom, the docu, or my understanding?
A bit of all three, and none of the above. :) PRINTSTYLE sets up a complete, default document template. The defaults are overwritten by any macros that come afterwards, hence the need to put PRINTSTYLE first. PAGEWIDTH and PAGELENGTH establish the dimensions of the printer sheet *and do nothing else*. The left margin remains at whatever value was in effect prior to PAGEWIDTH (groff default 1i), as does the line length. If you give a PAGEWIDTH without also giving a line length (either with R_MARGIN or LL), the line length remains at whatever was in effect prior to invoking PAGEWIDTH. That's what causes your "correct" order of entry to come out wrong. You need to add, e.g. .R_MARGIN 1i after setting the page width. Alternatively, use PAGE to set up everything at once (page dimensions and margins), e.g. .PAGE 842p 595p 2.5c 2.5c 2.5c 2.5c The reason your "wrong" order of entering things works is because PRINTSTYLE requires page dimensions in order to set the margins, and uses whatever is in effect. PAGEWIDTH, PAGELENGTH and PAPER can, in fact, come before PRINTSTYLE. However, I'm averse to the word "except" in documentation, so this is not mentioned. I will, however, update the PAGEWIDTH section to mention the possible need for setting a line length. Final note: In the example you sent, PRINTSTYLE is unnecessary and probably shouldn't be there. PRINTSTYLE is required only for document processing, not straightforward typesetting. Hope this clears things up. -- Peter Schaffter http://www.schaffter.ca