Hi I am trying to draw the following circuit:

enter image description here

using Tikz package in Latex. The following is my code

        \begin{circuitikz}[scale=1,transform shape]
            %(0,1) node [] {} to [R, l=$R_t$, i>^=$I_t$] (2,1)
            (0,1) to [cspst=$u$] (1.5,1)
            (0,-1) node [] {} -- (6,-1)
            (0,-1) {to [battery, l_=$V_s$] (0,1)}
            (1.5,1) to [L, l=$L_1$, i>^=$I_1$] (1.5,-1)
            (1.5,1) to [C, l=$C_1$, v<={{$V_1$}}] (3.5,1)
            (3.5,1) {to [diode] (3.5,-1)}
            (3.5,1) to [L, l=$L_2$, i>^=$I_2$] (5,1)
            (5,1) to [C, l=$C_2$, v<={{$V_2$}}] (5,-1)
            (6,-1) {to [R, l_=$G$] (6,1)}
            (5,1) -- (6,1);
    \caption{Electrical scheme of the zetaconverter.}

This always results in the following:

enter image description here

It always invert the sign conversion and the battery too. If I compile in my friend's Mac it becomes normal.

PS: These are my packages and some custom commands:



\tikzstyle{block} = [draw, rectangle, minimum height=2em, minimum width=4em]
\tikzstyle{sum} = [draw, fill=blue!20, circle, node distance=1cm]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}]


\usepackage[american,cute inductors,smartlabels]{circuitikz}


\tikzstyle{every node}=[font=\small]
\tikzstyle{every path}=[line width=0.8pt,line cap=round,line join=round]
  • 2
    please merge your code snippet to one small but complete document which we can copy and test. help us to help you.
    – Zarko
    Nov 22, 2018 at 11:07

1 Answer 1


It should because of the difference is version of circuitikz used. Quoting from Circuitikz manual:

Since v0.8.2: voltage and current label directions(v<= / i<=) do NOT change the orientation of the drawn source shape anymore. Use the ”invert” option to rotate the shape of the source. Furthermore, from this version on, the current label(i=) at current sources can be used independent of the regular label(l=).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.