【问题标题】:circuitikz - move current labels closer to current arrowcircuitikz - 将当前标签移近当前箭头
【发布时间】:2022-01-13 14:06:50
【问题描述】:

如何将当前标签移近当前箭头。 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,但没有成功。

【问题讨论】:

    标签: latex label positioning tikz


    【解决方案1】:

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

    【讨论】:

    • 松鼠力胜:)
    猜你喜欢
    • 2011-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多