8

How can I make the diodes in the following circuit smaller?

\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] doesn't work.

2 Answers 2

8

You can use

\ctikzset{bipoles/length=<value>}

A complete example:

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

enter image description here

If you want to scale the whole circuit, you can use the options scale=<value>,transform shape to the circuitikz environment:

\begin{circuitikz}[scale=0.5,transform shape]
....
\end{circuitikz}
7
  • Gonzalo, many thanks for your answer. Is it possible to make the diodes smaller without changing the size of the battery?
    – sergej
    Mar 13, 2013 at 13:52
  • 2
    @sergej You can only change the appearance of the full Schottky diode with: \tikzset{full Schottky diode/.append style={bipoles/length=1cm}} or \tikzset{full Schottky diode/.append style={/tikz/every node/.append style={/tikz/scale=0.5}}}. Mar 13, 2013 at 15:42
  • 2
    You can also try to put \ctikzset{bipoles/diode/height=.375} \ctikzset{bipoles/diode/width=.3}, or something similar, before your circuit. That will affect all diodes, and only diodes, scaling them down 1/4 of the original.
    – kenshin
    Nov 29, 2013 at 1:55
  • I would just like to point out that you can put calls to \ctikzset{bipoles/length=<value>} inside your circuitikz environment, interspersed with \draw commands, so that different components can have different sizes.
    – Dan Becker
    Dec 1, 2013 at 6:48
  • 2
    Even better, you can just do \draw (0,0) to[R, bipoles/length=0.5cm] (1,0) if you only need to change the size of a single component.
    – Dan Becker
    Dec 1, 2013 at 6:52
2

Just for completeness, with a recent circuitikz (> 0.9.4), you can just do something like that in the preamble:

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

output with scaling

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .