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 am following the tutorial in the tiKz and PGF manual v3.0.0 with the following LaTeX commands:

\begin{tikzpicture}[scale=3][>=latex']
    \clip (-0.1,-0.2) rectangle (1.1,1.51);
    \draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);
    \draw[->] (-1.5,0) -- (1.5,0);
    \draw[->] (0,-1.5) -- (0,1.5);
    \draw (0,0) circle [radius=1cm];
    \filldraw[fill=green!20,draw=green!50!black] (0,0) -- (3mm,0mm)
    arc [start angle=0, end angle=30, radius=3mm] -- cycle;
    \draw[red,very thick] (30:1cm) -- +(0,-0.5);
    \draw[blue,very thick] (30:1cm) ++(0,-0.5) -- (0,0);
    \path [name path=upward line] (1,0) -- (1,1);
    \path [name path=sloped line] (0,0) -- (30:1.5cm);
    \draw [name intersection={of=upward line and sloped line, by=x}]
    [very thick,orange] (1,0) -- (x);
\end{tikzpicture}

I have included the \usetikzlibrary{intersections} but I still get the following error:

 ! Package pgfkeys Error: I do not know the key '/tikz/name intersection' and Iam going to ignore it. Perhaps you misspelled it. See the pgfkeys package documentation for explanation.Type H <return> for immediate help.... ...on={of=upward line and sloped line, by=x}]

I am using TeXMaker v4.1.1 on a Windows 7 64-bit computer and Any suggestions?

share|improve this question
2  
Use name intersections={...}. You missed the last s. –  Jesse Jan 16 at 6:56
    
Add \usetikzlibrary{intersections} too. –  Harish Kumar Jan 16 at 13:07
    
@Jesse Please, make that an answer ;) –  tohecz Jan 29 at 18:00
    
@tohecz -- I just did. Thank you for your kindness. –  Jesse Jan 29 at 18:24

1 Answer 1

The name intersections={...} has an s with it and you missed the last s. After adding the s with Harish Kumar's comment requiring \usetikzlibrary{intersections}, you will get what follows.

enter image description here

Code

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections}
\begin{document}

\begin{tikzpicture}[scale=3][>=latex']
    \clip (-0.1,-0.2) rectangle (1.1,1.51);
    \draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);
    \draw[->] (-1.5,0) -- (1.5,0);
    \draw[->] (0,-1.5) -- (0,1.5);
    \draw (0,0) circle [radius=1cm];
    \filldraw[fill=green!20,draw=green!50!black] (0,0) -- (3mm,0mm)
    arc [start angle=0, end angle=30, radius=3mm] -- cycle;
    \draw[red,very thick] (30:1cm) -- +(0,-0.5);
    \draw[blue,very thick] (30:1cm) ++(0,-0.5) -- (0,0);
    \path [name path=upward line] (1,0) -- (1,1);
    \path [name path=sloped line] (0,0) -- (30:1.5cm);
    \draw [name intersections={of=upward line and sloped line, by=x}]   % <-- Here
    [very thick,orange] (1,0) -- (x);
\end{tikzpicture}

\end{document}
share|improve this answer

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.