gbranden pushed a commit to branch master
in repository groff.

commit 577c361b53a0c75c40c2db159f26f877c9fec43f
Author: Dave Kemper <[email protected]>
AuthorDate: Fri Apr 17 23:54:41 2026 +0000

    tmac/pspic.tmac: PSPIC computes placement better.
    
    * tmac/pspic.tmac: Allow `PSPIC` macro to place image at bottom of page.
      From groff 1.01 through 1.04, the macro did not invoke a break,
      explicitly or implicitly; thus the vertical space `.ne`eded for the
      image was incremented by 1v to account for a possible partially
      collected output line.  The "ChangeLog.old" file shows that James
      Clark added a break to this macro in a 1992-03-16 change (the Git
      history for this era is too coarse to show this change alone; it first
      shows up in commit a48ab7b6d, containing all changes between groff
      1.04 and groff 1.05).  However, the 1v increment was (presumably)
      inadvertently left in place, preventing an image that would exactly
      fit at the bottom of a page from being placed there.  This adjustment
      has been unnecessary for over 34 years, so get rid of it.
    
    [Fixes <https://savannah.gnu.org/bugs/?50770>.  Per the foregoing,
    problem dates back to groff 1.05, March 1992.  Thanks to Dave and Deri
    for sorting this out! --GBR]
---
 ChangeLog       | 20 ++++++++++++++++++++
 tmac/pspic.tmac |  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 9ad1c1b08..abaa0b6b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2022-04-17  Dave Kemper <[email protected]>
+
+       * tmac/pspic.tmac: Allow `PSPIC` macro to place image at bottom
+       of page.  From groff 1.01 through 1.04, the macro did not invoke
+       a break, explicitly or implicitly; thus the vertical space
+       `.ne`eded for the image was incremented by 1v to account for a
+       possible partially collected output line.  The "ChangeLog.old"
+       file shows that James Clark added a break to this macro in a
+       1992-03-16 change (the Git history for this era is too coarse to
+       show this change alone; it first shows up in commit a48ab7b6d,
+       containing all changes between groff 1.04 and groff 1.05).
+       However, the 1v increment was (presumably) inadvertently left in
+       place, preventing an image that would exactly fit at the bottom
+       of a page from being placed there.  This adjustment has been
+       unnecessary for over 34 years, so get rid of it.
+
+       [Fixes <https://savannah.gnu.org/bugs/?50770>.  Per the
+       foregoing, problem dates back to groff 1.05, March 1992.  Thanks
+       to Dave and Deri for sorting this out! --GBR]
+
 2026-04-24  Deri James  <[email protected]>
 
        [pdfmom]: Don't try to pass commands to pdfroff (-Tps) if
diff --git a/tmac/pspic.tmac b/tmac/pspic.tmac
index a2b4f922b..b74daa825 100644
--- a/tmac/pspic.tmac
+++ b/tmac/pspic.tmac
@@ -90,7 +90,7 @@
 .    \}
 .
 .    \" reserve vertical space for image
-.    ne (\\n[ps-desht]u + 1v)
+.    ne \\n[ps-desht]u
 .
 .    \" compute image offset w.r.t. the current left margin
 .    if (\\n[ps-offset-mode] == 0) \

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to