bugGNU roff - Bugs: bug #65077, [ms] unexpected suppression of...

 
 

bug #65077: [ms] unexpected suppression of `sp` effect after `DE` call

Submitter:  None
Submitted:  Sat 23 Dec 2023 07:51:03 AM UTC
   
 
Category:  Macro package ms Severity:  3 - Normal
Item Group:  Documentation Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 15 Nov 2024 05:37:52 AM UTC, comment #8: 

Sure, but any request for a behavior change carries some element of advocacy.  It's just that some things being advocated require less justification than others.  ("When I set the font size to 12 points, groff dumps core."  "OK, but why do you think that should be changed?")

This case isn't quite that obvious, but "don't ignore some basic user requests after a display" seems a pretty reasonable ask--especially if it's restoring historical (and not-obviously-buggy) behavior.  I don't think addressing the problem described in bug #62688 requires ignoring these requests as a side effect; that seems like a consequence of the implementation of 62688's solution, not a consequence inherent to a fix of that problem.

I'll disclaim that I'm not an ms user, which could weight my opinion either more (as an impartial outsider) or less (as someone ignorant of ms conventions).

Dave <barx>
Group Member
Fri 15 Nov 2024 02:48:41 AM UTC, comment #7: 

comment #6:

> A sentence in bug #66442 summarizes the issue more succinctly, I think, than anything here:
>
> "activation of no-space mode, after output of \n[DD] space is not the solution to bug #62688, because it inhibits all forms of explicitly user-specified vertical spacing requests, e.g. explicit .sp requests to add an explicit amount of extra vertical space, or to move to a specific vertical position on the page."


As a summary, that shades pretty far into the role of advocacy.  But it does express a complaint that can be evaluated, which beats that ticket's derisive BS about naïveté and this one's hyperventilating characterization of "critical" severity.

G. Branden Robinson <gbranden>
Group administrator
Fri 15 Nov 2024 02:34:30 AM UTC, comment #6: 

A sentence in bug #66442 summarizes the issue more succinctly, I think, than anything here:

"activation of no-space mode, after output of \n[DD] space is not the solution to bug #62688, because it inhibits all forms of explicitly user-specified vertical spacing requests, e.g. explicit .sp requests to add an explicit amount of extra vertical space, or to move to a specific vertical position on the page."

Dave <barx>
Group Member
Thu 14 Nov 2024 10:21:02 PM UTC, comment #5: 

comment #4:

> Rejected? Why?


Consider spending some time reading the comments to tickets in addition to writing them, Keith.

comment #3:

> Closing with no response from submitter in four months.  Submitter, please feel free to comment here if you have additional information, and this bug report can be reopened if necessary.


> This is a critical


Oh my God.  It's critical.  I'll drop everything at once.

Welcome back, Keith--I see you've lost none of your talent for hysterics, hyberbole, and harangue of your fellow developers.

> regression from groff-1.22.4, which I discovered only this week,
> after removing a modified 1.22.4 copy of s.tmac from my
> groff-pdfmark working tree; this regression seriously messes up
> the front-matter layout of pdfmark.pdf.


Thanks for identifying an actual document that exhibits undesired behavior; I'll have a look.  Can't make any promises for the groff 1.24.0 release, though.
 

> I filed a new ticket for this, as bug #66442; it's effectively a duplicate, reopening this.


Shockingly, Savannah supports marking tickets as duplicates, so I'll be closing that one, then.

Reopening.  An A/B comparison of groff 1.22.4's "contrib/pdfmark/pdfmark.ms" using groff 1.22.4 and 1.23.0 (and ultimately Git HEAD) is warranted to triage this issue.

G. Branden Robinson <gbranden>
Group administrator
Thu 14 Nov 2024 10:10:58 PM UTC, comment #4: 

Rejected? Why?

