From: G. B. R. <g.b...@gm...> - 2023-11-03 19:54:40
|
Hi Guenter, I'm CCing you because it seems like everytime I post to this list, I get a bounce telling me I'm not subscribed. But I am... At 2023-11-03T18:15:33-0000, Guenter Milde via Docutils-develop wrote: > Dear Engelbert, > > running the test suite with r9464 resulted in a failure > > FAIL: test_publish (test_writers.test_manpage.WriterPublishTestCase) > (id="totest['table'][0]") [...] > It this the intended output? > Is it tested with groff? The output of groff in 1.23.0 changed slightly here. Here's some 1.22.4/1.23.0 comparison on my system. UTF-8 output follows. $ /usr/bin/nroff -v GNU nroff (groff) version 1.22.4 $ nroff -v GNU nroff (groff) version 1.23.0 GNU groff version 1.23.0 Copyright (C) 2022 Free Software Foundation, Inc. GNU groff comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of groff and its subprograms under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. called subprograms: GNU grotty (groff) version 1.23.0 GNU troff (groff) version 1.23.0 First let's look at how the original table exhibit is handled. $ cat /tmp/docu.man .TH foo 1 2023-11-03 "groff test suite" .SH Name foo \- frobnicate a bar .TS center; |l|l|. _ T{ head T} T{ and T} _ T{ 1 T} T{ 2 T} _ T{ abc T} T{ so T} _ .TE $ /usr/bin/nroff -t -man /tmp/docu.man foo(1) General Commands Manual foo(1) Name foo - frobnicate a bar ┌─────┬─────┐ │head │ and │ ├─────┼─────┤ │1 │ 2 │ ├─────┼─────┤ │abc │ so │ └─────┴─────┘ groff test suite 2023‐11‐03 foo(1) $ nroff -t -man /tmp/docu.man foo(1) General Commands Manual foo(1) Name foo - frobnicate a bar ┌──────┬─────┐ │ head │ and │ ├──────┼─────┤ │ 1 │ 2 │ ├──────┼─────┤ │ abc │ so │ └──────┴─────┘ groff test suite 2023‐11‐03 foo(1) Notice: A. Fewer blank lines in the output after the page header; and B. There is now a space after the left border of the table. With your patch, let see what we get. $ cat /tmp/docu2.man .TH foo 1 2023-11-03 "groff test suite" .SH Name foo \- frobnicate a bar .TS box center; l|l. T{ head T} T{ and T} _ T{ 1 T} T{ 2 T} _ T{ abc T} T{ so T} .TE $ /usr/bin/nroff -t -man /tmp/docu2.man foo(1) General Commands Manual foo(1) Name foo - frobnicate a bar ┌─────┬─────┐ │head │ and │ ├─────┼─────┤ │1 │ 2 │ ├─────┼─────┤ │abc │ so │ └─────┴─────┘ groff test suite 2023‐11‐03 foo(1) $ nroff -t -man /tmp/docu2.man foo(1) General Commands Manual foo(1) Name foo - frobnicate a bar ┌──────┬─────┐ │ head │ and │ ├──────┼─────┤ │ 1 │ 2 │ ├──────┼─────┤ │ abc │ so │ └──────┴─────┘ groff test suite 2023‐11‐03 foo(1) Notice again: A. Fewer blank lines in the output after the page header; and B. There is now a space after the left border of the table. I fixed several bugs in table formatting for terminal devices in groff 1.23.0, and while I was at it I made the box border handling more consistent. Here's the relevant commit. commit 8f066786ea3cb5e1dbade1149e7d50ae978da202 Author: G. Branden Robinson <g.b...@gm...> Date: Fri Feb 3 02:22:02 2023 -0600 [tbl]: Improve symmetry of tables in nroff mode. * src/preproc/tbl/table.cpp (table::compute_column_positions): If a table has "left separation" (it is boxed, or has a vertical rule on the left-hand side), increase the first column's start register value by 1n, for symmetry with the right-hand size. * src/preproc/tbl/tests/check-horizontal-line-length.sh: * src/preproc/tbl/tests/check-line-intersections.sh: * src/preproc/tbl/tests/check-vertical-line-length.sh: Update output expectations. * src/preproc/tbl/tbl.am (tbl_XFAIL_TESTS): Remove now-passing test. Before: +--+---+---+ |a | b | c | +--+---+---+ |d | e | f | +--+---+---+ |g | h | i | +--+---+---+ After: +---+---+---+ | a | b | c | +---+---+---+ | d | e | f | +---+---+---+ | g | h | i | +---+---+---+ Further, if you want a table where every cell is boxed, that's what the "allbox" option is for. You can use that instead of putting "|" in your row descriptions and adding rows consisting solely of "_". tbl(1): allbox Enclose each table entry in a box; implies box. Regards, Branden |