I'm trying to add a sidewaysfigure to my document, but when I set the width to \textwidth
it comes out too wide.
This is my code:
\usepackage{rotating}
\begin{sidewaysfigure}
\centering
\begin{minipage}{\textwidth}
\caption{The caption}
\includegraphics[width=\textwidth]{img/diagramm_hs.png}\\
\source{The source}
\label{fig:diagramm_hs}
\end{minipage}
\end{sidewaysfigure}
As you can see, the image is wider than the textwidth (textwidth
is as wide as the line in the header), especially with the caption and source.
How can I make the image as large as possible on the page while everything, including caption and source, remain in the textarea?
EDIT: The image dimensions are 1327×960 px.
This is my documentclass:
\documentclass[
paper=A4,
fontsize=12pt,
BCOR12mm,
DIV14,
parskip=half*,
headsepline,
listof=totoc,
footinclude=false,
headinclude=true,
final
]{scrartcl}
Best Answer
First, the original
\textwidth
is lost usingsidewaysfigure
. Second, I needed to test if the total figure was too big. Finally, I needed the image height using[width=\textwidth]
in order to determine what[height=]
should be to compensate.I tested
\listoffigures
to make sure only one caption showed up.