Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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] doesnt work.

Thanks.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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}
share|improve this answer
    
Gonzalo, many thanks for your answer. Is it possible to make the diodes smaller without changing the size of the battery? –  sergej Mar 13 '13 at 13:52
1  
@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}}}. –  Qrrbrbirlbel Mar 13 '13 at 15:42
    
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 '13 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 '13 at 6:48
    
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 '13 at 6:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.