\documentclass[border=10pt]{standalone}
\usepackage[european,siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}[european]
\draw (0,0) to [short, o-] (1,0) to [ R=$R_1$] (2,0) to [short] (3,0) to [ R=$R_1$] (4,0) to [short, -o] (5,0)
(2.5,0) to [short] (2.5,-0.5) to [R=$R_2$] (2.5, -1.5) to [short] (2.5, -2)
(0,-2) to [short, o-o] (5,-2);
\end{circuitikz}
\end{document}
答案1
组件之间的间距太小。组件的默认尺寸基于基本长度(请参阅手册!),默认为 1.4 厘米。您只允许 1 厘米,因此重叠。
您可以添加空间:
\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}[european]
\draw (0,0) to [short, o-] (1,0) to [ R=$R_1$] (3,0) to [short] (4,0) to [ R=$R_1$] (6,0) to [short, -o] (7,0)
(3.5,0) to [short] (3.5,-0.5) to [R=$R_2$] (3.5, -2.5) to [short] (3.5, -3)
(0,-3) to [short, o-o] (7,-3);
\end{circuitikz}
\end{document}
或者通过减小 的值来使用较小的组件bipoles/length
(这是所有 的基本长度circuitikz
,请参阅手册第 33 页左右)。请注意,这将改变组件之间的比例以及标签中使用的字体大小,这不会受到影响 — 您可能喜欢或不喜欢。
\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\ctikzset{bipoles/length=1cm}
\begin{document}
\begin{circuitikz}[european]
\draw (0,0) to [short, o-] (1,0) to [ R=$R_1$] (2,0) to [short] (3,0) to [ R=$R_1$] (4,0) to [short, -o] (5,0)
(2.5,0) to [short] (2.5,-0.5) to [R=$R_2$] (2.5, -1.5) to [short] (2.5, -2)
(0,-2) to [short, o-o] (5,-2);
\end{circuitikz}
\end{document}
无论如何,如果您真的想使用circuitikz
,请帮自己一个忙,学习使用命名/相对坐标。这将带来巨大的回报……(请参阅手册中的教程)。