[Tex/LaTex] How to rotate (exclusively) the caption of a Figure

captionsfloatsrotating

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):

enter image description here

Hope that my problem is clear

-Jones

Best Answer

Like this:

enter image description here

\documentclass{article}
\usepackage[export]{adjustbox}
\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}