TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing report and now improving look and feel of the report. I found that last section appears in last of page and its remaininng part on next page which does not look good.

enter image description here

How can i move sectinon2 and its content to next page dynamically.

share|improve this question

closed as not a real question by lockstep, Kurt, Martin Schröder, diabonas, Guido Feb 15 '13 at 19:14

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

By default, LaTeX will not insert a page break after the first line of a section. Therefore, please add a minimal working example (MWE). – lockstep Jan 26 '13 at 11:43
I think Enlarge a single page might what you are looking for. (If this alone fixes the issue for you, please comment here so that we can close this question as a duplicate.) – Martin Scharrer Jan 26 '13 at 12:18
No, I need to do it dynamically. My text is variable. It may vary from report to report so i cannot make it fixed. – manish Jan 26 '13 at 15:20
@manish I think you should really provide an MWE. :-) – hpesoj626 Jan 26 '13 at 15:37
up vote 2 down vote accepted

The needspace package provides a means to conditionally insert content based on the amount of space left on a page. In this instance, you might be after a setup like the following:

\usepackage{needspace,lipsum}% http://ctan.org/pkg/{needspace,lipsum}
\section{First section}\lipsum[1-4]
\needspace{6\baselineskip}% <--------- Need 6 lines of text, or insert a page break
\section{Another section}\lipsum[1-4]

Comment out the line containing \needspace in order to see the difference. You can vary this length to suit your needs, depending on the amount of text that follow \section{Another section}, to avoid seeing widowed lines of text.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.