Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to add two ports to the gates (nand, and, or, not) in circuitikz on the top and bottom for reference voltages in a similar fashion to how they exist for the op amp?

share|improve this question

1 Answer 1

You can use the same mechanism given for op-amps in the manual by defining your own ports

\documentclass{article}
\usepackage{circuitikz,siunitx}
\begin{document}
\begin{circuitikz} 
\draw (0,0) node[op amp] (opamp) {}
 (opamp.+) node[ left ] {$v_+$}
 (opamp.-) node[left] {$v_-$}
 (opamp.out) node[right] {$v_o$}
 (opamp.down) node[ground] {}
 (opamp.up) ++ (0,.5) node[above] {\SI{12}{\volt}}
 -- (opamp.up)
;
\draw (4,0) node[european and port] (euand) {} 
(euand.south) node[ground] {}
(euand.north) ++(0,0.5) node[above] {\SI{12}{\volt}}
-- (euand.north);
\end{circuitikz}
\end{document} 

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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