![将标题环绕在图片周围,并将文本环绕在此结构周围](https://linux22.com/image/266690/%E5%B0%86%E6%A0%87%E9%A2%98%E7%8E%AF%E7%BB%95%E5%9C%A8%E5%9B%BE%E7%89%87%E5%91%A8%E5%9B%B4%EF%BC%8C%E5%B9%B6%E5%B0%86%E6%96%87%E6%9C%AC%E7%8E%AF%E7%BB%95%E5%9C%A8%E6%AD%A4%E7%BB%93%E6%9E%84%E5%91%A8%E5%9B%B4.png)
包装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}