6

Possible Duplicate:
longtabu and floats: wrong table breaks on pages with floats

In the paper I'm writing I want to format a long sequences of equations with definitions. To have a consistent indentation in the whole paper I have decided to use two-column longtables to be able to break them between pages. However, there are some nondeterministic vertical overfulls on the bottom margins, well represented by this MWE:

\documentclass[12pt,fleqn]{article}
\usepackage[a4paper, left=2.5cm, right=2.5cm, top=2.0cm, bottom=2.5cm, headsep=1.2cm]{geometry}
\usepackage{longtable}
\usepackage[OT4,T1]{fontenc}
\usepackage{lipsum}

\begin{document}

\lipsum[1-4]   

\begin{figure}[htbp]
\centering
\rule{300pt}{200pt}
\caption{Description}
\end{figure}

\begin{figure}[htbp]
\centering
\rule{300pt}{200pt}
\caption{Description}
\end{figure}

\section{Lorem ipsum}

\lipsum[3-4]

\subsection{A subsection}
\begin{longtable}{p{5.5cm} p{10cm}}
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
\end{longtable}

\subsection{Another subsection}
\begin{longtable}{p{5.5cm} p{10cm}}
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
  $a^2+b^2=c^2$ & a theorem\\
\end{longtable}

\end{document}

It's the shortest WE that I can produce.

What could be the cause of this overfull? Why the second longtable just does not break to 3rd page? Is using multiple longtables in sequence error-prone? Can another package provide such functionality?

David Carlisle
  • 757,742
janislaw
  • 161
  • 1
    Welcome to TeX.sx! More information on this site can be seen in the faq and the Unofficial TeX-SX FAQ http://meta.tex.stackexchange.com/q/1144/19384 as well as the markdown help http://tex.stackexchange.com/editing-help. Welcome to the community! – Peter Jansson Jan 02 '13 at 22:34
  • 1
    There seem to be an incompatibility between longtable and your geometry specifications, but I can't identify it yet. If you remove the geometry line, the document becomes 4 pages long with the last page containing the last 3 rows. Also note that your tables are wider than the text area as defined with your geometry (but that is not what is causing the problem) – ArTourter Jan 02 '13 at 22:44
  • 2
    The problem seems to be the same that is addressed in this answer: http://tex.stackexchange.com/a/48282 – egreg Jan 02 '13 at 22:46
  • Ah! well spotted @egreg. I thought the problem looked familiar! – ArTourter Jan 02 '13 at 22:50
  • Sorry about that, @egreg confirms that the fix in the bug report does fix this case. – David Carlisle Jan 02 '13 at 23:46
  • Thank you @egreg, the patch you have found has fixed the problem. I'm very pleased about the positive and rapid feedback I got with my first questions. Thank you all a lot. – janislaw Jan 03 '13 at 17:38

0 Answers0