bugGNU roff - Bugs: bug #62190, [PATCH] [mm] equation label...

 
 

bug #62190: [PATCH] [mm] equation label wrongly positioned within indented display

Submitter:  Damian McGuckin <damianmoz>
Submitted:  Tue 15 Mar 2022 09:13:51 PM UTC
   
 
Category:  Macro package mm Severity:  3 - Normal
Item Group:  Incorrect 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 08 Sep 2022 11:13:44 PM UTC, comment #3: 

This bug was originally discussed in the email thread starting at http://lists.gnu.org/r/groff/2022-03/msg00007.html

Dave <barx>
Group Member
Wed 27 Apr 2022 07:40:35 PM UTC, comment #2: 


commit d8af9f61e59d96b3166dcd5c83bf22e3995d4293
Author: Damian McGuckin <damianm@esi.com.au>
Date:   Tue Mar 15 21:13:51 2022 +0000

    [mm]: Fix Savannah #62190.

    * contrib/mm/m.tmac (eq@check): Compensate for display indentation when
      setting equation label.

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

commit 75d1c1591824e7ea455df73dcdd502d179c9cf5b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Apr 27 22:38:03 2022 +1000

    [mm]: Regression-test Savannah #62190.

    * contrib/mm/tests/place-equation-labels-correctly-in-displays.sh: Test
      it.
    * contrib/mm/mm.am (mm_TESTS): Run test.


G. Branden Robinson <gbranden>
Group administrator
Wed 16 Mar 2022 05:55:41 AM UTC, comment #1: 

I've confirmed that the bug remains using a recent git build, so I removed 1.22.4 from the Summary.

Thanks to Apple's inability to keep its OS's command-line utilities current to within the past decade, I also have access to a groff 1.19.2 installation, and can confirm that the bug was not present in that release: its output more or less matches eqnlabel-corrected.pdf as attached here.  ("More or less" because it has different line spacing, but the vertical alignment is identical.)

The buggy m.tmac line was last modified in commit cb5eb170, March 2006.  The commit message mentions fixing a different bug but does not link to a specific bug report; it does, however, mention the reporter's name, and http://lists.gnu.org/r/bug-groff/2005-09/msg00338.html appears to be the bug report in question (reposted as http://lists.gnu.org/r/bug-groff/2005-12/msg00167.html).  This commit debuted in groff 1.20, which aligns with Damian's memory.

Dave <barx>
Group Member
Tue 15 Mar 2022 09:13:51 PM UTC, original submission:  

The use os

         EQ (L)

Should put the label (L) on the right hand side margin.  It does so corrected for left-justified and centered displays. It used to work inearlier versions of MM, say 1.18.? but I have lost the ability to double check.

The offending line is 2418 in

         /usr/local/share/groff/current/tmac/m.tmac
i.e.
         \h'|\\n[.l]u-\w'\\*[eq*label]'u'\\*[eq*label]

A fix is possible if you replace this like with these 2 lines:

.ie \\n[ds*format]=1 \h'|\\n[.l]u-\w'\\*[eq*label]'u+\\n(Sin'\\*[eq*label]
.el \h'|\\n[.l]u-\w'\\*[eq*label]'u'\\*[eq*label]

I have attached examples of the misaligned and corrected behaviour as PDF output from:

     groff -rO3.2c -ma4 -mm -fT -t -e -U -p


Damian McGuckin <damianmoz>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #52991:  misaligned-eqn-label added by damianmoz (84B - application/octet-stream - File misaligned-eqn-label provides test cases - original (misaligned) and corrected PDFs)
file #52992:  eqnlabel-misaligned.pdf added by damianmoz (5KiB - application/pdf - File misaligned-eqn-label provides test cases - original (misaligned) and corrected PDFs)
file #52993:  eqnlabel-corrected.pdf added by damianmoz (5KiB - application/pdf - File misaligned-eqn-label provides test cases - original (misaligned) and corrected PDFs)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by damianmoz (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-27 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2022-04-27 gbranden Summary[PATCH] [mm] Equation Label Wrongly Positioned from Within an Indented display [PATCH] [mm] equation label wrongly positioned within indented display
    2022-04-26 gbranden StatusNone In Progress
        Assigned toNone gbranden
    2022-03-16 barx SummaryEquation Label Wrongly Positioned from Within an Indented display - 1.22.4 [PATCH] [mm] Equation Label Wrongly Positioned from Within an Indented display
    2022-03-15 damianmoz Attached File- Added misaligned-eqn-label, #52991
        Attached File- Added eqnlabel-misaligned.pdf, #52992
        Attached File- Added eqnlabel-corrected.pdf, #52993

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code