bug-groff
[Top][All Lists]
Advanced

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

[bug #57538] [me] incorrect PostScript output of macro .(b


From: G. Branden Robinson
Subject: [bug #57538] [me] incorrect PostScript output of macro .(b
Date: Tue, 21 Dec 2021 20:42:04 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #8, bug #57538 (project groff):

Aha.

All that excavation (and venting my spleen over George Helffrich) seems to
have enabled me to unearth a mewling kitten of insight buried amid the
macrology rubble.

This line has been bothering me.


.      ne \\n(dnu              \" make it all on one page


I thought it was because my fastidious mind objected to the casual, imprecise
language in the comment.  But maybe it was something else.

Try this patch.


diff --git a/tmac/e.tmac b/tmac/e.tmac
index cbe4ae6a7..a20fa2d09 100644
--- a/tmac/e.tmac
+++ b/tmac/e.tmac
@@ -1072,7 +1072,7 @@
 .de )b                 \" *** end block
 .@)
 .if (\\n(bt=0):(\\n(.t<\\n(bt) \
-.      ne \\n(dnu              \" make it all on one page
+.      ne \\n(dnu-1v           \" reserve room for diversion
 .@k |k ns
 .ev                             \" return from display environment
 .nr ?V 0


The idea here is that we don't need to reserve room for the trailing line
break--more precisely, for a vertical motion down to the next baseline--in the
diversion, because we don't need to avoid a page break there.  It's perfectly
fine with us if the page breaks right _after_ the block.  Including that
trailing break in our calculation reserves one more line than we need. 

The obvious question is, does this f*** up single-line blocks (which normally
have no reason to exist), exposing our math as fallacious?

No, it does not.  See attached keep3.me.  And, for the more practical 2-line
case, keep4.me.

I think this constitutes an RCA and a fix.  Please let me know if you concur,
or don't.

(file #52549, file #52550)
    _______________________________________________________

Additional Item Attachment:

File name: keep3.me                       Size:0 KB
    <https://file.savannah.gnu.org/file/keep3.me?file_id=52549>

File name: keep4.me                       Size:0 KB
    <https://file.savannah.gnu.org/file/keep4.me?file_id=52550>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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