1

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?

14
  • 3
    I can see nothing wrong with the output here the longtable doesn't go beyond the text block into the footer at all. However you should remove the center environment which can not do anything useful for longtable and just adds spurious vertical space. Apr 27, 2016 at 19:07
  • 1
    If you remove begin{center} ...\end{center}, then longtable is correct broken between pages, otherwise you have observed problem. Use {\centering\begin{longtable} ... \end{longtable} } instead.
    – Zarko
    Apr 27, 2016 at 19:26
  • 3
    @Zarko no. \centering has no effect on longtable Apr 27, 2016 at 19:27
  • 1
    hm, I make test and with begin{center} ... long table stuff ... \end{center} I reproduce OP problem. Replacing it with {\centering ... long table stuf ...} the problem disappear.
    – Zarko
    Apr 27, 2016 at 19:31
  • 1
    @Zarko - longtable environments are automatically centered by default -- \centering should have no effect either way. Removing the center environment does matter, though.
    – Mico
    Apr 27, 2016 at 19:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.