This is a critical regression from groff-1.22.4, which I discovered only this week, after removing a modified 1.22.4 copy of s.tmac from my groff-pdfmark working tree; this regression seriously messes up the front-matter layout of pdfmark.pdf.

I filed a new ticket for this, as bug #66442; it's effectively a duplicate, reopening this.

Keith Marshall <keithmarshall>
Group Member
Wed 01 May 2024 04:27:20 PM UTC, comment #3: 

Closing with no response from submitter in four months.  Submitter, please feel free to comment here if you have additional information, and this bug report can be reopened if necessary.

Dave <barx>
Group Member
Sat 13 Jan 2024 03:40:56 PM UTC, comment #2: 

Unassigning from self--"Need Info" status is waiting on submitter, not me.

G. Branden Robinson <gbranden>
Group administrator
Sat 23 Dec 2023 06:02:38 PM UTC, comment #1: 

original submission:

> Command used:
> $ groff -k -ms -Tpdf doc.ms > doc.pdf
>
> When compiling with v1.22.4:
> - Text after `.sp 4i` is 4 inches below
>
> When compiling with v1.23.0:
> - `.sp 4i` is ignored?
>
> doc.ms:
>
> ```
> .CD
> Centered text
> .DE
> .sp 4i
> This should be 4 inches lower on the page
> ```


This is an expected behavior change in groff 1.23.0 ms per the NEWS file.


o The s (ms) macro package now enables the formatter's "no-space mode"
  after ending displays (`DE`), equations (`EN`), tables (`TE`), and
  pictures without flyback (`PE`).  This means that display distance
  spacing (the `DD` register) overrides the spacing that may follow in a
  subsequent paragraph, section heading, or display instead of
  accumulating with that distance.  This change is to make the behavior
  of the package more predictable; you can fine-tune such spacing by
  setting the `DD` register in desired places.  It has also helped us to
  improve groff ms's rendering of historical ms(7) documents such as
  Kernighan & Cherry's "Typesetting Mathematics".


https://git.savannah.gnu.org/cgit/groff.git/tree/NEWS?h=1.23.0#n426

> I used this approach for centering since it is included in the groff_ms manual.


There's nothing wrong with centering text that way; the issue here is that under traditional ms it was unspecified whether vertical spacing arising from `sp` requests combined with that implied by display, sectioning, or paragraphing macros.  (Or indeed whether the spacing implied by any of these macros combined with that of the others.)

You can either restore spacing before invoking the `sp` request, or (perhaps temporarily) alter the value of the display distance register `DD` before ending your display.


.rs
.sp 4i



Centered text
.nr DDold \n[DD]
.nr DD 4i
.DE
.nr DD \n[DDold]


Does this help?

G. Branden Robinson <gbranden>
Group administrator
Sat 23 Dec 2023 07:51:03 AM UTC, original submission:  

Command used:
$ groff -k -ms -Tpdf doc.ms > doc.pdf

When compiling with v1.22.4:
- Text after `.sp 4i` is 4 inches below

When compiling with v1.23.0:
- `.sp 4i` is ignored?

doc.ms:

```
.CD
Centered text
.DE
.sp 4i
This should be 4 inches lower on the page
```

I used this approach for centering since it is included in the groff_ms manual.

This is how the output PDFs look: https://0x0.st/Hg4Z.png

Anonymous

 

(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 keithmarshall (Posted a comment)
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Posted a comment)
  •  

    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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-11-14 gbranden Open/ClosedClosed Open
    2024-11-14 gbranden StatusRejected Need Info
        Assigned tobarx None
    2024-05-01 barx StatusNeed Info Rejected
        Assigned toNone barx
        Open/ClosedOpen Closed
    2024-01-13 gbranden Assigned togbranden None
    2023-12-23 gbranden CategoryNone Macro package ms
        Item GroupNone Documentation
        StatusNone Need Info
        Assigned toNone gbranden
        SummaryUnexpected ms macros behavior [ms] unexpected suppression of `sp` effect after `DE` call

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code