答案1
理论上,你应该能够使用“通用可调箭头”--- 在实践中,当元素的锚点在一侧时,会出现一个小错误center
(在多个组件中都会发生,以便于定位)。所以你必须修补这个问题(我会解决的在下一个版本 1.5.0 中)。
\documentclass[12pt,]{article}
\usepackage[T1]{fontenc}
\usepackage[siunitx, RPvoltages]{circuitikz}
\makeatletter
\def\ctikztunablearrow{\pgfutil@ifnextchar[{\ctikztunablearrow@full}{\ctikztunablearrow@simple}}%
\def\ctikztunablearrow@simple{\ctikztunablearrow@full[]}%
\def\ctikztunablearrow@full[#1]#2#3#4#5{%
% add tunable arrow to a component
% relative thickness, relative length, rotation from axis, name of the component
\scope
\draw
\pgfextra{\pgfcirc@set@arrows{tunable}{}{latexslim}
\pgfsetlinewidth{#2\pgflinewidth}} [#1]
let \p1=($(#5.north east)-(#5.south west)$), \p2=($(#5.east)-(#5.west)$),
\n1 = {veclen(\x1,\y1)},
\n2 = {atan2(\y2,\x2)} in
% node[above]{\n1, \n2}
($(#5.west)!0.5!(#5.east)$) ++({\n2+(#4)}:{-0.5*(\n1)*(#3)}) -- ++({\n2+(#4)}:{(\n1)*(#3)});
\endscope
}
\makeatother
\begin{document}
\begin{tikzpicture}
\node [oscillator](M) at(0,0){};
\ctikztunablearrow[color=blue, densely dashed]{1}{1.2}{45}{M}
\end{tikzpicture}
\end{document}