
\documentclass[border=10pt]{standalone}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0)
node[transformer] (T) {};
\draw (T.B1)
to [D] (3,|-T.B1)
to [R] (3,|-T.B2)
-- (T.B2);
{
\ctikzset{bipoles/resistor/width =0.4}
\draw (3,|-T.B1)
to [vR] (6,|-T.B1)
to [R] (6,-1);
}
\draw (3,-1)
node [npn,xscale=-1] (npn) {}
(npn.collector) ;
\end{circuitikz}
\end{document}
如何將電晶體的集電極放置在最右側電阻的末端?
答案1
使用收集器的錨點(circuitikz
文件解釋了元件的預定義錨點,但在這種情況下,您也可以使用「標準」TikZ 錨點):
\documentclass[border=10pt]{standalone}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0)
node[transformer] (T) {};
\draw (T.B1)
to [D] (3,|-T.B1)
to [R] (3,|-T.B2)
-- (T.B2);
{
\ctikzset{bipoles/resistor/width =0.4}
\draw (3,|-T.B1)
to [vR] (6,|-T.B1)
to [R]
(6,-1) node [npn,xscale=-1,anchor=C] (npn) {}
(npn.collector);
}
\end{circuitikz}
\begin{circuitikz}
\draw (0,0)
node[transformer] (T) {};
\draw (T.B1)
to [D] (3,|-T.B1)
to [R] (3,|-T.B2)
-- (T.B2);
{
\ctikzset{bipoles/resistor/width =0.4}
\draw (3,|-T.B1)
to [vR] (6,|-T.B1)
to [R] (6,-1);
}
\draw (6,-1)
node [npn,xscale=-1,anchor=B,rotate=-90] (npn) {}
(npn.collector);
\end{circuitikz}
\end{document}