groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mom: .START macro resets page dimensions


From: Serge Baumer
Subject: mom: .START macro resets page dimensions
Date: Mon, 23 Mar 2020 13:33:46 +0200

Hi groff and groffers,

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.

I didn't study mom's code in depth, but I hope I've picked the
problematic chunk correctly.  If not, my apologies.  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.

--
Best regards,
Serge Baumer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]