# Page body exceeds page bottom with geometry package

In some circumstances, a tabular overflows/exceeds the page bottom that has been set with the geometry package. Originally, I've had the problem with a longtable and bunch of different packages, settings, and text, but I've managed to reproduce it with a regular tabular and a meticulously chosen vspace* parameter together with the showframe option. Here's the MWE:

\documentclass[10pt,a4paper]{scrreprt}

\usepackage{fontspec}
\usepackage[showframe]{geometry}

\geometry{top=2cm,left=1cm,right=1cm,bottom=1cm}

\begin{document}

\vspace*{737.6pt}
\begin{tabular}{ll}
\hline
X & 0 \\
\hline
\end{tabular}

\end{document}


How do I prevent the page body from exceeding the page bottom using the geometry package, independently of the body content?

• Well with your code you are forcing the tabular out of the page. But beside this, see tex.stackexchange.com/a/373120/2388 May 28, 2021 at 11:00
• @UlrikeFischer For the MWE, \maxdepth=0pt generates a new page with the same behaviour. When applying it to my actual (longer) document, there is no difference. The longtable cell still overflows the page bottom. Guess I will have to re-adjust the MWE. Should I edit the question or create a new one? May 28, 2021 at 12:48
• Well yes, as I said, your page is too large, and so you are forcing an overflow. May 28, 2021 at 13:46