[Tex/LaTex] How to determine the height of a minipage

dimensionsheightminipage

If I have a minipage

\begin{minipage}{5cm}
content
\end{minipage}

How can I determine its height and save this value as a length?

Best Answer

\newlength\foo

\settoheight\foo{\begin{minipage.....

If you also want to typeset the minipage you may want to save it in a box and instead say

\settoheight\foo{\usebox\mybox}

rather than typesetting it twice once just for measuring purposes.