bugGNU roff - Bugs: bug #61675, [me] troff warns if footnote...

 
 

bug #61675: [me] troff warns if footnote separator wider than column

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Tue 14 Dec 2021 11:42:35 PM UTC
   
 
Category:  Macro package me Severity:  3 - Normal
Item Group:  Warning/Suspicious behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 06 Oct 2022 04:19:40 AM UTC, comment #4: 

comment #2:

> original submission:
> > (There are other problems with footnotes in multi-column mode; as
> > can be seen above, the bottom of the column retreats up the page.
> ...
> > These issues are distinct and should be filed as separate tickets.)
>
> I was going to do just that, but before/after comparisons show that this particular issue was fixed as a side effect of the commit cited in comment #1.  It's not clear how, based on the code changes of this commit, which appear to have no effect on the root cause of this as explained over in bug #58736: "when a trap is set in multi-column mode for placement of the footnote, that trap is not cleared after the footnote is rendered.  The result is that the bottoms of your columns creep up the page as you go from left to right."  And the commit log talks only about the width of the footnote separator, so the fix to the column height might be a surprise to the commit's author as well.  But I won't argue with success.


I can confirm that this "footnote retreat" problem appears to be resolved.  With the same input it shows up with groff 1.22.4 and not with groff Git HEAD.

Most likely my hypothesized RCA of the cause of the retreat was simply wrong.  A new hypothesis is that an excessively long footnote separator caused advance of the vertical position, albeit not in a way visible to the naked eye (since there was no text after it to format), and that this threw off the extensive arithmetic me(7) uses to compute the placement of the footnote ejection trap.


$ ./build/test-groff -Tascii -me EXPERIMENTS/separatrix2.me







     Jackdaws  love    quartzK.[2]   Jack-
my  big  sphinx  of    daws  love  my  big
quartzAE.  Jackdaws    sphinx  of quartzJ.
love  my big sphinx    Jackdaws  love   my
of quartzAD.  Jack-    big    sphinx    of
daws  love  my  big    quartzI.   Jackdaws
sphinx of quartzAC.    love  my big sphinx
Jackdaws   love  my    of quartzH.   Jack-
big    sphinx    of    daws  love  my  big
quartzAB.  Jackdaws    sphinx of  quartzG.
love  my big sphinx    Jackdaws   love  my
of quartzAA.  Jack-    big    sphinx    of
daws  love  my  big    quartzF.   Jackdaws
sphinx  of quartzZ.    love my big  sphinx
Jackdaws  love   my    of  quartzE.  Jack-
big    sphinx    of    daws  love  my  big
quartzY.   Jackdaws    sphinx  of quartzD.
love  my big sphinx    Jackdaws  love   my
of quartzX.   Jack-    big    sphinx    of
daws  love  my  big    quartzC.   Jackdaws
sphinx of  quartzW.    love  my big sphinx
Jackdaws   love  my    of quartzB.   Jack-
big    sphinx    of    daws  love  my  big
quartzV.[1]   Jack-    sphinx of quartzA.
daws  love  my  big
sphinx  of quartzU.
Jackdaws  love   my
big    sphinx    of
quartzT.   Jackdaws
love  my big sphinx
of quartzS.   Jack-
daws  love  my  big
sphinx of  quartzR.
Jackdaws   love  my
big    sphinx    of
quartzQ.   Jackdaws
love my big  sphinx
of  quartzP.  Jack-
daws  love  my  big
sphinx  of quartzO.
Jackdaws  love   my
big    sphinx    of
quartzN.   Jackdaws
love  my big sphinx
of quartzM.   Jack-
daws  love  my  big
sphinx of  quartzL.
Jackdaws   love  my
big    sphinx    of
___________________    ___________________
   [1] Sometimes.         [2] Sometimes.









G. Branden Robinson <gbranden>
Group administrator
Sun 03 Jul 2022 05:44:53 AM UTC, comment #3: 

original submission:

> And on typesetters, the baselines of the columns don't
> align--there's a sliver of extra space at the top of the second.
> These issues are distinct and should be filed as separate tickets.


This still happens using the latest -me code and is now filed as bug #62698.

Dave <barx>
Group Member
Sun 03 Jul 2022 04:20:01 AM UTC, comment #2: 

original submission:

> (There are other problems with footnotes in multi-column mode; as
> can be seen above, the bottom of the column retreats up the page.

...

> These issues are distinct and should be filed as separate tickets.)


I was going to do just that, but before/after comparisons show that this particular issue was fixed as a side effect of the commit cited in comment #1.  It's not clear how, based on the code changes of this commit, which appear to have no effect on the root cause of this as explained over in bug #58736: "when a trap is set in multi-column mode for placement of the footnote, that trap is not cleared after the footnote is rendered.  The result is that the bottoms of your columns creep up the page as you go from left to right."  And the commit log talks only about the width of the footnote separator, so the fix to the column height might be a surprise to the commit's author as well.  But I won't argue with success.

