In this question, it was brought up that recent versions of Circuitikz reversed the direction of symbols such as batteries. The fix is to insert \tikzset{voltage dir = RP}. This was working for me until I reinstalled my system software (Mac OS) and installed TeX Live 2019. Now that line leads to a console error I do not know the key '/tikz/voltage dir'. What's happening?

EDIT: updating all packages solved the problem.

  • 4
    Please add an MWE, which demonstrate your problem, that we can test it. Which version of circuitikz you use?
    – Zarko
    Jan 22, 2020 at 19:41
  • Have you installed TeXLive 2019 from network or from a DVD? I guess the DVD has an old circuitikz release.
    – jotagah
    Jan 22, 2020 at 22:45
  • Please check tex.stackexchange.com/questions/524328/…
    – Rmano
    Jan 23, 2020 at 8:01

2 Answers 2


Your problem is probably a simple version problem, so check I need to use a different version of circuitikz. How can I do that?, please.

But given that the voltage direction problem arises frequently, let me cite the manual here (and as someone said, reading the documentation is pretty dangerous):

Start auto-citing the manual, section 4.6

The default direction/sign for currents and voltages in the components is, unfortunately, not standard, and can change across countries and sometimes across different authors. This unfortunate situation created a bit of confusion in circuitikz across the versions, with several incompatible changes starting from version 0.5. From version 0.9.0 onward, the maintainers agreed a new policy for the directions of bipoles’ voltages and currents, depending on 4 different possible options:

  • oldvoltagedirection, or the key style voltage dir=old: Use the old way of voltage direction having a difference between european and american direction, with wrong default labeling for batteries (it was the default before version 0.5);

  • nooldvoltagedirection, or the key style voltage dir=noold: The standard from version 0.5 onward, utilize the (German?) standard of voltage arrows in the direction of electric fields (without fixing batteries);

  • RPvoltages (meaning Rising Potential voltages), or the key style voltage dir=RP: the arrow is in the direction of rising potential, like in oldvoltagedirection, but batteries and current sources are fixed so that they follow the passive/active standard: the default direction of v and i are chosen so that, when both values are positive:

    • in passive component, the element is dissipating power;
    • in active components (generators), the element is generating power.
  • EFvoltages (meaning Electric Field voltages), or the key style voltage dir=EF: the arrow is in direction of the electric field, like in nooldvoltagedirection, but batteries are fixed;

Notice that the four styles are designed to be used at the environment level: that is, you should use them at the start of your environment as in \begin{circuitikz}[voltage dir=old] ... and not as a key for single components, in which case the behaviour is not guaranteed.

stop auto-citing

Moreover, unless you are re-using old circuits, the best approach is to load the package with your preferred option (arguably, RPvoltages or EFvoltages should be the logical choices):


and stick to it. There is a big fat warning if you do not specify the voltage direction, but I am evaluating removing it, it seems nobody reads warnings...

  • Would you please show what each option means schematically?
    – Diaa
    Dec 23, 2020 at 22:40
  • @Diaa there are two pages of examples in the manual...
    – Rmano
    Dec 24, 2020 at 9:14

To long for the comment ...

I make test of your MWE with my Windows machine with recent MikTeX version (upgraded today) and also with some simple circuit scheme:

\tikzset{voltage dir=RP}

%    \begin{circuitikz}
%\draw   (0,0)   to [sV=$Uq$]    (0,2);
%    \end{circuitikz}

Compilation above MWE gives no errors, no warning and it generate the following file list:

 *File List*
standalone.cls    2018/03/26 v1.3a Class to compile TeX sub-files standalone
shellesc.sty    2019/11/08 v1.0c unified shell escape interface for LaTeX
ifluatex.sty    2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
   iftex.sty    2019/11/07 v1.0c TeX engine tests
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
standalone.cfg    2018/03/26 v1.3a Default configuration file for 'standalone' 
 article.cls    2019/10/25 v1.4k Standard LaTeX document class
  size10.clo    2019/10/25 v1.4k Standard LaTeX file (size option)
circuitikz.sty    2019/12/22{} The CircuiTikz circuit drawing package version 1
    tikz.sty    2020/01/08 v3.1.5b (3.1.5b)
     pgf.sty    2020/01/08 v3.1.5b (3.1.5b)
  pgfrcs.sty    2020/01/08 v3.1.5b (3.1.5b)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
 pgfcore.sty    2020/01/08 v3.1.5b (3.1.5b)
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2019/11/01 v1.3d Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
  pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex
  pgfsys.sty    2020/01/08 v3.1.5b (3.1.5b)
pgfsyssoftpath.code.tex    2020/01/08 v3.1.5b (3.1.5b)
pgfsysprotocol.code.tex    2020/01/08 v3.1.5b (3.1.5b)
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
pgfcomp-version-0-65.sty    2020/01/08 v3.1.5b (3.1.5b)
pgfcomp-version-1-18.sty    2020/01/08 v3.1.5b (3.1.5b)
  pgffor.sty    2020/01/08 v3.1.5b (3.1.5b)
epstopdf-base.sty    2019-12-09 v2.10 Base part for package epstopdf

Result is blank page or if I consider example of circuitikz scheme` result is as expected:

enter image description here

Conclusion: I confirm @Rmano answer (+1). Please check, which version of packages you obtain at compilation of this MWE on your machine. If dates and versions of packages on your machine is older, than please update your LaTeX installation. With this you will solve your problem.

You must log in to answer this question.

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