I'm trying to use a wrap fig to place an image next to some text. But when it compiles the image gets placed at the very end of the document several pages away from where it is supposed to be.
The LaTeX source I am using is:
\begin{solution}
(b) No: Because the graph looks like:
\begin{wrapfigure}{r}{0.5\textwidth}
\begin{center}
\includegraphics{4x4graph.png}
\end{center}
\end{wrapfigure}
The marked vertexes have odd degree. As you draw a path the degree of the start and end vertex decrease by 1, and every vertex on the path in between decrease by 2. This means that the only way to hit every edge, is for each of the odd degree vertices to be the start and end of a path, but as there are 5 strings, you can only start and end at 10 vertices and as there are 12 odd vertices 2 of them cannot be the start and end of a path, so it is not possible to make this graph.
\end{solution}
\documentclass
and the appropriate packages so that those trying to help don't have to recreate it.\documentclass
(usearticle
if you are not set on a class), and all the packages that are needed. For thegraphicx
you should use\usepackage[demo]{graphicx}
so that the example can be compiled without the image: .solution
is defined in terms of a list environment (which is the case if it's defined withntheorem
tools), thenwrapfigure
can't be used inside it.