答案1
另一个起点:
\documentclass[margin=3mm]{standalone}
\usepackage{circuitikz}
\tikzset{pics/.cd,
LM/.style={code={
\node (LM)[draw, thick, shape=rectangle, minimum width=4cm, minimum height=2cm, anchor=center] at (0,0) {LM7812CT};
\draw (LM.-90)--++(-90:2)coordinate(COM);
\draw (LM.15)--++(0:2)coordinate(VREG);
\draw (LM.165)--++(180:2)coordinate(LV);
\node at (LM.-90) [above] {\scriptsize $COMMON$};
\node at (LM.15) [left] {\scriptsize $VREG$};
\node at (LM.165) [right] {\scriptsize $LINE\ $ \\ $VOLTAGE$};
}}
}
\begin{document}
\begin{circuitikz}
\pic at (0,0) {LM};
\draw (VREG) to [C,l=$C_2$] (4,-2);
\draw (LV) to [C,l=$C_1$] (-4,-2);
\end{circuitikz}
\end{document}
答案2
让我们尝试用芯片来实现“特殊用途”。您似乎想要一个相当不对称的芯片,所以我们假设我们将使用一个有 4 个引脚的宽芯片,然后我们将只使用顶部的两个引脚。我们绘制没有标签、也没有外部引脚的芯片,我们将手动添加所有内容。
\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{tikzpicture}[]
\ctikzset{multipoles/thickness=2}
\ctikzset{multipoles/dipchip/width=2}
\draw (0,0) node[dipchip,
num pins=4, hide numbers, no topmark,
external pins width=0](C){};
\node [right, font=\ttfamily\tiny, align=left] at (C.bpin 1) {LINE\\ VOLTAGE};
\node [left, font=\ttfamily\tiny] at (C.bpin 4) {VREG};
\node [above, font=\ttfamily\tiny] at (C.south) {COMMON};
\node [above, font=\ttfamily\small\bfseries, align=center] at (C.north) {U1\\ LM7812CT};
\draw (C.s) -- ++(0,-0.5) coordinate(com);
\draw (C.bpin 4) -- ++(0.5,0) coordinate(vreg);
\draw (C.bpin 1) -- ++(-0.5,0) coordinate(line);
\end{tikzpicture}
\end{document}
答案3
你应该能够发展下面的想法
\documentclass[10pt,a4paper]{article}
\usepackage{circuitikz}
\usetikzlibrary{calc}
\begin{document}
\begin{circuitikz}
\draw
(0,0) to [twoport, l^={X}, n=Q]++(2,0);
\node at ($(Q.west)+(4pt,0pt)$){\scriptsize Z};
\node at ($(Q.south)+(0pt,4pt)$){\scriptsize X};
\end{circuitikz}
\end{document}