2

Why does the short label l= interfere with the arrow marker and how do I fix it?

MWE:

\documentclass{minimal}
\usepackage[european,RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}
    \draw (0,2) to [short,l=$i(t)$, i=~] (1,2) to [short] (4,2);
    \draw (0,0) to [short,f=$i(t)$     ] (1,0) to [L, i_=$i(t)$, l_=$L$, v^<=$u(t)$](4,0);
\end{circuitikz}
\end{document}

1 Answer 1

4

Don't use the label element l if you want to add currents to your circuit. To add currents CircuiTikz provides the current option i or the flow option f.

If the distance of the current element is still to small you can customize the style of the current element by changing bipole current style.

enter image description here

\documentclass{minimal}
\usepackage[european,RPvoltages]{circuitikz}

\ctikzset{
    bipole current style/.style = {
        draw=red, 
        text=black,
        thick,
        fill=orange,
        yshift=0.2cm,
        inner ysep=6pt},
}
\begin{document}

\begin{circuitikz}
    \draw (0,2) to [short,i>=$I_1(t)$] (1,2) to [short] (5,2);
    \draw (0,0) 
        to [short,f=$I_2(t)$] ++(1,0) 
        to [L, l_=$L$, v^>=$u(t)$] ++(2,0) 
        to [short, i>=$I_2(t)$] ++(2,0);
\end{circuitikz}

\end{document}
2
  • Nice! Can you answer the follow up, or do I move it to a separate question?
    – skvery
    Apr 11, 2020 at 18:55
  • I doubt that tex.stackexchange.com is the right place for the question. You may ask at electronics.stackexchange.com Apr 11, 2020 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.