Page Layout ⇒ Problems Preventing Page Breaks
-
- Posts: 1
- Joined: Thu Nov 24, 2011 3:47 pm
Problems Preventing Page Breaks
I have longtable and some header text that precedes it. I need to make sure the header text and the longtable are on the same page. So I just need to make sure that a new page is not started after my header text.
\nopagebreak has no effect for some reason
using a minipage will not work because it will not allow the longtable to function properly. I only want the table and text moved to a new page if there isn't room for any table rows, if Latex can fit any part of the table on the page, then it should.
Order is important, so no floats.
- Attachments
-
- prevent-page-break2.tex
- In this document Latex should move the Section Header text to the next page
- (374 Bytes) Downloaded 198 times
-
- prevent-page-break.tex
- This document renders correctly, but wouldn't if I used minipage.
- (391 Bytes) Downloaded 195 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Problems Preventing Page Breaks
the needspace package can help. It provides the command \needspace which checks if there's sufficient available space, as specified by you, and inserts a pageb reak if necessary.
Perhaps have a look at Prevent page breaks for further information.
Stefan