8

Suppose some text is put inside a fixed width box. The text will then continue in vertical direction. How can you measure the total height of that text?

Original text:

text text text text text 

Text in a box constrained to width of text text

text text
text text
text

How long is this?

+
|
+
16

You can make such a box and measure it directly.

\documentclass{article}
\usepackage{calc}
\newlength\foo
\begin{document}
\settototalheight\foo{\parbox{3cm}{text text text text text text text text text}}
\the\foo
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.