I'm trying to get text to wrap around my figure. This works fine in the main body of my text, but when I put it inside an \fcolorbox the text simply overwrites the image. I've reduced my code to the example below. Being new here I apologize if I'm doing this wrong, but I don't see a link to upload a file, so I'm hoping people can reproduce this using any image file they have lying around.
\documentclass{book}
\usepackage{graphicx} % Allows graphics to be imported
\usepackage{wrapfig} % Allows figures to go on the side of the page with text wrapping around them
\usepackage[usenames,dvipsnames]{color} % An easy way to get shaded boxes
\definecolor{light-gray}{gray}{0.8} % Defines the color we're using for shaded boxes
\begin{document}
\fcolorbox{black}{light-gray}{\begin{minipage}{\columnwidth}\parskip=6pt
Some text
\begin{wrapfigure}{r}{.2\textwidth}
\vspace{-15pt}
\begin{center}\includegraphics[width=.18\textwidth]{latexchapters/vectorsfigures/simplepath.png}\end{center}
\vspace{-15pt}
\end{wrapfigure}
{\it Answer:} To find the potential at $(x,y)$ we evaluate a line integral from the origin to $(x,y)$. For simplicity we use the path shown on the right, first going from $(0,0)$ to $(x,0)$ and then from there to $(x,y)$. Along the first segment only $f_x$ contributes, and since $y=0$, $f_x=1$ and the line integral equals $x$. Along the second segment only $f_y$ contributes, and $x$ is constant but $y$ is not, so we get $x\int_0^ye^{\tilde{y}}d\tilde{y} = xe^y-x$. Combining the two segments we find $\int_C\vec{f}=xe^y$. Remember that the gradient theorem just relates line integrals to gradients, but the definition of potential we use includes an additional minus sign, so $V(x,y)=-xe^y$.
\end{minipage}}
\end{document}