> And on typesetters, the baselines of the columns don't
> align--there's a sliver of extra space at the top of the second.


I haven't looked into this aspect yet, so not sure if this still needs a bug report opened, or if the same commit also covertly resolved this as well.

Dave <barx>
Group Member
Thu 16 Dec 2021 12:13:42 PM UTC, comment #1: 


commit 07d7bf24af34f1fe00039286fc7cc932bc682530
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Dec 15 10:52:08 2021 +1100

    [me]: Don't draw a too-long footnote separator.

    * tmac/e.tmac ($c): Draw the footnote separator no wider than the column
      width.

    Fixes <https://savannah.gnu.org/bugs/?61675>.


G. Branden Robinson <gbranden>
Group administrator
Tue 14 Dec 2021 11:42:35 PM UTC, original submission:  

This one is pretty simple.  The `$s` macro draws a horizontal rule of 2i without considering the possibility that the column width is shorter than that.

Interestingly, what I thought should have been a minimal reproducer didn't work; apparently, I need the footnote separator to be drawn in a column after the first to rouse the formatter's anger.

Input:


$ cat EXPERIMENTS/separatrix2.me
.if n .ll 65n
.de XX
.if \\$1 \{\
.  nr N \\$1
.  nr L \\$1
.  af L A
.  nop Jackdaws love my big sphinx of quartz\\nL.\c
.  ie \\nN%11=0 \{\\**
.    (f
.    nop \\** Sometimes.
.    )f
.  \}
.el \" newline
.nr N -1
.XX \\nN
.\}
..
.2c 4n 3
.pp
.if n .XX 31
.if t .XX 43


groff 1.22.4 output:


$ nroff -me EXPERIMENTS/separatrix2.me |cat -s
troff: EXPERIMENTS/separatrix2.me:20: warning [p 1, 1.2i, div '|f', 0.0i]: can't break line

     Jackdaws  love    sphinx of quartzK.2
my  big  sphinx  of    Jackdaws   love  my
quartzAE.  Jackdaws    big    sphinx    of
love my big  sphinx    quartzJ.   Jackdaws
of quartzAD.  Jack‐    love my big  sphinx
daws  love  my  big    of  quartzI.  Jack‐
sphinx of quartzAC.    daws  love  my  big
Jackdaws  love   my    sphinx  of quartzH.
big    sphinx    of    Jackdaws  love   my
quartzAB.  Jackdaws    big    sphinx    of
love  my big sphinx    quartzG.   Jackdaws
of quartzAA.  Jack‐    love  my big sphinx
daws  love  my  big    of quartzF.   Jack‐
sphinx of  quartzZ.    daws  love  my  big
Jackdaws   love  my    sphinx of  quartzE.
big    sphinx    of    Jackdaws   love  my
quartzY.   Jackdaws    big    sphinx    of
love my big  sphinx    quartzD.   Jackdaws
of  quartzX.  Jack‐    love my big  sphinx
daws  love  my  big    of  quartzC.  Jack‐
sphinx  of quartzW.    daws  love  my  big
Jackdaws  love   my    sphinx  of quartzB.
big    sphinx    of    Jackdaws  love   my
quartzV.1  Jackdaws    big    sphinx    of
love  my big sphinx    quartzA.
of quartzU.   Jack‐
daws  love  my  big
sphinx of  quartzT.
Jackdaws   love  my
big    sphinx    of
quartzS.   Jackdaws
love my big  sphinx
of  quartzR.  Jack‐
daws  love  my  big
sphinx  of quartzQ.
Jackdaws  love   my
big    sphinx    of
quartzP.   Jackdaws
love  my big sphinx
of quartzO.   Jack‐
daws  love  my  big
sphinx of  quartzN.
Jackdaws   love  my
big    sphinx    of
quartzM.   Jackdaws
love my big  sphinx
of  quartzL.  Jack‐    ____________________
daws  love  my  big       2 Sometimes.

____________________
   1 Sometimes.


(There are other problems with footnotes in multi-column mode; as can be seen above, the bottom of the column retreats up the page.  If you increase the argument to the `XX` macro, you can observe this develop progressively across all three columns.  And on typesetters, the baselines of the columns don't align--there's a sliver of extra space at the top of the second.  These issues are distinct and should be filed as separate tickets.)

The fix for this one appears straightforward.


@@ -1661,7 +1668,10 @@
 .      nr fp 8                 \" footnote pointsize
 .
 .de $s                 \" $$$ footnote separator
-\l'2i'
+.nr __ 2i
+.if \\n($lu<\\n(__u .nr __ \\n($lu
+\l'\\n(__u'
+.rr __
 ..
 .
 .


G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-16 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-54b4.
    Corresponding source code