![背面为佩雷斯门的代码](https://linux22.com/image/431304/%E8%83%8C%E9%9D%A2%E4%B8%BA%E4%BD%A9%E9%9B%B7%E6%96%AF%E9%97%A8%E7%9A%84%E4%BB%A3%E7%A0%81.png)
答案1
你可以这样做tikz
:
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,0) node[anchor=east] {A} -- +(2,0) node[anchor=west] {P};
\draw (0,-1) node[anchor=east] {B} -- +(2,0) node[anchor=west] {Q};
\draw (0,-2) node[anchor=east] {C} -- +(2,0) node[anchor=west] {R};
\draw[fill] (1,0) circle[radius=0.125];
\draw[fill] (1,-1) circle[radius=0.125];
\draw (1,-1) circle[radius=0.175];
\draw (1,-2) circle[radius=0.175];
\draw (1,0) -- +(0,-2.175);
\end{tikzpicture}
\end{document}
产生
如果电线不应该在点后面“交叉”,则可以重新排序一些绘图命令,并用填充的白色圆圈“绘制”,如下所示:
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,0) node[anchor=east] {A} -- +(2,0) node[anchor=west] {P};
\draw (0,-1) node[anchor=east] {B} -- +(2,0) node[anchor=west] {Q};
\draw (0,-2) node[anchor=east] {C} -- +(2,0) node[anchor=west] {R};
\draw (1,0) -- +(0,-2.175);
\draw[fill] (1,0) circle[radius=0.125];
\draw[fill=white] (1,-1) circle[radius=0.175];
\draw[fill] (1,-1) circle[radius=0.125];
\draw (1,-1) circle[radius=0.175];
\draw (1,-2) circle[radius=0.175];
\end{tikzpicture}
\end{document}
得出的结果为:
总的来说,BTWcircuitikz
是一款适用于各种电路相关事物的优秀软件包,我建议你去看看;它也在积极开发中,如果你发现缺少某些东西并建议添加,我相信很有可能会添加。此外还有软件包quantikz
。然而,我对这两个都没有亲身体验。