I'm trying to insert a graphic and stretch it to textwidth and textheight. I get a overfull box and an empty page befor the graphic. But it works when I only strech in horizontal reps vertical direction. Why I can't stretch in both directions?
This works as I want
\documentclass[]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{mwe}
\setlength{\parindent}{0pt}
\pagestyle{empty}
\begin{document}
\includegraphics[height=\textheight]{example-image-a}
\end{document}
But this yields an overfull vbox and an empty page
\documentclass[]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{mwe}
\setlength{\parindent}{0pt}
\pagestyle{empty}
\begin{document}
\includegraphics[height=\textheight, width=\textwidth]{example-image-a}
\end{document}
The only difference is the width=\textwidth
.
Best Answer
The issue appears to be one of roundoff. Changing
to
fixes the problem, whereas an extra
9
,breaks it again. Such roundoff issues should not be too surprising, if one considers that constraining both the height and width is not a pure scale, but will require several constrained length multiplications in order to determine the final aspect and dimensional scale.
This MWE demonstrates the issue: