7

I have a code for putting a figure:

\begin{figure}
\includegraphics{some_narrow_and_tall_image.pdf}
\caption{caption of the figure which can be pretty long}
\end{figure}

The page format is single-column. Right now the caption appears below the image, as expected from this code. I would like to set it up so that the caption is on the right hand-side of the image. Is that possible?

5

You can use the floatrow package to do this.

\documentclass{article}
\usepackage[capbesideposition=right]{floatrow}
\begin{document}
\begin{figure}
\fcapside
  {\caption{A nice figure.}} 
  {\rule{4cm}{4cm}} %Replace with image
\end{figure}
\end{document}

Which yields:

enter image description here

1

Here's another solution with rotating:

\documentclass{article}

\usepackage{rotating}

\begin{document}
\begin{figure}
    \begin{minipage}{.75\textwidth}
        \rule{8cm}{4cm} %Replace with image
    \end{minipage}  
    \begin{minipage}[]{.15\textwidth}
        \rotcaption{A nice figure.}
    \end{minipage}
\end{figure}
\end{document}

Here, the placement on the side itself is solved using minipage environments. The advantage over the answer by Ian Thompson is that the caption is rotated, which I think is better if it's long.

See resulting output below:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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