I have read wrapfigure inside a tikzpicture and although the title is similar the intent does not seem to be the same.
I want to have some text wrapping my figure/picture as in the example here : https://fr.overleaf.com/learn/latex/Inserting_Images with the mesh and the contour figures.
I have another constraint: I need to use the latex structure that I will add my text and figure into, which is already built for another purpose, consisting of a tikzpicture.
So if you see lots of packages there, they are here for a reason that doesn't appear in this short example. Except for wrapfig that I added to be able to use wrapfigure.
Here is the example I would like it to work:
\documentclass{article}
\usepackage{tcolorbox, graphicx, tikz, xfp, pgf, wrapfig}
\usetikzlibrary{decorations.pathmorphing}
\usepackage[paperwidth=1000pt, paperheight=1000pt, margin=100pt]{geometry}
\begin{document}
\begin{tcolorbox}[boxsep=0pt, left=0pt, right=0pt, top=0pt, bottom=0pt, sharpish corners, opacityframe=0, opacityback=0, boxrule=0pt]
\begin{tikzpicture}[x=1pt, y=1pt]
\draw[xshift=100, yshift=100] node[draw, dotted, anchor=south west, text width=500, align=justify, inner sep=\padding, fill=white] {
\begin{wrapfigure}{l}{0.25\textwidth}
\centering
\includegraphics[width=200pt]{example-image-a}
\end{wrapfigure}
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
};
\end{tikzpicture}
\end{tcolorbox}
\end{document}
My issue is that the text is going over the picture and not wrapping it.



tikzpictureinside thewrapfigure. In case it affects your text, then you probably need to have thetikzpictureseparated from both thewrapfigureand text while using an overlay. – Archange Oct 07 '21 at 06:44\usepackage[paperwidth=1000, paperheight=1000, margin=100]{geometry}– David Carlisle Oct 07 '21 at 07:01