bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62688] [ms] inter-display distance accumulates with other vertical


From: G. Branden Robinson
Subject: [bug #62688] [ms] inter-display distance accumulates with other vertical space--it should not
Date: Thu, 30 Jun 2022 23:53:26 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?62688>

                 Summary: [ms] inter-display distance accumulates with other
vertical space--it should not
                 Project: GNU troff
               Submitter: gbranden
               Submitted: Fri 01 Jul 2022 03:53:25 AM UTC
                Category: Macro ms
                Severity: 2 - Minor
              Item Group: Rendering/Cosmetics
                  Status: In Progress
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 01 Jul 2022 03:53:25 AM UTC By: G. Branden Robinson <gbranden>
If you stick one display right next to another, both display distances will be
applied to the document.  This shouldn't happen.

Equations have a similar problem.


$ cat EXPERIMENTS/DD2.ms 
.LP
This is a paragraph.
.DS
Here is a display.
.DE
.DS
Here is another display.
.DE
.EQ
a + b = c
.EN
.EQ
x + y = z
.EN
.LP
Here's another paragraph.
.EQ
j + k = l
.EN
How much vertical space did we get?
.pl \n(nlu


Output:


$ nroff -ms EXPERIMENTS/DD2.ms






This is a paragraph.

     Here is a display.


     Here is another display.


                          a + b = c


                          x + y = z


Here’s another paragraph.

                          j + k = l

How much vertical space did we get?


Patch:


diff --git a/tmac/s.tmac b/tmac/s.tmac
index f72a8d698..9ef9b42be 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -976,6 +976,7 @@ along with this program.  If not, see
<http://www.gnu.org/licenses/>.
 .de DE
 .ds*end!\\n[\\n[.ev]:ds-type]
 .nr \\n[.ev]:ds-type 0
+.ns
 ..
 .de ds@auto-end
 .if \\n[\\n[.ev]:ds-type] \{\
@@ -1884,6 +1885,7 @@ along with this program.  If not, see
<http://www.gnu.org/licenses/>.
 .      if !'\\*[eqn*num]'' .nr eqn*have-num 1
 .      ie \\n[dl]:\\n[eqn*have-num] \{\
 .              sp \\n[DD]u
+.              ns
 .              par@reset
 .              ds eqn*tabs \\n[.tabs]
 .              nf
@@ -1912,6 +1914,7 @@ along with this program.  If not, see
<http://www.gnu.org/licenses/>.
 .              \}
 .\".           if !'\*(.T'html' .sp \\n[DD]u
 .              sp \\n[DD]u
+.              ns
 .              ta \\*[eqn*tabs]
 .      \}
 .      el \{\


Result:


$ ./build/test-groff -Tutf8 -ms EXPERIMENTS/DD2.ms 






This is a paragraph.

     Here is a display.

     Here is another display.

                          a + b = c

                          x + y = z

Here’s another paragraph.

                          j + k = l

How much vertical space did we get?








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62688>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]