🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #2644

Re: Grouping text

#2644
From: bbeeton
Date: Sat, 22 Aug 1992 20:40
36 lines
2280 bytes
david bolen (comp.text.tex, 18 aug 92) asks how to group a block of
text so that it is sure to stay on one page.

assuming that only text is involved (nothing defined as a \*box at
the outer level), there are two obvious cases;
 - a full, single paragraph
 - a heading followed by paragraphed text, or multiple paragraphs

in the case of the single paragraph, it can be packed into a group
either by \begingroup ... \endgroup or by {...} .  in either case,
the instruction \interlinepenalty=10000 placed inside the group at
the beginning will say "no page breaks within this text".  it's a
a good idea to make sure that the paragraph ends before the end of
the group; \endgraf or a blank line before the closing will take
care of that.  this could relatively easily be built into a new
environment.

when there is a return to vmode within the scope of the desired
group, an additional action is necessary.  after entering vmode,
but before any vertical skip, insert \penalty=10000 or its synonym
\nobreak .  (be absolutely certain you're in vmode -- \nobreak
also operated in hmode to prevent line breaks.)  there are ways
to make this automatic, but the use described by mr bolen sounds
as if he often wishes to select the scope himself.

i happen to believe that there's virtually *no* circumstance in
which a heading should be separated from the following text at a
page boundary.  unfortunately, latex 2.09 isn't very robust in
this respect, and i'm not prepared to suggest how to fix it (though
i've done so in certain very limited applications); for this
situation to be corrected permanently, i think we'll have to wait
for latex 3.  until then, one could try using \nobreak, but i'm
not certain it will always work as intended; the latex code simply
tries to be too smart, and can subvert even a practiced user at
times.
						-- bb
Technical Details
Message-ID: <714516041.864760.BNB@MATH.AMS.ORG>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!orion.oac.uci.edu!unogate!mvb.saic.com!info-tex

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!orion.oac.uci.edu!unogate!mvb.saic.com!info-tex
From: BNB@MATH.AMS.ORG (bbeeton)
Newsgroups: comp.text.tex
Subject: Re:  Grouping text
Message-ID: <714516041.864760.BNB@MATH.AMS.ORG>
Date: 22 Aug 92 20:40:41 GMT
Organization: Info-Tex<==>Comp.Text.Tex Gateway
Lines: 36
X-Gateway-Source-Info: Mailing List