Graphics, Figures & Tablescapacitor plates used as coordinates

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

capacitor plates used as coordinates

Post by todeilatiberia »

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

[pC, l=$C_{21}$, name=C21, -]
Is it possible also for the normal capacitors?

Code: Select all

[C, l=$C_{20}$, name=C20, -]
Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

capacitor plates used as coordinates

Post by rais »

you could access their `geographic' anchors, such as

Code: Select all

\documentclass{article}
\usepackage[siunitx, european]{circuitikz}

\begin{document}
\begin{circuitikz}
    \draw (0,0) to [pC, l=$C_{21}$, name=C21, -] ++(0,-1);
    \draw (2,0) to [C, l=$C_{20}$, name=C20, -] ++(0,-1);
    \draw (6,0) to [C, l=$C_{22}$, name=C22, -] ++(1,0);
    \draw[red, latex-] (C21.east) -- +(1,-1) node[right] {C21.east};
    \draw[blue, latex-] (C20.west) -- +(1,1) node[right] {C20.west};
    \draw[green!75!black, latex-] (C22.west) -- +(-1,1) node[above] {C22.west};
    \draw[green!75!black, latex-] (C22.east) -- +(1,1) node[above] {C22.east};
\end{circuitikz}
\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
Post Reply