4

In general, polar capacitors seem to be drawn with the curved end as the negative pole: textbook

However, doing this (naively) in circuitikz seems to result in a "reversed" version:

\draw (0, 0) [pC] ++(1, 0);

mwe

This can be fixed by adding the invert key to the drawing command:

\draw (0, 0) [pC, invert] ++(1, 0);

circuitikz correctly polarized capacitor

Still, is this the expected behaviour?

1
  • 2
    I just noticed that ecapacitor and polar capacitor seem to have opposite directions. Strange.
    – someonr
    Commented Sep 24, 2019 at 14:07

1 Answer 1

6

This is arguably wrong, but it's documented:

manual excerpt for 0.9.4

And it's like this since at least 0.6:

\documentclass[border=10pt]{standalone}
\usepackage[]{circuitikz-0.6}
\begin{document}
\begin{circuitikz}[american
    ]
    \draw (0,0) to[ecapacitor] ++(2,0);
    \draw (0,-2) to[polar capacitor] ++(2,0);
\end{circuitikz}
\end{document}

enter image description here

so I am quite afraid of changing it --- it's difficult to spot in a big circuit and can give nasty surprises.

I could try to consider it for the 1.0 release, maybe; --- also with the other thing that I do not like a lot, the fact that invert does not change voltage directions. But I don't know, I like the principle of least surprise...

update:

in the next version of circuitikz, 0.9.5, there will be a new component, curved capacitor:

new component description

deprecated old component

Yep, I know, it's "its polarity", no "it's polarity"... Can I blame the automatic corrector?

2
  • Arguably, for a new user, the least surprise occurs when the polar capacitor matches convention :)...would be great to see this in 1.0! Commented Sep 25, 2019 at 1:02
  • 2
    @AnshulSinghvi the best thing is to define a new bipoles cC, curved capacitor or whatever which has the correct orientation, and remove the old one from the manual (or just commenting it) so that old circuits are not affected. I will try to do that as soon as I can.
    – Rmano
    Commented Sep 25, 2019 at 7:15

You must log in to answer this question.

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