将标题环绕在图片周围,并将文本环绕在此结构周围

将标题环绕在图片周围,并将文本环绕在此结构周围

包装wrapfigure将捕获内容与图像对齐,标题很大。由于细节很少,制作全尺寸图片没有多大意义,所以我想用标题和文字包裹图像。我想在草图中看到类似的东西:


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

|...................||.一....||...........................................|

|..文本...........||.p....||....图像...........................|

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

|...................||.我....||...........................................|

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

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

|...................||.........标题...............................|

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

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

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

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

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

|___________________________________________|

答案1

我不确定,但你的意思是这样的吗:

在此处输入图片描述

\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}

相关内容