I want to use the list of fractions flist
to label some angles. They will be in the place of the "A".
\begin{tikzpicture}
\edef\r{1}
\edef\anglist{{30,45,60,120,135,150,210,225,240,300,315,330}}
%\edef\flist{{\frac{\pi}{6}, \frac{\pi}{4}, \frac{\pi}{3}, \frac{2\pi}{3}, \frac{3\pi}{4}, \frac{5\pi}{6}, \frac{7\pi}{6}, \frac{5\pi}{4}, \frac{4\pi}{3}, \frac{5\pi}{3}, \frac{7\pi}{4}, \frac{11\pi}{6}}}
\foreach \a in{0,...,11}{
\pgfmathsetmacro{\tmp}{\flist[\ang]};
\draw[cycle1] (0,0)--({\r*cos(\anglist[\a])},{\r*sin(\anglist[\a])})node[pos=1.3]{$A$};
}
\end{tikzpicture}
I don't know where is the mistake, but the code above doesn't works.
\frac{a}{b}
is intended for typesetting a fraction, you seem to want to calculatea/b
.pgfmath
doesn't understand\frac
, but it does understand/
, so just use that.