title: How do I correctly insert an image/figure and have the text "flow around" the image/figure in latex?
body: <p>I've been struggling with this. I wanted to insert an image and have it 'near' the text that discusses it, but have the text on that page wrap/flow around the image.</p>
  
  <p>The image I've converted into eps format. I initially tried to use the figure environment (\begin{figure}...), but that merely placed the image at the top or bottom of the page without any text beside it, leaving a large portion of the page empty.</p>
  
  <p>I did some digging on the web and identified the 'wrapfig' package, it seemed a likely solution, but I get a series of errors, and the image appears at the end of the document.</p>
  
  <p>The errors:</p>
  
  <pre><code>
  Package wrapfig Warning: wrapfigure used inside a conflicting environment on input line 297.
  Package wrapfig Warning: Stationary wrapfigure forced to float on input line 303.
  Package wrapfig Warning: Stationary wrapfigure forced to float on input line 306.
  </code></pre>
  
  <p>Which continues for several lines.</p>
  
  <p>What's odd is that one occasion, after compiling, the image appeared exactly where I wanted it, and then on the next it didn't.</p>
  
  <p>[Added a minute or so later]
  The latex code I have currently:</p>
  
  <pre><code>\begin{wrapfigure}{r}{0.2\textwidth}[h]
    \begin{center}
      \includegraphics[width=0.18\textwidth]{vec-perp.eps}
    \end{center}
    \caption{A}
  \end{wrapfigure}
  </code></pre>