\newpage 在两个表之间不起作用

\newpage 在两个表之间不起作用

我有一个简单的问题,要在两页上获取两个表格...有什么建议吗?这是我的代码:

    \documentclass{book}

\usepackage[ngerman]{babel}
\usepackage{blindtext}
\begin{document}
\pagestyle{empty}

\begin{table}[t]
\caption{Number of observed years in the respective state of all candidates are counted for each model.}
\label{tab:table1}
\fbox{%
\begin{tabular}{lccc}
 & Correct Model & Healthy Candidate Bias & Time Dependent Bias\\
  &Winner/Runner-up& Winner/Runner-up& Winner/Runner-up\\\hline
Germany & 177/201 & 121/182 & 192/186\\
USA  & 214/271 & 182/259 & 222/263\\
UK  & 231/155 & 181/140 & 241/145\\\hline
Total  & 622/627 & 484/581 & 655/594\\
\end{tabular}}
\end{table}

\newpage


\begin{table}
\caption{Results of the death hazard ratio with the 95\% confidence interval (CI) for winners relative to runners-up of different cox models for the healthy candidate bias, time dependent bias and the correct model.}
\label{table2}
\fbox{%
\begin{tabular}{lccl}
   Cox-Model & Correct Model & Healthy Candidate Bias & Time Dependent Bias\\
\hline
Basic & 1.133 (0.568 - 2.260) & 1.302 (0.648 - 2.618) & 1.124 (0.563 - 2.244)\\
Strata(country) & 1.062 (0.488 - 2.311) & 1.293 (0.585 - 2.860) & 1.062 (0.488 - 2.311)\\
 \end{tabular}}
\end{table}

\end{document}

答案1

\newpage在那个位置上确实没有多大意义。它强制在文本浮动中的固定点处进行分页,但表格是浮动的,因此会从主文本中取出并重新定位,因此显然分页符可能不会位于它们之间。

也许您打算\clearpage刷新所有待定的浮动元素,从而强制第一个表不浮动超过该点。(虽然给它一个[t]选项,以防止它出现在浮动页面上,然后使用它\clearpage强制它出现在浮动页面上,这有点奇怪。)

相关内容