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 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
   

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

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-13 gbranden Assigned togbranden None
    2023-12-23 gbranden CategoryNone Macro 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.13-02a9.
    Corresponding source code