I am currently using the shaded
environment from the framed
package for large calculation digressions in my papers.
\usepackage{framed}
\newenvironment{digression}[1]{\begin{shaded} \noindent\textbf{\sc {#1}\\} }{ \end{shaded} } % or snugshade
\definecolor{shadecolor}{gray}{0.9}
Unfortunately, when I try to include a figure within such a digression, I get the error ! LaTeX Error: Float(s) lost.
I'm using tikz right now, but ideally I'd like it to be in a wrapfigure since it's such a small figure..
Best Answer
Since
figure
s are floating in nature, you can't use them inside a static environment. But the reverse can be done as in: