I can't seem to find a simple way to create and move around ICs with CircuitTikz. Specifically I want to place an OP-amp IC somewhere, say (5,5), and have the corresponding pins relative to those coordinates, say pin 1 at (5,5.5), pin 2 at (5,6), etc) so I can place it somewhere and relatively quickly connect it to the rest of the circuit. But I don't understand how to do this.

Here is an image of the OP-amp I'm trying to implement. enter image description here

  • 1
    There doesn't appear to be any support for generic ICs in circuitikz. If there was I'd expect to address the pins by anchors called things like pin 1 as with logic gates etc (p32 of the manual). To do it properly would require quite a lot of effort; I reckon you'd do it parametrically for an arbitrary number of pins There is, however, support for op-amps (using the right-pointing triangle symbol, which is good for circuit logic, much less good for wiring instructions)
    – Chris H
    Feb 22, 2018 at 15:37
  • BTW I'd expect the notch to be at the top near pin 1
    – Chris H
    Feb 22, 2018 at 15:37
  • this is quit complex image which you should define for example with small pictures (\pic). searching on the site will show you some similar solutions.
    – Zarko
    Feb 22, 2018 at 15:38
  • @ChrisH you are correct. I updated the figure now.
    – E. l4d3
    Feb 22, 2018 at 15:52

1 Answer 1


Here is a standard 8 pin DIP from my web site. Anchors include p1 through p8. The size is adjusted using [pin spacing=...].


\newcommand{\Compass}% define anchors for compass points
{\anchor{north east}{\northeast}
\anchor{south west}{\southwest}
\anchor{north west}{\pgfextracty{\pgf@circ@res@up}{\northeast}\pgfextractx{\pgf@circ@res@left}{\southwest}\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
\anchor{south east}{\pgfextracty{\pgf@circ@res@down}{\southwest}\pgfextractx{\pgf@circ@res@right}{\northeast}\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}

% ************************** multipoles *****************************

\ctikzset{multipoles/.is family}
\ctikzset{multipoles/pin spacing/.initial = 5mm} % default value
\ctikzset{multipoles/gate spacing/.initial = 1cm} % default value

\pgfkeys{/tikz/pin spacing/.initial = 0mm}
\pgfkeys{/tikz/pin spacing/.default = 0mm}

\newlength{\IClen}  % scale factor
\newcommand{\pinsize}{\ifdim\IClen<3.5mm \tiny \else \scriptsize \fi}

\pgfkeys{/tikz/gate spacing/.initial = 0cm}
\pgfkeys{/tikz/gate spacing/.default = 0cm}


% ***************************** dip 8 *********************************
% anchors pin1 - pin8

\anchor{center}{\pgfpointorigin}    % within the node, (0,0) is the center

\anchor{text}   % this is used to center the text in the node

\savedmacro{\resize}{   % called automatically
 \setlength{\IClen}{\pgfkeysvalueof{/tikz/pin spacing}} % from node[]
 \ifdim\IClen=0mm \setlength{\IClen}
  {\pgfkeysvalueof{/tikz/circuitikz/multipoles/pin spacing}} \fi    % from \ctikzset{}
\savedanchor\icpina{\pgfpoint{-1.5\IClen}{-1.25\IClen}} % pin 1
\savedanchor\icpinb{\pgfpoint{-.5\IClen}{-1.25\IClen}}  % pin 2
\savedanchor\icpinc{\pgfpoint{.5\IClen}{-1.25\IClen}}   % pin 3
\savedanchor\icpind{\pgfpoint{1.5\IClen}{-1.25\IClen}}  % pin 4
\savedanchor\icpine{\pgfpoint{1.5\IClen}{1.25\IClen}}   % pin 5
\savedanchor\icpinf{\pgfpoint{.5\IClen}{1.25\IClen}}    % pin 6
\savedanchor\icping{\pgfpoint{-.5\IClen}{1.25\IClen}}   % pin 7
\savedanchor\icpinh{\pgfpoint{-1.5\IClen}{1.25\IClen}}  % pin 8

\Compass% standard anchors

\foregroundpath{ % border and pin numbers are drawn here
 \pgfsetlinewidth{.1\IClen} % line thickness 
 \pgfusepath{draw}  %draw rectangle
 \pgfsetlinewidth{.06\IClen} % line thickness 
 \pgfusepath{draw}  %draw semicircle
 \pgftext[bottom,at={\pgfpoint{-1.5\IClen}{-1.1\IClen}}]{\pinsize 1}
 \pgftext[bottom,at={\pgfpoint{-.5\IClen}{-1.1\IClen}}]{\pinsize 2}
 \pgftext[bottom,at={\pgfpoint{.5\IClen}{-1.1\IClen}}]{\pinsize 3}
 \pgftext[bottom,at={\pgfpoint{1.5\IClen}{-1.1\IClen}}]{\pinsize 4}
 \pgftext[top,at={\pgfpoint{1.5\IClen}{1.1\IClen}}]{\pinsize 5}
 \pgftext[top,at={\pgfpoint{.5\IClen}{1.1\IClen}}]{\pinsize 6}
 \pgftext[top,at={\pgfpoint{-.5\IClen}{1.1\IClen}}]{\pinsize 7}
 \pgftext[top,at={\pgfpoint{-1.5\IClen}{1.1\IClen}}]{\pinsize 8}

\node[dip8,rotate=-90] (T) {};


  • Nice website. A lot of useful figures and components.
    – E. l4d3
    Feb 23, 2018 at 0:13

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.