I am using LaTeX with CircuiTikZ to create circuit diagrams. Using the CircuiTikZ documentation and many of questions and answers on this community, I have been able to navigate it pretty well.
I have to recreate an 8 pin DIP chip containig an amplifier symbol connected internally to the pins. I have been able to create it using this code:
\begin{tikzpicture}
% DIP chip
\draw (0,0) node[dipchip,
num pins=8,
external pins width=0.3,
external pad fraction=3,
hide numbers](C){};
% amplifier
\draw (C) node[op amp, scale=0.571](OA){};
% amplifier connection to the chip pins
\draw (OA.-) |- (C.bpin 2)
(OA.+) |- (C.bpin 3)
(OA.out) |- (C.bpin 6);
\end{tikzpicture}
The result is exactly what I wanted:
The main objective in the creation of this image was the alignment between the dipchip pins and the amplifier + and - inputs. I accomplished this by manually resizing the amplifier (as shown by scale=0.571
in the code), until its inputs were perfectly aligned. Being this a quite tedious trial and error task, i was wondering if there is any easier (and possibly more elegant) method to accomplish the same result.
Thank you
circuitikz
. If I have a bit of time I'll try to show an example (basically, you have to retrieve the keys that define the two lengths and calculate the scale automatically).\pgfmathsetmacro{\myscale}{\ctikzvalof{multipoles/dipchip/pin spacing}/ (\ctikzvalof{tripoles/op amp/height}*\ctikzvalof{tripoles/op amp/input height})}
;-)