tags:

views:

109

answers:

0

I have defined an environment :

\newenvironment{exemple}%
{%
\par
\stepcounter{exemple}
\setlength{\leftmargin}{\exlen}
\setlength{\parindent}{0pt}
\advance\linewidth -\leftmargin
\advance\@totalleftmargin\leftmargin
\@setpar{{\@@par}}%
\parshape 1 \@totalleftmargin \linewidth
\ignorespaces
\hspace{-\exlen}{\bf Exemple \arabic{chapter}.\arabic{exemple}:}~~\small
}%
{\par}

This environment works fine when I use it alone but when I try to put a figure, using wrapfigure, inside it I got a warning "wrapfigure used inside a conflicting environment" followed by "Stationary wrapfigure forced to float" and the figure appears at the end of the document.

Is it possible to modify the environment exemple so that it will not be in conflict with wrapfigure?

Or is there another way to wrap text on the side of a figure?

Thanks alot.