I have an image and want to scale it to the full page size. I know, I can use \includegraphics[width=\textwidth]{...}
to scale an image to the full page width (or \rotatebox{90}{\includegraphics[height=\pagewidth]{...}}
in case the image needs to be turned 90 degrees). But the problem is that my images then use more space than the height of the page.
I have also tried to do \includegraphics[height=\textheight]
and actually that also worked, but this opens two problems:
- I have to guess for each image whether the height or the width will be the limiting factor and
- there is no more space for the image caption. This means, I get an overfull box unless I reduce the height manually, but I have to guess the factor for each image.
What I'd really appreciate is to say that I want such an image to be scaled as much as possible, keeping the aspect ratio but small enough that the caption also fits into the page. Is there a good way to achieve this?
I am using the scrbook
class, should that make any difference.
Best Answer