I discover that circuitikz is available in ConTeXt, and since it is way more complete than the circuits.ee.IEC tikz library, I am considering switching to it. However, I can't display a transformer core (I updated my context distribution this morning to be sure there wasn't an update). Here is my MWE :


\ctikzset{current=european, voltage=straight, resistor=european, inductor=american}

  \draw (0, 0) node [transformer core] (T) {};  % asking for node[transformer] (T) {} works

The demand for transformer core leads to the following error

Control sequence expected instead of undefined

Of course I can recreate the core symbol using the transformer anchors, but it seems silly since it is already defined in the library… Is there a simple fix for this problem ?

Thank you in advance


1 Answer 1


CircuiTikZ attempts to use the \pgfmoveto macro which has been deprecated since 2005. pgf loads the compatibility packages by default under LaTeX, but not under ConTeXt. So strictly speaking, this bug isn't exclusive to ConTeXt as the following LaTeX document gives the same error:


\usepackage[version=latest]{pgf}  % Works if this line is removed


  \draw (0, 0) node [transformer core] (T) {};

To fix this problem, you just need to provide appropriate definitions for \pgfmoveto and \pgflineto:


\let\pgfmoveto=\pgfpathmoveto  % Added
\let\pgflineto=\pgfpathlineto  % Added

    \node [transformer core] {};



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .