[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 09/09: [man]: Fix Savannah #60624.
From: |
G. Branden Robinson |
Subject: |
[groff] 09/09: [man]: Fix Savannah #60624. |
Date: |
Mon, 14 Jun 2021 14:32:29 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 4e1dbb55dc805d8eb5f5bcfa8ab8cbe1059cb7fd
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Jun 15 04:20:30 2021 +1000
[man]: Fix Savannah #60624.
[man]: Don't spuriously break a page after a paragraph tag when the tag
is short enough to fit within the paragraph's indentation.
* tmac/an-old.tmac (an-write-paragraph-tag): Reserve ("need") 2 vees
plus 1 basic unit of vertical space regardless of the width of the
tag. In the short tag case, we reverse space by one vee after
outputting the diversion in which the tag is stored, but it will
always contain a break, and by the time we reverse, we might have
already hit a page location trap (an-break-body-text), and by then
it's too late to back up.
Fixes <https://savannah.gnu.org/bugs/index.php?60624>.
---
ChangeLog | 14 ++++++++++++++
tmac/an-old.tmac | 3 +--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 861bcaf..fd521cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,23 @@
2021-06-15 G. Branden Robinson <g.branden.robinson@gmail.com>
+ [man]: Don't spuriously break a page after a paragraph tag when
+ the tag is short enough to fit within the paragraph's
+ indentation.
+
+ * tmac/an-old.tmac (an-write-paragraph-tag): Reserve ("need") 2
+ vees plus 1 basic unit of vertical space regardless of the width
+ of the tag. In the short tag case, we reverse space by one vee
+ after outputting the diversion in which the tag is stored, but
+ it will always contain a break, and by the time we reverse, we
+ might have already hit a page location trap
+ {an-break-body-text}, and by then it's too late to back up.
+
* tmac/tests/an-old_no-break-after-short-paragraph-tags.sh: Test
it.
* tmac/tmac.am (tmac_TESTS): Run test.
+ Fixes <https://savannah.gnu.org/bugs/index.php?60624>.
+
2021-06-15 G. Branden Robinson <g.branden.robinson@gmail.com>
* tmac/an-old.tmac: Rename environments to be more descriptive.
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 67d7cbd..b26b775 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -528,8 +528,8 @@
. mc
. nf
. in \\n[an-margin]u
+. ne (2v + 1u)
. ie (\\n[dl] + \\n[an-tag-separation] > \\n[an-prevailing-indent]) \{\
-. ne (2v + 1u)
. an-div
. ev
. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
@@ -538,7 +538,6 @@
. \" In nroff mode, the indentation value should be an integer
. \" multiple of the character cell, to avoid different results
. \" compared to the .ie part above.
-. ne (1v + 1u)
. DEVTAG-COL 1
. an-div
. sp -1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 09/09: [man]: Fix Savannah #60624.,
G. Branden Robinson <=