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.
\pgf@sh@bg@pnp -> \pgftransformationadjustments
\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'), type
I' 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.
...pgfverticaltransformationadjustment
.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'), type
I' 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 inserted0'. (If you can't figure out why I needed to see a number, look up
weird error' in the index to The TeXbook.)