3

I have come across a problem with using longtabu together with tables created in the table environment which makes them float. When a long table is broken across two pages with the longtabu environment, another floating table will treat the long table as a normal paragraph and insert itself at the top of the page, then let longtabu continue its course below. This is obviously suboptimal for the reader, how can I fix this?

A sample that will reproduce this is provided below.

\documentclass[12pt]{article}
\usepackage{booktabs,longtable,tabu}

\begin{document}

\tabulinesep = 0.2cm

\begin{longtabu} to \textwidth {X[2,lp] X[cp] X[cp] X[cp]}
\caption{Model specification regressions} \\
\toprule
& \multicolumn{3}{c}{Regression} \\ 
\cmidrule(l){2-4}
Coefficient or statistic & Unrestricted & Intermediate & Final\\
\midrule
$\bar{R^2}$ & $0.7166$ & $0.7198$ & $0.7132$\\
SSE & $13.3967$ & $14.5750$ & $15.0457$\\
Constant & $4.3885$ $(0.5973)$ & $14.2384$ $(0.0000)$ & $12.9334$ $(0.0000)$\\
$\ln income$ & $-1.5138$ $(0.2602)$ & $-0.8366$ $(0.0147)$ & $-0.4696$ $(0.0980)$\\
$\ln ptea$ & $-0.7113$ $(0.0003)$ & $-0.7067$ $(0.0001)$ & $-0.9201$ $(0.0000)$\\
$\ln pcoff$ & $0.8773$ $(0.0003)$ & $0.8135$ $(0.0000)$ & $1.0268$ $(0.0000)$\\
$\ln pftvg$ & $-1.4448$ $(0.0386)$ & $-1.1288$ $(0.0037)$ & $-1.0836$ $(0.0056)$\\
$\ln pleis$ & $0.2368$ $(0.1881)$ & $0.2681$ $(0.0575)$ & ---\\
$\ln pmtfh$ & $-0.4448$ $(0.2207)$ & --- & --- \\
$\ln ptrav$ & $0.0548$ $(0.8075)$ & --- & --- \\
$\ln pbeer$ & $0.6850$ $(0.4659)$ & --- & --- \\
$\ln pwine$ & $0.0139$ $(0.0355)$ & --- & --- \\
$\ln palloth$ & $0.9735$ $(0.1132)$ & --- & --- \\
$\ln income\_1$ & $1.3850$ $(0.2786)$ & --- & --- \\
$time$ & $-0.0189$ $(0.4036)$ & --- & --- \\
$quarter1$ & $-0.0451$ $(0.6368)$ & --- & --- \\
$quarter2$ & $-0.1463$ $(0.1245)$ & --- & --- \\
$quarter3$ & $-0.0117$ $(0.9033)$ & --- & --- \\
\bottomrule
\end{longtabu}

\begin{table}
\centering
\caption{Validity of Restrictions}
\begin{tabu} to \textwidth {X[lm] X[1.5,cm] X[lm] X[Lm]}
\toprule
Test & Formula & $H_0$ & $H_1$\\
\midrule
Significant residual difference & $F=\frac{SSR_R-SSE_U/J}{SSE_U/(N-K)}$ & Restrictions do not explain significant variation in model & Restrictions explain significant variation in model\\
\bottomrule
\end{tabu}
\end{table}

\end{document}

Note that in this specific example the problem only occurs when the tabulinesep option is included.

  • put \clearpage before the longtable – David Carlisle Sep 19 '13 at 21:09
  • it worked if \clearpage is put before the other table. thanks a lot david! – user36880 Sep 19 '13 at 21:23
3

You can put put \clearpage before the longtabu environment. This will flush any pending floats and prevent them floating into the table.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.