如何在电阻器“块”内部显示“R_1”,并显示电阻器外部的值?(circuitikz)

如何在电阻器“块”内部显示“R_1”,并显示电阻器外部的值?(circuitikz)

如何显示“R_1”里面电阻器,显示价值外部电阻器?

\documentclass[]{standalone}
\usepackage{circuitikz, siunitx}
\begin{document}
    \begin{circuitikz}[european]
        \draw
            (0,0)   to  [short, i=\(I_1\), -*]                      (1,0)
                    to  [short, i=\(I_3\)]                      ++  (1,0)
                    to  [R, l=\(R_2\), label=\(\SI{10}{\ohm}\)] ++  (2,0)
                    to  [short, -*]                             ++  (1,0)
                    to  [short, i=\(I_5\)]                      ++  (1,0);
        \draw
            (0,0)   to  [battery1, l_=\(V_1\)]                  ++  (0,-3);
        \draw
            (5,0)   to  [R, l=\(R_3\), label=\(\SI{2}{\ohm}\)]  ++  (0,-2)
                    to  [short, i=\(I_4\), -*]                  ++  (0,-1)
                    to  [short]                                 ++  (1,0)
                    to  [battery1, l_=\(V_2\)]                  ++  (0,3);
        \draw
            (5,-3)  to  [short, i=\(I_6\)]                      ++  (-5,0);
        \draw
            (1,0)   to  [R, l=\(R_1\), label=\(\SI{5}{\ohm}\) ] ++  (0,-2)
                    to  [short, i=\(I_2\), -*]                  ++  (0,-1)
                    to  [short]                                 ++  (-1,0);
    \end{circuitikz}
\end{document}

我该如何转变变成这个?

答案1

你有更多信息(以及我认为这是一个坏主意的理由)这里;无论如何,鉴于该答案中没有同时存在的两个标签,例如:

\documentclass[border=10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{tikzpicture}[european]
    \draw (0,0) to[R=\qty{5}{\ohm},name=vr1] ++(0,-2);
    \node [rotate=90, font=\scriptsize] at (vr1.center) {$R_1$};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容