LaTeX forum ⇒ Graphics, Figures & Tablescapacitor plates used as coordinates

Information and discussion about graphics, figures & tables in LaTeX documents.
todeilatiberia
Posts: 3
Joined: Fri Aug 02, 2019 2:58 pm

capacitor plates used as coordinates

Postby todeilatiberia » Wed Aug 14, 2019 10:35 pm

Greetings,

How can I use the positive and the negative pins from a capacitor as reference to connect another parts in tikz?

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. [pC, l=$C_{21}$, name=C21, -]


Is it possible also for the normal capacitors?
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. [C, l=$C_{20}$, name=C20, -]


Thanks!

rais
Posts: 235
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Thu Aug 15, 2019 5:26 pm

you could access their `geographic' anchors, such as
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{article}
  2. \usepackage[siunitx, european]{circuitikz}
  3.  
  4. \begin{document}
  5. \begin{circuitikz}
  6. \draw (0,0) to [pC, l=$C_{21}$, name=C21, -] ++(0,-1);
  7. \draw (2,0) to [C, l=$C_{20}$, name=C20, -] ++(0,-1);
  8. \draw (6,0) to [C, l=$C_{22}$, name=C22, -] ++(1,0);
  9. \draw[red, latex-] (C21.east) -- +(1,-1) node[right] {C21.east};
  10. \draw[blue, latex-] (C20.west) -- +(1,1) node[right] {C20.west};
  11. \draw[green!75!black, latex-] (C22.west) -- +(-1,1) node[above] {C22.west};
  12. \draw[green!75!black, latex-] (C22.east) -- +(1,1) node[above] {C22.east};
  13. \end{circuitikz}
  14. \end{document}

Note, that these anchors are given, before the shape may be rotated. Since the bipoles are defined from left (west) to right (east), "west" of a bipole may be facing north in your drawing...

KR
Rainer


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 6 guests