In my thesis I need to display a lot of long tables for which I use the longtable environment. Most of the time it works perfectly, but sometimes for some reason it doesn't split the table and the table goes well over bottom margin of the page covering a good part of the footer (sometimes even overwriting the page number).
I tried to construct a minimal working example but didn't really succeed. The best I could do was this:
\documentclass[a4paper]{article}
\usepackage{longtable}
\begin{document}
Minimal working example.
\vskip 14.205cm
\begin{description}
\item one
\item two
\item three
\item four
\end{description}
\begin{center}
\begin{longtable}{l|l|l}
\textbf{$f$-vector} & \textbf{ratio} & \textbf{generating grid point} \\ \hline
\endhead
$(8, 12, 6)$ & $1/2$ & $(0, 0, 0)$ \\
$(12, 18, 8)$ & $1/2$ & $(88/1413, 0, 0)$ \\
$(16, 24, 10)$ & $1/2$ & $(706/1413, 0, 0)$ \\
$(18, 28, 12)$ & $1/2$ & $(21/628, -21/628, 0)$ \\
$(21, 32, 13)$ & $1/2$ & $(2825/5652, -1/5652, 0)$ \\
$(24, 36, 14)$ & $1/2$ & $(1/4, -1/4, 0)$ \\
$(25, 38, 15)$ & $1/2$ & $(313/628, -1/5652, 0)$ \\
$(28, 42, 16)$ & $1/2$ & $(539/5652, -187/5652, 0)$ \\
\end{longtable}
\end{center}
\end{document}
In principle it shows what's wrong. The table should be broken and not continue so far into the footer. That's a least what I would like to have. And as I wrote above, sometimes it even goes over the page number.
Any idea what's wrong and how can I fix it?
center
environment which can not do anything useful for longtable and just adds spurious vertical space.begin{center} ...\end{center}
, thenlongtable
is correct broken between pages, otherwise you have observed problem. Use{\centering\begin{longtable} ... \end{longtable} }
instead.\centering
has no effect on longtablebegin{center} ... long table stuff ... \end{center}
I reproduce OP problem. Replacing it with{\centering ... long table stuf ...}
the problem disappear.longtable
environments are automatically centered by default --\centering
should have no effect either way. Removing thecenter
environment does matter, though.