2

RL series

I want to have complete control on where to put the labels R1 and L1, the annotation 100 Ohms and the Voltage VL.

  1. For example, how to move L1 label a little more to the right, and a little more to the up?
  2. How to move the + and the - signs a little closer towards VL? (And I want to colour these signs in red for better emphasization)

    \documentclass[border=1cm]{standalone} 
    \usepackage{amsmath}
    \usepackage{siunitx}
    \usepackage{circuitikz}
    \begin{document}
    \begin{circuitikz}[american voltages]
    \draw (0,0) 
      to [R, l=$R_1$,a=\SI{100}{\ohm},o-] (3,0)
      to [L, l=$L_1$, v=$V_L$,-o] (6,0)
    ;\end{circuitikz}
    \end{document}
    
9
  • Labels are actually nodes themselves. You can also use \fbox or \raisebox to move the text relative to the node. See tex.stackexchange.com/questions/114379/… Commented Oct 26, 2018 at 19:17
  • Try \ctikzset{voltage/distance from node=.8} for the +/- placement. Interestingly, larger values are closer together and smaller or negative values are further away.. Commented Oct 26, 2018 at 19:46
  • Coloring the built in +/- is not an option. Nor is it easily patched. I suggest you simply add your own nodes. Use the to [L,name=L1] option (for example) and place nodes relative to (L1). Commented Oct 26, 2018 at 19:54
  • Obviously using \node at (_coord_) {_anything_}; you can put anything at coord.
    – vi pa
    Commented Oct 26, 2018 at 19:54
  • 1
    Since circuitikz IS TikZ, it helps to learn that manual as well. Commented Oct 27, 2018 at 14:58

1 Answer 1

3

Bipoles name compass point anchors se (for example) instead of south east, but otherwise behave the same as any TikZ node.

\documentclass[border=1cm]{standalone} 
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[american voltages]
\ctikzset{voltage/distance from node=.8}
\draw (0,0) 
  to [R, l=$R_1$,a=\SI{100}{\ohm},o-] (3,0)
  to [L, -o, name=L1] (6,0);
\node[above, xshift=2pt, yshift=2pt] at (L1.n) {$L_1$};
\node[below] at (L1.s) {$V_L$};
\node[red,below] at (L1.w) {\scriptsize$+$};
\node[red,below] at (L1.e) {$-$};
\end{circuitikz}
\end{document}

demo

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .