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: Sun, 19 Dec 2021 04:57:02 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #57538 (project groff):

                  Status:                    None => Need Info              
             Assigned to:                    None => gbranden               

    _______________________________________________________

Follow-up Comment #4:

Hi Dave,

[comment #3 comment #3:]
>   The symptom is caused by a higher footer in troff-mode than in the
> nroff-mode.
> 
>   The footer in troff-mode is half a line bigger (6.5 v).
> 
>   The documentation ("doc/meref.ps") mentions "6v ...[nominal]" for
> the register "bm".
> 
>   It is common to have a different page layout in troff from that in
> nroff as the resolution is very different.
> 
>   troff is a typesetting "machine"; nroff a typewriter, line printer
> "machine".

I believe Bjarni [quoted] is correct here.

I instrumented e.tmac's `)b` macro to report the .t (distance to next trap),
dn (diversion height), and bt (me's "break threshold"), and to dump all active
traps.

I also instrumented your reproducer (which I called "keep.me") to also report
the distance to the next trap and the vertical line height (.v) in interesting
places.

I noticed that the distance to the next trap was exactly half a line height in
your original reproducer (before the slight modification that makes nroff and
troff diverge).

I then went ahead with your procedure of adding one line, but modified it by
typesetting the new line in 5-point type on 6-point vertical spacing.

Lo and behold, the example started working as you expected again.

I therefore do not think there is a bug here; if only half a line of space is
available, a full-height line cannot be typeset.

Do you concur?

I am including my "keep.me" and the patch I applied to e.tmac to instrument
it.  (It might apply with an offset--I have other experiments in the
pipeline.)


$ cat EXPERIMENTS/keep.me 
.nr bs 0         \" no extra space before or after blocks
.nf
.\".ig
.ps 5z
.vs 6p
Hello, world!
.vs
.ps
.\"..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.tm GBR: keep.me: before (b: .t=\n(.t, .v=\n(.v
.(b
forty-six
forty-seven
forty-eight
forty-nine
fifty
fifty-one
fifty-two
.tm GBR: keep.me: before )b: .t=\n(.t, .v=\n(.v
.)b
.tm GBR: keep.me: after )b: .t=\n(.t, .v=\n(.v
53
54
55
56
57
58
59
60



$ ./build/test-groff -b -ww -a -me EXPERIMENTS/keep.me | grep -FC8 page
GBR: keep.me: before (b: .t=84000, .v=12000
GBR: keep.me: before )b: .t=2147483646, .v=12000
GBR: )b: .t=84000, dn=84000, bt=0
@h      0
@f      -78000
GBR: keep.me: after )b: .t=630000, .v=12000
<beginning of page>
Hello, world!
1
2
3
4
5
6
7
--
45
 forty-six
 forty-seven
 forty-eight
 forty-nine
 fifty
 fifty-one
 fifty-two
<beginning of page>
53
54
55
56
57
58
59
60



diff --git a/tmac/e.tmac b/tmac/e.tmac
index 4f74a1966..912d43401 100644
--- a/tmac/e.tmac
+++ b/tmac/e.tmac
@@ -1071,6 +1071,8 @@
 .de )b                 \" *** end block
 .br
 .@)
+.tm GBR: )b: .t=\\n(.t, dn=\\n(dn, bt=\\n(bt
+.ptr
 .if (\\n(bt=0):(\\n(.t<\\n(bt) \
 .      ne \\n(dnu              \" make it all on one page
 .@k |k ns


    _______________________________________________________

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]