我正在嘗試畫一個電路。小點之間必須有電壓源,但它不會出現在電路中。
以下是該問題的一個最小範例。我剛剛在 Sharelatex.com 上嘗試過。
\documentclass{minimal}
\usepackage{siunitx}
\usepackage[cuteinductors,american,smartlabels,siunitx]{circuitikz}
\usetikzlibrary{shadows}
\usetikzlibrary{backgrounds}
\ctikzset {bipoles/thickness=1}
\begin{document}
\begin{circuitikz}[ scale =1.4, american, cute inductors, line width=0.8, line cap=round, line join=round]
\draw %%%% These commands shoud
(0,2) [V=20<\volt>] (2,2); %%%% draw a voltage source
\draw
(0,2)
to [I_=1<\ampere>,*-] ++(0,-2);
\draw (0,0)
to [short] (4,0) to [R=10<\ohm>] (4,2) to [short] (4,4) to [R=10<\ohm>] (0,4) to [short] (0,2);
\draw
(2,2) to [I^=2<\ampere>,*-] (4,2);
\draw
(2,0)
to [R=20<\ohm>](2,2);
\end{circuitikz}
\end{document}
謝謝
答案1
您缺少to
第 10 行:
(0,2) to [V=20<\volt>] (2,2); %%%% draw a voltage source