xltabular 打印超出页面后 \vbox 溢出

xltabular 打印超出页面后 \vbox 溢出

我尝试将 MWE 降至最低,但仍然很大 :-/

\documentclass[a4paper,11pt,naustrian]{article}
\usepackage[margin=2.5cm, showframe]{geometry}
\usepackage[tracking=true,factor=1100,stretch=10,shrink=10,final]{microtype}
\usepackage[table]{xcolor} % for highlighting AND background images-color!!!
\usepackage{setspace} 
\onehalfspacing 
\usepackage{xltabular} 
\usepackage{booktabs} 
\usepackage{caption} % config is done for table and image separately
\usepackage{needspace}
\usepackage{placeins} %insert some barriers for floats (e.g. figure)
\usepackage{kantlipsum}
\begin{document}
\begin{xltabular}{\textwidth}{| X X X X X X X X X X X}
\midrule[131564sp]
&2020& 2021& 2020& 2021& 2020& 2021& 2020& 2021& {2020}&  {2021}\\
\midrule
&\multicolumn{2}{ c  }{abc 1 }
&\multicolumn{2}{ c  }{abc 2 }
&\multicolumn{2}{ c  }{abc 3 }
&\multicolumn{2}{ c  }{abc 4 }
&\multicolumn{2}{ c  }{{abc 5} }\\
\midrule
\endhead
Provinz&212&62&195&101&212&62&195&101&{212}&{62}\\
\midrule
Provinz&5&5&8&10&5&5&8&10&{5}&{5}\\
\midrule
Provinz&1&2&0&3&1&2&0&3&{1}&{2}\\
\midrule
Provinz&1&1&1&5&1&1&1&5&{1}&{1}\\
\midrule
Provinz&3&1&1&1&3&1&1&1&{3}&{1}\\
\midrule
Provinz&15&1&5&7&15&1&5&7&{15}&{1}\\
\midrule
Insgesamt&
2&3& 1&1&2&3&1&1&2&3\\
\midrule\end{xltabular}
\needspace{3\baselineskip}
\FloatBarrier
\section{test bilder}

\begin{xltabular}{\textwidth}{!{\vrule width 131564sp} X X X X}
\midrule[131564sp]
& & & \\ \midrule
& & & \\ \midrule
& & & \\ \midrule
\end{xltabular}

\begin{figure}[!htbp]
    \rule{10cm}{5cm}
\caption{Image1}
    \rule{11cm}{1cm}
\end{figure}
\FloatBarrier
\begin{figure}[!htbp]
\caption{Nextcloud}
\end{figure}
%\newpage
\FloatBarrier
\begin{figure}[!htbp]
    \rule{11cm}{4cm}
\caption{Nextcloud Daten}
\end{figure}
\FloatBarrier
\begin{figure}[!htbp]
    \rule{13cm}{4cm}
\caption{Zoneneinteilung ABC}
\end{figure}
\FloatBarrier
\section{MyTest}
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in
\begin{xltabular}{\textwidth}{!{\vrule width 131564sp} X X X X X X X}
\midrule[131564sp]
Vorfälle& 01/21& 02/22& 03/22& 04/22& 05/22& 06/22\\
\midrule
10& x& & & & & \\ \midrule
20& & x& & & & \\ \midrule
30& & & x& x& & \\ \midrule
40& & & x& & & \\  \midrule
50& & & & & x& xx\\ \midrule
60& & & & & & \\ \midrule
\end{xltabular}
\kant
\end{document}

似乎我的图表和表格组合很奇怪,导致最后一个表格对整个页面的计算很奇怪。它最终以

Overfull \vbox (256.12231pt too high) has occurred while \output is active []

看起来像

在此处输入图片描述

引入类似命令\newpage可修复此问题。由于我或多或少会自动生成 TeX 代码,因此我需要一个能够正确计算末尾空间的解决方案。

有什么提示我该怎么做才能取得更好的结果?

注意:如果需要,我可以发送此请求的所有文件的完整包 - 因为它们包含一些需要特定尺寸的图形:-/

跑步lualatex 1.13.2

注意:更新:

  1. 用尺子替换图像
  2. 使用,xltabular因为我事先不知道页面在哪儿结束,什么时候结束。这应该由 TeX 自动完成(至少我希望如此)。

相关内容