如何使下列电路中的二极管变得更小?
\documentclass{article}
\usepackage{tikz}
\usepackage[europeanresistors,americaninductors]{circuitikz}
\begin{document}
\begin{circuitikz}
%\draw[step=1.0,black!20] (0,0) grid (6,4);
\draw
(1,1) node[nigfete] (fet1) {}
(1,3) node[nigfete] (fet2) {}
(3,1) node[nigfete] (fet3) {}
(3,3) node[nigfete] (fet4) {}
(5,1) node[nigfete] (fet5) {}
(5,3) node[nigfete] (fet6) {};
\draw
(fet1.S)++(0,0.4) -- ++(0.5,0) to[sD*] ($(fet1.D)+(0.5,-0.4)$) -- ++(-0.5,0)
(fet2.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet2.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet3.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet3.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet4.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet4.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet5.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet5.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet6.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet6.D)+(0.5,-0.1)$) -- ++(-0.5,0);
\draw
(fet1.S)++(0,0) -- ++(-2,0) to[battery] ($(fet2.D)+(-2,0)$) -- ++(2,0);
\draw
(fet1.D) to (fet2.S)
(fet3.D) to (fet4.S)
(fet5.D) to (fet6.S);
\draw
(fet1.S) to (fet3.S)
(fet3.S) to (fet5.S)
(fet2.D) to (fet4.D)
(fet4.D) to (fet6.D);
\end{circuitikz}
\end{document}
to[sD*, scale=.5]
不起作用。
答案1
您可以使用
\ctikzset{bipoles/length=<value>}
完整示例:
\documentclass{article}
\usepackage{tikz}
\usepackage[europeanresistors,americaninductors]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
(1,1) node[nigfete] (fet1) {}
(1,3) node[nigfete] (fet2) {}
(3,1) node[nigfete] (fet3) {}
(3,3) node[nigfete] (fet4) {}
(5,1) node[nigfete] (fet5) {}
(5,3) node[nigfete] (fet6) {};
\draw
(fet1.S)++(0,0.4) -- ++(0.5,0) to[sD*] ($(fet1.D)+(0.5,-0.4)$) -- ++(-0.5,0)
(fet2.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet2.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet3.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet3.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet4.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet4.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet5.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet5.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet6.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet6.D)+(0.5,-0.1)$) -- ++(-0.5,0);
\draw
(fet1.S)++(0,0) -- ++(-2,0) to[battery] ($(fet2.D)+(-2,0)$) -- ++(2,0);
\draw
(fet1.D) to (fet2.S)
(fet3.D) to (fet4.S)
(fet5.D) to (fet6.S);
\draw
(fet1.S) to (fet3.S)
(fet3.S) to (fet5.S)
(fet2.D) to (fet4.D)
(fet4.D) to (fet6.D);
\end{circuitikz}
\vspace{10pt}
\ctikzset{bipoles/length=.6cm}
\begin{circuitikz}
\draw
(1,1) node[nigfete] (fet1) {}
(1,3) node[nigfete] (fet2) {}
(3,1) node[nigfete] (fet3) {}
(3,3) node[nigfete] (fet4) {}
(5,1) node[nigfete] (fet5) {}
(5,3) node[nigfete] (fet6) {};
\draw
(fet1.S)++(0,0.4) -- ++(0.5,0) to[sD*] ($(fet1.D)+(0.5,-0.4)$) -- ++(-0.5,0)
(fet2.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet2.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet3.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet3.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet4.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet4.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet5.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet5.D)+(0.5,-0.1)$) -- ++(-0.5,0)
(fet6.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet6.D)+(0.5,-0.1)$) -- ++(-0.5,0);
\draw
(fet1.S)++(0,0) -- ++(-2,0) to[battery] ($(fet2.D)+(-2,0)$) -- ++(2,0);
\draw
(fet1.D) to (fet2.S)
(fet3.D) to (fet4.S)
(fet5.D) to (fet6.S);
\draw
(fet1.S) to (fet3.S)
(fet3.S) to (fet5.S)
(fet2.D) to (fet4.D)
(fet4.D) to (fet6.D);
\end{circuitikz}
\end{document}
如果要扩展整个电路,可以使用scale=<value>,transform shape
环境选项circuitikz
:
\begin{circuitikz}[scale=0.5,transform shape]
....
\end{circuitikz}