![改善我的赛道:跳跃穿越、区块布局](https://linux22.com/image/428507/%E6%94%B9%E5%96%84%E6%88%91%E7%9A%84%E8%B5%9B%E9%81%93%EF%BC%9A%E8%B7%B3%E8%B7%83%E7%A9%BF%E8%B6%8A%E3%80%81%E5%8C%BA%E5%9D%97%E5%B8%83%E5%B1%80.png)
我画了一个可以工作的电路,但是有几个小错误我无法修复:
\documentclass[border=1mm]{standalone}
\usepackage[european, straightvoltages]{circuitikz}
\usetikzlibrary{babel}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[en amp](aop1){AO1};
\draw (aop1.+)
to[short] ++(0,-2) node[ground](GND){};
\draw (aop1.-)
--++(0,1.5) coordinate (in-1)
--++(-2,0) node[npn, photo, anchor=E](photo){} ;
\draw (photo.C)
--++(-2,0) coordinate (pile)
to[battery2] (pile|-GND);
\draw (in-1)
to [vR, mirror] (in-1 -|aop1.out)
to[short] (aop1.out);
\draw (aop1.out)
--++(1,0) coordinate (out1)
to[R] ++(2,0) coordinate (in-2)
--++(0.5,0) node[en amp, anchor=-](aop2){AO2};
\draw (photo.C)
--(photo.C-|out1) coordinate (jump);
\node at (aop1.out-|jump) [jump crossing, rotate=90](J){};
\draw (jump)
-- (J.east);
\draw (J.west)
to[pR, n=curseur] (jump|-GND)
to [short] (jump|-GND) ;
\draw (in-2)
--(in-2|-curseur.wiper) coordinate(ao2r)
to[R] (ao2r-|curseur.wiper)
to[short] (curseur.wiper);
\draw (aop2.+)
to[short] (aop2.+|-GND);
\draw (in-2)
--++(0,1.5) coordinate(RC)
to [R] (RC -|aop2.out);
\draw (RC)
--++(0,1) coordinate (C)
to[C] (C-|aop2.out)
to[short] (aop2.out);
\path (aop2.center) ++(2,0) coordinate (in-3) ++(1,0) node[en amp, anchor=-](aop3){};
\draw (aop2.out)
-| (aop3.-);
\draw (jump)
--(jump-|in-3) coordinate (jump2);
\node at (aop2.out-|jump2) [jump crossing, rotate=90](J2){};
\draw (jump2)
-- (J2.east);
\draw (J2.west)
to[pR, n=curseur2] (jump2|-GND)
to [short] (jump2|-GND) ;
\draw (aop3.+)
-|(curseur2.wiper);
\draw (aop3.out)
to[R] ++(3,0) coordinate (ledR)
to[leDo] (ledR|-GND);
\draw (GND)
to[short] (GND-|ledR);
\draw (GND)
to[short] (GND-|pile);
\end{circuitikz}
\end{document}
- 跳跃交叉:我已经使用垂直绘制了它们
\node at (aop1.out-|jump) [jump crossing, rotate=90](J){};
,但仍然有一条轻微的水平线:我该如何删除它?
感谢您花时间帮助我改进我的代码。
答案1
对于仍在寻求解决此问题的人,更新:circuitikz
交叉点可以用作节点或路径。在节点样式中,产生[jump crossing]
上述水平线。在路径样式中,[xing]
不是生成水平线。请参阅 circuiTikZ 1.6.6 文档第 4.10 节第 45 页
\documentclass[border=1mm]{standalone}
\usepackage[european, straightvoltages]{circuitikz}
\usetikzlibrary{babel}
\begin{document}
\begin{circuitikz}
\draw
(0,0) to [xing] (1,0)
(1,0) to node[jump crossing]{} (2,0)
\end{circuitikz}
\end{document}