1

I'm trying to put polarity signs to a resistor using american voltages but it just doesn't work.

I put this in my header \usepackage[american voltages]{circuitikz} and, following the CTAN package documentation, used this code.

\begin{circuitikz}[american voltages]
  \draw
  (0,0) to[sV]
  (0,2) to[R, v^>=$v_1$]
  (3,2) to[C]
  (3,0) -- (0,0)
  ;
\end{circuitikz}

P.S.: I'm using overleaf.

1

Add \ctikzset{v/.append style={/tikz/american voltages}}. Now it works?

enter image description here

\documentclass[a4paper,12pt]{article}
\pagestyle{empty}
\usepackage{circuitikz}
\ctikzset{v/.append style={/tikz/american voltages}}

\begin{document}

\begin{circuitikz}[american voltages]
  \draw
  (0,0) to[sV]
  (0,2) to[R, v^>=$v_1$]
  (3,2) to[C]
  (3,0) -- (0,0)
  ;
\end{circuitikz}

\end{document}

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.