Graphics, Figures & Tablesconnection in one point only

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

connection in one point only

Post by todeilatiberia »

Hello all,

Is it possible to coonect the source of M1 to a defined path without knowing the coordinates?

\path (0,0) coordinate (IBGND);
\draw (IBGND) to [short,-] (15,0){};
\draw (0.5,0.5) to [C, l=$C_1$, name=C1, -] (0.5,1.5) %cap = 1
(0.5,0) -- (0.5,0.5) ;
\draw (1,1.5) node[pmos,anchor=drain,yscale=-1.5,xscale=1.5,rotate=270](M5){};
\draw (M5.drain) -- (0.5,1.5)
(M5.gate) to [short,-*] ++(0,-0.8) %%%% in this line I have to guess the coordinates of that point on the X axis
(M5.drain) node[above right] {$M_5$}
(M5.source) ++(0.5,0) node[nmos,anchor=gate,scale=1.5](M1){}
(M5.source) -- (M1.gate)
(M1.drain) node[below right] {$M_1$};


Thank you!
Attachments
pierce.PNG
pierce.PNG (10.13 KiB) Viewed 1237 times

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

connection in one point only

Post by rais »

you could use the (p1 |- p2) notation to use the horizontal component of coordinate p1 and the vertical component of coordinate p2, such as

Code: Select all

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

\begin{document}
\begin{circuitikz}
\ctikzset{tripoles/mos style/arrows}
\path (0,0) coordinate (IBGND);
\draw (IBGND) to [short,-] (15,0){};
\draw (0.5,0.5) to [C, l=$C_1$, name=C1, -] (0.5,1.5); %cap = 1
\draw (C1.west) to [short, -*] (C1.west |- IBGND);
\draw (1,1.5) node[pmos,anchor=drain,yscale=-1.5,xscale=1.5,rotate=270](M5){};
\draw (M5.drain) -- (0.5,1.5)
(M5.gate) to [short,-*]  (M5.gate |- IBGND) %%%% in this line I have to guess the coordinates of that point on the X axis
(M5.drain) node[above right] {$M_5$}
(M5.source) ++(0.5,0) node[nmos,anchor=gate,scale=1.5](M1){}
(M5.source) -- (M1.gate)
(M1.drain) node[below right] {$M_1$};
\draw (M1.source) to [short, -*] (M1.source |- IBGND);
\end{circuitikz}
\end{document}
KR

Rainer
Post Reply