Boxes – Setting a Minimum Height for a Parbox

boxes

I'm looking for a way to make it so that my \parboxes keep a minimum height, similar to CSS min-height, e.g.

\mhparbox{\textwidth}{3cm}{...}

would ensure that whatever text appears in place of ..., the resulting box will at least take up 3cm of vertical space. Does a package to that effect exist or is there maybe a solution using \savebox?

Best Answer

enter image description here

\documentclass{article}

\begin{document}



    \sbox{0}{\parbox{.5\textwidth}{one two three}}
    \ifdim\dimexpr\ht0+\dp0<3cm 
    \dp0\dimexpr3cm-\ht0\fi

    \fbox{\usebox{0}}


\end{document}