[comp.misc] HELP! with boxed tables using MM, tbl

btwomey@mtuxj.att.com (XF3AA-W.TWOMEY) (02/09/89)

I'm trying to create multi-page boxed tables using tbl and mm and troff.
I'm using .TS H and .TH to get the header repeated on pages.

MM has problems though. I have had: the sides of the box go missing;
pages come out blank except for the table header; and the last page 
have the last few lines jam into each other as if the vertical space
had been decreased, as in .vs 2 .  Lots of nonsense, really.

I'll break the table into several page sized tables as a last resort.

Is there a bug in mm? If you have had success with a multipage boxed
table, can you send me a copy?

Here is how I'm setting up the table. Do you see anything wrong?

Table contents deleted for brevity. I don't think that the length
of this table (300 lines) is munging things; errors have appeared
on every page.

This is exasperating, any help will be greatly appreciated.

Bill Twomey
201-577-4627		
AT&T Business Markets Group	attmail!btwomey

.PM N
.PF "''- \\\\nP -''"
.PH "'''junk2.tbl'"
.\" there are extra columns on the left and right, it looks nicer
.TS H
center, doublebox;
rw1 1 cw1 1 s s s sw1
rw1 1 rw1 1 c s s 
rw1 1 Lw1 1 c c c 1 Lw1 Lw1.
\ 
\ 		Database File Usage\fR
\ 	\ 	_	_	_	 	\ 
.T&
rw1 1 Lw1 1 c c c 1 L 1 rw1 1
rw1 1 Lw1 1 c c c 1 L 1 rw1 1
rw1 1 Lw1 1 c c c 1 L 1 rw1 1.
		LOGICAL	FILE	C	\ 	\ 
		FILE	ALIAS	PROGRAM	\ 	\ 
\ 	=	=	=	=	=	\ 
.T&
rw1 1 Lw1 1 ae 4 ce 4 a l.
.TH
		noclass	NOFILE	flag.c	 \ 
				w aclist.c
				badseed.c
				broad.c
				krispie.c
				poopt.c
		gagroot	GAGFILE	gagnld.c
				bloadpes.c
				slicingf1.c
				phspca.c
.
.
.
		std	STFILE	poopt.c
				poorepf.c
				fnordcomf1.c
				fnordcopy.c
.TE

-- 
201-577-4627
AT&T Business Markets Group
Business Customer Platform & Equipment Provisioning Systems Division

hecht@hsi.UUCP (Alice Hecht) (02/11/89)

In article <946@mtuxj.att.com>, btwomey@mtuxj.att.com (XF3AA-W.TWOMEY) writes:
> 
> I'm trying to create multi-page boxed tables using tbl and mm and troff.
> I'm using .TS H and .TH to get the header repeated on pages.
> 
> MM has problems though. I have had: the sides of the box go missing;
> pages come out blank except for the table header; and the last page 
> have the last few lines jam into each other as if the vertical space
> had been decreased, as in .vs 2 .  Lots of nonsense, really.
> 
> I'll break the table into several page sized tables as a last resort.
> 
I've had similar problems with tables before and the only thing that 
ended working was ending the table at the bottom of each page and then
restarting it again at the top.  It seems that sometimes you can use
the running table headers and sometimes it doesn't like it.  The worst
learning experience I ever had with tables was when I started a job
at the end of the day and left for home and when I came in the
next day to pick up my printout found out that the system administrator
finally had to cancel my job 8 hours after I had left.  What had happened
was the table went into an infinite loop and tied up a majority
of our CPU processing time.  They weren't too happy with me that day.

So if you're trying to have a table run from one page to the next, don't!
There is definitely a bug in troff there (and by the way I was using the
MS macro but your situation sounds identical to mine).

Alice

-- 
Alice Hecht                                       ...!uunet!hsi!hecht
Health Systems International                      hecht@hsi.uu.net

debra@alice.UUCP (Paul De Bra) (02/14/89)

