2

This question already has an answer here:

I'm using the circuitikz library to draw some circuits. To connect two nodes with a square angle, there is the possibility to use |-, as in the MWE below for the connection of (a) with (b). However, sometimes I don't like the way circuitikz connects the nodes (e.g. it sometimes draws line overlapping with other lines in large circuits), so in some cases I'd like to specify the coordinates where the square angles are inserted (e.g. sometimes I'd like to have two right angles as in MWE 2) or I want to insert a circle at a particular node and so on.

In the MWE, node (a) is connected with nodes (b), (c), (d) and (e).

  • The connection with (b) is fine.
  • For the connection with (c), I've inserted a circle, and the line after the circle doesn't start immediately at the circle but with some horizontal space inbetween.
  • Same problem with node (d), but without the circle.
  • Finally, I wanted to connect (a) with (e) by going further up (to (0,5)) and then from there to the right and down to (e). However, this isn't working properly either.

Any ideas how I can solve at least some of these problems?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage[european]{circuitikz}

\begin{document}

\begin{circuitikz} \draw

(0,0) node (a){a}
(1,1) node (b) {b}
(2,2) node (c) {c}
(3,3) node (d) {d}
(3,4) node (e) {e}

(0,2) node (crossa) {}
(0,3) node (crossa2) {}
(0,5) node (crossa3) {}

(a) |- (b)
(a) to[short, -*] (crossa)
(crossa) -- (c)
(a) -- (crossa2) |- (d)
(a) -- (crossa3) |- (e)

;\end{circuitikz}
\end{document}

marked as duplicate by Joseph Wright Feb 1 '14 at 21:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Very likely the problem lies in the use of nodes rather than coordinates (nodes have an inner sep>0). You might want to have a look to TikZ: difference between \node and \coordinate? – Claudio Fiandrino Nov 11 '13 at 10:43
  • @ClaudioFiandrino Thanks, it really works to change the connecting nodes to coordinates. Thanks a lot again! If you write your comment as an answer, I'll accept it. – AnjaM Nov 11 '13 at 12:37