[Tex/LaTex] Wrap figure within a float

floatswrapwrapfigure

In the textbook I am writing, there are some floating boxes with text (I used tcolorbox to define them). I need to place a small picture in some of these boxes, with text wrapping around them.

To wrap around figures, I use the package wrapfig, but apparently it doesn't allow to wrap within floats. Any solution to suggest?

Best Answer

You have given no information about what you tried, or what error message you got, so I can only note that wrapfigure works fine in floats.

enter image description here

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