Hi looking to understand this a little better. Why does adjustbox
not resize the text in the following example so that it fits the dimensions I think I'm specifying. e.g a 4in x 4in box. Am I doing something wrong and how do I fix it?
\documentclass{article}
\usepackage{lipsum}
\usepackage{adjustbox}
\begin{document}
\begin{adjustbox}{frame,max height=4in,max width=4in}
\parbox{4in}{
\lipsum[1-3]}
\end{adjustbox}
\end{document}
Best Answer
Boxes in
TeX
have both height and depth. We can enquire about the dimensions of the box in question as follows.In this way, we obtain a height of
204.97221pt
and a depth of209.97223pt
. Since1in=72.27pt
, this means that the height and depth of the box are approximately2.84in
and2.91in
, respectively. Consequently, settingmax height=4in
has no effect. According to page 5 of the adjustbox package manual,totalheight
isheight
plusdepth
, so if you want the actual height of the box on the page to be restricted to4in
you should usetotalheight
in place ofheight
. To make the width of the box remain the same (so the aspect ratio of the box changes), you need to setwidth
andtotalheight
.