Why is that? Shouldn't they both be 2cm
x2cm
in size?!
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\resizebox{2cm}{2cm}{\rule{6cm}{7cm}}
\resizebox{2cm}{2cm}{\begin{tabular}{l l}A&B\\C&D\end{tabular}}
\end{document}
scalingtables
Why is that? Shouldn't they both be 2cm
x2cm
in size?!
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\resizebox{2cm}{2cm}{\rule{6cm}{7cm}}
\resizebox{2cm}{2cm}{\begin{tabular}{l l}A&B\\C&D\end{tabular}}
\end{document}
Best Answer
You want
\resizebox*
not\resizebox
the latter scales the height whereas the former scales height + depth. A tabular is vertically centred so the height is half its vertical extent.