# error of drawing angles by using tikz

I draw an angle：

\usetikzlibrary{angles,quotes}
\begin{tikzpicture}
\coordinate [label=above right:$A$] (A) at (1,1);
\coordinate [label=above left:$B$] (B) at (0,0);
\coordinate [label=below left:$C$] (C) at (1,0);
\draw (A) -- (B) -- (C) pic [draw] {angle};
\end{tikzpicture}


I get: Package pgfkeys Error: I do not know the key '/tikz/pics/angle' and I am going to ignore it. Perhaps you misspelled it. ...draw (A) -- (B) -- (C) pic [draw] {angle}.

How to solve it?

• It works for me! Aug 4 at 14:39
• Welcome to TeX.SX! Your code snippet is not a minimal working example (MWE). If I place it in a minimal document, I get no error and the expected output is shown. Aug 4 at 15:10
• I had placed it in a document,but I got the error "I do not know the key '/tikz/pics/angle'".Actually,I wonder know what does it means and how to solve the error. Aug 5 at 0:18

If I insert your code fragment into a small document, for example:

\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,
quotes}

\begin{document}
\begin{tikzpicture}
\coordinate [label=above right:$A$] (A) at (1,1);
\coordinate [label=above left:$B$] (B) at (0,0);
\coordinate [label=below left:$C$] (C) at (1,0);

\draw (A) -- (B) -- (C) pic [draw] {angle};
\end{tikzpicture}
\end{document}


I get the following result:

But I guess that you probably looking for the following result:

The MWE (Minimal Working Example) that produces the image above, unlike your code fragment, has angular coordinates explicitly defined by {angle=C--B--A}. Note, the order of those coordinates determine if angle mark is inside or outside drawn lines:

\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,
quotes}

\begin{document}
\begin{tikzpicture}
\coordinate [label=above right:$A$] (A) at (1,1);
\coordinate [label= left:$B$] (B) at (0,0);
\coordinate [label=right:$C$] (C) at (1,0);

\draw (A) -- (B) -- (C) pic [draw] {angle=C--B--A}; % <---
\end{tikzpicture}
\end{document}


There is also another(similar) approach using tkz-euclide package:

\documentclass{standalone}
\usepackage{tkz-euclide}
\tkzSetUpPoint[size=1,color=black,fill=black]
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{1/1/A,0/0/B,1/0/C}
\tkzDrawPoints(A,B,C)
\tkzDrawSegments(A,B B,C)
\tkzLabelPoint[above](A){A}\tkzLabelPoint[left](B){B}  \tkzLabelPoint[right](C){C}
\tkzMarkAngle[size=0.5](C,B,A)
\end{tikzpicture}
\end{document}


and the output: