Peter Schaffter writes: > On Mon, Mar 23, 2020, Serge Baumer wrote: > > In the om.tmac, the .START macro calls .DEFAULTS unconditionally. Here > > are few lines of code from the very beginning of the .DEFAULTS > > definition: > > > > . if !\\n[#DOC_TYPE]=5 \{\ > > . ie !d $PAPER .PAPER LETTER > > . el .PAPER \\*[$PAPER] > > . \} > > > > They are introduced by a commit dated 2018-03-04 to replace the more > > simple > > > > . if !d $PAPER .PAPER LETTER > > > > Thus, the new code is in the official 1.22.4 but not in earlier groff. > > > > So, what we get here if we're not making slides (i.e. #DOC_TYPE != 5) > > but have used .PAGE or any of .PAGEWIDTH, .PAGELENGTH separately before > > .START. If we haven't used .PAPER yet, it's called here with "LETTER", > > resetting our custom page dimensions. But if we'd called .PAPER, say, > > before making page size tweaks: it's called again now, destroying our > > previous work all the same. So, we have a chance to setup our own page > > size only with slides. > > It's astounding how long a bug like this can hang around before it's > discovered. There are two culprits. The first is that mom has > been setting the default papersize (letter) in om.tmac itself with > '.PAPER LETTER' when she should be calling PAGEWIDTH and PAGELENGTH > separately. The second is that the DEFAULTS clause, above, is > unnecessary. It's cruft from testing that I neglected to remove. > When these issues are corrected, PAGELENGTH, PAGEWIDTH, and PAGE > behave as expected. > > One thing to be wary of: PAGEWIDTH only sets the width of the > physical page. It does not in/decrease the line length (an > assumption mom does not make), and must be done either by giving an > explicit R_MARGIN or an explicit LL.
:) Yeah, I got it after а day or two of reasoning WHY that page height extends to A4/Letter one while width remains mine (my pages are mostly pocket e-book reader mini-pages, and I use .PAGE with the full set of args). Then I said: well, man, what you see is not page width. It's line length. > > I didn't report this as a bug because I'm not sure that here's no > > some sort of planned behaviour and that I didn't miss some info. > > I can create a ticket though. > > It is a bug. No need to create a ticket. Most mom bug reports come > to me directly and go into the BUGS file. Ok, all reports by mail, as said in BUGS. > I'll make the necessary changes to the om.tmac in the groff > repo and to the tarball at the mom site within a day or two. If > you're in a hurry, you can make the changes yourself. Search > through om.tmac for the text "Set up a default papersize". Remove > the line beneath, '.PAPER LETTER', and replace it with > > .PAGEWIDTH 8.5i > .PAGELENGTH 11i > > then remove entirely the clause in DEFAULTS, above. Good. Thanks for the reply, Peter, and thank you for mom. -- Best regards, Serge Baumer