bugGNU roff - Bugs: bug #62265, [tbl] tables in nroff mode seem to...

 
 

bug #62265: [tbl] tables in nroff mode seem to want one too many vees

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Thu 07 Apr 2022 10:36:05 PM UTC
   
 
Category:  Preprocessor tbl Severity:  2 - Minor
Item Group:  Rendering/Cosmetics Status:  Invalid
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 18 Aug 2022 11:29:19 AM UTC, comment #6: 

Resolving this as invalid.

comment #4:

> 1. I boneheadedly misled myself as noted above.  Not much can be done about that.  Well, others might do the same.  See item 3, below.


"Against stupidity, the gods themselves contend in vain."

> 2. The tbl(1) man page could add some cautions to nroff-oriented tbl users about the vertical size of rules and box borders.


I've done this.


commit 7925122f390decc2cdcc6072645b9e16190587ad
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Aug 14 05:59:16 2022 -0500

    tbl(1): Document nroff mode vertical space issue.

    For me, at least, this knowledge was hard-won.  :-|


> 3. The man(7) package could really use keep macros.  I'm really itching to scandalize Ingo by adding yet another feature.  But this one would be really useful.  With ms(7)-like KS/KE macros, the user would never need to count lines--as I have done, erroneously, multiple times--and nothing bad happens if an implementation doesn't support them.  Well, nothing worse than would have happened anyway.


Filed as bug #62911.

G. Branden Robinson <gbranden>
Group administrator
Sat 30 Jul 2022 11:05:20 PM UTC, comment #5: 

Oh, here's a more significant amendment to the epic Dave linked to.

https://lists.gnu.org/archive/html/groff/2022-07/msg00261.html

G. Branden Robinson <gbranden>
Group administrator
Sat 30 Jul 2022 11:03:21 PM UTC, comment #4: 

comment #3:

> The detailed analysis in http://lists.gnu.org/r/groff/2022-07/msg00223.html suggests that this and bug #62471 are respectively the vertical and horizontal manifestations of the same bug.


Unfortunately there were some analytical problems with that rambling epic.  Not only did I correct one point, but it appears another must fall--this one.

The problem with my original submission (comment #0) was that I forgot about the paragraph distance inserted before the section heading.  (At present, this is implemented by the `an-break-paragraph` macro.)  Worse, I helped mislead myself by putting the `.br` after the two empty requests I use to annotate the expected presence of vertical space.

However in this case there is the additional complication that the horizontal rule does eat an additional vee--but only on nroff devices.

Here is a new exhibit that works as I expect.  I have instrumented it so that the interested reader can play with the `PL` register and see if they can contrive to break the poor man's keep implemented with the `ne` request.


$ cat EXPERIMENTS/sh-then-table.man
.if r PL .pl \n(PLu
.TH sh\-then\-table 1 2022-07-30 "groff test suite"
.SH Name
sh\-then\-table \- experiment
.SH Description
Sed ut perspiciatis,
unde omnis iste natus error sit voluptatem accusantium doloremque
laudantium,
totam rem aperiam eaque ipsa,
quae ab illo inventore veritatis et quasi architecto beatae vitae dicta
sunt,
explicabo.
.
.
.br
.if t .ne 4v
.if n .ne 6v \" account for \n[PD] and horizontal rule
.SH Options
.TS
Lb Lb.
Flag    Description
_
\-a     Do it all.
.TE
$ for n in $(seq 19 26); do read -p "PL=${n}v? "; ./build/test-groff -t -man -rPL=${n}v -rcR=0 -Tascii EXPERIMENTS/sh-then-table.man; done


I think there are 3 issues here.

1. I boneheadedly misled myself as noted above.  Not much can be done about that.  Well, others might do the same.  See item 3, below.

2. The tbl(1) man page could add some cautions to nroff-oriented tbl users about the vertical size of rules and box borders.

3. The man(7) package could really use keep macros.  I'm really itching to scandalize Ingo by adding yet another feature.  But this one would be really useful.  With ms(7)-like KS/KE macros, the user would never need to count lines--as I have done, erroneously, multiple times--and nothing bad happens if an implementation doesn't support them.  Well, nothing worse than would have happened anyway.

G. Branden Robinson <gbranden>
Group administrator
Fri 29 Jul 2022 05:56:24 AM UTC, comment #3: 

The detailed analysis in http://lists.gnu.org/r/groff/2022-07/msg00223.html suggests that this and bug #62471 are respectively the vertical and horizontal manifestations of the same bug.

Dave <barx>
Group Member
Mon 18 Apr 2022 06:09:46 PM UTC, comment #2: 

(Changing summary to what I think it meant to say; feel free to correct if my guess is wrong)

Dave <barx>
Group Member
Fri 08 Apr 2022 09:20:36 AM UTC, comment #1: 

original submission:

> I can suppress the warning, and force the table with the its
> adjacent subsection heading to the next page by `ne`eding
> some space before the heading.
>
> But I have to ask for one more vee than I really need.


Symptoms sound similar to the thing over in bug #57538 that affects the -mm and -me macro packages (though there the problem is in troff rather than nroff output).

Dave <barx>
Group Member
Thu 07 Apr 2022 10:36:05 PM UTC, original submission:  

I'm getting this diagnostic when formatting our groff_char(7) page for the terminal, with continuous rendering disabled.


$ ./build/test-groff -z -b -ww -Tutf8 -t -man -rcR=0 ./build/man/groff_char.7
./build/man/groff_char.7:1516: warning: table row will not fit on page 14


If we inspect the page, we see that a subsection heading immediately precedes the table, and it has a horizontal line/rule below the first row.  (In troff mode, i.e. on a typesetter, that rule would be almost zero height.  But on a terminal it demands a full vee of space.)


   Currency symbols
       Output   Input   Unicode   Notes
       ────────────────────────────────────────────────────────────────────────



groff 1.23.0.rc1.2262‐22381      7 April 2022                               14





groff_char(7)          Miscellaneous Information Manual          groff_char(7)


       $        $       u0024     dollar sign


I can suppress the warning, and force the table with the its adjacent subsection heading to the next page by `ne`eding some space before the heading.

But I have to ask for one more vee than I really need.


$ diff -u ATTIC/groff_char_*
--- ATTIC/groff_char_nowarn.7   2022-04-08 08:27:25.908132694 +1000
+++ ATTIC/groff_char_warn.7     2022-04-08 08:28:23.064206026 +1000
@@ -1507,7 +1507,7 @@
 .
 .
 .br
-.ne 5v
+.ne 4v
 .\" ====================================================================
 .SS "Currency symbols"
 .\" ====================================================================


If we ask for 5 vees, then we see that the subsection heading, column heading, horizontal rule, and first row of data take up only 4 vees.


                \[bs]   ‐‐‐       Bell System logo +







groff 1.23.0.rc1.2262‐22381      7 April 2022                               14





groff_char(7)          Miscellaneous Information Manual          groff_char(7)


   Currency symbols
       Output   Input   Unicode   Notes
       ────────────────────────────────────────────────────────────────────────
       $        $       u0024     dollar sign


So what gives?

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-08-18 gbranden StatusNone Invalid
        Assigned toNone gbranden
        Open/ClosedOpen Closed
    2022-04-18 barx Summary[tbl] tables in nroff one seem to want one too many vees [tbl] tables in nroff mode seem to want one too many vees

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code