这是我的代码:
\documentclass{standalone}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[npn](npn) at (0,0) {2N3904};
\draw (npn.C)
to [R,l_=560<\ohm>] (0,3)
to [short] (0,4);
\draw (npn.E) --++(0,-0.5) node[ground]{};
\draw (npn.B)
to [short] (-2,0)
to [R,l^=200<\kilo\ohm>] (-2,3.75)
to [short] (0,3.75)
to node[vcc]{+15\,\textnormal{V}} (0,4.5);
\end{circuitikz}
\end{document}
这是它产生的输出:
有没有办法将 NPN 晶体管标签“2N3904”向下移动,如下图所示?
答案1
使用
\node[npn, label=right:2N3904](npn) at (0,0) {};
反而。
\documentclass[border=4mm]{standalone}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}
\node[npn, label=right:2N3904](npn) at (0,0) {};
\draw (npn.C)
to [R,l_=560<\ohm>] (0,3)
to [short] (0,4);
\draw (npn.E) -- ++(0,-0.5) node[ground]{};
\draw (npn.B)
to [short] (-2,0)
to [R,l^=200<\kilo\ohm>] (-2,3.75)
to [short] (0,3.75)
to node[vcc]{+15\,\textnormal{V}} (0,4.5);
\end{circuitikz}
\end{document}