在 circuitikz 中更改符号大小

在 circuitikz 中更改符号大小

如何使下列电路中的二极管变得更小?

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

答案2

只是为了完整性,使用最近的circuitikz(> 0.9.4),您可以在序言中执行类似的操作:

\usepackage[europeanresistors,americaninductors, EFvoltages]{circuitikz}
\ctikzset{diodes/scale=0.5, transistors/scale=1.2}

带缩放的输出

相关内容