我在使用 table 环境中创建的表格时遇到了一个问题longtabu
,即表格会浮动。当一个长表格在环境中跨两页时longtabu
,另一个浮动表格会将长表格视为普通段落,并将其自身插入页面顶部,然后让其longtabu
继续在下方移动。这显然对读者来说不是最理想的,我该如何解决这个问题?
下面提供了一个重现此现象的示例。
\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}
tabulinesep
请注意,在此特定示例中,仅当包含该选项时才会发生问题。
答案1
\clearpage
您可以在环境之前放置 put longtabu
。这将清除所有待处理的浮点数并防止它们浮入表。