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

Ste*_*ant 5 label latex positioning tikz

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

微量元素:

\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}
Run Code Online (Sandbox Code Playgroud)

我尝试在标签前面加一个\vspace,但没有成功。

在此输入图像描述

Rma*_*ano 4

我在这里提出两种解决方案:第一个是使用假标签,然后手动设置标签(具有很大的灵活性),或者使用提供的标签样式。详情见评论;您需要最近的版本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}

Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

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