# I need to use a different version of circuitikz. How can I do that?

I have a circuitikz that works perfectly on one configuration but not on another one; for example, this:

\begin{circuitikz}
\draw  (0,0) node[dipchip]{CHIP1};
\end{circuitikz}


works ok on one computer but gives errors in another one. What's the matter?

The error is something like: I do not know the key /tikz/dipchip/ or similar about not existing /tikz/circuitikz/ keys,.

The most likely problem here is that you have different versions of circuitikz in the two installations. To check this put somewhere in your source document the command \pgfcircversion:

Circuitikz version here is \pgfcircversion{} released on \pgfcircversiondate{}.


and you'll obtain, for example (my personal installation):

or, on Overleaf on January 18, 2020:

Now you can look at the manual (the latest version is found at http://circuitikz.github.io/circuitikz/circuitikzmanualgit.pdf --- near the end there is a changelog section that, for example, will tell you that the chips were added in version 0.9.0).

So now there are two possible cases for your not-working circuit:

1. (most probable) you need to upgrade your circuitikz in the system which is failing; or
2. (could happen) you have hit a backward compatibility problem or a bug introduced in a newer version.

In case 1: I need/want to update circuitikz, you have several options if you are on your own local system --- all of them greatly explained in this great answer. Basically, you can (details are explained in the linked answer!):

• update your TeX/LaTeX installation (this is often not possible if you are using a distribution-packaged one, like in Ubuntu);
• download the latest version from CTAN or from GitHub and install it in your local TEXMF tree;
• if you are on an online service, you can use the circuitikzgit trick explained below --- for example, that will work in overleaf.

In case 2 (I need to downgrade), your best option is still to upgrade to the last version and use the internal rollback function; it was in a very hackish state before 1.4.0 now but after that version you can just use the standard rollback \usepackage[options]{circuitikz}[=v1.1.2].

### Using the circuitikzgit hack (both for upgrading and for downgrading)

In a quite more "hackish" way (it will break if you use any package that depends on circuitikz; I think there is none of them at this time, but you never know) you can use another mechanism: circuitikz offers an approach that can be used in both cases 1 and 2 --- it's easier to apply in a pinch but as stated before a bit dangerous. If you go to the page https://circuitikz.github.io/circuitikz/ you'll see a list of released versions:

Go to the main file link of the version you want to use, and download it (depending on your browser, it could be a right-click and a "download document as..." or similar things.), and save the file with the name circuitikzgit.sty in a place where your document can read it (easiest: in the same folder as the main document — this should work in most online services also.).

Now, in the place where your document has the command

\usepackage[whatever options]{circuitikz}


change it to

\usepackage[whatever options]{circuitikzgit}


and now you'll use the version you have downloaded. If you use stock style files (since 0.9.4) beware that style files also change and you may need to download them and put them also in the main directory (they come as a zip file, you have to extract the needed ones).

That's all; now your version will look like this:

(although in older releases the "base" version number is lost... you have to rely on the date):

As a last (important) comment, notice that you need to check your options, especially for voltage and current directions. You have to read it in the fine manual, sorry... ;-)

• it's really not a good idea to change the package name. if you load another package that relies on circuittikz and does \RequirePackage{circuitikz} you latex won't recognise that this has already been loaded so you will end up loading both versions into the same document Jan 15 '20 at 9:50
• You could use the package rollback feature so the the user can do \usepackage{circuitikz}[=2019/12/22] to get the releases of that date saved to a suitable filename, then latex "knows" that circuitikz has been loaded Jan 15 '20 at 9:54
• @DavidCarlisle you are right --- I will try to convert to that format as soon as I manage to release a 1.0... Jan 15 '20 at 10:31