[Tex/LaTex] Voltage sign convention (European vs. American) in Circuitikz


This time I dive into Circuitikz. Anyway, I've got a problem with the
american and european styles of e.g. voltages.

IIRC Voltage drops are counted positive which means the voltage arrow in the
pictures goes from + to -, where the current flows.

  (0,0) node[ground] {}
  to [V,v=$U_0$] (0,3) {}
  to [cspst=$t_0$] (2,3) {}
  to [L=$L$,v=$u_L$] (3,3) {}
  to [R=$R$,v=$u_R$] (6,3) {}
  to [C,l_=$C$,v^=$u_C$,i=$i$] (6,0) {}
  to [ground] (6,0) {};

enter image description here

enter image description here

Please use with/without american option. Please note the signs in american and the arrows in european style which are opposite. As the result the equations would be
different using the common laws.

Is it a bug, intentionally or I'm wrong?

Further more, this example shows some other problems: At european style the inductor's
arrow is not shown/hidden. At american the inductor's signs are cluttered also.

And, probably a TikZ problem, how to get the 2nd ground symbol?

PS: What's the preferred way to append pictures/pdf here – where to store?

Best Answer

I don't know whether or not you want to hold on to circuitikz or are willing to use the circuits library of TikZ as well. I prefer the latter. This would be the code and resulting image using that instead. Note that the direction info option is added to show the arrows.

\begin{tikzpicture}[circuit ee IEC,semithick,
                    every info/.style={font=\footnotesize},
                    small circuit symbols,
                    set resistor graphic=var resistor IEC graphic]
  \draw (0,0) to [ground={near start, rotate=180}] (0,1)
              to [voltage source={near start, direction info={info=$U_0$}}] (0,3)
              to [break contact={info=$t_0$}] (2,3)
              to [inductor={direction info={info=$L$},info'=$u_L$}] (3,3)
              to [resistor={direction info={info=$R$}, info'=$u_R$}] (6,3)
              to [capacitor={direction info={info'=$C$}, info=$u_C$}] (6,1)
              to [ground={near end}] (6,0);

TikZ circuit using circuits library

You can change the direction in the direction info by simply adding a <-.