# Wrap caption around image and wrap text around this construction

Package wrapfigure aligns capture under the image and caption is big. Making a full size picture does not make to much sense due to a very little amount of details so I would like to wrap image and with caption and with text. I want to have something like in the sketch this:

|...................||.C....||...........................................|

|...................||.a....||...........................................|

|..Text...........||.p....||....Image.............................|

|...................||.t....||...........................................|

|...................||.i....||...........................................|

|...................||.o....||_________________________|

|...................||.n....|__________________________|

|...................||.........Caption...............................|

|...................|....................................................|

|...................|_______________________________|

|........................................................................|

|........................................................................|

|........................................................................|

|___________________________________________|

-
– Claudio Fiandrino Apr 17 '13 at 13:31

I'm not sure, but do you mean something like this:

\documentclass{article}

\usepackage[demo]{graphicx}
\usepackage{wrapfig}
\def\a{One two three four five six. }
\def\b{\a\a\a Red yellow green blue white black. }
\def\c{\b\a\b\b\b\par\b\b\a\b\b\par}

\begin{document}

\c

\begin{wrapfigure}{r}{7.5cm}

\sbox{0}{\includegraphics{file}}

\dimen0=\dimexpr\linewidth-\wd0-1em\relax
\count0=1
\dimen2=\ht0
\def\pshape{}
\loop
\edef\pshape{\pshape\space0pt \the\dimen0 \space}
\ifdim\dimen2>0pt
\repeat

\itshape
\parshape = \the\count0
\pshape
0pt \the\linewidth
\leavevmode\smash{\rlap{\kern\dimexpr\dimen0+1em\relax\raise-\ht0\box0}}%
The caption goes here it is a very long caption that
goes on and on and on and wraps around the picture
The caption goes here it is a very long caption that
goes on and on and on and wraps around the picture

\end{wrapfigure}
\a\a\a\c\b\b\c\c\c

\end{document}

-