我怎样才能将箭头移到离组件更远的地方,并且像图像中那样给箭头和标签涂上不同的颜色?
(将标签放在箭头下方可能会使其看起来更好一些,但我更喜欢将其放在顶部。)
我一直尝试按照手册来应用它,但无法使其工作。
\documentclass[border=0.1mm]{standalone}
\usepackage[american,siunitx,RPvoltages]{circuitikz}
\begin{document}
\begin{tikzpicture}[thick]
\ctikzset{bipoles/cuteinductor/voltage/distance from node/.initial=0.4};
\ctikzset{bipoles/capacitor/voltage/distance from node/.initial=0.7};
\ctikzset{!i/.style={ no i symbols}};
\newcommand{\iarronly}[1]{% name
\node [currarrow, color=red, anchor=center,
rotate=\ctikzgetdirection{#1-Iarrow}] at (#1-Ipos) {};
}
\draw (0,0) node[ocirc,scale=2]{} to [C,
i>^=$I_C$,
v^=$V_C$
] ++(3,0) to
[cute inductor,
v^=$V_L$,
i^>= $I_L$,
voltage/american label distance=0.8pt] ++(1.5,0) to
[short, name= LL,!i] ++(1,0)node[ocirc,scale=2] {};
% \iarronly{LL};
\end{tikzpicture}
\end{document}
答案1
像这样?
(不使用 at usecurrent arrow scale=...
编辑:
您可以通过选项缩放电流箭头current arrow scale=<denominator of size>
。现在已添加到\ctikzset
,但也可以本地插入。
\documentclass[margin=3mm]{standalone}
\usepackage[american,siunitx,RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}
\ctikzset{bipoles/capacitor/width/.initial=.075,
current arrow scale=8
}
\draw (0,0) node[ocirc] {}
to [short, i=$I_{C}$, color=red,
bipole current append style={color=red}] ++ (1,0)
to [C, v^=$V_C$] ++ (2,0)
to [cute inductor, v^=$V_L$] ++ (2,0)
to [short, i=$I_{L}$, color=blue,
bipole current append style={color=blue}] ++ (1,0)
node[ocirc] {};
\end{circuitikz}
\end{document}
使用时current arrow scale=8