Update of bug #66439 (group groff): Status: None => In Progress Assigned to: None => gbranden
_______________________________________________________ Follow-up Comment #1: By its nature a bottom block is a thing that should not interact with a partially collected line in the input. Using a regular diversion moved the vertical drawing position from its "pre-page" location of "-1" (because the `BS` macro called `br` to ensure that the bottom block didn't absorb any partially collected line). That in turn sprung the default header trap that writes a centered page number. The `LT` letter logic is written such that if the drawing position is not at the top of the page, it fails to write of the pre-body letter material (writer's address, date, inside address, salutation, etc.). (Because the first page has already started and the drawing position is non-negative, the `LT` macro is also too late to turn off the default page header.) The essence of the fix is to use box diversions instead of the regular kind. I think it's still a good idea to have the `BE` macro explicitly break before closing the box diversion, in case the document author forgets to, doesn't use `tl` as in [https://lists.gnu.org/archive/html/groff/2024-11/msg00108.html this example from the mailing list inspired by a problem Oliver Corff raised], and similar scenarios. Here's a patch and the result: $ git diff diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac index b74bc7ce3..6b540271f 100644 --- a/contrib/mm/m.tmac +++ b/contrib/mm/m.tmac @@ -1707,13 +1707,12 @@ .debug@emit pg*block-div .de BS .misc@ev-keep pg*block-ev .@reset -.br -.debug@di pg*block-div +.debug@box pg*block-div .. .\"------------------------- .de BE -.br -.debug@di +.br \" in case the user forgot +.debug@box .nr pg*block-size \\n[dn]u .ev .pg@move-trap $ ./build/test-groff -mm -Tutf8 ATTIC/oliver-letter.mm | cat -s 123 Main Street Anytown, ST 10101 17 May 2023 Rufus T. Arbogast Autovectorization Guru 456 Elsewhere Avenue Nirvana, PA 20406 We have a research leak! The next person I catch embedding engineering samples of our Lightspeed Overdrive 2048‐core processors in cork coasters distributed at trade shows is going to regret it. Yours very truly, Epi G. Netic Head of Research Copy to sundry careless people Contact Tax ID Bank Account/IBAN me@org 12334 DE12123123450100 _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66439> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature