我想以灯泡标签的形式显示其标称电压和电流。我尝试:
\documentclass[border = 1mm]{standalone}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{circuitikz}
\draw (0,0) to [vsource, l=$\SI{6}{V}$] (0,3) to[lamp, l=$\SI{6}{V},{100}{mA}$] (3,3) to [R, l=$R_1$] (3,0) -- (0,0);
但它导致我出现错误
我该怎么办?非常感谢你的帮助
答案1
像那样?
\documentclass[border = 1mm]{standalone}
\usepackage{circuitikz}
\usepackage{siunitx}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{circuitikz}
\draw (0,0) to [vsource, l=\SI{6}{V}] (0,3) to[lamp, l=\mbox{\SI{6}{V}, \SI{100}{mA}}] (3,3) to [R, l=$R_1$] (3,0) -- (0,0);
\end{circuitikz}
\end{document}