Document Classes ⇒ longtable with strange page break just for head line
longtable with strange page break just for head line
is it possible to tell longtable to place at least 3 rows to each page? if yes, how?
if there is a other or better package than longtable, please let me know.
greetings
stefan
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: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
longtable with strange page break just for head line
perhaps the needspace package could be useful for you, for example:
Code: Select all
\usepackage{needspace}
...
\needspace{8\baselineskip}
\begin{longtable}[h]{|c|c|}
...
Stefan
longtable with strange page break just for head line
thanks for your answer. Unfortunately needspace does not help.
But I have found a solution with modifying longtable.sty. I must admit that I do not know exactly what I am doing.

- \ifvoid\LT@foot\else
\advance\vsize-3\ht\LT@foot
\global\advance\@colroom-3\ht\LT@foot
\dimen@\pagegoal\advance\dimen@-3\ht\LT@foot\pagegoal\dimen@
\maxdepth\z@
\fi
Greetings
Stefan
Addition:
Ok, I found one other mistake in my example. Longtable places the caption like a simple row. So the caption has to be defined in \endfoot or \lastendfoot section. But this does not solve the problem. It seems, longtable does not take the size of lastendfoot into account while calculating the pagebreak.