2

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?

3
  • tcolorbox is not a float, but it is a tikzpicture. Oct 13, 2017 at 18:57
  • But you can make it a float by using the option float when defining the tcolorbox, can't you?
    – Massimo
    Oct 13, 2017 at 22:03
  • So does remove float fix the problem? Oct 13, 2017 at 22:11

1 Answer 1

2

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}
2
  • You're right, it works. I am embarassed. In this case I think I can delete the question...
    – Massimo
    Oct 13, 2017 at 18:24
  • @Massimo no harm done:-) Oct 13, 2017 at 18:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .