circuitikz - 将当前标签移近当前箭头

circuitikz - move current labels closer to current arrow

如何将当前标签移近当前箭头。 IE。我想将 i_1 移近箭头。

MWE:

\documentclass{standalone}

\usepackage[european,cuteinductors,fetbodydiode,straightvoltages]{circuitikz}

\begin{document}
\begin{figure}[htb]
    \centering
    \begin{tikzpicture}[scale=0.65, arrowmos]
        \coordinate (zero) at (0,0);
        \draw (zero) to[R,-*,R=$R_1$,i>_=$i_1$] ++(2.75,2);
    \end{tikzpicture}
    \end{figure}
\end{document}

我试着在标签前加了一个\vspace,但是没用。

我在这里提出两种解决方案:第一种是使用假标签然后手动设置标签(具有很大的灵活性),或者使用提供的标签样式。评论中的详细信息;您需要最近的 circuitikz 才能使用此解决方案 (>=1.4.2)。

\documentclass{standalone}

\usepackage[european,cuteinductors,fetbodydiode,straightvoltages]{circuitikz}

\begin{document}
    \centering
    \begin{tikzpicture}[scale=0.65, arrowmos]
        \coordinate (zero) at (0,0);
        % First option
        % use a blank label for the current, and name the component
        \draw (zero) to[R,-*,R=$R_1$,i>_=~,name=myI] ++(2.75,2);
        % manually place the label where you like
        % myIcurrent is the normal position where the blank label is set
        \node[below=1mm, anchor=center, red] at (myIcurrent) {$i_1$};
        % you can also use bipole current style to change inner sep;
        \draw (2,0) to[bipole current style={inner sep=0pt}, R,-*,R=$R_1$,i>_=$i_1$] ++(2.75,2);
    \end{tikzpicture}
\end{document}

参见circuitikz手册,https://texdoc.org/serve/circuitikz/0#subsection.5.6