Circuitikz 中缺少一个点

Circuitikz 中缺少一个点

我尝试使用以下代码绘制电路:

\documentclass[12pt]{article}

\usepackage{siunitx}
\usepackage{tikz}
\usepackage{circuitikz}

\tikzset{component/.style={draw,thick,circle,fill=white,minimum size =0.75cm,inner sep=0pt}}

\begin{document}

\begin{circuitikz}
\draw (0,0) to[lamp] (2,0) to (3,0) node[component]{\SI{1}{\ampere}} to (4,0) to (4,2) node[component]{?} to (4,3) to[battery1] (0,3) to (0,0);
\draw (0,1) to[lamp,*-] (2,1) to (3,1) node[component]{\SI{2}{\ampere}} to[,-*] (4,1);
\end{circuitikz}

\end{document}

不幸的是,电路中仅出现一个点来指示连接点,如下所示:

在此处输入图片描述

我该如何添加缺失的点?

答案1

为了获得你需要的东西,你只需添加short(短路)键即可-*

\documentclass[12pt]{article}

\usepackage{siunitx}
\usepackage{tikz}
\usepackage{circuitikz}

\tikzset{component/.style={draw,thick,circle,fill=white,minimum size =0.75cm,inner sep=0pt}}

\begin{document}

\begin{circuitikz}
\draw (0,0) to[lamp] (2,0) to (3,0) node[component]{\SI{1}{\ampere}} to (4,0) to (4,2) node[component]{?} to (4,3) to[battery1] (0,3) to (0,0);
\draw (0,1) to[lamp,*-] (2,1) to  (3,1) node[component]{\SI{2}{\ampere}} to [short,-*] (4,1);
\end{circuitikz}

\end{document} 

在此处输入图片描述

相关内容