我尝试过这个:
\documentclass{scrartcl}
\usepackage[european, cuteinductors]{circuitikz}
\usetikzlibrary{arrows.meta, bending}
%wished arrow tip
\tikzset{> = Latex}
\begin{document}
\begin{circuitikz}
%this circuit shouldn't make sense
\draw (0, 0) to [V = $U$, i = $I$] (0, 3)
to [vR = $R$, v<= $u_R$, i<= $i$] (3, 3)
to [C = $C$, v<= $u_C$, i<= $i$] (6, 3)
to [closing switch, v<= $u$, i<= $i$] (9, 3)
to [sV = $u$, i = $i$] (9, 0)
to [I<= $I$, v = $u$] (6, 0)
to [L = $L$, v<= $u_L$, i<= $i$] (3, 0)
to [sI<= $i$, v = $u$] (0, 0)
(3, 3) to [opening switch, v = $u$, *-*] (3, 0)
(6, 3) to [open, v = $u$, o-o] (6,0);
%extra nodes for the mesh arrow
\node (left of L) at (3.5, .75) {M};
\node (right of L) at (5.5, .75) {};
\node (left of C) at (3.5, 2) {};
\node (right of C) at (5.5, 2) {};
%the mesh arrow
\draw
[->] (right of L.west) .. controls (right of C.west) and (left of C.east)
.. (left of L.east);
\end{circuitikz}
\end{document}
但它不起作用。有什么建议吗?
提前感谢您的帮助和努力!
答案1
不幸的是,circuitikz 中使用的箭头形状实际上是一个节点,其形状currarrow
在包中定义。因此,没有简单的方法将形状更改为另一个箭头尖端。
您可以currarrow
使用如下方式重新定义形状:
\makeatletter
\pgfdeclareshape{currarrow}{
\anchor{center}{
\pgfpointorigin
}
\behindforegroundpath{
\pgfscope
\pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\divide \pgf@circ@res@step by 16
\pgfsetarrows{->}
\pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
\pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{0pt}}
\pgfusepath{stroke}
\endpgfscope
}
}
\makeatother
此代码只是重新定义了形状,以使用默认箭头绘制一条简单的线条。\tikzset{> = Latex}
然后使用即可获得预期的行为。