I'm trying to vertically fill the whole height of a page with 3 evenly spaced boxes. This is what I have now
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage[many]{tcolorbox}
\usepackage{calc}
\usepackage{lipsum}
\newlength{\boxheight}
\setlength{\boxheight}{136.80573pt}
\newlength{\vertspace}
\setlength{\vertspace}{(\textheight - 3\boxheight)/2 - 7pt}
% ----------------
\begin{document}
\begin{tcolorbox}[sharp corners, draft]
\lipsum[1]
\end{tcolorbox}
\vspace{\vertspace}
\begin{tcolorbox}[sharp corners]
\lipsum[1]
\end{tcolorbox}
\vspace{\vertspace}
\begin{tcolorbox}[sharp corners]
\lipsum[1]
\end{tcolorbox}
\end{document}
the -7pt
in the definition of \vertspace
is the vertical space between two boxes given by a new paragraph. As you can see there's still a little bit of space left at the bottom, but I'm not sure why. Even if I use \vfill
, the space at the bottom remains.
How should I calculate \vertspace
? Is there a better way to go about it?
\vfill
? – Phelype Oleinik Jun 19 '19 at 20:30