I'm trying to draw the arc of an angle between two lines in tikz. I'm using the angles library and have pretty much copied the example from the manual, but when I try to label the arc, I get the following error:
! Missing \endcsname inserted.
<to be read again>
\theta
l.29 ...c [draw, "$\theta$", angle eccentricity=3]{angle=P--V--Q};
I am following the syntax from this answer. But I have the same trouble using the syntax from the manual pg 570.
Removing the label allows me to draw the arc no trouble. But I would really like to put a theta in my diagram. I thought it might be an escaping issue so I tried labelling with "$t$", and then "t". In the last case the error tells me tikz doesn't know of the label t.
my drawing code is below
\documentclass[border=20pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,angles}
\begin{document}
\begin{tikzpicture}
\def \radius{3.5}
\coordinate (V) at ($(0,0)!\radius cm!rand*45:(0,\radius)$);
\path (-\radius, 0) coordinate(P) --
coordinate[midway](O)
(\radius, 0) coordinate(Q);
% Draw semicircle
\draw (Q) arc(0:180:\radius1);
\draw[shorten <=-5mm, shorten >=-5mm] (P) -- (Q);
%draw an arc starting at [partway from V to Q], to[ partway from V to P]
\draw [color=blue] (P)--(V)--(Q);
\pic [draw, "$\theta$", angle eccentricity=3] {angle=P--V--Q};
\node at (O) [below] {$O$};
\node at (P) [below] {$P$};
\node at (Q) [below] {$Q$};
\node at (V) [above] {$V$};
\foreach \p in {O,P,Q, V}{
\fill (\p) circle (1pt);
}\
\end{tikzpicture}
\end{document}



\usetikzlibrary{calc,angles,quotes}. Then it processes normaly. – Roland Feb 15 '21 at 23:57