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, -]
Code: Select all
[C, l=$C_{20}$, name=C20, -]
Code: Select all
[pC, l=$C_{21}$, name=C21, -]
Code: Select all
[C, l=$C_{20}$, name=C20, -]
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis