I am relatively new to LaTeX so I don't really know where to start with this one...
I have two (sub)figures, landscape. I would like the figures and associated caption to stretch to fill the width of the text on the page. Of course, I could adjust the size of the figures with the height/width options in the includegraphics commands, but (a) this is tedious and (b) if I change the caption, I have to readjust the size of the figures, which is tedious.
Is there a way to get the size of the figure to automatically adjust to fill the width of the page?
Many thanks!
Laura
Code: Select all
\documentclass[a4paper, 11pt]{article}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{rotating}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO]{Header text}
\begin{document}
\begin{sidewaysfigure}
\centering
\subfloat[Subcaption]{\includegraphics[height=0.5\textheight{file}}
\hfill
\subfloat[Subcaption]{\includegraphics[height=0.5\textheight]{file}}
\caption{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean hendrerit dui. Proin interdum semper augue. Quisque consequat, lacus eget euismod interdum, lorem sapien rutrum augue, quis lacinia justo augue quis mauris. Etiam vel ante in dui malesuada iaculis. Maecenas arcu sem, tristique sed, mollis in, elementum at, ipsum. Aenean imperdiet. Donec libero. Ut diam. Vestibulum id dui quis libero auctor congue. Cras tortor. Fusce a lorem in tellus fringilla lobortis. Suspendisse ac risus. Suspendisse a est non nisi gravida sodales. Suspendisse potenti. Sed iaculis diam sed justo. Integer dapibus leo a nisl. Nunc dui eros, faucibus et, luctus non, ornare sed, mi. Morbi vitae metus eu felis condimentum aliquam. Aliquam placerat.}
\label{fig:plot}
\end{sidewaysfigure}
\end{document}