2

I am trying to compile this circuit:

\documentclass[10pt,a4paper]{article}
\usepackage{circuitikz}
\begin{document}

\begin{circuitikz} \draw
 (0,0) to[V=1<\volt>] (0,2)
 { to[R=1<\ohm>, color=red] (2,2) }
 to[C=1<\farad>] (2,0) -- (0,0) ;
\end{circuitikz}

\end{document}

But then I recive this error:

! Undefined control sequence.
\pgfk@/tikz/circuitikz/bipole/voltage/label/name ...
                                                  >
l.6  (0,0) to[V=1<\volt>] (0,2)

I copied this example verbatim from the manual (page 53, version 0.8.3). I compiled this using Tikz version 3.0.0 and circuitikz 0.3.0.

The circuitikz is completely outdated (running Debian Jessie) but I cannot dist-upgrade this system without breaking other things.

I downloaded circuitikzgit.sty from GitHub and placed it in the current working directory. Changed to

\usepackage{circuitikzgit}

but the problem remains exactly the same. The log file reports the inclusion of the new circuitikzgit.

As far as I can see, the only requirement for circuitikz is Tikz >= 3.0. Which it is. On this machine I have no other problems with Tikz and I am using features which are only available in Tikz 3.0.

I am not sure whether this is a version problem or something else.

0

1 Answer 1

5

You are missing the siunitx package. I suspected this because the units shown in the CircuiTikZ documentation are awfully similar to siunitx's: \kilo\ohm.

Section 1.5 of (my version) of the documentation says:

1.5 Requirements

  • TikZ, version ≥ 2;
  • xstring, not older than 2009/03/13;
  • siunitx, if using siunitx option.

and later it says:

• siunitx: integrates with SIunitx package. If labels, currents or voltages are of the form #1<#2> then what is shown is actually \SI{#1}{#2};

1
  • 1
    This was the fastest answer ever I have seen on tex.stackexchange. The voltage source now compiles correctly, but the next error is in the resistor. I'll have to post a new question with a new mwe for that. Jul 3, 2018 at 20:06

You must log in to answer this question.

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