I've been trying for a while to get the angle working, but it's not displaying correctly. I get this instead:
The angle is not correctly labeled. I get the following error messages (all on that line):
Missing \endcsname inserted.
Package xcolor Error: Undefined color "$\theta $"'.
Missing \endcsname inserted. (again)
Runaway argument?
Package xcolor Error: Undefined color "$\theta $"'. (again)
Package xcolor Error: Undefined color "$\theta $"'. (again)
I have no idea how to solve this, the other page I looked at had this work, so I don't know what to do. Any help would be appreciated.
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{angles, quotes}
\begin{document}
\begin{figure}
\caption{Enhetscirkeln}
\label{Enhetscirkeln}
\begin{center}
\begin{tikzpicture}
\coordinate (origo) at (0, 0);
\draw[gray, thick] (origo) circle (50pt);
\draw[black, thick] (origo) -- node[above, black, rotate = 30] {$r = 1$} (43.3pt, 25pt) node (r) {};
\draw[gray, thin, ->] (origo) -- (75pt, 0) node (x) {} node[below] {$x$};
\draw[gray, thin, ->] (origo) -- (-75pt, 0);
\draw[gray, thin, ->] (origo) -- (0, -75pt);
\draw[gray, thin, ->] (origo) -- (0, 75pt) node[right] {$y$};
\pic [draw, ->, \dq$\theta$\dq, angle eccentricity=1.5] {angle = x--origo--r};
\end{tikzpicture}
\end{center}
\end{figure}
\end{document}
\dq
is - it is not working.quotes
needs to be in quotes like this:\pic [draw, ->, "$\theta$", angle eccentricity=1.5] {angle = x--origo--r};