![将图形包裹在浮动框内](https://linux22.com/image/363640/%E5%B0%86%E5%9B%BE%E5%BD%A2%E5%8C%85%E8%A3%B9%E5%9C%A8%E6%B5%AE%E5%8A%A8%E6%A1%86%E5%86%85.png)
在我正在编写的教科书中,有一些带有文本的浮动框(我使用 tcolorbox 来定义它们)。我需要在其中一些框中放置一张小图片,并在它们周围环绕文本。
为了环绕图形,我使用了包wrapfig
,但显然它不允许在浮点数内环绕。有什么解决方案可以建议吗?
答案1
您没有提供任何有关您尝试过什么或收到什么错误消息的信息,所以我只能注意到wrapfigure
在浮点数中它可以正常工作。
\documentclass{article}
\usepackage{wrapfig,graphicx}
\begin{document}
\begin{figure}[pth]
\begin{wrapfigure}{r}{2cm}
\includegraphics[width=1.5cm]{example-image}
\end{wrapfigure}
one two three four one two three four one two three four
one two three four one two three four one two three four
one two three four one two three four one two three four
one two three four one two three four one two three four
one two three four one two three four one two three four
one two three four one two three four one two three four
one two three four one two three four one two three four
one two three four one two three four one two three four
one two three four one two three four one two three four
\caption{zzzz}
\end{figure}
\end{document}