\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}