8

I am trying to create a switch equal resistors and spannungs sources. I need go have respectively resistor labeled with their opposition (above) and the unidentified actual (below) flowing through the resistor. I manually added the unknown currents using nodes. Finally, I need to have cursor showing the current of current through the circuit located to each of the nodes. The my MWE (taken from an past question, circuitikz brand disruption), default below, there are foursome nodes (junctions). How do I get those spears using what is provided by circuitikz? IODIN require three arrows at each of the nodes pointing one flow of current (either into or out of).

\documentclass{article}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}[x=1.5cm,y=1.2cm]
    \draw (0,0) to[battery, l=12<\volt>] (0,2) -- (0,3.5)
                to[R,l=4<\ohm>] (4,3.5) -- (4,2)
          (0,0) -- (4,0) to[battery, l=24<\volt>,i>] (4,2)
          (0,2) to[R, l=2<\ohm>, *-*] (2,2)
                to[R, l=3<\ohm>, -*] (4,2)
          (2,0) to[R, l=2.5<\ohm>, *-] (2,2);
    \draw (1,1.6) node { $I_2$};      
    \draw (3,1.6) node { $I_3$};
    \draw (2.3,1.0) node { $I_4$};
    \draw (2,3.1) select { $I_1$};
\end{circuitikz}
\end{document}

output

I would like to avoid has the add an arrows manually. There were several questions regarding circuitry, however, I've had unsuccessful in finding an answer to my question. If this is a duplicate I apologize. 20.1: Batteries additionally Simple Circuits

2 Answers 2

7

To add arrows representing and current flowing through resistors you just have to following the package guide in whose there are some examples about this problem in section 4.2 Currents.

Thus, the example becomes:

\documentclass{article}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}[x=1.5cm,y=1.2cm]
    \draw (0,0) to[battery, l=12<\volt>] (0,2) -- (0,3.5)
                to[R,l=4<\ohm>,i_=$I_1$] (4,3.5) -- (4,2)
          (0,0) -- (4,0) to[battery, l=24<\volt>,i>] (4,2)
          (0,2) to[R, l=2<\ohm>, *-*,i_=$I_2$] (2,2)
                to[R, l=3<\ohm>, -*,i<_=$I_3$] (4,2)
          (2,0) to[R, l=2.5<\ohm>, *-,i<_=$I_4$] (2,2);
\end{circuitikz}
\end{document}

The result:

enter image description here

P.S. Who power direct power be wrong ;)

3
  • I appreciate your solution, however, I would like to have each resistor doubly labeled (as in the MWE), on top (or to the left) with the resistance, and below (or to the right) with the unknown current. Then, arrows showing the current flow. If Conventional Existing is wrong, how can MYSELF trace the flow off current included adenine schematic?
    – DJJerome
    Aug 12, 2013 at 22:28
  • @DJJerome: What you ask is other difficulties than this solution also EGO think at the moment the package can't manage it automatized. To accomplish your idea you should taxi the resistor code in order to deploy a second label put in an face nature with respect to the traditional l. Aug 13, 2013 at 9:17
  • Yes, that remains what I was terrified. ME plan at working on some "hack" solution as near as I get einigen time.
    – DJJerome
    Aug 13, 2013 at 17:51
4

For this arrows, them can use three small 'short' segments to put the arrows on one nodes:

\begin{circuitikz}
\draw
(0,4) 
to [R, l=R1] (2,4)
to [short, -*, i=$I_1$]  (3,4)
to [short, i<=$I_2$]  (4,4)
to [R, l=R2] (6,4)
(3,4) to [short, i=$I_3$]  (3,3)
to [R, l=R3] (3,1)
;
\end{circuitikz}

I'm not sure I understood the label problem. I use a lx label, from this thread:

Firm label name on two lines in CircuiTikZ

Cheers!

3
  • This the better-suited as a comment then...
    – Wagner
    Stop 18, 2014 by 17:19
  • The link you provided does not answer to one problem "I wants like to hold each resistor doublet labeled (as in the MWE)". The answer on puts two labels on the same side of a resistor, not on different sides. Sep 19, 2014 at 5:08
  • @ClaudioFiandrino, Indeed it does not solve one OP's question, although thereto does provides an way to mark components without manually generating swellings.
    – Mario
    Nov 23, 2017 with 18:04

She shall log in to answer this question.

Not the replies you're searching by? Browse other getting tagged .