Why does the following test using \ifthenelse not compile:
\documentclass[border=30pt, tikz]{standalone} \usepackage{tikz,tikz-3dplot} \usepackage{ifthen} \usepackage{animate, calc}%%%%%%%%%%%% \usepackage{animate} \usepackage{circuitikz} \begin{document} \foreach \x in {0.1,0.2,...,4}{ \begin{tikzpicture} \begin{circuitikz} \draw (0,0) to[V,v=$U_q$] (0,2) % The voltage source to[short] (2,2) to[R=$R_1$] (2,0) % The resistor to[short] (0,0); \draw (2,2) to[short] (4,2) to[R=$R_2$] (4,0) to[short] (2,0); \ifthenelse{\x<2}{\fill[color=red] (0,\x) circle (3pt);}{} \end{circuitikz} \end{tikzpicture} } \end{document} On compilation I get the following error:
! Missing = inserted for \ifnum. <to be read again>