banner



How To Draw Circuits In Latex

  • In this tutorial, we will acquire how to draw a logic excursion in LaTeX using CircuitikZ packet with different electrical components styles: American, European and IEEE. The circuit example has been suggested by Nithin Aaron, Thanks to him!

logic_circuit_example in CircuiTikZ LaTeX

Hand fatigued circuit suggested by Nithin Aaron

If yous enjoy these TikZ tutorials, Please consider supporting me by ownership me a java ❤️

Buy Me a Coffee at ko-fi.com

Short description

  • The logic circuit consists of OR, AND and NOT logic gates. All these elements can be added using \node command. Components tin exist customized using the control \ctikzset {}. To modify the components style use logic ports = ieee or (american, or european) inside the previous command. Using logic ports/scale =0.viii reduces the default size by 20%. The option logic ports/make full=lightgray changes the filling color of all logic gates. The spring crossing is a node element and can be also drawn along the path. Check the code below for more details!

LaTeX code of the Logic circuit: IEEE style

            \documentclass[border=0.2cm]{standalone}  % Required packages and libraries \usepackage{circuitikz} \usetikzlibrary{calc}  \begin{document}   \begin{tikzpicture}  % Excursion style \ctikzset{ 	logic ports=ieee, 	logic ports/calibration=0.eight, 	logic ports/fill=lightgray }  % Logic ports \node[or port] (ORa) at (0,0){}; \node[not port] (Noa) at (0,-2){}; \node[or port] (ORb) at (0,-4){};  \node[not port] (Nob) at (2.v,0){}; \node[and port] (ANDa) at (2.5,-3){};  \node[or port] (ORc) at (5,-1.5){};  % Connection \describe (ORa.out) -- (Nob.in);  \draw (Noa.out) -| (ANDa.in 1); \draw (ORb.out) -| (ANDa.in 2);  \draw (ANDa.out) -|  (ORc.in 2); \describe (Nob.out) -| (ORc.in 1); \draw (ORc.out) -- ++(i,0) node[nigh end,above]{Out};  \draw (ORa.in 1) -- ++(-one.5,0)node[left](In1){In1}; \describe (ORb.in 2) -- ++(-1.5,0)node[left](In3){In3};  % Jump crossing chemical element \node at (ORa.in ii) [ 	below, 	jump crossing, 	rotate=-90, 	scale=one.3 ](Ten){};  \depict (Noa.in) -| (X.eastward) 	(X.west) to[short,-*] (Ten.westward |- ORa.in 1);   \draw ($ (In1) !.5! (In3) $) node[]{In2} 	++ (0.4,0) to[curt,-*] ++(0.v,0) coordinate(a) 	|- (X.south) (a) |- (ORb.in 1); \finish{tikzpicture}   \end{document}          
  • How tin I go coordinates of the half distance between two nodes? To brand the circuit drawing flexible, IN2 should be put in the one-half distance between IN1 and IN3 and from there we keep drawing the circuit. This can be achieved thank you to the calc library by using the syntax: ($ (In1) !.5! (In3) $). (IN1) is the saved coordinates of the first node and (IN3) is the saved coordinates of the second node.

Compiling the to a higher place code yields:

Logic Circuit in CircuiTikZ IEEE style

Logic Excursion in CircuitikZ with IEEE components style

LaTeX code of the Logic circuit: American manner

Past changing the style from ieee to american in the to a higher place code, we will become:

Logic Circuit in CircuiTikZ American style

Logic Circuit in CircuitikZ with American components mode

LaTeX code of the Logic circuit: European way

Past irresolute the style from ieee to european in the higher up code, we volition get:

Logic Circuit in CircuiTikZ European style

Logic Circuit in CircuitikZ with European components fashion

  • If y'all would to see a detailed tutorial about information technology, go out me a annotate below or reach me via eastward-post at admin@latexdraw.com, I will be happy to hear from you!

Source: https://latexdraw.com/draw-a-logic-circuit-in-circuitikz/

Posted by: covarrubiasdond1949.blogspot.com

0 Response to "How To Draw Circuits In Latex"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel