I would like to change the size of a simple logic gate
\begin{circuitikz} \draw
(0,0) node[and port] () {};
\end{circuitikz}
The output is:
How can I control the size of the ouptut?
Welcome to TeX.SE! As usual in this kind of business with scale=<factor>
.
\documentclass{article}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[and port,scale=3] (n) {};
\end{circuitikz}
\end{document}
You can change the height and width of circuitikz
components locally or globally using \ctikzset
.
(Inspired from this answer)
\documentclass[border=3mm]{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz} \draw
(0,0) node[and port] () {};
\draw
\pgfextra{\ctikzset{tripoles/american and port/width=.55,
tripoles/american and port/height=.4}}
(0,-1.5) node[and port] () {};
\draw
\pgfextra{\ctikzset{tripoles/american and port/width=.3,
tripoles/american and port/height=.2}}
(0,-2.5) node[and port] () {};
\end{circuitikz}
\end{document}
\documentclass[border=3mm]{standalone}
\usepackage{circuitikz}
\begin{document}
\ctikzset{tripoles/american and port/width=.55,tripoles/american and port/height=.4}
\begin{circuitikz}
\draw (0,0) node[and port] () {};
\draw (0,-1) node[or port](){};
\draw (0,-2) node[and port] () {};
\end{circuitikz}
\end{document}