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

1
  • 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
    Commented Sep 12, 2019 at 20:30

1 Answer 1

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

You must log in to answer this question.

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