I tried to reduce my MWE to some minimum but this is nevertheless quite large :-/

\usepackage[margin=2.5cm, showframe]{geometry}
\usepackage[table]{xcolor} % for highlighting AND background images-color!!!
\usepackage{caption} % config is done for table and image separately
\usepackage{placeins} %insert some barriers for floats (e.g. figure)
\begin{xltabular}{\textwidth}{| X X X X X X X X X X X}
&2020& 2021& 2020& 2021& 2020& 2021& 2020& 2021& {2020}&  {2021}\\
&\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} }\\
2&3& 1&1&2&3&1&1&2&3\\
\section{test bilder}

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

\caption{Nextcloud Daten}
\caption{Zoneneinteilung ABC}
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}
Vorfälle& 01/21& 02/22& 03/22& 04/22& 05/22& 06/22\\
10& x& & & & & \\ \midrule
20& & x& & & & \\ \midrule
30& & & x& x& & \\ \midrule
40& & & x& & & \\  \midrule
50& & & & & x& xx\\ \midrule
60& & & & & & \\ \midrule

It seems like I have a strange combination of figure and tables which causes the last table in a strange calculation of the of the whole page. It finally ends with a

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

which will look like

enter image description here

Introducing a command like \newpage fixes the issue. Since I'm more or less generating the TeX code automatically I need a solution which calculates the space at the end properly.

Any hints what I can to do to achieve a better result?

NOTE: If required I can send a complete package of all the files for this request - since they include some graphics which require a specific size :-/

Running lualatex 1.13.2

NOTE: Update:

  1. Replacing the images with a ruler
  2. Using xltabular since I don't know in advance where the page ends and when not. This should be done automatically by TeX (at least I would expect so).
  • 1
    Out of curiosity: Why do you use xltabular for this particular table? As it currently is, it is significantly smaller than a page, meaning mid-table page breaks are unnecessary. A simple tabularx should work just fine for this table.
    – leandriis
    Commented Oct 7, 2021 at 13:34
  • Regarding the images: probably you can replace the currently used images with dummy images of the respective required heights in order to create a compile mwe.
    – leandriis
    Commented Oct 7, 2021 at 13:37
  • @leandriis: Thx for the hint with image replacements. I guess that's the general question when to use xltabular and when not. If you do it manually I would agree. If you do automatically its hard to guess when or when not to use each of them.
    – LeO
    Commented Oct 7, 2021 at 13:50
  • 3
    Your example is way to long. But beside this: xltabular uses longtable, and longtable is a complicated beast and sometimes interacts badly with floats, see e.g. github.com/latex3/latex2e/issues/158. So don't use it until you need it. Commented Oct 7, 2021 at 14:58
  • 1
    With your MWE I cant reproduce showed result of compilation. In your MWE also have the following strange construction: \begin{figure}[!htbp] \rule{10cm}{5cm} \caption{Image1} \rule{11cm}{1cm} \end{figure} \FloatBarrier \begin{figure}[!htbp] \caption{Nextcloud} \end{figure}.
    – Zarko
    Commented Oct 7, 2021 at 16:10


You must log in to answer this question.

Browse other questions tagged .