5

how can I move the current label closer to the current arrow. I.e. I want to move the i_1 closer to the arrow.

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}

I tried to put a \vspace in front of the label but it didn't work.

enter image description here

Steradiant
  • 233
  • 2
  • 13

1 Answers1

4

I propose two solutions here: the first one is using a fake label and then setting the label manually (with a lot of flexibility), or using the provided styling for labels. Details in comments; you need a quite recent circuitikz for using this solution (>=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}

enter image description here

See circuitikz manual, https://texdoc.org/serve/circuitikz/0#subsection.5.6 .

Rmano
  • 377
  • 10
  • 25