[Tex/LaTex] Put text to the right of figures

captionsfloatsnumbering

How can I display text to the right of figure, vertically centered? "Caption" is only displaying text below it, as it seems to me.

Best Answer

You can use the sidecap package and the c (centered) option for \sidecaptionvpos:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{sidecap}

\sidecaptionvpos{figure}{c}

\begin{document}

\begin{SCfigure}
  \centering
  \includegraphics[height=7cm]{name}  
  \caption{text text text text text text text text text text text text text text text text text text text text text text text text text text text text text}
\end{SCfigure}

\end{document}

enter image description here

If the captions should always appear to the right, you can use the rightcaption package option:

\usepackage[rightcaption]{sidecap}

Another option, using \capbeside, from the powerful floatrow package this time:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{floatrow}

\begin{document}

\begin{figure}
\floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,center},capbesidewidth=4cm}}]{figure}[\FBwidth]
{\caption{A test figure and its caption vertically centered side by side}\label{fig:test}}
{\includegraphics[width=5cm]{name}}
\end{figure}

\end{document}

enter image description here

The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

Related Question