# How to rotate (exclusively) the caption of a Figure?

I am trying to rotate only the caption of a figure, because the contained picture contains a large workflow that stretches out vertically to perfectly fit a page. However there is no space left under the figure, so I want to rotate the caption by 90 degrees and place it to the left (or right) of the figure.

Most posts that I could find in in SE are related to rotate the figure (e.g. using sidewaysfigure) but not exclusively the caption. Note that the caption is relatively large which means I really want a rotation here and not just place it to the right or left using e.g. capbeside.

Here is an example of what I am trying to get (black box is representing the included graphic):

Hope that my problem is clear

-Jones

• You might try to use a landscape page and rotate your image. – beardhatcode Jul 12 '17 at 9:48
• @beardhatcode I thought about this but I need to print this (It is part of a large document). Knowing all my local printing offices, I know that this will create a horrible mess. Besides, the page headings will be placed in landscape, too. Nonetheless thanks for the hint. – Jones Jul 12 '17 at 9:51
• Use the sidewaysfigure environment. – Bernard Jul 12 '17 at 9:59
• This might help: tex.stackexchange.com/questions/44427/… – StefanH Jul 12 '17 at 10:00
• Please note my comment: I do NOT want to rotate the figure but only the caption. I updated the example to make it clearer. – Jones Jul 12 '17 at 10:08

Like this:

\documentclass{article}
\usepackage{graphics}
\usepackage{array}

\begin{document}
\begin{figure}
\refstepcounter{figure}
\begin{tabular}{c c}
\includegraphics[valign=m]{example-image-a}
&
\rotatebox[origin=c]{90}{Figure~\thefigure: My rotated caption}
\end{tabular}
\end{figure}

\begin{figure}
\includegraphics{example-image-b}
\caption{Standard caption}
\end{figure}
\end{document}

• Thanks for the nice example. Just in case anyone else has problems with long text captions: Put a \parbox in the \rotatebox, to get nice linebreaks. – Jones Jul 12 '17 at 14:00

Had this problem myself and found another solution for it. I know this is not the OP's ideal option, but it seems simpler and it worked for me, so it might for others too. The idea is that you can create a landscape page, and within that landscape page, you rotate just the image alone by 90 degrees, so that it returns to portrait orientation. The caption will simply remain in landscape mode beside it. Try this:

\documentclass{book}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{lscape}
\usepackage{lipsum}

\begin{document}

\newgeometry{left=1.5cm, right=1cm, top=1.5cm, bottom=1.5cm} % Play around with margins, if necessary
\begin{landscape}
\begin{figure}[p]
\centerline{
\includegraphics[width=8cm, height=22cm, angle=-90]{example-image-c}}
\caption[My short caption]{\lipsum[2]}
\label{fig:mylabel}
\end{figure}
\end{landscape}
\restoregeometry

\end{document}


Try with this:

\documentclass{book}
\usepackage{rotating}
\begin{document}

\begin{figure}
\fbox{\vbox to 15pc{\hbox to 10pc{Test}}}%%insert your figure here
\begin{sideways}
\begin{minipage}{10pc}
{\caption{caption test}}
\end{minipage}
\end{sideways}
\end{figure}

\end{document}