# How to avoid page breaking of a section [duplicate]

Possible Duplicate:
Unbreakable block

I'm writing my resumee in LaTeX and I would like to avoid page breaking in small chunks of text (namely, I detail the different tasks I performed in each project, utilized languages and platforms, and I would like those blocks to stay on the same page), I'm looking for something like

\begin{nopagebreak}
stuff
stuff
stuff
stuff
\end{nopagebreak}

-

## migrated from stackoverflow.comMay 7 '11 at 22:58

This question came from our site for professional and enthusiast programmers.

## marked as duplicate by Alan Munn, Sharpie, Aditya, lockstep, Joseph Wright♦May 8 '11 at 6:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

–  Josh Rosen May 5 '11 at 23:01

## 1 Answer

The environment is called samepage.

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

-
Note: Do NOT use this to keep two section headings together. If you put a label into a section whose heading is in the samepage environment, without including the label itself in the samepage environment, references to the label will bear the number of the previous section! –  Jan Schejbal Jun 29 at 18:31