0

I am trying to draw an SR Latch using Circuitikz

My code is:

\begin{circuitikz} \draw
(0,2) node[nor port] (NOR1) {}
(1,2) node[anchor=east] {Q}
(1,0) node[anchor=east] {$\overline{Q}$}
(0,0) node[nor port] (NOR2) {}
(NOR1.in 1) node[anchor=east] {R}
(NOR2.in 2) node[anchor=east] {S}
(NOR1.out) -| (NOR2.in 1) 
(NOR2.out) -| (NOR1.in 2) 
;\end{circuitikz}

enter image description here

I would like the image be something like:

enter image description here

I don't know how to make the circuit paths look like that

2

In future, please add a MWE as part of the question. including \documentclass, \begin{document} and \end{document}. Something like this:

\documentclass[border=3mm]{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz} \draw
(0,2) node[nor port] (NOR1) {}
(1,2) node[anchor=east] {Q}
(1,0) node[anchor=east] {$\overline{Q}$}
(0,0) node[nor port] (NOR2) {}
(NOR1.in 1) node[anchor=east] {R}
(NOR2.in 2) node[anchor=east] {S}
(NOR1.out) -- ++(0,-0.5) -- ($(NOR2.in 1) +(0,0.5)$) -- (NOR2.in 1)
(NOR2.out) -- ++(0,+0.5) -- ($(NOR1.in 2) +(0,-0.5)$)--(NOR1.in 2)
;\end{circuitikz}
\end{document}

And the output:

enter image description here

  • What does it mean -- ++ ? I don't understand how you use it. Is there a documentation that you recommend that explains all of that? – Delfin Dec 6 '18 at 4:55
  • @Delfin (a) -- ++(1,0) is equivalent to (a) -- ($(a)+(1,0)$). It draws a line from coordinate (a) to another coordinate which is 1 unit shifted along x and 0 unit shifted along y. – nidhin Dec 6 '18 at 6:04
  • What is --? And what is -|? Sorry, I'm complety new in circuitikz. There is an official manual texdoc.net/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf But I don't find in which part they explain that – Delfin Dec 6 '18 at 15:29
  • @Delfin circuitikz lodas tikz. -- and -| are defined in tikz.Please go through the Minimal introduction to TikZ and then the manual. – nidhin Dec 6 '18 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.