[comp.text.tex] Restricting pagebreaks within a paragraph in LaTeX

kirkaas@oahu.cs.ucla.edu (paul kirkaas) (08/20/90)

I am looking for a way to prohibit page breaking within certain paragraphs
with LaTeX.  Specifically in \verse mode, I have 4 line stanzas that I
want to be unbroken.  Between stanzas, paged breaking is acceptable.
I have tried the various LaTeX commands that seemed obvious, but to no
avail.  Any suggestions?

Paul.

--
--
Paul Kirkaas
kirkaas@cs.ucla.edu

dhosek@sif.claremont.edu (Hosek, Donald A.) (08/20/90)

In article <38193@shemp.CS.UCLA.EDU>, kirkaas@oahu.cs.ucla.edu (paul kirkaas) writes...

>I am looking for a way to prohibit page breaking within certain paragraphs
>with LaTeX.  Specifically in \verse mode, I have 4 line stanzas that I
>want to be unbroken.  Between stanzas, paged breaking is acceptable.
>I have tried the various LaTeX commands that seemed obvious, but to no
>avail.  Any suggestions?

Between lines, try using \\* rather than \\ (take a look at the
entry for \\ in the reference manual section of the LaTeX
manual).

-dh


---
Don Hosek                       TeX, LaTeX, and Metafont support, consulting 
dhosek@ymir.claremont.edu       installation and production work. 
dhosek@ymir.bitnet              Free Estimates.
uunet!jarthur!ymir              Phone: 714-625-0147
                                finger dhosek@ymir.claremont.edu for more info

rjc@uk.ac.ed.cstr (Richard Caley) (08/21/90)

In article <8140@jarthur.Claremont.EDU> dhosek@sif.claremont.edu (Hosek, Donald A.) writes:

    In article <38193@shemp.CS.UCLA.EDU>, kirkaas@oahu.cs.ucla.edu (paul kirkaas) writes...

    >I am looking for a way to prohibit page breaking within certain paragraphs
    >with LaTeX.  Specifically in \verse mode, I have 4 line stanzas that I
    >want to be unbroken.  Between stanzas, paged breaking is acceptable.
    >I have tried the various LaTeX commands that seemed obvious, but to no
    >avail.  Any suggestions?

    Between lines, try using \\* rather than \\ (take a look at the
    entry for \\ in the reference manual section of the LaTeX
    manual).

Probably a stupid question but...

Is there any way to do this `automatically'; that is, how can I define
an environment which will keep a given block of text on one page
without either having to end each line with \\* ( thus making the
whole thing unreadable ) or putting it in a vbox ( which will set the
glue and prevent the normal line spacing adjustments ).

Thanks for any help, I'm sure it is burried in the TeX book somewhere
but I can't see it.

--
rjc@uk.ac.ed.cstr

tim@cstr.ed.ac.uk (Tim Bradshaw) (08/21/90)

>>>>> On 20 Aug 90 18:31:07 GMT, rjc@uk.ac.ed.cstr (Richard Caley) said:

> Probably a stupid question but...

> Is there any way to do this `automatically'; that is, how can I define
> an environment which will keep a given block of text on one page
> without either having to end each line with \\* ( thus making the
> whole thing unreadable ) or putting it in a vbox ( which will set the
> glue and prevent the normal line spacing adjustments ).

> Thanks for any help, I'm sure it is burried in the TeX book somewhere
> but I can't see it.

Well I haven't tried it but, setting \interlinepenalty quite high
should prevent it breaking between lines.  Of course you also need to
set \widowpenalty, \displaywidowpenalty \brokenpenalty equivalently
high, or TeX will produce widows &c by preference.  This will do
interesting things to the page breaking in general of course...

--tim
Tim Bradshaw.  Internet: tim%ed.cstr@nsfnet-relay.ac.uk
UUCP: ...!uunet!mcvax!ukc!cstr!tim  JANET: tim@uk.ac.ed.cstr
"Quis custodiet ipsos custodes?"

dorai@titan.rice.edu (Dorai Sitaram) (08/21/90)

In article <RJC.90Aug20183107@brodie.uk.ac.ed.cstr> rjc@uk.ac.ed.cstr (Richard Caley) writes:
$In article <8140@jarthur.Claremont.EDU> dhosek@sif.claremont.edu (Hosek, Donald A.) writes:
$
$    In article <38193@shemp.CS.UCLA.EDU>, kirkaas@oahu.cs.ucla.edu (paul kirkaas) writes...
$
$    >I am looking for a way to prohibit page breaking within certain paragraphs
$    >with LaTeX.  Specifically in \verse mode, I have 4 line stanzas that I
$    >want to be unbroken.  Between stanzas, paged breaking is acceptable.
$    >I have tried the various LaTeX commands that seemed obvious, but to no
$    >avail.  Any suggestions?
$
$    Between lines, try using \\* rather than \\ (take a look at the
$    entry for \\ in the reference manual section of the LaTeX
$    manual).
$
$Probably a stupid question but...
$
$Is there any way to do this `automatically'; that is, how can I define
$an environment which will keep a given block of text on one page
$without either having to end each line with \\* ( thus making the
$whole thing unreadable ) or putting it in a vbox ( which will set the
$glue and prevent the normal line spacing adjustments ).

You could enclose the stuff that should be in one page in a \samepage
declaration (see LaTeX manual).  Thus:

{\samepage 
\begin{verse}
This, dear reader, is the first line of my poem;\\
And this is the second, wait, don't go hoem;\\
...
\end{verse}
}

Talking of readability, \\ isn't a whole lot more readable than \\*,
is it?  I prefer (see TeXbook):

\obeylines{
This, dear reader, is the first line of my poem
And this is the second, wait, don't go hoem
...
}

If you're going to typeset an epic or a play in vers libre, it's
rather obvious which approach is better, no?  Once again, relevant
sections should be enclosed in \samepage's.

--d