Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to prevent pagebreaks? \nopagebreak not working!

1,062 views
Skip to first unread message

Heikki Kähkölä

unread,
Sep 24, 2001, 8:03:06 AM9/24/01
to

Hello.


Is it possible to somehow prevent a paragraph or a few lines of text from
being broken up to the next page? I'm working on an automatic catalog
creation project with XML / XSLT --> LaTeX, and sometimes I get a paragraph
header on the bottom of the page, and maybe one line with few words.. what
I'd like to do is have it all on the next page. Is there a way to make LaTeX
group stuff together instead of just breaking the page where it feels like
doing so? \nopagebreak seems to have little effect. Any ideas?

Jules Bean

unread,
Sep 24, 2001, 8:20:08 AM9/24/01
to
"Heikki Kähkölä" wrote:
> I'd like to do is have it all on the next page. Is there a way to make LaTeX
> group stuff together instead of just breaking the page where it feels like
> doing so?

\begin{samepage}
...
\end{samepage}

will do the trick for certain constructs.

> \nopagebreak seems to have little effect. Any ideas?

\nopagebreak does work, but only at *that* specific possible page-break
location. What can happen is that another page-break-location follows
shortly after (what looks like the same position, in the output, but
isn't as far as TeX is concerned). If you posted specific cases where
\nopagebreak doesn't work, someone would be able to explain why..

Jules

0 new messages