[comp.text] how to ``keep'' in tex?

jon@hanauma.Stanford.EDU (Jon Claerbout) (07/31/90)

I have a small table in latex that I want to keep entirely on one page.
I read the manual and tried
{\samepage   and/or \nobreak
	table line one
	table line two
}
but this didn't work.  In troff the syntax for a keep is
.KS
	table line one
	table line two
.KE
This should be easy, any suggestions?

chris@mimsy.umd.edu (Chris Torek) (08/02/90)

In article <10725@lindy.Stanford.EDU> jon@hanauma.Stanford.EDU
(Jon Claerbout) writes:
>I have a small table in latex that I want to keep entirely on one page.
>... This should be easy, any suggestions?

The most trivial and straightforward way to *force* TeX not to break
something is to enclose it in a \vbox.  For instance,

	\vbox{No matter how much stuff you put in here, TeX
	will have to put it on one page.  If you put way too
	much stuff inside this box TeX will be very unhappy.
	I fed TeX a vbox containing approximately 2500 lines
	of text (our /etc/termcap) and got the errors:

Overfull \vbox (21479.7419pt too high) detected at line 2136

Overfull \vbox (21479.7419pt too high) has occurred while \output is active

	21,479 points is nearly 25 feet---quite impressive.}

After saying all this, I feel that I should point out that tables, like
figures, are generally best handled as `floats'.  LaTeX has a bunch of
stuff already in it to do floats.  Just surround your table with
\begin{table}...\end{table}.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@cs.umd.edu	Path:	uunet!mimsy!chris