Hi Jan,

At 2024-04-23T08:24:19+0200, Jan Eden wrote:
> Sorry for failing to mention that I use the tbl preprocessor,

I figured that.  It takes exceptional courage and patience with tedium
to lay out tables _without_ tbl.  :P

> which only has a `nokeep` option described as follows:
> 
> "Don't use roff diversions to manage page breaks. Normally, tbl
> employs them to avoid breaking a page within a table row. This usage
> can sometimes interact badly with macro packages' own use of
> diversions—when footnotes, for example, are employed. This is a GNU
> extension."

The foregoing advice could probably use some fine-tuning.  Is it okay to
use *roff diversions if you let a macro package that ships with groff do
it for you?

You seem to be bumping into an anticipated issue, though.

groff 1.23.0's tbl(1) man page includes the following cautionary note:

Limitations
     Multi‐page tables, if boxed and/or if you want their column
     headings repeated after page breaks, require support at the time
     the document is formatted.  A convention for such support has
     arisen in macro packages such as ms, mm, and me.  To use it, follow
     the .TS token with a space and then “H”; this will be interpreted
     by the formatter as a TS macro call with an H argument.  Then,
     within the table data, call the TH macro; this informs the macro
     package where the headings end.  If your table has no such heading
     rows, or you do not desire their repetition, call TH immediately
     after the table format specification.  If a multi‐page table is
     boxed or has repeating column headings, do not enclose it with
     keep/release macros, or divert it in any other way.  Further, the
     bp request will not cause a page break in a “TS H” table.  Define a
     macro to wrap bp: invoke it normally if there is no current
     diversion.  Otherwise, pass the macro call to the enclosing
     diversion using the transparent line escape sequence \!; this will
     “bubble up” the page break to the output device.  See section
     “Examples” below for a demonstration.

I got good results with the attached document.  Here are the commands I
used.

$ nroff -t -mm EXPERIMENTS/table.mm

$ groff -t -mm EXPERIMENTS/table.mm > table.ps

Does this help?

Regards,
Branden
.LP
Here's a document with a boxed table in it.
.LP
.TS H
box;
L.
.TH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.TE

Attachment: table.ps
Description: PostScript document

Attachment: signature.asc
Description: PGP signature

Reply via email to