1

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?

  • tcolorbox is not a float, but it is a tikzpicture. – John Kormylo Oct 13 '17 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 '17 at 22:03
  • So does remove float fix the problem? – John Kormylo Oct 13 '17 at 22:11
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}
  • You're right, it works. I am embarassed. In this case I think I can delete the question... – Massimo Oct 13 '17 at 18:24
  • @Massimo no harm done:-) – David Carlisle Oct 13 '17 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.