I noticed that the tabu
package seems to have problems with its longtabu
environment, if it is placed on a page, where a float already is placed.
Consider the following MWE:
\documentclass[10pt]{article}
\usepackage{longtable,tabu}
\usepackage{lipsum}
\begin{document}
\begin{table}
\begin{tabular}{ccc}
Row 1 & Row 1 & Row 1 \\
Row 2 & Row 2 & Row 2 \\
Row 3 & Row 3 & Row 3 \\
Row 4 & Row 4 & Row 4 \\
Row 5 & Row 5 & Row 5 \\
Row 6 & Row 6 & Row 6 \\
Row 7 & Row 7 & Row 7 \\
Row 8 & Row 8 & Row 8 \\
Row 9 & Row 9 & Row 9 \\
Row 10 & Row 10 & Row 10 \\
\end{tabular}
\end{table}
\lipsum[1-2]
\begin{longtabu}{X[l]X[c]}
Test & Test
\end{longtabu}
\lipsum[10]
{
\footnotesize
\begin{longtabu}{|X[-4,l]|X[r]|X[r]|X[r]|}
\hline
Col 1 & Col 2 & Col 3 & Col 4 \\\hline
Lorem ipsum dolor sit & 0.000019 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000012 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000173 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000011 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.012992 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000031 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000068 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000018 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.029689 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000055 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000004 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 28.276892 & 0.405603 & 1.560010 \tabularnewline\hline
Lorem ipsum dolor sit & 0.957158 & 0.234002 & 0.702005 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000011 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000002 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000013 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000336 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000004 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000003 & 0.000000 & 0.000000 \tabularnewline\hline
Lorem ipsum dolor sit & 0.000003 & 0.000000 & 0.000000 \tabularnewline\hline
\end{longtabu}
}
\end{document}
Note that the last table is broken in a wrong way at the bottom of page 1. I guess that the wrong offset for the table break is exactly the vertical dimension of the first table, which is enclosed in a floating environment.
However, I don't know how to fix the wrong table break. I have many pages containing floating tables, but at some places I would like to have long tables with longtabu
, as exactly as in the MWE.
Can anybody tell me how to fix the wrong table break?