%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% defcirc.tex
% definitions of circuit element macros
%
% author:          K.H. Hofmann, A.K"oster
% e-mail:          karlheinrich.hofmann@hs-rm.de
% created:         10.02.1995
% last revision:   07.01.2018, 09.06.2016, 10.01.2016, 21.07.2014 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \usepackage{calc}       % required for calculations with parameters
%
% ! loading of file defxpic.tex mandatory 
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% circuit elements
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ground 2 x 4.4 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\ground}[2]{\put(#1,#2){\begin{picture}(2,4.4)(1,0)
        \put(0,0){\line(1,0){2}}        \put(1,0){\line(0,1){3}}
        \put(1,3.7){\circle{1.4}}     
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% groundd 2 x 4.4 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\groundd}[2]{\put(#1,#2){\begin{picture}(2,4.4)(1,0)
        \put(0,0){\line(1,0){2}}  \put(1,0){\line(0,-1){3}}
        \put(1,-3.7){\circle{1.4}}     
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% resistor 3 x 8 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Rr}[2]{\put(#1,#2){\begin{picture}(8,3)(0,1.5)
        \put(0,0){\line(0,1){3}}        \put(8,0){\line(0,1){3}}
        \put(0,0){\line(1,0){8}}        \put(0,3){\line(1,0){8}}
                                \end{picture}}}
\newcommand{\Rl}[2]{\put(#1,#2){\begin{picture}(8,3)(8,1.5)
        \put(0,0){\line(0,1){3}}        \put(8,0){\line(0,1){3}}
        \put(0,0){\line(1,0){8}}        \put(0,3){\line(1,0){8}}
                                \end{picture}}}
\newcommand{\Rd}[2]{\put(#1,#2){\begin{picture}(3,8)(1.5,8)
        \put(0,0){\line(0,1){8}}        \put(3,0){\line(0,1){8}}
        \put(0,0){\line(1,0){3}}        \put(0,8){\line(1,0){3}}
                                \end{picture}}}
\newcommand{\Ru}[2]{\put(#1,#2){\begin{picture}(3,8)(1.5,0)
        \put(0,0){\line(0,1){8}}        \put(3,0){\line(0,1){8}}
        \put(0,0){\line(1,0){3}}        \put(0,8){\line(1,0){3}}
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Potentiometer 8 x 6 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Pol}[2]{\put(#1,#2){\begin{picture}(6,8)
            \dot{0}{0}\Ru{-1.5}{-4}\put(0,0){\vector(-2,1){6}}
                                \end{picture}}}
\newcommand{\Por}[2]{\put(#1,#2){\begin{picture}(6,8)
            \dot{0}{0}\Ru{1.5}{-4}\put(0,0){\vector(2,1){6}}
                                \end{picture}}}
\newcommand{\Pod}[2]{\put(#1,#2){\begin{picture}(8,6)
            \dot{0}{0}\Rr{-4}{-1.5}\put(0,0){\vector(-1,-2){3}}
                                \end{picture}}}
\newcommand{\Pou}[2]{\put(#1,#2){\begin{picture}(8,6)
            \dot{0}{0}\Rr{-4}{1.5}\put(0,0){\vector(1,2){3}}
                                \end{picture}}}
% Potentiometer 3 x 8 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \Triu -> \Potiul und \dot added,  revised : 02.10.97 Hofmann
%\newcommand{\Triu}[2]{\put(#1,#2){\begin{picture}(6,8)(3,0)
%        \put(1.5,0){\line(0,1){8}}      \put(4.5,0){\line(0,1){8}}
%        \put(1.5,0){\line(1,0){3}}      \put(1.5,8){\line(1,0){3}}
%        \put(0,1){\line(1,1){6}}        \qbezier(5.2,7.8)(6,7)(6.8,6.2)
%                                \end{picture}}}
\newcommand{\Potiul}[2]{\put(#1,#2){\begin{picture}(6,8)(3,0)
        \multiput(1.5,0)(3,0){2}{\line(0,1){8}}
        \multiput(1.5,0)(0,8){2}{\line(1,0){3}}
        \put(0,1){\line(1,1){6}} \dot{0}{1} 
        \qbezier(5.2,7.8)(6,7)(6.8,6.2)
                                \end{picture}}}
\newcommand{\Potiur}[2]{\put(#1,#2){\begin{picture}(6,8)(3,0)
        \multiput(1.5,0)(3,0){2}{\line(0,1){8}}
        \multiput(1.5,0)(0,8){2}{\line(1,0){3}}
        \put(0,1){\line(1,1){6}} \dot{6}{7} 
        \qbezier(-0.8,1.8)(0,1)(0.8,0.2)
                                \end{picture}}}
\newcommand{\Potird}[2]{\put(#1,#2){\begin{picture}(8,6)(0,3)
        \multiput(0,1.5)(0,3){2}{\line(1,0){8}}
        \multiput(0,1.5)(8,0){2}{\line(0,1){3}}
        \put(1,0){\line(1,1){6}} \dot{1}{0} 
        \qbezier(6.2,6.8)(7,6)(7.8,5.2)
                                \end{picture}}}
\newcommand{\Potiru}[2]{\put(#1,#2){\begin{picture}(8,6)(0,3)
        \multiput(0,1.5)(0,3){2}{\line(1,0){8}}
        \multiput(0,1.5)(8,0){2}{\line(0,1){3}}
        \put(1,0){\line(1,1){6}} \dot{7}{6} 
        \qbezier(0.2,0.8)(1,0)(1.8,-0.8)
                                \end{picture}}}
% Trimmer
\newcommand{\Trimd}[2]{\put(#1,#2){\begin{picture}(8,6)(4,4.5)
        \multiput(0,3)(0,3){2}{\line(1,0){8}}
        \multiput(0,3)(8,0){2}{\line(0,1){3}}
        \vcu{4}{0}{3}
                                \end{picture}}}
\newcommand{\Trimu}[2]{\put(#1,#2){\begin{picture}(8,6)(4,-1.5)
        \multiput(0,0)(0,3){2}{\line(1,0){8}}
        \multiput(0,0)(8,0){2}{\line(0,1){3}}
        \vcd{4}{6}{3}
                                \end{picture}}}
\newcommand{\Triml}[2]{\put(#1,#2){\begin{picture}(6,8)(4.5,4)
        \multiput(3,0)(3,0){2}{\line(0,1){8}}
        \multiput(3,0)(0,8){2}{\line(1,0){3}}
        \vcr{0}{4}{3}
                                \end{picture}}}
\newcommand{\Trimr}[2]{\put(#1,#2){\begin{picture}(6,8)(1.5,4)
        \multiput(0,0)(3,0){2}{\line(0,1){8}}
        \multiput(0,0)(0,8){2}{\line(1,0){3}}
        \vcl{6}{4}{3}
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NTC negative temperature coefficient 8 x 8 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NTCr old
%\newcommand{\NTCr}[2]{\put(#1,#2){\begin{picture}(8,3)(0,1.5)
%        \put(0,0){\line(0,1){3}} \put(8,0){\line(0,1){3}}
%        \put(0,0){\line(1,0){8}} \put(0,3){\line(1,0){8}}
%        \put(4,1.5){\vector(1,1){4}}\put(4,1.5){\vector(-1,-1){4}} 
%        \put(1.5,4){$\scriptstyle \vartheta_-$} 
%                                \end{picture}}}
\newcommand{\NTCr}[2]{\put(#1,#2){\begin{picture}(8,3)(0,1.5)
        \put(0,0){\line(0,1){3}} \put(8,0){\line(0,1){3}}
        \put(0,0){\line(1,0){8}} \put(0,3){\line(1,0){8}}
        \put(-1,-1){\line(1,0){3}} \put(2,-1){\line(3,4){5}}  
        \put(1,4){$\scriptstyle \vartheta_-$} 
                                \end{picture}}}
% NTCd old
%\newcommand{\NTCd}[2]{\put(#1,#2){\begin{picture}(3,8)(1.5,8)
%        \put(0,0){\line(0,1){8}} \put(3,0){\line(0,1){8}}
%        \put(0,0){\line(1,0){3}} \put(0,8){\line(1,0){3}}
%        \put(1.5,4){\vector(1,1){4}}\put(1.5,4){\vector(-1,-1){4}} 
%        \put(3.5,3){$\scriptstyle \vartheta_-$} 
%                                \end{picture}}}
\newcommand{\NTCd}[2]{\put(#1,#2){\begin{picture}(3,8)(1.5,8)
        \put(0,0){\line(0,1){8}} \put(3,0){\line(0,1){8}}
        \put(0,0){\line(1,0){3}} \put(0,8){\line(1,0){3}}
        \put(-1,9){\line(0,-1){3}} \put(-1,6){\line(4,-3){6.67}}  
        \put(3.5,3.5){$\scriptstyle \vartheta_-$} 
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PTC positive temperature coefficient 3 x 8 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PTCr old
%\newcommand{\PTCr}[2]{\put(#1,#2){\begin{picture}(8,3)(0,1.5)
%        \put(0,0){\line(0,1){3}} \put(8,0){\line(0,1){3}}
%        \put(0,0){\line(1,0){8}} \put(0,3){\line(1,0){8}}
%        \put(4,1.5){\vector(1,1){4}}\put(4,1.5){\vector(-1,-1){4}} 
%        \put(1.5,4){$\scriptstyle \vartheta_+$} 
%                                \end{picture}}}
\newcommand{\PTCr}[2]{\put(#1,#2){\begin{picture}(8,3)(0,1.5)
        \put(0,0){\line(0,1){3}} \put(8,0){\line(0,1){3}}
        \put(0,0){\line(1,0){8}} \put(0,3){\line(1,0){8}}
        \put(-1,-1){\line(1,0){3}} \put(2,-1){\line(3,4){5}}  
        \put(1,4){$\scriptstyle \vartheta_+$} 
                                \end{picture}}}
% PTCd old
%\newcommand{\PTCd}[2]{\put(#1,#2){\begin{picture}(3,8)(1.5,8)
%        \put(0,0){\line(0,1){8}} \put(3,0){\line(0,1){8}}
%        \put(0,0){\line(1,0){3}} \put(0,8){\line(1,0){3}}
%        \put(1.5,4){\vector(1,1){4}}\put(1.5,4){\vector(-1,-1){4}} 
%        \put(3.5,3){$\scriptstyle \vartheta_+$} 
%                                \end{picture}}}
\newcommand{\PTCd}[2]{\put(#1,#2){\begin{picture}(3,8)(1.5,8)
        \put(0,0){\line(0,1){8}} \put(3,0){\line(0,1){8}}
        \put(0,0){\line(1,0){3}} \put(0,8){\line(1,0){3}}
        \put(-1,9){\line(0,-1){3}} \put(-1,6){\line(4,-3){6.67}}  
        \put(3.5,3.5){$\scriptstyle \vartheta_+$} 
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% inductivity 3 x 8 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Lr}[2]{\put(#1,#2){\begin{picture}(8,3)(0,1.5)
        \put(0,0){\rule{8.1mm}{3.1mm}}  \end{picture}}}
\newcommand{\Ll}[2]{\put(#1,#2){\begin{picture}(8,3)(8,1.5)
        \put(0,0){\rule{8.1mm}{3.1mm}}  \end{picture}}}
\newcommand{\Lu}[2]{\put(#1,#2){\begin{picture}(3,8)(1.5,0)
        \put(0,0){\rule{3.1mm}{8.1mm}}  \end{picture}}}
\newcommand{\Ld}[2]{\put(#1,#2){\begin{picture}(3,8)(1.5,8)
        \put(0,0){\rule{3.1mm}{8.1mm}}  \end{picture}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% relais 4 x 8 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\relais}[2]{\put(#1,#2){\begin{picture}(8,4)(4,2)
        \put(0,0){\line(0,1){4}} \put(8,0){\line(0,1){4}}
        \put(0,0){\line(1,0){8}} \put(0,4){\line(1,0){8}}
        \put(2,0){\line(1,1){4}} 
                                \end{picture}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% diode (rectifier) 4 x 4 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Dr}[2]{\put(#1,#2){\begin{picture}(4,4)(0,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}}
        \put(4,2){\line(-2,-1){4}} \put(4,2){\line(-2,1){4}}                 
                               \end{picture}}}
\newcommand{\Dl}[2]{\put(#1,#2){\begin{picture}(4,4)(4,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}} 
        \put(0,2){\line(2,1){4}} \put(0,2){\line(2,-1){4}}  
                               \end{picture}}}
\newcommand{\Du}[2]{\put(#1,#2){\begin{picture}(4,4)(2,0)
        \put(0,0){\line(1,0){4}} \put(0,4){\line(1,0){4}}
        \put(2,0){\line(0,1){4}}
        \put(2,4){\line(-1,-2){2}} \put(2,4){\line(1,-2){2}}
                               \end{picture}}}
\newcommand{\Dd}[2]{\put(#1,#2){\begin{picture}(4,4)(2,4)
        \put(0,0){\line(1,0){4}} \put(0,4){\line(1,0){4}}
        \put(2,0){\line(0,1){4}} 
        \put(2,0){\line(-1,2){2}} \put(2,0){\line(1,2){2}}                   
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Zener-diode 4 x 4mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Dzr}[2]{\put(#1,#2){\begin{picture}(4,4)(0,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}} \put(4,0){\line(-1,0){1.5}}
        \put(4,2){\line(-2,-1){4}} \put(4,2){\line(-2,1){4}}
                                 \end{picture}}}
\newcommand{\Dzl}[2]{\put(#1,#2){\begin{picture}(4,4)(4,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}} \put(0,4){\line(1,0){1.5}}
        \put(0,2){\line(2,1){4}} \put(0,2){\line(2,-1){4}}
                                 \end{picture}}}
\newcommand{\Dzu}[2]{\put(#1,#2){\begin{picture}(4,4)(2,0)
        \put(0,0){\line(1,0){4}} \put(0,4){\line(1,0){4}}
        \put(2,0){\line(0,1){4}} \put(4,4){\line(0,-1){1.5}}
        \put(2,4){\line(-1,-2){2}} \put(2,4){\line(1,-2){2}}
                                 \end{picture}}}
\newcommand{\Dzd}[2]{\put(#1,#2){\begin{picture}(4,4)(2,4)
        \put(0,0){\line(1,0){4}} \put(0,4){\line(1,0){4}}
        \put(2,0){\line(0,1){4}}  \put(0,0){\line(0,1){1.5}}
        \put(2,0){\line(-1,2){2}} \put(2,0){\line(1,2){2}}
                                 \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LED  4 x 4 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Ledr}[2]{\put(#1,#2){\begin{picture}(4,4)(0,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}}
        \put(4,2){\line(-2,-1){4}} \put(4,2){\line(-2,1){4}}
        \put(0.5,5){\vector(1,2){1.8}}  \put(2.5,4){\vector(1,2){1.8}}        
                               \end{picture}}}
\newcommand{\Ledl}[2]{\put(#1,#2){\begin{picture}(4,4)(4,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}} 
        \put(0,2){\line(2,1){4}} \put(0,2){\line(2,-1){4}}  
        \put(1.5,0){\vector(-1,-2){1.8}}  \put(3.5,-1){\vector(-1,-2){1.8}}  
                               \end{picture}}}
\newcommand{\Ledu}[2]{\put(#1,#2){\begin{picture}(4,4)(2,0)
        \put(0,0){\line(1,0){4}} \put(0,4){\line(1,0){4}}
        \put(2,0){\line(0,1){4}}
        \put(2,4){\line(-1,-2){2}} \put(2,4){\line(1,-2){2}}
        \put(-1,0.5){\vector(-2,1){3.6}}  \put(0,2.5){\vector(-2,1){3.6}}  
                               \end{picture}}}
\newcommand{\Ledd}[2]{\put(#1,#2){\begin{picture}(4,4)(2,4)
        \put(0,0){\line(1,0){4}} \put(0,4){\line(1,0){4}}
        \put(2,0){\line(0,1){4}} 
        \put(2,0){\line(-1,2){2}} \put(2,0){\line(1,2){2}}  
        \put(5,3.5){\vector(2,-1){3.6}}  \put(4,1.5){\vector(2,-1){3.6}}  
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Photo Diode  4 x 4 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Phdr}[2]{\put(#1,#2){\begin{picture}(4,4)(0,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}}
        \put(4,2){\line(-2,-1){4}} \put(4,2){\line(-2,1){4}}
        \put(2.3,8.6){\vector(-1,-2){1.8}}  \put(4.3,7.6){\vector(-1,-2){1.8}}        
                               \end{picture}}}
\newcommand{\Phdl}[2]{\put(#1,#2){\begin{picture}(4,4)(4,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}} 
        \put(0,2){\line(2,1){4}} \put(0,2){\line(2,-1){4}}  
        \put(-0.3,-3.6){\vector(1,2){1.8}}  \put(1.7,-4.6){\vector(1,2){1.8}}  
                               \end{picture}}}
\newcommand{\Phdu}[2]{\put(#1,#2){\begin{picture}(4,4)(2,0)
        \put(0,0){\line(1,0){4}} \put(0,4){\line(1,0){4}}
        \put(2,0){\line(0,1){4}}
        \put(2,4){\line(-1,-2){2}} \put(2,4){\line(1,-2){2}}
        \put(-4.6,2.3){\vector(2,-1){3.6}}  \put(-3.6,4.3){\vector(2,-1){3.6}}  
                               \end{picture}}}
\newcommand{\Phdd}[2]{\put(#1,#2){\begin{picture}(4,4)(2,4)
        \put(0,0){\line(1,0){4}} \put(0,4){\line(1,0){4}}
        \put(2,0){\line(0,1){4}} 
        \put(2,0){\line(-1,2){2}} \put(2,0){\line(1,2){2}}  
        \put(8.6,1.7){\vector(-2,1){3.6}}  \put(7.6,-0.3){\vector(-2,1){3.6}}  
                                \end{picture}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Schottky-diode 5.5 x 6mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Dsy}[2]{\put(#1,#2){\begin{picture}(4,4)(0,2)
        \put(0,0){\line(0,1){4}} \put(4,-1){\line(0,1){6}}
        \put(0,2){\line(1,0){4}} 
        \put(4,-1){\line(-1,0){1.5}} \put(2.5,-1){\line(0,1){1}}
        \put(4,5){\line(1,0){1.5}}   \put(5.5,5){\line(0,-1){1}}
        \put(4,2){\line(-2,-1){4}} \put(4,2){\line(-2,1){4}}
                                 \end{picture}}}
\newcommand{\Dsyl}[2]{\put(#1,#2){\begin{picture}(4,4)(0,2)
        \put(0,0){\line(0,1){4}} \put(-4,-1){\line(0,1){6}}
        \put(0,2){\line(-1,0){4}} 
        \put(-4,-1){\line(-1,0){1.5}} \put(-5.5,-1){\line(0,1){1}}
        \put(-4,5){\line(1,0){1.5}}   \put(-2.5,5){\line(0,-1){1}}
        \put(-4,2){\line(2,1){4}} \put(-4,2){\line(2,-1){4}}
                                 \end{picture}}}
\newcommand{\Dsyu}[2]{\put(#1,#2){\begin{picture}(4,4)(2,0)
        \put(0,0){\line(1,0){4}} \put(-1,4){\line(1,0){6}}
        \put(2,0){\line(0,1){4}} 
        \put(-1,4){\line(0,1){1.5}} \put(-1,5.5){\line(1,0){1}}
        \put(5,4){\line(0,-1){1.5}} \put(5,2.5){\line(-1,0){1}}
        \put(0,0){\line(1,2){2}} \put(4,0){\line(-1,2){2}}
                                 \end{picture}}}
\newcommand{\Dsyd}[2]{\put(#1,#2){\begin{picture}(4,4)(2,0)
        \put(0,0){\line(1,0){4}} \put(-1,-4){\line(1,0){6}}
        \put(2,0){\line(0,-1){4}} 
        \put(-1,-4){\line(0,1){1.5}} \put(-1,-2.5){\line(1,0){1}}
        \put(5,-4){\line(0,-1){1.5}} \put(5,-5.5){\line(-1,0){1}}
        \put(0,0){\line(1,-2){2}} \put(4,0){\line(-1,-2){2}}
                                 \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tunnel-diode 4 x 4mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Dtu}[2]{\put(#1,#2){\begin{picture}(4,4)(0,2)
        \put(0,0){\line(0,1){4}} \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){4}} \put(4,0){\line(-1,0){1.5}}
        \put(4,4){\line(-1,0){1.5}}
        \put(4,2){\line(-2,-1){4}} \put(4,2){\line(-2,1){4}}
                                 \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% capacity  5 x 4 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Cr}[2]{\put(#1,#2){\begin{picture}(5,4)(0,2)
        \put(2,0){\line(0,1){4}} \put(3,0){\line(0,1){4}}
        \put(0,2){\line(1,0){2}} \put(3,2){\line(1,0){2}}
                                \end{picture}}}
\newcommand{\Cl}[2]{\put(#1,#2){\begin{picture}(5,4)(5,2)
        \put(2,0){\line(0,1){4}} \put(3,0){\line(0,1){4}}
        \put(0,2){\line(1,0){2}} \put(3,2){\line(1,0){2}}
                                \end{picture}}}
\newcommand{\Cu}[2]{\put(#1,#2){\begin{picture}(4,5)(2,0)
        \put(2,0){\line(0,1){2}} \put(2,3){\line(0,1){2}}
        \put(0,2){\line(1,0){4}} \put(0,3){\line(1,0){4}}
                                \end{picture}}}
\newcommand{\Cd}[2]{\put(#1,#2){\begin{picture}(4,5)(2,5)
        \put(2,0){\line(0,1){2}} \put(2,3){\line(0,1){2}}
        \put(0,2){\line(1,0){4}} \put(0,3){\line(1,0){4}}
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% capacity elko  6 x 4 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Cer}[2]{\put(#1,#2){\begin{picture}(6,4)(0,2)
        \put(2,0){\line(0,1){4}} \put(3,0){\line(0,1){4}}
        \put(2,0){\line(1,0){1}} \put(2,4){\line(1,0){1}}
        \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){2}} \put(4,2){\line(1,0){2}}
                                \end{picture}}}
\newcommand{\Cel}[2]{\put(#1,#2){\begin{picture}(6,4)(6,2)
        \put(2,0){\line(0,1){4}} \put(3,0){\line(0,1){4}}
        \put(3,0){\line(1,0){1}} \put(3,4){\line(1,0){1}}
        \put(4,0){\line(0,1){4}}
        \put(0,2){\line(1,0){2}} \put(4,2){\line(1,0){2}}
                                \end{picture}}}
\newcommand{\Ceu}[2]{\put(#1,#2){\begin{picture}(4,6)(2,0)
        \put(2,0){\line(0,1){2}} \put(2,4){\line(0,1){2}}
        \put(0,2){\line(1,0){4}} \put(0,3){\line(1,0){4}}
        \put(0,2){\line(0,1){1}} \put(4,2){\line(0,1){1}}
        \put(0,4){\line(1,0){4}}
                                \end{picture}}}
\newcommand{\Ced}[2]{\put(#1,#2){\begin{picture}(4,6)(2,6)
        \put(2,0){\line(0,1){2}} \put(2,4){\line(0,1){2}}
        \put(0,2){\line(1,0){4}} \put(0,3){\line(1,0){4}}
        \put(0,4){\line(1,0){4}}
        \put(0,3){\line(0,1){1}} \put(4,3){\line(0,1){1}}
                                \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DC Voltage source 8 x 5 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\VDCr}[2]{\put(#1,#2){\begin{picture}(5,8)(0,4)
        \put(2,0){\line(0,1){8}} \put(3,1.5){\line(0,1){5}}
        \put(0,4){\line(1,0){2}} \put(3,4){\line(1,0){2}}
        \txtrt{1.5}{2}{\fsz +}                       
                                  \end{picture}}}
\newcommand{\VDCl}[2]{\put(#1,#2){\begin{picture}(5,8)(5,4)
        \put(2,1.5){\line(0,1){5}} \put(3,0){\line(0,1){8}}
        \put(0,4){\line(1,0){2}}   \put(3,4){\line(1,0){2}}
        \txtlb{3.5}{6}{\fsz +}                       
                                  \end{picture}}}
\newcommand{\VDCu}[2]{\put(#1,#2){\begin{picture}(8,5)(4,0)
        \put(4,0){\line(0,1){2}}   \put(4,3){\line(0,1){2}}
        \put(0,2){\line(1,0){8}}   \put(1.5,3){\line(1,0){5}}
        \txtlt{6}{1.5}{\fsz +}                       
                                  \end{picture}}}
\newcommand{\VDCd}[2]{\put(#1,#2){\begin{picture}(8,5)(4,5)
        \put(4,0){\line(0,1){2}}   \put(4,3){\line(0,1){2}}
        \put(1.5,2){\line(1,0){5}} \put(0,3){\line(1,0){8}}
        \txtrb{2}{4}{\fsz +}                       
                                  \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% AC source 6 x 6 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\VAC}[2]{\put(#1,#2){\begin{picture}(6,6)(3,3)
        \put(3,3){\circle{6}}  \txt{3}{3}{{\Large $\sim$}}
                                 \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% source 6 x 6 mm   (can be used as voltage or current source)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                   line from top to bottom
\newcommand{\SOURCEtd}[2]{\put(#1,#2){\begin{picture}(6,6)(3,3)
        \put(3,3){\circle{6}} \put(3,0){\line(0,1){6}}
                              \end{picture}}}
%
%                   line from left to right
\newcommand{\SOURCElr}[2]{\put(#1,#2){\begin{picture}(6,6)(3,3)
        \put(3,3){\circle{6}} \put(0,3){\line(1,0){6}}
                              \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Transistor npn bipolar 7 x 7 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Tnpnr}[2]{\put(#1,#2){\begin{picture}(7,7)(0,3.5)
        \put(3,3.5){\line(-1,0){3}}\put(3,0){\line(0,1){7}}
        \put(3,5){\line(2,1){4}}   \put(3,2){\line(2,-1){4}}
        \put(3,2){\vector(2,-1){3.6}} 
                                   \end{picture}}}
%
\newcommand{\Tnpnl}[2]{\put(#1,#2){\begin{picture}(7,7)(7,3.5)
        \put(7,3.5){\line(-1,0){3}}\put(4,0){\line(0,1){7}}
        \put(4,5){\line(-2,1){4}}  \put(4,2){\line(-2,-1){4}}
        \put(4,2){\vector(-2,-1){3.6}} 
                                   \end{picture}}}
%
\newcommand{\Tnpnlr}[2]{\put(#1,#2){\begin{picture}(7,7)(3.5,0)
        \put(3.5,3){\line(0,-1){3}} \put(0,3){\line(1,0){7}}
        \put(2,3){\line(-1,2){2}}   \put(5,3){\line(1,2){2}}
        \put(5,3){\vector(1,2){1.76}} 
                                    \end{picture}}}
%
\newcommand{\Tnpnrl}[2]{\put(#1,#2){\begin{picture}(7,7)(3.5,0)
        \put(3.5,3){\line(0,-1){3}} \put(0,3){\line(1,0){7}}
        \put(2,3){\line(-1,2){2}}   \put(5,3){\line(1,2){2}}
        \put(2,3){\vector(-1,2){1.76}} 
                                    \end{picture}}}
%
\newcommand{\Ttnpnr}[2]{\put(#1,#2){\begin{picture}(7,7)(0,3.5)
        \put(3,3.5){\line(-1,0){3}}\put(3,0){\line(0,1){7}}
        \put(3,5){\line(2,1){4}}   \put(3,2){\line(2,-1){4}}
        \put(3,5){\vector(2,1){3.6}} 
                                   \end{picture}}}
%
\newcommand{\Ttnpnl}[2]{\put(#1,#2){\begin{picture}(7,7)(7,3.5)
        \put(7,3.5){\line(-1,0){3}}\put(4,0){\line(0,1){7}}
        \put(4,5){\line(-2,1){4}}  \put(4,2){\line(-2,-1){4}}
        \put(4,5){\vector(-2,1){3.6}} 
                                   \end{picture}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fototransistor npn  8 x 7 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Tfoto}[2]{\put(#1,#2){\begin{picture}(8,7)(0,3.5)
                                  \put(4,0){\line(0,1){7}}
         \put(4,5){\line(2,1){4}}     \put(4,2){\line(2,-1){4}}
         \put(4,2){\vector(2,-1){3.6}}
         \put(0,5){\vector(1,0){3}}   \put(0,2){\vector(1,0){3}} 
                              \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Transistor pnp bipolar 7 x 7 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Tpnpr}[2]{\put(#1,#2){\begin{picture}(7,7)(0,3.5)
        \put(3,3.5){\line(-1,0){3}}   \put(3,0){\line(0,1){7}}
        \put(3,5){\line(2,1){4}}   \put(3,2){\line(2,-1){4}}
        \put(7,0){\vector(-2,1){3.6}} 
                              \end{picture}}}
%
\newcommand{\Tpnpl}[2]{\put(#1,#2){\begin{picture}(7,7)(7,3.5)
        \put(7,3.5){\line(-1,0){3}} \put(4,0){\line(0,1){7}}
        \put(4,5){\line(-2,1){4}}   \put(4,2){\line(-2,-1){4}}
        \put(0,0){\vector(2,1){3.6}} 
                              \end{picture}}}
%
\newcommand{\Tpnplr}[2]{\put(#1,#2){\begin{picture}(7,7)(3.5,0)
        \put(3.5,3){\line(0,-1){3}} \put(0,3){\line(1,0){7}}
        \put(2,3){\line(-1,2){2}}   \put(5,3){\line(1,2){2}}
        \put(7,7){\vector(-1,-2){1.76}} 
                              \end{picture}}}
%
\newcommand{\Tpnprl}[2]{\put(#1,#2){\begin{picture}(7,7)(3.5,0)
        \put(3.5,3){\line(0,-1){3}} \put(0,3){\line(1,0){7}}
        \put(2,3){\line(-1,2){2}}   \put(5,3){\line(1,2){2}}
        \put(0,7){\vector(1,-2){1.76}} 
                              \end{picture}}}
%
\newcommand{\Ttpnpr}[2]{\put(#1,#2){\begin{picture}(7,7)(0,3.5)
        \put(3,3.5){\line(-1,0){3}}   \put(3,0){\line(0,1){7}}
        \put(3,5){\line(2,1){4}}   \put(3,2){\line(2,-1){4}}
        \put(7,7){\vector(-2,-1){3.6}} 
                              \end{picture}}}
%
\newcommand{\Ttpnpl}[2]{\put(#1,#2){\begin{picture}(7,7)(7,3.5)
        \put(7,3.5){\line(-1,0){3}} \put(4,0){\line(0,1){7}}
        \put(4,5){\line(-2,1){4}}   \put(4,2){\line(-2,-1){4}}
        \put(0,7){\vector(2,-1){3.6}} 
                              \end{picture}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% J-FET p-Kanal 7 x 13mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\JFETpr}[2]{\put(#1,#2){\begin{picture}(7,13)(0,4)
        \put(0,4){\line(1,0){4}}   \put(4,4){\vector(-1,0){3}}
        \put(4,2.5){\line(0,1){8}}
        \put(4,4){\line(1,0){3}}   \put(7,4){\line(0,-1){4}}
        \put(4,9){\line(1,0){3}}   \put(7,9){\line(0,1){4}}
                              \end{picture}}}
%
\newcommand{\JFETpl}[2]{\put(#1,#2){\begin{picture}(7,13)(7,4)
        \put(3,4){\line(1,0){4}}   \put(3,4){\vector(1,0){3}}
        \put(3,2.5){\line(0,1){8}}
        \put(0,4){\line(1,0){3}}   \put(0,0){\line(0,1){4}}
        \put(0,9){\line(1,0){3}}   \put(0,9){\line(0,1){4}}
                              \end{picture}}}
%
\newcommand{\JFETplr}[2]{\put(#1,#2){\begin{picture}(13,7)(9,0)
        \put(9,0){\line(0,1){4}}   \put(9,4){\vector(0,-1){3}}
        \put(2.5,4){\line(1,0){8}}
        \put(4,4){\line(0,1){3}}   \put(4,7){\line(-1,0){4}}
        \put(9,4){\line(0,1){3}}   \put(9,7){\line(1,0){4}}
                              \end{picture}}}
%
\newcommand{\JFETprl}[2]{\put(#1,#2){\begin{picture}(13,7)(4,0)
        \put(4,0){\line(0,1){4}}   \put(4,4){\vector(0,-1){3}}
        \put(2.5,4){\line(1,0){8}}
        \put(4,4){\line(0,1){3}}   \put(4,7){\line(-1,0){4}}
        \put(9,4){\line(0,1){3}}   \put(9,7){\line(1,0){4}}
                              \end{picture}}}
%
\newcommand{\JFETprt}[2]{\put(#1,#2){\begin{picture}(7,13)(0,9)
        \put(0,9){\line(1,0){4}}   \put(4,9){\vector(-1,0){3}}
        \put(4,2.5){\line(0,1){8}}                                     
        \put(4,4){\line(1,0){3}}   \put(7,4){\line(0,-1){4}}           
        \put(4,9){\line(1,0){3}}   \put(7,9){\line(0,1){4}}            
                              \end{picture}}}        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% J-FET n-Kanal 7 x 13 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\JFETnr}[2]{\put(#1,#2){\begin{picture}(7,13)(0,4)
        \put(0,4){\line(1,0){4}}   \put(0,4){\vector(1,0){4}}
        \put(4,2.5){\line(0,1){8}}
        \put(4,4){\line(1,0){3}}   \put(7,4){\line(0,-1){4}}
        \put(4,9){\line(1,0){3}}   \put(7,9){\line(0,1){4}}
                              \end{picture}}}
%
\newcommand{\JFETnl}[2]{\put(#1,#2){\begin{picture}(7,13)(7,4)
        \put(3,4){\line(1,0){4}}   \put(7,4){\vector(-1,0){4}}
        \put(3,2.5){\line(0,1){8}}
        \put(0,4){\line(1,0){3}}   \put(0,0){\line(0,1){4}}
        \put(0,9){\line(1,0){3}}   \put(0,9){\line(0,1){4}}
                              \end{picture}}}
%
\newcommand{\JFETnlr}[2]{\put(#1,#2){\begin{picture}(13,7)(9,0)
        \put(9,0){\line(0,1){4}}   \put(9,0){\vector(0,1){4}}
        \put(2.5,4){\line(1,0){8}}
        \put(4,4){\line(0,1){3}}   \put(4,7){\line(-1,0){4}}
        \put(9,4){\line(0,1){3}}   \put(9,7){\line(1,0){4}}
                              \end{picture}}}
%
\newcommand{\JFETnrl}[2]{\put(#1,#2){\begin{picture}(13,7)(4,0)
        \put(4,0){\line(0,1){4}}   \put(4,0){\vector(0,1){4}}
        \put(2.5,4){\line(1,0){8}}
        \put(4,4){\line(0,1){3}}   \put(4,7){\line(-1,0){4}}
        \put(9,4){\line(0,1){3}}   \put(9,7){\line(1,0){4}}
                              \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MOS-FET Depletion p-Kanal 7 x 13 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\MOSFETdpr}[2]{\put(#1,#2){\begin{picture}(7,13)(0,4)
        \put(0,4){\line(1,0){3}}   \put(3,4){\line(0,1){5}}
        \put(4,2.5){\line(0,1){8}}
        \put(4,4){\line(1,0){3}}   \put(7,4){\line(0,-1){4}}
        \put(4,9){\line(1,0){3}}   \put(7,9){\line(0,1){4}}
        \put(4,6.5){\line(1,0){3}} \put(4.5,6.5){\vector(1,0){2.5}}
        \put(7,4){\circle*{0.9}}  
        \put(7,6.5){\line(0,-1){2.5}}
                              \end{picture}}}
%
\newcommand{\MOSFETdpl}[2]{\put(#1,#2){\begin{picture}(7,13)(7,4)
        \put(7,4){\line(-1,0){3}}   \put(4,4){\line(0,1){5}}
        \put(3,2.5){\line(0,1){8}}
        \put(3,4){\line(-1,0){3}}   \put(0,4){\line(0,-1){4}}
        \put(3,9){\line(-1,0){3}}   \put(0,9){\line(0,1){4}}
        \put(3,6.5){\line(-1,0){3}} \put(2.5,6.5){\vector(-1,0){2.5}}
        \put(0,4){\circle*{0.9}}  
        \put(0,6.5){\line(0,-1){2.5}}
                              \end{picture}}}
%
\newcommand{\MOSFETdplr}[2]{\put(#1,#2){\begin{picture}(7,13)(9,0)
        \put(9,0){\line(0,1){3}}   \put(9,3){\line(-1,0){5}}
        \put(2.5,4){\line(1,0){8}}
        \put(4,4){\line(0,1){3}}   \put(4,7){\line(-1,0){4}}
        \put(9,4){\line(0,1){3}}   \put(9,7){\line(1,0){4}}
        \put(6.5,4){\line(0,1){3}} \put(6.5,4.5){\vector(0,1){2.5}}
        \put(9,7){\circle*{0.9}}  
        \put(6.5,7){\line(1,0){2.5}}
                              \end{picture}}}
%
\newcommand{\MOSFETdprl}[2]{\put(#1,#2){\begin{picture}(7,13)(4,0)
        \put(4,0){\line(0,1){3}}   \put(4,3){\line(1,0){5}}
        \put(2.5,4){\line(1,0){8}}
        \put(4,4){\line(0,1){3}}   \put(4,7){\line(-1,0){4}}
        \put(9,4){\line(0,1){3}}   \put(9,7){\line(1,0){4}}
        \put(6.5,4){\line(0,1){3}} \put(6.5,4.5){\vector(0,1){2.5}}
        \put(4,7){\circle*{0.9}}  
        \put(6.5,7){\line(-1,0){2.5}}
                              \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MOS-FET Depletion n-Kanal 7 x 13 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\MOSFETdnr}[2]{\put(#1,#2){\begin{picture}(7,13)(0,4)
        \put(0,4){\line(1,0){3}}   \put(3,4){\line(0,1){5}}
        \put(4,2.5){\line(0,1){8}}
        \put(4,4){\line(1,0){3}}   \put(7,4){\line(0,-1){4}}
        \put(4,9){\line(1,0){3}}   \put(7,9){\line(0,1){4}}
        \put(4,6.5){\line(1,0){3}} \put(7,6.5){\vector(-1,0){3}}
        \put(7,4){\circle*{0.9}} 
        \put(7,6.5){\line(0,-1){2.5}}
                              \end{picture}}}
%
\newcommand{\MOSFETdnl}[2]{\put(#1,#2){\begin{picture}(7,13)(7,4)
        \put(7,4){\line(-1,0){3}}   \put(4,4){\line(0,1){5}}
        \put(3,2.5){\line(0,1){8}}
        \put(3,4){\line(-1,0){3}}   \put(0,4){\line(0,-1){4}}
        \put(3,9){\line(-1,0){3}}   \put(0,9){\line(0,1){4}}
        \put(3,6.5){\line(-1,0){3}} \put(0,6.5){\vector(1,0){3}}
        \put(0,4){\circle*{0.9}}  
        \put(0,6.5){\line(0,-1){2.5}}
                              \end{picture}}}
%
\newcommand{\MOSFETdnlr}[2]{\put(#1,#2){\begin{picture}(7,13)(9,0)
        \put(9,0){\line(0,1){3}}   \put(9,3){\line(-1,0){5}}
        \put(2.5,4){\line(1,0){8}}
        \put(4,4){\line(0,1){3}}   \put(4,7){\line(-1,0){4}}
        \put(9,4){\line(0,1){3}}   \put(9,7){\line(1,0){4}}
        \put(6.5,4){\line(0,1){3}} \put(6.5,7){\vector(0,-1){3}}
        \put(9,7){\circle*{0.9}}  
        \put(6.5,7){\line(1,0){2.5}}
                              \end{picture}}}
%
\newcommand{\MOSFETdnrl}[2]{\put(#1,#2){\begin{picture}(7,13)(4,0)
        \put(4,0){\line(0,1){3}}   \put(4,3){\line(1,0){5}}
        \put(2.5,4){\line(1,0){8}}
        \put(4,4){\line(0,1){3}}   \put(4,7){\line(-1,0){4}}
        \put(9,4){\line(0,1){3}}   \put(9,7){\line(1,0){4}}
        \put(6.5,4){\line(0,1){3}} \put(6.5,7){\vector(0,-1){3}}
        \put(4,7){\circle*{0.9}}  
        \put(6.5,7){\line(-1,0){2.5}}
                              \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MOS-FET Enhancement p-Kanal 7 x 13 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\MOSFETepr}[2]{\put(#1,#2){\begin{picture}(7,13)(0,3.5)
        \put(0,3.5){\line(1,0){3}}   \put(3,3.5){\line(0,1){6}}
        \multiput(4,2.5)(0,3){3}{\line(0,1){2}}
        \put(4,3.5){\line(1,0){3}}   \put(7,3.5){\line(0,-1){3.5}}
        \put(4,9.5){\line(1,0){3}}   \put(7,9.5){\line(0,1){3.5}}
        \put(4,6.5){\line(1,0){3}}   \put(4.5,6.5){\vector(1,0){2.5}}
        \put(7,3.5){\circle*{0.9}} 
        \put(7,6.5){\line(0,-1){3}}
                              \end{picture}}}
%
\newcommand{\MOSFETepl}[2]{\put(#1,#2){\begin{picture}(7,13)(7,3.5)
        \put(7,3.5){\line(-1,0){3}}   \put(4,3.5){\line(0,1){6}}
        \multiput(3,2.5)(0,3){3}{\line(0,1){2}}
        \put(3,3.5){\line(-1,0){3}}   \put(0,3.5){\line(0,-1){3.5}}
        \put(3,9.5){\line(-1,0){3}}   \put(0,9.5){\line(0,1){3.5}}
        \put(3,6.5){\line(-1,0){3}}   \put(2.5,6.5){\vector(-1,0){2.5}}
        \put(0,3.5){\circle*{0.9}} 
        \put(0,6.5){\line(0,-1){3}}
                              \end{picture}}}
%
\newcommand{\MOSFETeplr}[2]{\put(#1,#2){\begin{picture}(13,7)(9.5,0)
        \put(9.5,0){\line(0,1){3}}   \put(9.5,3){\line(-1,0){6}}
        \multiput(2.5,4)(3,0){3}{\line(1,0){2}}
        \put(3.5,4){\line(0,1){3}}   \put(3.5,7){\line(-1,0){3.5}}
        \put(9.5,4){\line(0,1){3}}   \put(9.5,7){\line(1,0){3.5}}
        \put(6.5,4){\line(0,1){3}}   \put(6.5,4.5){\vector(0,1){2.5}}
        \put(9.5,7){\circle*{0.9}} 
        \put(6.5,7){\line(1,0){3}}
                              \end{picture}}}
%
\newcommand{\MOSFETeprl}[2]{\put(#1,#2){\begin{picture}(13,7)(3.5,0)
        \put(3.5,0){\line(0,1){3}}   \put(3.5,3){\line(1,0){6}}
        \multiput(2.5,4)(3,0){3}{\line(1,0){2}}
        \put(3.5,4){\line(0,1){3}}   \put(3.5,7){\line(-1,0){3.5}}
        \put(9.5,4){\line(0,1){3}}   \put(9.5,7){\line(1,0){3.5}}
        \put(6.5,4){\line(0,1){3}}   \put(6.5,4.5){\vector(0,1){2.5}}
        \put(3.5,7){\circle*{0.9}} 
        \put(3.5,7){\line(1,0){3}}
                              \end{picture}}}
%
\newcommand{\MOSFETepru}[2]{\put(#1,#2){\begin{picture}(7,13)(0,9.5)
        \put(0,9.5){\line(1,0){3}}   \put(3,3.5){\line(0,1){6}}
        \multiput(4,2.5)(0,3){3}{\line(0,1){2}}
        \put(4,3.5){\line(1,0){3}}   \put(7,3.5){\line(0,-1){3.5}}
        \put(4,9.5){\line(1,0){3}}   \put(7,9.5){\line(0,1){3.5}}
        \put(4,6.5){\line(1,0){3}}   \put(4.5,6.5){\vector(1,0){2.5}}
        \put(7,9.5){\circle*{0.9}} 
        \put(7,6.5){\line(0,1){3}}
                              \end{picture}}}
%
\newcommand{\MOSFETeplu}[2]{\put(#1,#2){\begin{picture}(7,13)(7,9.5)
        \put(7,9.5){\line(-1,0){3}}   \put(4,3.5){\line(0,1){6}}
        \multiput(3,2.5)(0,3){3}{\line(0,1){2}}
        \put(3,3.5){\line(-1,0){3}}   \put(0,3.5){\line(0,-1){3.5}}
        \put(3,9.5){\line(-1,0){3}}   \put(0,9.5){\line(0,1){3.5}}
        \put(3,6.5){\line(-1,0){3}}   \put(2.5,6.5){\vector(-1,0){2.5}}
        \put(0,9.5){\circle*{0.9}} 
        \put(0,6.5){\line(0,1){3}}
                              \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MOS-FET Enhancement n-Kanal 7 x 13 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\MOSFETenr}[2]{\put(#1,#2){\begin{picture}(7,13)(0,3.5)
        \put(0,3.5){\line(1,0){3}}   \put(3,3.5){\line(0,1){6}}
        \multiput(4,2.5)(0,3){3}{\line(0,1){2}}
        \put(4,3.5){\line(1,0){3}}   \put(7,3.5){\line(0,-1){3.5}}
        \put(4,9.5){\line(1,0){3}}   \put(7,9.5){\line(0,1){3.5}}
        \put(4,6.5){\line(1,0){3}}   \put(7,6.5){\vector(-1,0){3}}
        \put(7,3.5){\circle*{0.9}} 
        \put(7,6.5){\line(0,-1){3}}
                              \end{picture}}}
%
\newcommand{\MOSFETenl}[2]{\put(#1,#2){\begin{picture}(7,13)(7,3.5)
        \put(7,3.5){\line(-1,0){3}}   \put(4,3.5){\line(0,1){6}}
        \multiput(3,2.5)(0,3){3}{\line(0,1){2}}
        \put(3,3.5){\line(-1,0){3}}   \put(0,3.5){\line(0,-1){3.5}}
        \put(3,9.5){\line(-1,0){3}}   \put(0,9.5){\line(0,1){3.5}}
        \put(3,6.5){\line(-1,0){3}}   \put(0,6.5){\vector(1,0){3}}
        \put(0,3.5){\circle*{0.9}} 
        \put(0,6.5){\line(0,-1){3}}
                              \end{picture}}}
%
\newcommand{\MOSFETenlr}[2]{\put(#1,#2){\begin{picture}(13,7)(9.5,0)
        \put(9.5,0){\line(0,1){3}}   \put(9.5,3){\line(-1,0){6}}
        \multiput(2.5,4)(3,0){3}{\line(1,0){2}}
        \put(3.5,4){\line(0,1){3}}   \put(3.5,7){\line(-1,0){3.5}}
        \put(9.5,4){\line(0,1){3}}   \put(9.5,7){\line(1,0){3.5}}
        \put(6.5,4){\line(0,1){3}}   \put(6.5,7){\vector(0,-1){3}}
        \put(9.5,7){\circle*{0.9}} 
        \put(6.5,7){\line(1,0){3}}
                              \end{picture}}}
%
\newcommand{\MOSFETenrl}[2]{\put(#1,#2){\begin{picture}(13,7)(3.5,0)
        \put(3.5,0){\line(0,1){3}}   \put(3.5,3){\line(1,0){6}}
        \multiput(2.5,4)(3,0){3}{\line(1,0){2}}
        \put(3.5,4){\line(0,1){3}}   \put(3.5,7){\line(-1,0){3.5}}
        \put(9.5,4){\line(0,1){3}}   \put(9.5,7){\line(1,0){3.5}}
        \put(6.5,4){\line(0,1){3}}   \put(6.5,7){\vector(0,-1){3}}
        \put(3.5,7){\circle*{0.9}} 
        \put(3.5,7){\line(1,0){3}}
                              \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% coaxial cable 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
% parameter 3: length
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\coaxr}[3]{\put(#1,#2){\begin{picture}(2,2)
                       \multiput(0,0)(#3,0){2}{\circle{3}}
                       \multiput(0,-1.5)(0,3){2}{\line(1,0){#3}}
                       \end{picture}}}
%
\newcommand{\coaxl}[3]{\put(#1,#2){\begin{picture}(2,2)
                       \multiput(0,0)(-#3,0){2}{\circle{3}}
                       \multiput(0,-1.5)(0,3){2}{\line(-1,0){#3}}
                       \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% XLR plugs and jacks 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\XLRp}[2]{\put(#1,#2){\kringel{0}{3.3}  \txtr{-1}{3.3}{\tsz 2} 
             \kringel{0}{-3.3} \txtr{-1}{-3.3}{\tsz 1}
             \kringel{3.3}{0}  \txtr{2.3}{0}{\tsz 3}
             \kreisa{0}{0}{5} }}
%
\newcommand{\XLRj}[2]{\put(#1,#2){\kringelb{0}{3.3}  \txtr{-1}{3.3}{\tsz 2} 
             \kringelb{0}{-3.3} \txtr{-1}{-3.3}{\tsz 1}
             \kringelb{3.3}{0}  \txtr{2.3}{0}{\tsz 3}
             \kreisa{0}{0}{5} }}
%
\newcommand{\XLRpg}[2]{\put(#1,#2){\kringel{0}{3.3}  \txtr{-1}{3.3}{\tsz 2} 
             \kringel{0}{-3.3} \txtr{-1}{-3.3}{\tsz 1}
             \kringel{3.3}{0}  \txtr{2.3}{0}{\tsz 3}
             \kreisa{0}{0}{5} 
             \lnd{0}{-4}{4} \lnr{-1}{-8}{2}  }}
%
\newcommand{\XLRjg}[2]{\put(#1,#2){\kringelb{0}{3.3}  \txtr{-1}{3.3}{\tsz 2} 
             \kringelb{0}{-3.3} \txtr{-1}{-3.3}{\tsz 1}
             \kringelb{3.3}{0}  \txtr{2.3}{0}{\tsz 3}
             \kreisa{0}{0}{5} 
              \lnd{0}{-4}{4} \lnr{-1}{-8}{2}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Cinch (RCA) plugs and jacks 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Cinchp}[2]{\put(#1,#2){\kringelb{0}{0}
             \kreisa{0}{0}{3} }}
%
\newcommand{\Cinchj}[2]{\put(#1,#2){\kringel{0}{0}
             \kreisa{0}{0}{3} }}
%
\newcommand{\Cinchpg}[2]{\put(#1,#2){\kringelb{0}{0}
             \kreisa{0}{0}{3} 
             \lnd{0}{-3}{3}\lnr{-1}{-6}{2}   }}
%
\newcommand{\Cinchjg}[2]{\put(#1,#2){\kringel{0}{0}
             \kreisa{0}{0}{3} 
             \lnd{0}{-3}{3}\lnr{-1}{-6}{2} }}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% operational amplifier 15 x 18 mm ! old symbol
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\OPpmr}[2]{\put(#1,#2){\begin{picture}(15,18)(0,9)
        \put(0,0){\line(0,1){18}}   
        \put(15,9){\line(-5,3){15}} \put(15,9){\line(-5,-3){15}}
        \txt{2.5}{4.5}{$-$} \txt{2.5}{13.5}{$+$}                       
        %\put(0,4.5){\line(-1,0){2}}
        %\put(0,13.5){\line(-1,0){2}}
                               \end{picture}}}
%
\newcommand{\OPpml}[2]{\put(#1,#2){\begin{picture}(15,18)(15,9)
        \put(15,0){\line(0,1){18}}   
        \put(0,9){\line(5,3){15}} \put(0,9){\line(5,-3){15}}
        \txt{12.5}{4.5}{$-$} \txt{12.5}{13.5}{$+$}                       
        %\put(15,4.5){\line(1,0){2}}
        %\put(15,13.5){\line(1,0){2}}
                               \end{picture}}}
%
\newcommand{\OPmpr}[2]{\put(#1,#2){\begin{picture}(15,18)(0,9)
        \put(0,0){\line(0,1){18}}   
        \put(15,9){\line(-5,3){15}} \put(15,9){\line(-5,-3){15}}
        \txt{2.5}{4.5}{$+$} \txt{2.5}{13.5}{$-$}  
        %\put(0,4.5){\line(-1,0){2}}
        %\put(0,13.5){\line(-1,0){2}}                     
                               \end{picture}}}
%
\newcommand{\OPmpl}[2]{\put(#1,#2){\begin{picture}(15,18)(15,9)
        \put(15,0){\line(0,1){18}}   
        \put(0,9){\line(5,3){15}} \put(0,9){\line(5,-3){15}}
        \txt{12.5}{4.5}{$+$} \txt{12.5}{13.5}{$-$}  
        %\put(15,4.5){\line(1,0){2}}
        %\put(15,13.5){\line(1,0){2}}                     
                               \end{picture}}}
%
\newcommand{\OPr}[2]{\put(#1,#2){\begin{picture}(15,18)(0,9)
        \put(0,0){\line(0,1){18}}   
        \put(15,9){\line(-5,3){15}} \put(15,9){\line(-5,-3){15}}
                               \end{picture}}}
%
\newcommand{\OPl}[2]{\put(#1,#2){\begin{picture}(15,18)(15,9)
        \put(15,0){\line(0,1){18}}   
        \put(0,9){\line(5,3){15}} \put(0,9){\line(5,-3){15}}              
                               \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% bipolar supply voltage for operational amplifier 15 x 18 mm ! old symbol
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\OPbpr}[3]{\put(#1,#2){\begin{picture}(15,18)(0,9)
        \put(10,12){\line(0,1){2.5}} 
        \kringel{10}{15.2} \txtl{11.5}{15.2}{$\ssty +#3$}
        \put(10,6){\line(0,-1){2.5}} 
        \kringel{10}{2.8} \txtl{11.5}{2.8}{$\ssty -#3$}
                               \end{picture}}}
%
\newcommand{\OPbpl}[3]{\put(#1,#2){\begin{picture}(15,18)(15,9)
        \put(5,12){\line(0,1){2.5}} 
        \kringel{5}{15.2} \txtr{4}{15.2}{$\ssty +#3$}
        \put(5,6){\line(0,-1){2.5}} 
        \kringel{5}{2.8} \txtr{4}{2.8}{$\ssty -#3$}
                               \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% unipolar supply voltage for operational amplifier 15 x 18 mm ! old symbol
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\OPupr}[3]{\put(#1,#2){\begin{picture}(15,18)(0,9)
        \put(10,12){\line(0,1){2.5}} 
        \kringel{10}{15.2} \txtl{11.5}{15.2}{$\ssty +#3$}
        \put(10,6){\line(0,-1){4}} \put(9,2){\line(1,0){2}}
                               \end{picture}}}
%
\newcommand{\OPupl}[3]{\put(#1,#2){\begin{picture}(15,18)(15,9)
        \put(5,12){\line(0,1){2.5}} 
        \kringel{5}{15.2} \txtr{4}{15.2}{$\ssty +#3$}
        \put(5,6){\line(0,-1){4}} \put(4,2){\line(1,0){2}} 
                               \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% operational amplifier 12 x 18 mm ! new symbol
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\OPNpmr}[2]{\put(#1,#2){\begin{picture}(12,18)(0,9)
        \multiput(0,0)(12,0){2}{\line(0,1){18}}
        \multiput(0,0)(0,18){2}{\line(1,0){12}}
        \txt{2.5}{4}{$-$} \txt{2.5}{14}{$+$} 
        \txtl{8}{14}{$\dsty \rhd$}                      
                                   \end{picture}}}
%
\newcommand{\OPNpml}[2]{\put(#1,#2){\begin{picture}(12,18)(12,9)
        \multiput(12,0)(-12,0){2}{\line(0,1){18}}
        \multiput(12,0)(0,18){2}{\line(-1,0){12}}  
        \txt{9.5}{4}{$-$} \txt{9.5}{14}{$+$} 
        \txtr{4}{14}{$\dsty \lhd$}
                               \end{picture}}}
%
\newcommand{\OPNmpr}[2]{\put(#1,#2){\begin{picture}(12,18)(0,9)
        \multiput(0,0)(12,0){2}{\line(0,1){18}}
        \multiput(0,0)(0,18){2}{\line(1,0){12}}
        \txt{2.5}{4}{$+$} \txt{2.5}{14}{$-$}
        \txtl{8}{14}{$\dsty \rhd$}
                               \end{picture}}}
%
\newcommand{\OPNmpl}[2]{\put(#1,#2){\begin{picture}(12,18)(12,9)
        \multiput(12,0)(-12,0){2}{\line(0,1){18}}
        \multiput(12,0)(0,18){2}{\line(-1,0){12}}    
        \txt{9.5}{4}{$+$} \txt{9.5}{14}{$-$}  
        \txtr{4}{14}{$\dsty \lhd$}             
                               \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% logic gates 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% AND gate, right oriented
\newcommand{\andr}[2]{\put(#1,#2){\begin{picture}(11,8)(0,0)
        \lnud{0}{0}{4} 
        \multiput(0,-4)(0,8){2}{\lnr{0}{0}{7}}
        \qbezier(7,4)(11,4)(11,0) 
        \qbezier(7,-4)(11,-4)(11,0)
        \txt{5.5}{0}{\ssz AND}
                                  \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NAND gate, right oriented
\newcommand{\nandr}[2]{\put(#1,#2){\begin{picture}(12,8)(0,0)
        \lnud{0}{0}{4} 
        \multiput(0,-4)(0,8){2}{\lnr{0}{0}{7}}
        \qbezier(7,4)(11,4)(11,0) 
        \qbezier(7,-4)(11,-4)(11,0)
        \txt{5.5}{0}{\ssz NAND} \put(11.5,0){\circle{1}}
                                  \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% loudspeaker and microphones
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% loudspeaker right oriented
\newcommand{\ldspkr}[2]{\put(#1,#2){\begin{picture}(5.6,10.8)(0,3)
        \multiput(0,0)(2,0){2}{\lnu{0}{0}{6}}
        \multiput(0,0)(0,6){2}{\lnr{0}{0}{2}} 
        \put(2,6){\line(3,2){3.6}} \put(2,0){\line(3,-2){3.6}} 
        \lnu{5.6}{-2.4}{10.8}             
                               \end{picture}}}
% loudspeaker left oriented
\newcommand{\ldspkl}[2]{\put(#1,#2){\begin{picture}(5.6,10.8)(0,3)
        \multiput(0,0)(-2,0){2}{\lnu{0}{0}{6}}
        \multiput(0,0)(0,6){2}{\lnl{0}{0}{2}} 
        \put(-2,6){\line(-3,2){3.6}} \put(-2,0){\line(-3,-2){3.6}} 
        \lnu{-5.6}{-2.4}{10.8}             
                               \end{picture}}}
% microphone right oriented
\newcommand{\micr}[2]{\put(#1,#2){\begin{picture}(4,6)(0,3)
        \kreisa{2}{3}{2} \lnu{4}{0}{6}             
                               \end{picture}}}
% microphone left oriented
\newcommand{\micl}[2]{\put(#1,#2){\begin{picture}(4,6)(0,3)
        \kreisa{-2}{3}{2} \lnu{-4}{0}{6}             
                               \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% rectifiers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\Rectbridgesy}[2]{\put(#1,#2){\begin{picture}(26,26)(0,0)
        \multiput(-13,0)(26,0){2}{\dot{0}{0}}
        \multiput(0,-13)(0,26){2}{\dot{0}{0}}
        \multiput(-13,0)(13,-13){2}{\line(1,1){13}}
        \multiput(-13,0)(13,13){2}{\line(1,-1){13}}
        \txtr{11}{0}{$\scriptstyle +$}
        \txtl{-11}{0}{$\scriptstyle -$}
        \txtt{0}{11}{$\scriptstyle \sim$}
        \txtb{0}{-11}{$\scriptstyle \sim$}
        \Dr{-2}{0} \lnr{-4}{0}{8}             
                               \end{picture}}}
%
\newcommand{\Rectbridgedi}[2]{\put(#1,#2){\begin{picture}(26,26)(0,0)
        \multiput(-13,0)(26,0){2}{\dot{0}{0}}
        \multiput(0,-13)(0,26){2}{\dot{0}{0}}
        \multiput(-13,0)(13,-13){2}{\line(1,1){13}}
        \multiput(-13,0)(13,13){2}{\line(1,-1){13}}
        \qbezier(3.672,6.5)(5.086,7.914)(6.5,9.328)         % D1
        \qbezier(6.5,3.672)(7.914,5.086)(9.328,6.5)
        \qbezier(3.672,6.5)(5.793,5.793)(7.914,5.086)        
        \qbezier(6.5,9.328)(7.207,7.207)(7.914,5.086)   
        \qbezier(-9.328,-6.5)(-7.914,-5.086)(-6.5,-3.672)   % D2
        \qbezier(-6.5,-9.328)(-5.086,-7.914)(-3.672,-6.5)
        \qbezier(-9.328,-6.5)(-7.207,-7.207)(-5.086,-7.914)
        \qbezier(-6.5,-3.672)(-5.793,-5.793)(-5.086,-7.914)

        \qbezier(-6.5,3.672)(-7.914,5.086)(-9.328,6.5)      % D3
        \qbezier(-3.672,6.5)(-5.086,7.914)(-6.5,9.328)
        \qbezier(-6.5,3.672)(-5.793,5.793)(-5.086,7.914)
        \qbezier(-9.328,6.5)(-7.207,7.207)(-5.086,7.914)

        \qbezier(6.5,-9.328)(5.086,-7.914)(3.672,-6.5)      % D4
        \qbezier(9.328,-6.5)(7.914,-5.086)(6.5,-3.672)
        \qbezier(6.5,-9.328)(7.207,-7.207)(7.914,-5.086)
        \qbezier(3.672,-6.5)(5.793,-5.793)(7.914,-5.086)
                                       \end{picture}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% labeled voltage vectors 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% counter definitions for the following voltvector commands
\newcounter{vveclength}
\newcounter{vvecstarty}
\newcounter{vveclabelx}
\newcounter{vveclabely}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% voltage vector to ground, labeling left side of vector 
% ! minimum total length: 12mm
% parameter 1: x-coordinate of lower reference point
% parameter 2: y-coordinate of lower reference point
% parameter 3: y-coordinate of upper reference point
% parameter 4: labeling of vector
%
\newcommand{\voltvectorl}[4]{
  \setcounter{vveclength}{(#3)-(#2)-8}
  \setcounter{vvecstarty}{(#3)-2}
  \setcounter{vveclabelx}{(#1)-2}
  \setcounter{vveclabely}{(\thevvecstarty)-(\thevveclength/2)}
  \kringel{#1}{#3} \ground{#1}{#2}
  \vcd{#1}{\thevvecstarty}{\thevveclength}
  \txtr{\thevveclabelx}{\thevveclabely}{$\ssty #4 $}
                         } 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% voltage vector to ground, labeling right side of vector 
% ! minimum total length: 12mm
% parameter 1: x-coordinate of lower reference point
% parameter 2: y-coordinate of lower reference point
% parameter 3: y-coordinate of upper reference point
% parameter 4: labeling of vector
%
\newcommand{\voltvectorr}[4]{
  \setcounter{vveclength}{(#3)-(#2)-8}
  \setcounter{vvecstarty}{(#3)-2}
  \setcounter{vveclabelx}{(#1)+2}
  \setcounter{vveclabely}{(\thevvecstarty)-(\thevveclength/2)}
  \kringel{#1}{#3} \ground{#1}{#2}
  \vcd{#1}{\thevvecstarty}{\thevveclength}
  \txtl{\thevveclabelx}{\thevveclabely}{$\ssty #4 $}
                         } 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% keys and switches 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% key (Taster) right up, open
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keyru}[2]{\put(#1,#2){\begin{picture}(5,4.4)
 \dot{0}{0} \put(0,0){\line(5,4){5.5}} \lnu{5}{0}{2}
 \end{picture}}} 
% key (Taster) right up, closed
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keyruc}[2]{\put(#1,#2){\begin{picture}(5,3)
 \dot{0}{0} \put(0,0){\line(5,2){6}} \lnu{5}{0}{2}
 \end{picture}}} 
%
% key (Taster) left up, open
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keylu}[2]{\put(#1,#2){\begin{picture}(5,4.4)(5,0)
 \dot{5}{0} \put(5,0){\line(-5,4){5.5}} \lnu{0}{0}{2}
 \end{picture}}}
%
% key (Taster) left up, closed
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keyluc}[2]{\put(#1,#2){\begin{picture}(5,4.4)(5,0)
 \dot{5}{0} \put(5,0){\line(-5,2){6}} \lnu{0}{0}{2}
 \end{picture}}}
%
% key (Taster) up left, open 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keyul}[2]{\put(#1,#2){\begin{picture}(4.4,5)(4.4,0)
 \dot{4.4}{0} \put(4.4,0){\line(-4,5){4.4}} \lnl{4.4}{5}{2}
 \end{picture}}}
%
% key (Taster) up left, closed 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keyulc}[2]{\put(#1,#2){\begin{picture}(4.4,5)(4.4,0)
 \dot{4.4}{0} \put(4.4,0){\line(-2,5){2.4}} \lnl{4.4}{5}{2}
 \end{picture}}}
%
% key (Taster) up right, open 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keyur}[2]{\put(#1,#2){\begin{picture}(4.4,5)
 \dot{0}{0} \put(0,0){\line(4,5){4.4}} \lnr{0}{5}{2}
 \end{picture}}}
%
% key (Taster) up right, closed 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keyurc}[2]{\put(#1,#2){\begin{picture}(4.4,5)
 \dot{0}{0} \put(0,0){\line(2,5){2.4}} \lnr{0}{5}{2}
 \end{picture}}}
%
% key (Taster) down left, open 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keydl}[2]{\put(#1,#2){\begin{picture}(4.4,5)(4.4,5)
 \dot{4.4}{5} \put(4.4,5){\line(-4,-5){4.4}} \lnl{4.4}{0}{2}
 \end{picture}}}
%
% key (Taster) down left, closed 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keydlc}[2]{\put(#1,#2){\begin{picture}(4.4,5)(4.4,5)
 \dot{4.4}{5} \put(4.4,5){\line(-2,-5){2.4}} \lnl{4.4}{0}{2}
 \end{picture}}}
%
% key (Taster) down right, open 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keydr}[2]{\put(#1,#2){\begin{picture}(4.4,5)
 \dot{0}{0} \put(0,0){\line(4,-5){4.4}} \lnr{0}{-5}{2}
 \end{picture}}}
%
% key (Taster) down right, closed 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\keydrc}[2]{\put(#1,#2){\begin{picture}(4.4,5)
 \dot{0}{0} \put(0,0){\line(2,-5){2.4}} \lnr{0}{-5}{2}
 \end{picture}}}
%
% switch right up 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\switchru}[2]{\put(#1,#2){\begin{picture}(6,10)(0,5)
 \dot{0}{5} \put(0,5){\line(2,1){6}} \lnu{5}{7.5}{2.5} \lnd{5}{2.5}{2.5}
 \end{picture}}}
%
% switch right down 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\switchrd}[2]{\put(#1,#2){\begin{picture}(6,10)(0,5)
 \dot{0}{5} \put(0,5){\line(2,-1){6}} \lnu{5}{7.5}{2.5} \lnd{5}{2.5}{2.5}
 \end{picture}}}
%
% switch left up 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\switchlu}[2]{\put(#1,#2){\begin{picture}(6,10)(6,5)
 \dot{6}{5} \put(6,5){\line(-2,1){6}} \lnu{1}{7.5}{2.5} \lnd{1}{2.5}{2.5}
 \end{picture}}}
%
% switch left down 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\switchld}[2]{\put(#1,#2){\begin{picture}(6,10)(6,5)
 \dot{6}{5} \put(6,5){\line(-2,-1){6}} \lnu{1}{7.5}{2.5} \lnd{1}{2.5}{2.5}
 \end{picture}}}
%
% switch down left 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\switchdl}[2]{\put(#1,#2){\begin{picture}(10,6)(5,6)
 \dot{5}{6} \put(5,6){\line(-1,-2){3}} \lnl{2.5}{1}{2.5} \lnr{7.5}{1}{2.5}
 \end{picture}}}
%
% switch down right 
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\switchdr}[2]{\put(#1,#2){\begin{picture}(10,6)(5,6)
 \dot{5}{6} \put(5,6){\line(1,-2){3}} \lnl{2.5}{1}{2.5} \lnr{7.5}{1}{2.5}
 \end{picture}}}
%
% switch up left
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\switchul}[2]{\put(#1,#2){\begin{picture}(10,6)(5,0)
 \dot{5}{0} \put(5,0){\line(-1,2){3}} \lnl{2.5}{5}{2.5} \lnr{7.5}{5}{2.5}
 \end{picture}}}
%
% switch up right
% parameter 1: x-coordinate of reference point
% parameter 2: y-coordinate of reference point
%
\newcommand{\switchur}[2]{\put(#1,#2){\begin{picture}(10,6)(5,0)
 \dot{5}{0} \put(5,0){\line(1,2){3}} \lnl{2.5}{5}{2.5} \lnr{7.5}{5}{2.5}
 \end{picture}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
