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!
Best Answer
You can use
picins
instead ofwrapfig
but likeoutlines
picins
is not in texLive.I use
with your example.