In article <1085@hsi.UUCP> hecht@hsi.UUCP (Alice Hecht) writes:
?In article <946@mtuxj.att.com>, btwomey@mtuxj.att.com (XF3AA-W.TWOMEY) writes:
?> 
?> I'm trying to create multi-page boxed tables using tbl and mm and troff.
?> I'm using .TS H and .TH to get the header repeated on pages.
?> 
?> MM has problems though. I have had: the sides of the box go missing;
?> pages come out blank except for the table header; and the last page 
?> have the last few lines jam into each other as if the vertical space
?> had been decreased, as in .vs 2 .  Lots of nonsense, really.
?> 
?> I'll break the table into several page sized tables as a last resort.
?> 
?I've had similar problems with tables before and the only thing that 
?ended working was ending the table at the bottom of each page and then
?restarting it again at the top.  It seems that sometimes you can use
?the running table headers and sometimes it doesn't like it.  The worst
?learning experience I ever had with tables was when I started a job
?at the end of the day and left for home and when I came in the
?next day to pick up my printout found out that the system administrator
?finally had to cancel my job 8 hours after I had left.  What had happened
?was the table went into an infinite loop and tied up a majority
?of our CPU processing time.  They weren't too happy with me that day.
?
?So if you're trying to have a table run from one page to the next, don't!
?There is definitely a bug in troff there (and by the way I was using the
?MS macro but your situation sounds identical to mine).
?

From working with people that are serious troff/tbl hackers I can predict
that the bug most likely is in tbl, not in MM or troff. Tbl never checks
the distance to the next trap, so whenever a table hits a trap or end of
page the table gets messed up, since tbl generates code that does not print
the table completely from the top to the bottom. Trying to go up and down
on a page only works as long as you don't hit a trap.

Paul.
-- 
------------------------------------------------------
|debra@research.att.com   | uunet!research!debra     |
------------------------------------------------------

edwards@houxa.ATT.COM (D.LEWAN) (02/17/89)

In article <8909@alice.UUCP>, debra@alice.UUCP (Paul De Bra) writes:
> In article <1085@hsi.UUCP> hecht@hsi.UUCP (Alice Hecht) writes:
> ?In article <946@mtuxj.att.com>, btwomey@mtuxj.att.com (XF3AA-W.TWOMEY) writes:
> ?> 
> ?> I'm trying to create multi-page boxed tables using tbl and mm and troff.
> ?> I'm using .TS H and .TH to get the header repeated on pages.
> ?> 
> ?> MM has problems though. I have had: the sides of the box go missing;
> ?> pages come out blank except for the table header; 
etc.................
> ?I've had similar problems with tables before and the only thing that 
> ?ended working was ending the table at the bottom of each page and then
> ?restarting it again at the top. 
etc.................
> 
> From working with people that are serious troff/tbl hackers I can predict
> that the bug most likely is in tbl, not in MM or troff. Tbl never checks
> the distance to the next trap, 
etc.................

I will not advocate tbl(1) as perfect -- far from it -- but the
problem described is anticipated in both the tbl(1) documentation
and implementations.  To quote:

	The macro T# is defined to produce the bottom lines and side
	lines of a boxed table, and then invoked at its end.  By the
	use of this macro in the page footer a multi-page can be
	boxed.

It works -- generally, certainly not always; it seems that when
things happen too close to traps troff gets confused about which
side they're on and messes up accordingly.

The bug is that the detail is so hidden in the documentation, and
that is a side-effect of the fact that the documentation is so
unstructured and scattered.  It looks just like a research project
that's been artificially elevated to the status of product without
regard for the non-academic features that make *products* reasonable
for use by people.  Academic projects uncover universal truths;
their results live independently.  

Any other favorite bugs in UNIX\(rg text processing?  My favorites
come from the fact that it is all interpreted and chained and there
is no way to truly integrate.  Others come from the 2 character
restrictions on names.  Oh, yeah, most tbl(1) implementations allow
only 100 text blocks.  C'm'on guys, in computer science is 100
really such a large number?????

Yours in box rules,

Doug

wrp@biochsn.acc.virginia.edu (William R. Pearson) (02/23/89)

>
>Any other favorite bugs in UNIX\(rg text processing?  My favorites
>come from the fact that it is all interpreted and chained and there
>is no way to truly integrate.  Others come from the 2 character
>restrictions on names.  Oh, yeah, most tbl(1) implementations allow
>only 100 text blocks.  C'm'on guys, in computer science is 100
>really such a large number?????

	This week I encountered a more intransigent bug in tbl -
how to get double spacing inside of text blocks T{,T}.  Several
of the things that I tried ended up spacing the text block down
one line.  None worked satifactorily.  I would appreciate any suggestions
on how to format the following table:

 .TS
 center box;
 c c l.
 col1<TAB>col2<TAB>T{
 this is a very long text block that takes several lines
 }T
 .TE

and have the text block be double spaced, without changing the .vs
for the whole table.

Bill Pearson