On Wed, 20 Jan 2021 18:00:39 +0100 Oliver Corff <oliver.co...@email.de> wrote:
> try this: > > TS H Hi Oliver, Thanks for the suggestion. I'm still stuck for the "right" way, but it turns out lengthening the logical page does the trick: .pl 100i I didn't find a way to avoid diving down into troff requests. Here's my input: .ll +6.5i .TS H box; LBLBLB N L L . T{ id T} T{ author T} T{ body T} _ .TH ... The input comes from SQL; my program just wraps it in tbl and sends it off to nroff for display. The data for every cell is wrapped in T{... T} to let groff format it. With the particular output in question, -mdoc (or no macro set) fails spectacularly: $ nroff -t -mdoc R | cat -s | wc -l error: page 2: table will not fit on one page; use .TS H/.TH with a supporting macro package 1 That last "1" is wc(1) reporting one line of output :-( With -mdoc, I get pagination, and a better diagnostic: $ nroff -t -ms R | cat -s | wc -l R:18: warning [p 1, 1.0i, div `3tbd1,2', 0.5i]: cannot adjust line R:18: warning [p 1, 1.0i, div `3tbd1,2', 2.0i]: cannot adjust line R:18: warning [p 1, 1.0i, div `3tbd1,2', 3.8i]: cannot adjust line R:24: warning [p 1, 1.0i, div `3tbd2,2', 2.2i]: cannot adjust line R:24: warning [p 1, 1.0i, div `3tbd2,2', 6.0i]: cannot adjust line R:26: warning [p 1, 1.0i, div `3tbd2,2', 9.3i]: cannot adjust line R:47: warning [p 1, 1.0i, div `3tbd5,2', 1.5i]: cannot adjust line R:47: warning [p 1, 1.0i, div `3tbd5,2', 1.8i]: cannot adjust line R:52: warning [p 1, 1.0i, div `3tbd6,2', 0.7i]: cannot adjust line R:57: warning [p 1, 1.0i, div `3tbd7,2', 1.5i]: cannot adjust line R:59: warning [p 1, 1.0i, div `3tbd7,2', 3.2i]: cannot adjust line warning: page 2: table text block will not fit on one page 180 That warning suggested something problematic with the data. The "body" column is the wide one, and adjusting the header N L Lw(50) . "solves" the problem completely, but only by reducing the output to 66 lines. If I use N L Lw(30) . It prints OK in -ms (except paginated), but in -mdoc (or none), I get: $ nroff -t R -mdoc | cat -s | less error: page 2: table will not fit on one page; use .TS H/.TH with a supporting macro package I guess that's because -mdoc does not support .TS H? I have run across this elsewhere, converting documentation to mdoc. It's not unusual for formal documentation to have tables that run on for many pages. It feels like a gap in mdoc. I'm starting to think that if I want long tables displayed in mdoc in nroff, the right way is to roll up my sleeves and figure out how to implement the macro, and be sensititive to the logical page length. But for my immediate purposes, I can use 100 inch logical pages conditional to running in nroff. --jkl