4

I would like to have a mix of americand and european styles, but they seem to have inverted polarities

\documentclass[fleqn,10pt]{SelfArx}
\usepackage[siunitx]{circuitikz}

\begin{document}
  \begin{circuitikz}[scale=1.3] \draw
    node[ocirc] (A) at (2,0) {}
    node[ocirc] (B) at (2,1.75) {}
    (A) to[short, *-] (0,0)
    (0,0) to[american voltage source, v=$V_{oc}$] (0,1.75)
    (0,1.75) to[R=$R$, i=$i$, -*] (B)
    ;
  \end{circuitikz}
\end{document}

enter image description here

This is what I have so far, I want the american voltage source with +/- but inverted, together with the european arrow. When I invert the source, the plus sign stays on top but the arrow points down, is there a way to achieve the desired effect?

Something like this

2 Answers 2

3

Load the package with the option oldvoltagedirection.

\usepackage[oldvoltagedirection]{circuitikz}

enter image description here

\documentclass[border=2mm]{standalone}
\usepackage[siunitx,oldvoltagedirection]{circuitikz}
\begin{document}
  \begin{circuitikz}[scale=1.3] \draw
    node[ocirc] (A) at (2,0) {}
    node[ocirc] (B) at (2,1.75) {}
    (A) to[short, *-] (0,0)
    (0,0) to[american voltage source, v=$V_{oc}$] (0,1.75)
    (0,1.75) to[R=$R$, i=$i$, -*] (B)
    ;
  \end{circuitikz}
\end{document}
1
  • Thank you very much!! I searched quite a lot for a solution but couldn't find it, I was afraid it would be very complicated, but it is so simple!
    – user50039
    Commented Apr 20, 2017 at 22:02
2

You can change the orientation of the source using the new option invert:

 \begin{circuitikz}[scale=1.3] \draw     
 (0,0) to[american voltage source,v=$V_{oc}$] ++(1,0)
 to[american voltage source,v<=$V_{oc}$] ++(1,0)
 to[american voltage source,invert,v=$V_{oc}$] ++(1,0)
;\end{circuitikz}

enter image description here

This is better than using the oldvoltagedirection, because this leads to inconsistent voltage direction between the sources.

Nevertheless, this seems to be a bug, because the voltage counting direction(v<=...) should not change the appearance of the source. This is not necessary anymore since there is the invert option.

I will have a look at this.

Best regards, Stefan

2
  • I have tried using 'inver' before, but I got this error: Package pgfkeys Error: I do not know the key '/tikz/invert' and I am going to ignore it. Perhaps you misspelled it.
    – user50039
    Commented Apr 24, 2017 at 16:47
  • Then you should update your installation :)
    – sistlind
    Commented Apr 24, 2017 at 17:24

You must log in to answer this question.

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