3

Please consider the following MWE:

\documentclass[border={1mm}]{standalone}

\usepackage[europeanresistors]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0)to [R,l={{{{\rotatebox[origin=c]{-90}{$+\;\; v_2\;\; -$}}}}},o-o](0,-3);
\end{circuitikz}
\end{document}

This is the output:

enter image description here

But I prefer the following output:

enter image description here

  • You can try to use the standard v and the voltage shift and other voltage positioning options (see the manual). Otherwise, name the component and put nodes manually near the appropriate anchors... Will write a possible solution tomorrow, if nobody does it. – Rmano Sep 12 '19 at 20:30
4

After all this is still LaTeX, so you can use an array.

\documentclass[border={1mm}]{standalone}
\usepackage[europeanresistors]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0)to [R,l={{{{$\begin{array}{@{}c@{}}+\\ v_2\\ -\end{array}$}}}},o-o](0,-3);
\end{circuitikz}
\end{document}

enter image description here

| improve this answer | |

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.