`\documentclass{article}
\usepackage{graphicx}
\usepackage[american]{circuitikz}
\begin{document}
\begin{figure}
\centering
\begin{circuitikz}
\draw (0,0)
to[V,v=$V$] (0,3)
to[C=$C_1$] (5,3)
to [L=$L_1$] (5,0)
to[short] (0,0);
\end{circuitikz}
\caption{}
\end{figure}
\end{document}
You can invert the voltage source by changing the counting direction of the voltage using v<=$V$
Your full example will look like:
\documentclass{article}
\usepackage{graphicx}
\usepackage[american]{circuitikz}
\begin{document}
\begin{figure}
\centering
\begin{circuitikz}
\draw (0,0)
to[V,v<=$V$] (0,3)
to[C=$C_1$] (5,3)
to [L=$L_1$] (5,0)
to[short] (0,0);
\end{circuitikz}
\caption{}
\end{figure}
\end{document}
-
this doesn't work for me, still it appears the same way, weather I put the < or not, I'm using texlive – Andrés Alcarraz Dec 12 '17 at 3:17
-
Ditto, this doesn't work for me, even though the docs say it should (and this does). Using the answer above (drawing the other way around) puts the V on the wrong side of the circuit. – aha Jan 25 '18 at 18:41
Since version 0.8.3, using v<=$V$
has been removed as a way to change the polarity of a source. The manual recommends using the invert
tag on the element:
\begin{center}
\begin{circuitikz}
\draw (0,0)
to[V, v=$V$, invert] (0,3) %Invert the element to achieve required polarity.
to[C=$C_1$] (5,3)
to[L=$L_1$] (5,0)
to[short] (0,0);
\end{circuitikz}
\end{center}
Inverting also keeps the correct voltage/current direction.
(0,0) -> (0,3)
, draw from(0,3) -> (0,0)
). See tex.stackexchange.com/questions/202159/… – Paul Gessler Aug 15 '16 at 4:05