5

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...............................|

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

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

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

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

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

|___________________________________________|

5

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

enter image description here

\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}
\advance\count0 1
\advance\dimen2-\baselineskip
\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}

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.