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.

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

share|improve this question

1 Answer 1

up vote 9 down vote accepted

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.

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.