When I compile this MWE, I get a box that takes up about 80% of a vertical page. Since I have specified max height=0.4\textheight
in adjustbox
, I'd expect a box half the size… is geometry
not changing \textheight
?
\documentclass[a4paper,10pt]{article}
\usepackage[landscape,hmargin={1.2cm,1cm},vmargin=1cm,footskip=7mm]{geometry}
\usepackage{adjustbox}
\usepackage{boxedminipage}
\begin{document}
\begin{adjustbox}{max width=\textwidth,max height=0.4\textheight,keepaspectratio}
\begin{boxedminipage}{70cm}
\ \vspace{70cm}\
\end{boxedminipage}
\end{adjustbox}
\end{document}
Best Answer
\textheight
is changing as you can verify by adding theverbose
option togeometry
and looking in the log file. The problem is theadjustbox
command. Changingmax height
tomax totalheight
gives the desired behaviour.If you do the following
then the log file will show that your boxed minipage has height
1001.74644pt
and depth996.74644pt
so its total height is about twice its height. (The values are close to being such that the box is vertially centered with respect to the middle of the current row.)boxedminipage
is just likeminipage
, so you can give it positioning arguments: a\begin{boxedminipage}[b]
results in a box with zero depth and full height;\begin{boxedminipage}[t]
results in a box with height0.4pt
and (nearly) full depth (the0.4pt
comes from the frame). So instead of usingtotalheight
, you could use