bug-groff
[Top][All Lists]
Advanced

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

[bug #62841] [man] stop forcing vertical space before tbl(1) tables


From: G. Branden Robinson
Subject: [bug #62841] [man] stop forcing vertical space before tbl(1) tables
Date: Sat, 30 Jul 2022 12:47:24 -0400 (EDT)

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

                 Summary: [man] stop forcing vertical space before tbl(1)
tables
                 Project: GNU troff
               Submitter: gbranden
               Submitted: Sat 30 Jul 2022 04:47:23 PM UTC
                Category: Macro man
                Severity: 3 - Normal
              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: Sat 30 Jul 2022 04:47:23 PM UTC By: G. Branden Robinson <gbranden>
I'm slowly picking the spacing bugs out of _tbl_, particularly in nroff mode.

It's getting to the point where we can undo what I assume was a workaround for
rendering problems 20 years ago.

The following commits seem relevant.


commit 7ef622e18f30f74b20d1dfa71c5e3174b7feecec
Author: Werner LEMBERG <wl@gnu.org>
Date:   Wed Jan 16 22:58:46 2002 +0000

    * tmac/an-old.tmac (TS): Force break, inserting some vertical space.

diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 4920c9150..0e064e9c4 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -493,6 +493,7 @@
 .\" table support
 .
 .de1 TS
+.  sp \\n[PD]u
 .  if n \{\
 .    nr an-pl \\n[.p]
 .    pl \\n[nl]u

commit 777e2d262862621966c18d685a000cc88f432bc6
Author: Werner LEMBERG <wl@gnu.org>
Date:   Sat Jan 26 07:52:05 2002 +0000

    * tmac/groff_ms.man: Typographical improvements.
    
    * doc/groff.texinfo: Updated version and copyright.
    * src/devices/grops/grops.man: Updated.
    
    * tmac/groff_tmac.man: Fix `ig' macro.
    
    * tmac/an-old.tmac (ne): Redefine `ne' request to be a no-op in
    nroff mode.
    Use `.ne' unconditionally everywhere.
    (TS): Only insert some vertical space.  Doing a page break is no
    longer necessary due to the redefinition of the `ne' request.
    
    * src/libs/libdriver/input.cc (parse_D_command): Don't emit a
    warning for unknown subcommands but parse and pass them to the
    device driver.

[snip]
iff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 0e064e9c4..b9e3da83d 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
[snip]
@@ -494,12 +499,6 @@
 .
 .de1 TS
 .  sp \\n[PD]u
-.  if n \{\
-.    nr an-pl \\n[.p]
-.    pl \\n[nl]u
-.    bp
-.    pl \\n[an-pl]u
-.  \}
 ..
 .
 .de1 TE


These look to me like efforts to wrestle the continuous-rendering beast into
submission, which I can attest is a hell of a challenge.

I think we have room to express a simpler rule now.

If you want your table to be preceded by vertical space, use a paragraphing
macro.[1]

If you don't want your table to be preceded by vertical space, don't precede
it with a paragraphing macro.

A fix that makes it unnecessary to _follow_ a boxed table with a paragraphing
macro just to avoid overprinting the table's bottom border in nroff mode is
pending.  See bug #49390.

So tables in man pages will shortly be better behaved.

[1] If you start a (sub)section with a table, that won't work, but it's not
supposed to.  Good style may suggest that you should discuss the table before
presenting it, in any case.







    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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