1

I need some help with the increasing the length of the input and output lines.

\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}

\begin{circuitikz}
    \ctikzset{logic ports origin=center}
    \draw (0,0) node[and port, scale=2] (myand) {}
    (myand.in 1) node[anchor=east] {1}
    (myand.in 2) node[anchor=east] {2}
    (myand.out) node[anchor=west] {3};
\end{circuitikz}

\end{document}

enter image description here

0

1 Answer 1

2

american ports do not have an option to change lead pin lengths (although they can be suppressed, see the manual around page 117). So you have to extend them manually ... and optionally add coordinate names for later use:

\documentclass{standalone}
\usepackage[RPvoltages]{circuitikz}
\begin{document}

\begin{circuitikz}
    \ctikzset{logic ports origin=center}
    \draw (0,0) node[and port, scale=2] (myand) {}
    (myand.in 1) -- ++(-1,0) coordinate(myand-in1) node[anchor=east]{1}
    (myand.in 2)-- ++(-1,0) coordinate(myand-in2)  node[anchor=east]{2}
    (myand.out) -- ++(1,0) coordinate(myand-out) node[anchor=west]{3};
\end{circuitikz}

\end{document}

enter image description here

On the other hand, ieee logic ports does have an option for the lead length (manual page 124):

\documentclass{standalone}
\usepackage[RPvoltages]{circuitikz}
\begin{document}

\begin{circuitikz}
    \ctikzset{logic ports=ieee, ieeestd ports/pin length=2}
    \draw (0,0) node[and port, scale=2] (myand) {}
    (myand.in 1) node[anchor=east]{1}
    (myand.in 2) node[anchor=east]{2}
    (myand.out) node[anchor=west]{3};
\end{circuitikz}

\end{document}

enter image description here

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .