URL: <https://savannah.gnu.org/bugs/?64207>
Summary: [PATCH] [mm] internal `pg@next-page` macro should invoke `br` before `ne` Group: GNU roff Submitter: gbranden Submitted: Wed 17 May 2023 09:34:13 AM UTC Category: Macro mm Severity: 3 - Normal Item Group: Incorrect behaviour Status: Postponed Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Wed 17 May 2023 09:34:13 AM UTC By: G. Branden Robinson <gbranden> Affects groff 1.22.4. It seems to be a common error in *roff to use `ne` without `br` before it, but the behavior you get when including the `br` request is usually what people want. $ cat EXPERIMENTS/use-ne-to-break-page.roff .de LI Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. .. .LI .ne 999i .br Now check this out. .sp .LI Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. .br .ne 999i $ nroff EXPERIMENTS/use-ne-to-break-page.roff | cat -s Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Now check this out. Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Sed ut perspiciatis, unde omnis iste na‐ tus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. I propose a simple patch for this. diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac index c679a7089..0b2878c89 100644 --- a/contrib/mm/m.tmac +++ b/contrib/mm/m.tmac @@ -1297,6 +1297,7 @@ numeric; got '\\$1' .\" stop output and begin on next page. Fix footnotes and all that. .de pg@next-page .\".debug next-page +.br .ne 999i \" activate trap .\" .pg@footer .. Unfortunately, `pg@next-page` has several callers and it's _conceivable_ that some of them might exhibit changed behavior due to this. So make this change in the 1.24 cycle and see what shakes out. Also, with any luck we'll have the new, improved `.R` register by then and we can use that as the argument to `ne` instead of `999i`, which risks numeric overflow in the (admittedly unlikely) event that some output device shows up with a resolution so high that this value causes numeric overflow. See bug #63587. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64207> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/