Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 9 down vote accepted

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}
share|improve this answer
    
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
1  
@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

I'm new to LaTeX and the StackExchange, so I don't know whether I'm meant to be posting on an answered question, but here goes...

I'm having similar problems to the OP and have tried the code supplied by Danie Els, but I can't get it to work and I'm not sure why.

My requirements are pretty much the same, but I'll clarify what I'm trying to achieve. I need my image to be in landscape orientation on a portrait page with a caption that is in the same orientation as the image (i.e. landscape). However, I also need to automatically scale the image so that the image is as large as possible, whilst fitting within the page margins and allowing all the caption text to appear underneath the image.

Here's my code so far. This should work as a standalone. I've also included a link to my "decaychain" image file here.

Thanks for the help. Chris

\documentclass[12pt,a4paper]{report}
\usepackage{amsmath,graphicx}
\graphicspath{{./images/}}

\begin{document}

\begin{figure}
\centering
\includegraphics[scale=.35,angle=90]{decaychain}
\caption{Simplified decay series for the uranium and thorium decay chains (\(^{238}\text{U}\), \(^{235}\text{U}\) and \(^{232}\text{Th}\)), featuring the major short-lived intermediate daughters (\(t_\frac{1}{2}\) \(>\)300 ns).  In this configuration, the neutron number increases from left to right, whilst the number of protons decreases from top to bottom.}\label{fig:1}

\end{figure}

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.