答案1
我做了两处更改。首先,现在可以使用 设置箭头\ctikzset{bipoles/interr/arrowhead=...}
。其次,我修改了箭头所连接的线性延伸,这样线条就不会显示出来。
\documentclass{standalone}
\usepackage{circuitikz}
%% SPST
\ctikzset{bipoles/interr/arrowhead/.initial=latex'}
\makeatletter
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{spst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
\pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}}
\pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen}
\pgfpathlineto{\pgfpoint{.21\pgf@circ@res@right}{-.35\pgf@circ@res@up}}
\pgfsetarrowsend{\ctikzvalof{bipoles/interr/arrowhead}}
\pgfusepath{draw}
}
\makeatother
\begin{document}
\begin{circuitikz}
\draw (0,0) to[spst] (1,0);
\end{circuitikz}
\end{document}