bug-groff
[Top][All Lists]
Advanced

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

[bug #49390] last line of boxed tables overprinted on nroff devices


From: G. Branden Robinson
Subject: [bug #49390] last line of boxed tables overprinted on nroff devices
Date: Sat, 30 Jul 2022 12:01:15 -0400 (EDT)

Follow-up Comment #5, bug #49390 (project groff):

Here are some exhibits.  The first is a very simple reproducer for the
reported problem; the second illustrates that the same problem does _not_
occur when an unboxed table ends with a horizontal rule at the bottom, which
one might suspect could happen.


$ cat EXPERIMENTS/sayama-simpler.roff 
foo
.TS
box;
L.
bar
.TE
baz
.pl \n(nlu
$ nroff -t -Tascii EXPERIMENTS/sayama-simpler.roff 
foo
+----+
|bar |
baz--+
$ cat EXPERIMENTS/sayama-with-rule.roff
foo
.TS
L.
bar
_
.TE
baz
.pl \n(nlu
$ tgu -t -Tascii EXPERIMENTS/sayama-with-rule.roff 
foo
bar
----
baz


We also see evidence of bug #62471, which vexes me and appears quite difficult
to address.

The fix for this, however, is straightforward.


diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 18cee1e92..dcf77b05d 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -3025,6 +3025,11 @@ void table::do_bottom()
           ".\\}\n");
   if (flags & DOUBLEBOX)
     prints(".sp " DOUBLE_LINE_SEP "\n");
+  // Horizontal box lines take up an entire row on nroff devices (maybe
+  // a half-row if we ever support [emulators of] devices like the
+  // Teletype Model 37 with half-line motions).
+  if (flags & (BOX | DOUBLEBOX | ALLBOX))
+    prints(".if n .sp\n");
   prints("." RESET_MACRO_NAME "\n"
         ".fc\n"
         ".cp \\n(" COMPATIBLE_REG "\n");



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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