# Landscape caption for a rotated figure in a portrait page

I've managed to rotate an image 90 degrees to be as if in landscape mode, but I still need to change location and rotation of the caption to match the image's orientation, while keeping the page in portrait mode (headers, pagination...etc). I use memoir AND caption package (yes I know it emulates caption functionality).

The caption options:

\usepackage{caption}
\captionsetup{font=small,labelfont=bf}


The figure environment:

\begin{figure}[htbp]
\centering
\includegraphics[width=17cm,angle=90]{./Images/1-PsychrometricChart}
\caption[The Psychrometiric Chart]{The Psychrometric Chart \cite{szokolay08} \label{PsychroChart}}
\end{figure}


Addendum: An option that defines two cases of the image being placed on either the recto or verso pages would be a major plus, after all the image could be placed on either for many reasons. Let's say if it's on the recto page it faces the right margin, and if on the verso page faces the left margin.

-

You can save the figure + caption in a box and then rotate the box, or use the sidewaysfigure environment from the rotating package. It puts the figure on its own page. For a small figure you can use the \rotcaption command to rotate the caption.

\documentclass{memoir}
\usepackage{caption}
\captionsetup{font=small,labelfont=bf}
\usepackage{graphicx}
\usepackage{rotating}

\newsavebox{\savefig}
\begin{document}

Save the figure + caption in a box and rotate
\begin{figure}[htbp]
\centering
\savebox{\savefig}{\rule{8cm}{5cm}}
\rotatebox{90}{%
\begin{minipage}{\wd\savefig}
\usebox{\savefig}
\caption{Rotated saved box}
\end{minipage}}
\end{figure}

Just rotate the caption
\begin{figure}[htbp]
\hfill
\rule{5cm}{8cm}%
\hspace{\abovecaptionskip}%
\begin{minipage}[b][8cm][c]{2\baselineskip}
\rotcaption{Just rotate caption}
\end{minipage}
\hfill\mbox{}
\end{figure}

Use the sidewaysfigure environment
\begin{sidewaysfigure}
\centering
\rule{15cm}{10cm}
\caption{A sideways figure}
\end{sidewaysfigure}

\end{document}

-
This wasn't part of the OP but, how about adding an option for verso and rectum pages? If it's on the right it faces the right margin and vice versa. –  Ayman Elmasry Mar 1 '12 at 9:27
@Ayman Elmasry: with sidewaysfigure it is possible but will require a substantial amount of coding. If you use the saved box option it is not that difficult –  Danie Els Mar 1 '12 at 10:08
@Ayman Elmasry: I forgot about it, but the sidewaysfigure automaticaly changes rotation if the twosided class option is selected. So it allready does what you are asking for, you must just run Latex twice to get the right orientation. –  Danie Els Mar 1 '12 at 15:30
I guess it makes sense that way. –  Ayman Elmasry Mar 1 '12 at 22:19