Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to wrap text around a TikZ image using the wrapfigure package, but it doesn't seem to be working--the document compiles, but the image is pushed down with new text. The error I get on the log is that wrapfigure is being used in a conflicting environment. I'm not quite sure how to resolve this and I would appreciate any help.

Here's my code:

\documentclass[a4paper,12pt]{article}

\usepackage{outlines}
\usepackage{tensor}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage[top=2cm, bottom=1.3cm, left=3cm, right=2.0cm]{geometry}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{wrapfig}
\pagestyle{empty}

\begin{document}
\section*{Chapter 3 Problems}
\begin{outline}[enumerate]
  \1 A car is driven 215 km west and then 85 km southwest. What is the displacement of the car from the point of origin (magnitude and direction)? Draw a diagram.
  \begin{wrapfigure}{l}{0.5cm}
  \begin{tikzpicture}
    \draw[<->,thick] (-3,0) -- (1,0);
    \draw[<->,thick] (0,-2) -- (0,1);
    \draw[step=0.25cm,gray,very thin] (-3,-2) grid (1,1);
    \draw[red,very thick,<-] (-2,0) -- (0,0);
    \draw (-1,0.15) node [font=\tiny] {215 km};
    \draw[blue,very thick,->] (-2,0) -- (-2.5591,-1);
    \draw (-2.1,-0.5) node [rotate=57,font=\tiny] {85 km};
    \draw (-2.22,0) arc (180:225:0.3);
    \draw[black,thick,->] (0,0) -- (-2.5591,-1);
    \draw (-1,0) arc (180:225:0.5);
    \draw[orange,very thick,dashed] (-2.5591,0) -- (-2.5591,-1);
    \draw[green,very thick,dashed] (-2,0) -- (-2.5591,0);
  \end{tikzpicture}
  \end{wrapfigure}
    \2 [] Displacement in the \textit{y}:
      \3 [] \textit{D}$_y$  
\end{outline}

\end{document}

Thanks in advance!

share|improve this question
    
I don't think you can use wrapfigure inside outline or similar enumerate environments. This is basically what the "conflicting environment" is most likely about. –  Martin Scharrer Jun 23 '11 at 23:58
    
Okay, I'll take it out of the outline environment to see if wrapfigure will work (although I needed it there). –  Halime Jun 24 '11 at 0:12
    
So outline does conflict with wrapfigure... –  Halime Jun 24 '11 at 0:17
add comment

1 Answer

You can use picins instead of wrapfig but like outlines picins is not in texLive.

I use

  \parpic[r]{%
    \begin{tikzpicture}
    ...

with your example.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.