# circuitikz pnp transistor; control sequence undefined

I'm using the Circuitikz package to draw a circuit which has a pnp transistor. The editor I use is TexStudio. It gives me the following error:

! Undefined control sequence.
\pgfsetcolor {\pgfkeysvalueo...
l.10 ;

The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), typeI' and the correct spelling (e.g., I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

I created a MWE. If I compile the empty document, and then with the drawing of the pnp transistor, it still compiles, draws the transistor, and gives me the error. When I don't compile it beforehand (so there's no preview open) and then try to compile with the drawing of the pnp transistor, it gives me the error and doesn't compile.

MWE

\documentclass{article}
\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}
\draw
(0,0) node [pnp] {node}
;
\end{circuitikz}
\end{document}


Also, the following (which is just a node, not a pnp transistor) works fine:

\documentclass{article}
\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}
\draw
(0,0) node {node}
;
\end{circuitikz}
\end{document}


I don't see why it gives me the error, I did what was in the Circuitikz manual (page 22). All code from other people on the internet, and examples I find, is the same, so that didn't get me any further, either.

EDIT

I added something to the code, which now is as follows:

\documentclass{article}
\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}
\draw
(0,0) node [pnp] {node}
;
\end{circuitikz}
\end{document}


It doesn't complain about the semicolon anymore, but now I have these errors instead:

! Undefined control sequence.
.5\pgflinewidth
l.11 (
pnp.B) to (-2,0)

The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), typeI' and the correct spelling (e.g., I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

! Missing number, treated as zero.

p
l.11 (
pnp.B) to (-2,0)

A number should have been here; I inserted 0'. (If you can't figure out why I needed to see a number, look upweird error' in the index to The TeXbook.)

• Your MWE works fine for me. Make sure your packages are up to date and you are running PDFlatex (also called Latex->PDF). Aug 30, 2016 at 14:31
• Just checked. I am using PDFlatex. According to MiKTeX I installed the circuitikz pagacke on 2016-07-09, and it was packaged on 2016-06-07. So that should be right, I suppose. Could it be that any other of my packages is outdated and that that causes the trouble?
– Abby
Aug 30, 2016 at 14:39
• Is TikZ up to date? Aug 30, 2016 at 14:46
• Alright, I'm now running an MiKTeX Update as admin. First only saw the Package Manager...
– Abby
Aug 30, 2016 at 14:52
• Yes, running that update worked! Thank you!
– Abby
Aug 30, 2016 at 15:13