texlive[59856] Master/texmf-dist: circuitikz (6jul21)

commits+karl at tug.org commits+karl at tug.org
Tue Jul 6 22:31:35 CEST 2021


Revision: 59856
          http://tug.org/svn/texlive?view=revision&revision=59856
Author:   karl
Date:     2021-07-06 22:31:34 +0200 (Tue, 06 Jul 2021)
Log Message:
-----------
circuitikz (6jul21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
    trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
    trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
    trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
    trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4.sty
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6.sty
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.7.sty
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.8.3.sty
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.9.3.sty
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-1.0.sty
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-1.1.2.sty
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-1.2.7.sty
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.7-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.8.3-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.9.3-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.9.6-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-1.0-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-1.1.2-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-1.2.7-body.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circutikz-0.9.6.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.9.6.sty

Modified: trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2021-07-06 20:31:34 UTC (rev 59856)
@@ -1,6 +1,16 @@
 <!--- CircuiTikz - Changelog --->
 The major changes among the different CircuiTikZ versions are listed here. See <https://github.com/circuitikz/circuitikz/commits> for a full list of changes.
 
+* Version 1.4.0 (2021-07-06)
+
+    The main news is that *package rollback* for `circuitikz` has been implemented (LaTeX-only, of course).
+    Additionally, a small but important change in the path (`to`) construction that should fix some warning from Ti*k*Z
+    and give better line joins in wire corners.
+
+    - bump version to 1.4.0
+    - implement the version rollback: time travel to 0.4!
+    - remove a wrong movement in the path construction (potentially dangerous)
+
 * Version 1.3.9 (2021-06-27)
 
     Bugfix release: `open poles opacity` was not working in most of the cases.

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -5,6 +5,25 @@
 
 \begin{itemize}
 \item
+  Version 1.4.0 (2021-07-06)
+
+  The main news is that \emph{package rollback} for \texttt{circuitikz}
+  has been implemented (LaTeX-only, of course). Additionally, a small
+  but important change in the path (\texttt{to}) construction that
+  should fix some warning from Ti\emph{k}Z and give better line joins in
+  wire corners.
+
+  \begin{itemize}
+  \tightlist
+  \item
+    bump version to 1.4.0
+  \item
+    implement the version rollback: time travel to 0.4!
+  \item
+    remove a wrong movement in the path construction (potentially
+    dangerous)
+  \end{itemize}
+\item
   Version 1.3.9 (2021-06-27)
 
   Bugfix release: \texttt{open\ poles\ opacity} was not working in most

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -224,6 +224,8 @@
 Here, we will provide a list of incompabilitys between different version of \Circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than including a lot of switches and compatibility layers. In general, changes that would invalidate a circuit (changes of polarity of components and so on) are almost always protected by a flag; the same is not true for purely aesthetic changes.
 If unsure, you can check the version at your local installation using the macro \verb!\pgfcircversion{}!.
 \begin{itemize}
+    \item \texttt{v1.4.0} introduce the rollback system for the package when using LaTeX; that (at least in principle) should be completely backeard-compatible.
+    \item The path construction in \texttt{v1.4.0} has been changed a bit (again). The change shouldn't break any circuit and correct a behavior that should have been fixed with the \texttt{v1.2.1} change (see below).
     \item Version 1.3.6 fixes several problems with the stacked labels; the most important change is that now the bracing of arguments is respected as in version 1.3.0 for the other labels. The special treatment in stacked labels (and only in stacked labels!) for the (still experimental\footnote{and, really, not advised\dots}) \texttt{siunitx} compact syntax \texttt{<...>} has been removed: it was completely buggy before, and silently ignored, now will throw an error.
     \item Version 1.3.3 fixes the direction of the arrows in tunable elements; before this version, they were more or less random, now the arrow goes from bottom left to top right. You have the option to go back to the old behavior with \texttt{\textbackslash ctikzset\{bipoles/fix tunable direction=false\}}. As a compensation for the fuss, now the arrows are configurable. To learn more, see the FAQ:~\ref{faq:tunable-arrow}.
     \item Version 1.3.1 removes the warning if you do not specify a voltage direction.
@@ -257,13 +259,25 @@
 \begin{itemize}
     \item you can use an older version locally using the git-version and picking the correct commit from the repository (branch gh-pages) or the main GitHub site directly;
     \item if you are using \LaTeX, the distribution has embedded several important old versions: \texttt{0.4}, \texttt{0.6}, \texttt{0.7}, \texttt{0.8.3}, \texttt{0.9.3}, \texttt{0.9.6}, \texttt{1.0}, \texttt{1.1.2} and \texttt{1.2.7}.
-        To switch to use them, you simply change your \verb|\usepackage| invocation like
-        \begin{lstlisting}
+        To switch to use them, since \texttt{v1.4.0} you simply use the \href{https://www.latex-project.org/publications/2018-FMi-TUB-tb122mitt-version-rollback.pdf}{new LaTeX kernel rollback system}, changing your \verb|\usepackage| invocation to something like:
+        \begin{lstlisting}[numbers=none]
+            \usepackage[]{circuitikz}[=v0.8.3] % or v0.4, v0.6, ...
+        \end{lstlisting}
+        You can also specify a date instead of a version number: if you write
+        \begin{lstlisting}[numbers=none]
+            \usepackage[]{circuitikz}[=2020/02/05]
+        \end{lstlisting}
+        the rollback system will load the version that was current on February 5th,~2020 (in this case it will be \texttt{v1.0} which was released the day before).
+
+        If for whatever reasons your kernel is older, you can still use the old method of loading the \emph{package-version} package; for example:
+        \begin{lstlisting}[numbers=none]
             \usepackage[]{circuitikz-0.8.3} % or circuitikz-0.4, 0.6...
         \end{lstlisting}
-    You have to take care of the options that may have changed between versions;
+        which is an inferior solution because it can fool any package you use that depend on \texttt{circuitikz}.
+
+        Both ways, you have to take care of the options that may have changed between versions (and sometime syles, if you use them).
     \item   if you are using  \ConTeXt, only versions \texttt{0.8.3}, \texttt{0.9.3},  \texttt{0.9.6}, \texttt{1.0}, \texttt{1.1.2} and \texttt{1.2.7} are packaged; if can use it with
-        \begin{lstlisting}
+        \begin{lstlisting}[numbers=none]
             \usemodule[circuitikz-0.8.3]
         \end{lstlisting}
 \end{itemize}
@@ -1649,6 +1663,18 @@
     thyristor style/.try=compact,
 \end{lstlisting}
 
+Or, in case of new values of existing ``choice'' keys, you can use the syntax:
+
+\begin{lstlisting}[frame=single, framesep=10pt]
+    % Logic ports
+    logic ports/ieee/.try,
+    % this way of setting the key does nothing if ieee option
+    % does not exist; logic ports/.try=ieee does not work
+    % if the key exists but the value is not defined
+    logic ports/scale=1.0,
+\end{lstlisting}
+
+
 \subsection{Subcircuits}\label{sec:subcircuits}
 
 Starting from version \texttt{1.3.5}, there is an \textbf{experimental}\footnote{That means that in future releases the interface can change; use it at your risk and if you need it to continue working as-is, please use the \href{https://circuitikz.github.io/circuitikz/}{GitHub project page} and download and save the \texttt{circuitikzgit.sty} file for future-proof use!} support for generating sub-circuits, or circuits blocks. The creation and use of subcircuits is somewhat limited, to keep them simple and easy to define and maintain.

Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -10,8 +10,8 @@
 %
 % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
 
-\def\pgfcircversion{1.3.9}
-\def\pgfcircversiondate{2021/06/27}
+\def\pgfcircversion{1.4.0}
+\def\pgfcircversiondate{2021/07/06}
 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
 
 \usemodule[tikz]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -111,12 +111,12 @@
 logic ports/fill=none,
 logic ports/thickness=none,
 logic ports origin=legacy, % it can be "center" (better)
-american or shape=roundy,% could be pointy
+american or shape/.try=roundy,% could be pointy
 %
 % flip-flops
-flipflops/scale=1.0,
-flipflops/fill=none,
-flipflops/thickness=none,
+flipflops/scale/.try=1.0,
+flipflops/fill/.try=none,
+flipflops/thickness/.try=none,
 %
 % Integrated circuits
 chips/scale=1.0,

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -54,15 +54,18 @@
 amplifiers/thickness=3.0,
 %
 % Logic ports
-logic ports/.try=ieee,
+logic ports/ieee/.try,
+% this way of setting the key does nothing if ieee option
+% does not exist; logic ports/.try=ieee does not work
+% if the key exists but the value is not defined
 logic ports/scale=1.0,
 logic ports/thickness=2.0,
 logic ports origin=center,
-american or shape=pointy,
+american or shape/.try=pointy,
 %
 % flip-flops
-flipflops/scale=1.0,
-flipflops/thickness=2.0,
+flipflops/scale/.try=1.0,
+flipflops/thickness/.try=2.0,
 %
 % Switches
 bipoles/cuteswitch/thickness=0.5,

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -160,7 +160,7 @@
     \ifx\pgf at temp\pgf at circ@temp  % if it is an open do nothing
     \else
         % it is important to start the path with -- to have correct line joins!
-        -- (\tikztostart) -- (pgfcirc at anchorstartnode)
+        -- (pgfcirc at anchorstartnode)
     \fi
     % Add all the "ornaments": labels, annotations, voltages, currents and flows
     \drawpoles

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -93,12 +93,12 @@
 %% subcircuits (experimental)
 %%
 %% introduced by Romano Giannetti around April 2021
+%% changes suggested by Jonathan P. Spratte
 %%
-%%
 \newbox\ctikz at scratchbox
 \long\def\ctikzsubcircuitdef#1#2#3{%
-    \expandafter\gdef\csname #1 at Anchor\endcsname{}
-    \expandafter\gdef\csname #1 at setanchors\endcsname{
+    \expandafter\gdef\csname #1 at Anchor\endcsname{}%
+    \expandafter\gdef\csname #1 at setanchors\endcsname{%
         \setbox\ctikz at scratchbox=\hbox{%
         \begin{circuitikz}
         \draw (0,0) \csname#1\endcsname{T-#1}{};
@@ -106,17 +106,12 @@
         % reference anchor is -center
         \draw (0,{2-\i/2}) let \p1 = ($(T-#1-subckt at reference)-(T-#1-\anchor)$) in
             node[right]{\anchor: \x1,\y1 \expandafter\xdef\csname #1 at Anchor\anchor\endcsname{++(\x1,\y1)}};
-        \end{circuitikz}
-        }
-    }
-    \expandafter\gdef\csname#1\endcsname##1##2{\csname#1aux\endcsname{##1}{\csname #1 at Anchor##2\endcsname}}
-    \expandafter\gdef\csname#1aux\endcsname##1##2{%
-    % move to the anchor
-    ##2
-    % reference anchor should be -reference
-    coordinate (##1-subckt at reference)
-    #3
-    }
+        \end{circuitikz}%
+        }%
+    }%
+    \expandafter\gdef\csname#1\endcsname##1##2{%
+        \csname #1 at Anchor##2\endcsname coordinate(##1-subckt at reference)#3%
+    }%
 }
 \long\def\ctikzsubcircuitactivate#1{\csname #1 at setanchors\endcsname}
 

Added: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4-body.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4-body.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4-body.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -0,0 +1,10127 @@
+% Copyright 2018-2021 by Romano Giannetti
+% Copyright 2015-2021 by Stefan Lindner
+% Copyright 2013-2021 by Stefan Erhardt
+% Copyright 2007-2021 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
+
+
+%%%%%
+%%%%%
+%%%%%
+%%%%% Se c'è l'opzione symbol, fallback to siunitx con warning
+%%%%%
+%%%%%
+
+\NeedsTeXFormat{LaTeX2e}
+
+\def\pgfcircversion{0.4}
+\def\pgfcircversiondate{2012/12/20}
+
+%% Version 2.0 of pgf/TikZ is required
+\RequirePackage{tikz}
+\usetikzlibrary{calc}
+\usepgflibrary{decorations.pathmorphing,arrows}
+
+\DeclareOption{european}{
+	\ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
+	 \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester = european} 
+}
+
+\DeclareOption{american}{
+	\ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester = american}
+	\ctikzset{logic ports = american}
+}
+
+\DeclareOption{fulldiodes}{
+	\ctikzset{diode = full}
+}
+
+\DeclareOption{emptydiodes}{
+	\ctikzset{diode = empty}
+}
+
+\DeclareOption{europeanvoltages}{
+	\ctikzset{voltage=european}
+}
+
+\DeclareOption{americanvoltages}{
+	\ctikzset{voltage=american}
+}
+
+\DeclareOption{europeancurrents}{
+	\ctikzset{current = european}
+}
+
+\DeclareOption{americancurrents}{
+	\ctikzset{current = american}
+}
+
+\DeclareOption{europeanvoltages}{
+	\ctikzset{voltage = european}
+}
+
+\DeclareOption{americanresistors}{
+	\ctikzset{resistor = american}
+}
+
+\DeclareOption{europeanresistors}{
+	\ctikzset{resistor = european}
+}
+
+\DeclareOption{americaninductors}{
+	\ctikzset{inductor = american}
+}
+
+\DeclareOption{europeaninductors}{
+	\ctikzset{inductor = european}
+}
+
+\DeclareOption{cuteinductors}{
+	\ctikzset{inductor = cute}
+}
+
+\DeclareOption{americanports}{
+	\ctikzset{logic ports = american}
+}
+
+\DeclareOption{europeanports}{
+	\ctikzset{logic ports = european}
+}
+
+\DeclareOption{americangfsurgearrester}{
+	\ctikzset{gas filled surge arrester = american}
+}
+
+\DeclareOption{europeangfsurgearrester}{
+	\ctikzset{gas filled surge arrester = european}
+}
+
+
+\DeclareOption{siunitx}{
+	\pgf at circ@siunitxtrue
+}
+
+\DeclareOption{nosiunitx}{
+	\pgf at circ@siunitxfalse
+}
+
+\DeclareOption{arrowmos}{
+	\pgf at circuit@mos at arrowstrue
+}
+
+\DeclareOption{noarrowmos}{
+	\pgf at circuit@mos at arrowsfalse
+}
+
+\DeclareOption{straightlabels}{
+	\ctikzset{label/align = straight}
+}
+
+\DeclareOption{rotatelabels}{
+	\ctikzset{label/align = rotate}
+}
+
+\DeclareOption{smartlabels}{
+	\ctikzset{label/align = smart}
+}
+
+
+
+\DeclareOption{fulldiode}{
+	\ctikzset{diode = full}
+}
+
+\DeclareOption{emptydiode}{
+	\ctikzset{diode = empty}
+}
+
+\DeclareOption{europeanvoltage}{
+	\ctikzset{voltage=european}
+}
+
+\DeclareOption{americanvoltage}{
+	\ctikzset{voltage=american}
+}
+
+\DeclareOption{europeancurrent}{
+	\ctikzset{current = european}
+}
+
+\DeclareOption{americancurrent}{
+	\ctikzset{current = american}
+}
+
+\DeclareOption{europeanvoltage}{
+	\ctikzset{voltage = european}
+}
+
+\DeclareOption{americanresistor}{
+	\ctikzset{resistor = american}
+}
+
+\DeclareOption{europeanresistor}{
+	\ctikzset{resistor = european}
+}
+
+\DeclareOption{americaninductor}{
+	\ctikzset{inductor = american}
+}
+
+\DeclareOption{europeaninductor}{
+	\ctikzset{inductor = european}
+}
+
+\DeclareOption{cuteinductor}{
+	\ctikzset{inductor = cute}
+}
+
+\DeclareOption{americanport}{
+	\ctikzset{logic ports = american}
+}
+
+\DeclareOption{europeanport}{
+	\ctikzset{logic ports = european}
+}
+
+\DeclareOption{europeanport}{
+	\ctikzset{logic ports = european}
+}
+
+\DeclareOption{betterproportions}{
+	\ctikzset{monopoles/ground/width/.initial=.15}
+
+	\ctikzset{bipoles/resistor/height/.initial=.23}
+	\ctikzset{bipoles/resistor/width/.initial=.6}
+	\ctikzset{bipoles/capacitor/height/.initial=.4}
+	\ctikzset{bipoles/capacitor/width/.initial=.1}
+	\ctikzset{bipoles/potentiometer/height/.initial=.6}
+	\ctikzset{bipoles/potentiometer/height 2/.initial=.23}
+	\ctikzset{bipoles/potentiometer/width/.initial=.6}
+	\ctikzset{bipoles/photoresistor/height/.initial=.6}
+	\ctikzset{bipoles/photoresistor/height 2/.initial=.23}
+	\ctikzset{bipoles/photoresistor/width/.initial=.6}
+	\ctikzset{bipoles/thermistor/main/.initial=.7}
+	\ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7
+	\ctikzset{bipoles/thermistor/width/.initial=.6}
+	\ctikzset{bipoles/thermistorntc/width/.initial=.6}
+	\ctikzset{bipoles/thermistorntc/main/.initial=.7}
+	\ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7
+	\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7
+	\ctikzset{bipoles/thermistorptc/width/.initial=.6}
+	\ctikzset{bipoles/thermistorptc/main/.initial=.7}
+	\ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7
+	\ctikzset{bipoles/varistor/main/.initial=.7}
+	\ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7
+	\ctikzset{bipoles/varistor/width/.initial=.6}
+	\ctikzset{bipoles/vresistor/height/.initial=.45}
+	\ctikzset{bipoles/vresistor/width/.initial=.6}
+	\ctikzset{bipoles/cuteinductor/height/.initial=.23}
+	\ctikzset{bipoles/cuteinductor/width/.initial=.6}
+	\ctikzset{bipoles/cuteinductor/coils/.initial=6}
+	\ctikzset{bipoles/americaninductor/height/.initial=.23}
+	\ctikzset{bipoles/americaninductor/height 2/.initial=.1}
+	\ctikzset{bipoles/americaninductor/width/.initial=.6}
+	\ctikzset{bipoles/americaninductor/coils/.initial=4}
+	\ctikzset{bipoles/vcuteinductor/height/.initial=.6}
+	\ctikzset{bipoles/vcuteinductor/coil height/.initial=.23}
+	\ctikzset{bipoles/vcuteinductor/width/.initial=.6}
+	\ctikzset{bipoles/vcuteinductor/coils/.initial=6}
+	\ctikzset{bipoles/vamericaninductor/height/.initial=.45}
+	\ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
+	\ctikzset{bipoles/vamericaninductor/width/.initial=.6}
+	\ctikzset{bipoles/vamericaninductor/coils/.initial=4}
+	\ctikzset{bipoles/generic/height/.initial=.23}
+	\ctikzset{bipoles/generic/width/.initial=.6}
+	\ctikzset{bipoles/generic potentiometer/height/.initial=.6}
+	\ctikzset{bipoles/generic potentiometer/height 2/.initial=.23}
+	\ctikzset{bipoles/generic potentiometer/width/.initial=.6}
+	\ctikzset{bipoles/ageneric/height/.initial=.23}
+	\ctikzset{bipoles/ageneric/width/.initial=.6}
+	\ctikzset{bipoles/memristor/height/.initial=.23}
+	\ctikzset{bipoles/memristor/wave height/.initial=.375}
+	\ctikzset{bipoles/memristor/width/.initial=.60}
+	\ctikzset{bipoles/tgeneric/height/.initial=.525}
+	\ctikzset{bipoles/tgeneric/width/.initial=.6}
+	\ctikzset{bipoles/tfullgeneric/height/.initial=.525}
+	\ctikzset{bipoles/tfullgeneric/width/.initial=.60}
+	\ctikzset{bipoles/fullgeneric/height/.initial=.23}
+	\ctikzset{bipoles/fullgeneric/width/.initial=.6}
+	\ctikzset{bipoles/diode/height/.initial=.3}
+	\ctikzset{bipoles/diode/width/.initial=.25}
+	
+	\ctikzset{tripoles/thyristor/height/.initial=.66}
+	\ctikzset{tripoles/thyristor/height 2/.initial=.3}
+	\ctikzset{tripoles/thyristor/width/.initial=.6}
+	\ctikzset{tripoles/thyristor/diode height/.initial=.3}
+	\ctikzset{tripoles/thyristor/diode width left/.initial=.4}
+	\ctikzset{tripoles/thyristor/diode width right/.initial=.3}
+
+	\ctikzset{tripoles/triac/height/.initial=.66}
+	\ctikzset{tripoles/triac/width/.initial=.6}
+	\ctikzset{tripoles/triac/diode width left/.initial=.3}
+	\ctikzset{tripoles/triac/diode width right/.initial=.3}
+}
+
+%%%%%%%%%
+
+
+
+%%%%%%%%%%% Springe nach circuitikz.code
+%%%---------- open: circuitikz.code.tex
+
+%% Options
+
+
+
+
+%% Keys
+
+\long\def\pgf at circ@comment#1{}
+
+\def\circuitikzbasekey{/tikz/circuitikz}
+
+\pgfkeys{\circuitikzbasekey/.is family}
+
+\def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
+\let\ctikzset\circuitikzset
+\def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
+\def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
+
+\newif\ifpgf at circuit@inputarrow
+\ctikzset{inputarrow/.is choice}
+\ctikzset{inputarrow/true/.code={\pgf at circuit@inputarrowtrue}}
+\ctikzset{inputarrow/false/.code={\pgf at circuit@inputarrowfalse}}
+
+\ctikzset{bipoles/.is family}
+\ctikzset{bipoles/border margin/.initial=1.1}
+\ctikzset{bipoles/thickness/.initial=2} 
+\ctikzset{bipoles/length/.initial=1.4cm} 
+\ctikzset{nodes width/.initial=.04}
+\newdimen\pgf at circ@Rlen 
+\ctikzset{bipoles/length/.code={\pgf at circ@Rlen = #1}} 
+
+
+\ctikzset{monopoles/.is family}
+\ctikzset{monopoles/ground/width/.initial=.25}
+\ctikzset{monopoles/chassis/width/.initial=.25}
+\ctikzset{monopoles/alternative chassis/width/.initial=.25}
+\ctikzset{monopoles/equipotentiality/width/.initial=.25}
+\ctikzset{monopoles/tlinestub/width/.initial=.25}          
+\ctikzset{monopoles/antenna/width/.initial=.25}            
+\ctikzset{monopoles/antenna/label/xanchor/.initial=.4}            
+\ctikzset{monopoles/antenna/label/yanchor/.initial=.75}            
+\ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}            
+\ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}            
+\ctikzset{monopoles/txantenna/width/.initial=.25}
+\ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}            
+\ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}            
+\ctikzset{monopoles/rxantenna/width/.initial=.25}
+\ctikzset{monopoles/tground/thickness/.initial=3}
+\ctikzset{monopoles/vcc/width/.initial=.2}
+\ctikzset{monopoles/match/width/.initial=.4}
+\ctikzset{monopoles/oscillator/width/.initial=.7}
+
+\ctikzset{bipoles/resistor/height/.initial=.3}
+\ctikzset{bipoles/resistor/width/.initial=.8}
+\ctikzset{bipoles/potentiometer/height/.initial=.8}
+\ctikzset{bipoles/potentiometer/height 2/.initial=.3}
+\ctikzset{bipoles/potentiometer/width/.initial=.8}
+\ctikzset{bipoles/photoresistor/height/.initial=.6}
+\ctikzset{bipoles/photoresistor/height 2/.initial=.3}
+\ctikzset{bipoles/photoresistor/width/.initial=.8}
+\ctikzset{bipoles/thermistor/main/.initial=.7}
+\ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
+\ctikzset{bipoles/thermistorntc/width/.initial=.8}
+\ctikzset{bipoles/thermistorntc/main/.initial=.7}
+\ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
+\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
+\ctikzset{bipoles/thermistorptc/width/.initial=.8}
+\ctikzset{bipoles/thermistorptc/main/.initial=.7}
+\ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
+\ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
+\ctikzset{bipoles/thermistor/width/.initial=.8}
+\ctikzset{bipoles/varistor/main/.initial=.7}
+\ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
+\ctikzset{bipoles/varistor/width/.initial=.8}
+\ctikzset{bipoles/vresistor/height/.initial=.6}
+\ctikzset{bipoles/vresistor/width/.initial=.8}
+\ctikzset{bipoles/cuteinductor/height/.initial=.3}
+\ctikzset{bipoles/cuteinductor/width/.initial=.8}
+\ctikzset{bipoles/cuteinductor/coils/.initial=6}
+\ctikzset{bipoles/americaninductor/height/.initial=.3}
+\ctikzset{bipoles/americaninductor/height 2/.initial=.1}
+\ctikzset{bipoles/americaninductor/width/.initial=.8}
+\ctikzset{bipoles/americaninductor/coils/.initial=4}
+\ctikzset{bipoles/vcuteinductor/height/.initial=.6}
+\ctikzset{bipoles/vcuteinductor/coil height/.initial=.3}
+\ctikzset{bipoles/vcuteinductor/width/.initial=.8}
+\ctikzset{bipoles/vcuteinductor/coils/.initial=6}
+\ctikzset{bipoles/vamericaninductor/height/.initial=.6}
+\ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
+\ctikzset{bipoles/vamericaninductor/width/.initial=.8}
+\ctikzset{bipoles/vamericaninductor/coils/.initial=4}
+\ctikzset{bipoles/isource/height/.initial=.60}
+\ctikzset{bipoles/isource/width/.initial=.60}
+\ctikzset{bipoles/isourceam/height/.initial=.60}
+\ctikzset{bipoles/isourceam/width/.initial=.60}
+\ctikzset{bipoles/vsource/height/.initial=.60}
+\ctikzset{bipoles/vsource/width/.initial=.60}
+\ctikzset{bipoles/vsourceam/height/.initial=.60}
+\ctikzset{bipoles/vsourceam/width/.initial=.60}
+\ctikzset{bipoles/vsourceam/margin/.initial=.7}
+\ctikzset{bipoles/isourcesin/height/.initial=.60}
+\ctikzset{bipoles/isourcesin/width/.initial=.60}
+\ctikzset{bipoles/vsourcesin/height/.initial=.60}
+\ctikzset{bipoles/vsourcesin/width/.initial=.60}
+\ctikzset{bipoles/vsourcesquare/height/.initial=.60}
+\ctikzset{bipoles/vsourcesquare/width/.initial=.60}
+\ctikzset{bipoles/cisource/height/.initial=.7}
+\ctikzset{bipoles/cisource/width/.initial=.7}
+\ctikzset{bipoles/cisourceam/height/.initial=.7}
+\ctikzset{bipoles/cisourceam/width/.initial=.7}
+\ctikzset{bipoles/cvsource/height/.initial=.7}
+\ctikzset{bipoles/cvsource/width/.initial=.7}
+\ctikzset{bipoles/cvsourceam/height/.initial=.7}
+\ctikzset{bipoles/cvsourceam/width/.initial=.7}
+\ctikzset{bipoles/cvsourceam/margin/.initial=.7}
+\ctikzset{bipoles/cvsourceam/text scale/.initial=1}
+\ctikzset{bipoles/cisourcesin/width/.initial=.7}
+\ctikzset{bipoles/cvsourcesin/height/.initial=.7}
+\ctikzset{bipoles/cvsourcesin/width/.initial=.7}
+\ctikzset{bipoles/capacitor/height/.initial=.6}
+\ctikzset{bipoles/capacitor/width/.initial=.2}
+\ctikzset{bipoles/pcapacitor/height/.initial=.6}
+\ctikzset{bipoles/pcapacitor/width/.initial=.2}
+\ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
+\ctikzset{bipoles/vcapacitor/height/.initial=.6}
+\ctikzset{bipoles/vcapacitor/width/.initial=.5}
+\ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
+\ctikzset{bipoles/battery/height/.initial=.6}
+\ctikzset{bipoles/battery/width/.initial=.3}
+\ctikzset{bipoles/battery1/height/.initial=.6}
+\ctikzset{bipoles/battery1/width/.initial=.3}
+\ctikzset{bipoles/diode/height/.initial=.50}
+\ctikzset{bipoles/diode/width/.initial=.40}
+\ctikzset{bipoles/varcap/height/.initial=.50}
+\ctikzset{bipoles/varcap/width/.initial=.45}
+\ctikzset{bipoles/interr/height/.initial=.35}
+\ctikzset{bipoles/interr/width/.initial=.35}
+\ctikzset{bipoles/interr/height 2/.initial=.1}
+\ctikzset{bipoles/generic/height/.initial=.30}
+\ctikzset{bipoles/generic/width/.initial=.80}
+\ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
+\ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
+\ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
+\ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
+\ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
+\ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
+\ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
+\ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
+\ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
+\ctikzset{bipoles/fuse/height/.initial=.20}
+\ctikzset{bipoles/fuse/width/.initial=.50}
+\ctikzset{bipoles/afuse/height/.initial=.20}
+\ctikzset{bipoles/afuse/width/.initial=.50}
+\ctikzset{bipoles/generic potentiometer/height/.initial=.80}
+\ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
+\ctikzset{bipoles/generic potentiometer/width/.initial=.80}
+\ctikzset{bipoles/ageneric/height/.initial=.30}
+\ctikzset{bipoles/ageneric/width/.initial=.80}
+\ctikzset{bipoles/memristor/height/.initial=.30}
+\ctikzset{bipoles/memristor/wave height/.initial=.5}
+\ctikzset{bipoles/memristor/width/.initial=.80}
+\ctikzset{bipoles/tgeneric/height/.initial=.70}
+\ctikzset{bipoles/tgeneric/width/.initial=.80}
+\ctikzset{bipoles/tfullgeneric/height/.initial=.70}
+\ctikzset{bipoles/tfullgeneric/width/.initial=.80}
+\ctikzset{bipoles/fullgeneric/height/.initial=.30}
+\ctikzset{bipoles/fullgeneric/width/.initial=.80}
+\ctikzset{bipoles/open/height/.initial=.25}
+\ctikzset{bipoles/open/width/.initial=.8}
+\ctikzset{bipoles/ammeter/height/.initial=.60}
+\ctikzset{bipoles/ammeter/width/.initial=.60}
+\ctikzset{bipoles/voltmeter/height/.initial=.60}
+\ctikzset{bipoles/voltmeter/width/.initial=.60}
+\ctikzset{bipoles/buffer/height/.initial=1}
+\ctikzset{bipoles/buffer/width/.initial=1}
+\ctikzset{bipoles/not port/width/.initial=1}
+\ctikzset{bipoles/not port/height/.initial=.8}
+\ctikzset{bipoles/not port/circle width/.initial=.15}
+\ctikzset{bipoles/lamp/height/.initial=.60}
+\ctikzset{bipoles/lamp/width/.initial=.60}
+\ctikzset{bipoles/tline/height/.initial=.3}
+\ctikzset{bipoles/tline/width/.initial=.8}
+\ctikzset{bipoles/squid/height/.initial=.60}
+\ctikzset{bipoles/squid/width/.initial=.60}
+\ctikzset{bipoles/barrier/height/.initial=.60}
+\ctikzset{bipoles/barrier/width/.initial=.60}
+\ctikzset{bipoles/thermocouple/height/.initial=.250}
+\ctikzset{bipoles/thermocouple/height 2/.initial=.60}
+\ctikzset{bipoles/thermocouple/width/.initial=.140}
+\ctikzset{bipoles/pushbutton/height/.initial=.5}
+\ctikzset{bipoles/pushbutton/height 2/.initial=.0}
+\ctikzset{bipoles/pushbutton/width/.initial=.50}
+\ctikzset{bipoles/twoport/width/.initial=.7}
+\ctikzset{bipoles/twoport/height/.initial=.7}
+\ctikzset{bipoles/twoport/text/.initial=}
+\ctikzset{bipoles/vco/width/.initial=.7}
+\ctikzset{bipoles/bandpass/width/.initial=.7}
+\ctikzset{bipoles/highpass/width/.initial=.7}
+\ctikzset{bipoles/lowpass/width/.initial=.7}
+\ctikzset{bipoles/adc/width/.initial=.7}
+\ctikzset{bipoles/dac/width/.initial=.7}
+\ctikzset{bipoles/dsp/width/.initial=.7}
+\ctikzset{bipoles/fft/width/.initial=.7}
+\ctikzset{bipoles/amp/width/.initial=.7}
+\ctikzset{bipoles/vamp/width/.initial=.7}
+\ctikzset{bipoles/piattenuator/width/.initial=.7}
+\ctikzset{bipoles/vpiattenuator/width/.initial=.7}
+\ctikzset{bipoles/tattenuator/width/.initial=.7}
+\ctikzset{bipoles/vtattenuator/width/.initial=.7}
+\ctikzset{bipoles/phaseshifter/width/.initial=.7}
+\ctikzset{bipoles/vphaseshifter/width/.initial=.7}
+\ctikzset{bipoles/detector/width/.initial=.7}
+
+\newif\ifpgf at circuit@mos at arrows
+\ctikzset{tripoles/mos style/.is choice}
+\ctikzset{tripoles/mos style/no arrows/.code={\pgf at circuit@mos at arrowsfalse}}
+\ctikzset{tripoles/mos style/arrows/.code={\pgf at circuit@mos at arrowstrue}}
+\ctikzset{tripoles/nmos/width/.initial=.7}
+\ctikzset{tripoles/nmos/gate height/.initial=.35}
+\ctikzset{tripoles/nmos/base height/.initial=.5}
+\ctikzset{tripoles/nmos/height/.initial=1.1}
+\ctikzset{tripoles/nmos/base width/.initial=.5}
+\ctikzset{tripoles/nmos/gate width/.initial=.62}
+\ctikzset{tripoles/pmos/width/.initial=.7}
+\ctikzset{tripoles/pmos/gate height/.initial=.35}
+\ctikzset{tripoles/pmos/base height/.initial=.5}
+\ctikzset{tripoles/pmos/height/.initial=1.1}
+\ctikzset{tripoles/pmos/base width/.initial=.5}
+\ctikzset{tripoles/pmos/gate width/.initial=.62}
+
+\ctikzset{tripoles/nfet/width/.initial=.7}
+\ctikzset{tripoles/nfet/gate height/.initial=.35}
+\ctikzset{tripoles/nfet/base height/.initial=.5}
+\ctikzset{tripoles/nfet/height/.initial=1.1}
+\ctikzset{tripoles/nfet/base width/.initial=.5}
+\ctikzset{tripoles/nfet/gate width/.initial=.62}
+
+\ctikzset{tripoles/pfet/width/.initial=.7}
+\ctikzset{tripoles/pfet/gate height/.initial=.35}
+\ctikzset{tripoles/pfet/base height/.initial=.5}
+\ctikzset{tripoles/pfet/height/.initial=1.1}
+\ctikzset{tripoles/pfet/base width/.initial=.5}
+\ctikzset{tripoles/pfet/gate width/.initial=.62}
+
+\ctikzset{tripoles/nigfete/width/.initial=.7}
+\ctikzset{tripoles/nigfete/gate height/.initial=.35}
+\ctikzset{tripoles/nigfete/base height/.initial=.5}
+\ctikzset{tripoles/nigfete/height/.initial=1.1}
+\ctikzset{tripoles/nigfete/base width/.initial=.5}
+\ctikzset{tripoles/nigfete/gate width/.initial=.62}
+
+\ctikzset{tripoles/nigfetd/width/.initial=.7}
+\ctikzset{tripoles/nigfetd/gate height/.initial=.35}
+\ctikzset{tripoles/nigfetd/base height/.initial=.5}
+\ctikzset{tripoles/nigfetd/height/.initial=1.1}
+\ctikzset{tripoles/nigfetd/base width/.initial=.5}
+\ctikzset{tripoles/nigfetd/gate width/.initial=.62}
+
+\ctikzset{tripoles/pigfete/width/.initial=.7}
+\ctikzset{tripoles/pigfete/gate height/.initial=.35}
+\ctikzset{tripoles/pigfete/base height/.initial=.5}
+\ctikzset{tripoles/pigfete/height/.initial=1.1}
+\ctikzset{tripoles/pigfete/base width/.initial=.5}
+\ctikzset{tripoles/pigfete/gate width/.initial=.62}
+
+\ctikzset{tripoles/pigfetd/width/.initial=.7}
+\ctikzset{tripoles/pigfetd/gate height/.initial=.35}
+\ctikzset{tripoles/pigfetd/base height/.initial=.5}
+\ctikzset{tripoles/pigfetd/height/.initial=1.1}
+\ctikzset{tripoles/pigfetd/base width/.initial=.5}
+\ctikzset{tripoles/pigfetd/gate width/.initial=.62}
+
+\ctikzset{tripoles/npn/width/.initial=.6}
+\ctikzset{tripoles/npn/gate height/.initial=.45}
+\ctikzset{tripoles/npn/gate height 2/.initial=.15}
+\ctikzset{tripoles/npn/base height/.initial=.4}
+\ctikzset{tripoles/npn/height/.initial=1.1}
+\ctikzset{tripoles/npn/gate width/.initial=.5}
+
+
+
+\ctikzset{tripoles/pnp/width/.initial=.6}
+\ctikzset{tripoles/pnp/gate height/.initial=.45}
+\ctikzset{tripoles/pnp/gate height 2/.initial=.15}
+\ctikzset{tripoles/pnp/base height/.initial=.4}
+\ctikzset{tripoles/pnp/height/.initial=1.1}
+\ctikzset{tripoles/pnp/gate width/.initial=.5}
+
+\ctikzset{tripoles/pigbt/width/.initial=.6}
+\ctikzset{tripoles/pigbt/gate height/.initial=.45}
+\ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
+\ctikzset{tripoles/pigbt/base height/.initial=.4}
+\ctikzset{tripoles/pigbt/height/.initial=1.1}
+\ctikzset{tripoles/pigbt/gate width/.initial=.62}
+\ctikzset{tripoles/pigbt/base width/.initial=.5}
+\ctikzset{tripoles/nigbt/width/.initial=.6}
+\ctikzset{tripoles/nigbt/gate height/.initial=.45}
+\ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
+\ctikzset{tripoles/nigbt/base height/.initial=.4}
+\ctikzset{tripoles/nigbt/height/.initial=1.1}
+\ctikzset{tripoles/nigbt/gate width/.initial=.62}
+\ctikzset{tripoles/nigbt/base width/.initial=.5}
+
+\ctikzset{tripoles/njfet/width/.initial=.7}
+\ctikzset{tripoles/njfet/gate height/.initial=.5}
+\ctikzset{tripoles/njfet/gate height 2/.initial=.35}
+\ctikzset{tripoles/njfet/gate width/.initial=.5}
+\ctikzset{tripoles/njfet/height/.initial=1.1}
+\ctikzset{tripoles/pjfet/width/.initial=.7}
+\ctikzset{tripoles/pjfet/gate height/.initial=.5}
+\ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
+\ctikzset{tripoles/pjfet/gate width/.initial=.5}
+\ctikzset{tripoles/pjfet/height/.initial=1.1}
+
+\ctikzset{tripoles/isfet/width/.initial=1}
+\ctikzset{tripoles/isfet/gate height/.initial=.35}
+\ctikzset{tripoles/isfet/base height/.initial=.5}
+\ctikzset{tripoles/isfet/height/.initial=1.1}
+\ctikzset{tripoles/isfet/base width/.initial=.3}
+\ctikzset{tripoles/isfet/gate width/.initial=.5}
+\ctikzset{tripoles/isfet/wave width/.initial=.16}
+\ctikzset{tripoles/isfet/wave amp/.initial=.06}
+\ctikzset{tripoles/isfet/waves y sep/.initial=.22}
+\ctikzset{tripoles/isfet/waves x sep/.initial=.8}
+
+\newif\ifpgf at circuit@europeanlogicport
+\ctikzset{logic ports/.is choice}
+\ctikzset{logic ports/european/.code= {\pgf at circuit@europeanlogicporttrue } }
+\ctikzset{logic ports/american/.code= {\pgf at circuit@europeanlogicportfalse } } 
+
+\newif\ifpgf at circuit@bipole at voltage@backward
+\ctikzset{bipole/voltage/direction/.is choice}
+\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
+\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at voltage@backwardtrue}}
+
+\ctikzset{tripoles/american and port/width/.initial=1.1}
+\ctikzset{tripoles/american and port/height/.initial=.8}
+\ctikzset{tripoles/american and port/port width/.initial=.7}
+\ctikzset{tripoles/american and port/input height/.initial=.5}
+\ctikzset{tripoles/american nand port/width/.initial=1.1}
+\ctikzset{tripoles/american nand port/height/.initial=.8}
+\ctikzset{tripoles/american nand port/port width/.initial=.7}
+\ctikzset{tripoles/american nand port/circle width/.initial=.15}
+\ctikzset{tripoles/american nand port/input height/.initial=.5}
+\ctikzset{tripoles/american or port/width/.initial=1.1}
+\ctikzset{tripoles/american or port/height/.initial=.8}
+\ctikzset{tripoles/american or port/port width/.initial=.7}
+\ctikzset{tripoles/american or port/input height/.initial=.5}
+\ctikzset{tripoles/american or port/input skip/.initial=.25}
+\ctikzset{tripoles/american or port/aaa/.initial=.6}
+\ctikzset{tripoles/american or port/bbb/.initial=.4} 
+\ctikzset{tripoles/american or port/ccc/.initial=.5} 
+\ctikzset{tripoles/american or port/ddd/.initial=.0}
+\ctikzset{tripoles/american nor port/width/.initial=1.1}
+\ctikzset{tripoles/american nor port/height/.initial=.8}
+\ctikzset{tripoles/american nor port/port width/.initial=.7}
+\ctikzset{tripoles/american nor port/input height/.initial=.5}
+\ctikzset{tripoles/american nor port/input skip/.initial=.25}
+\ctikzset{tripoles/american nor port/circle width/.initial=.15}
+\ctikzset{tripoles/american nor port/aaa/.initial=.6}
+\ctikzset{tripoles/american nor port/bbb/.initial=.4} 
+\ctikzset{tripoles/american nor port/ccc/.initial=.5} 
+\ctikzset{tripoles/american nor port/ddd/.initial=.0}
+\ctikzset{tripoles/american xor port/width/.initial=1.1}
+\ctikzset{tripoles/american xor port/height/.initial=.8}
+\ctikzset{tripoles/american xor port/port width/.initial=.7}
+\ctikzset{tripoles/american xor port/input height/.initial=.5}
+\ctikzset{tripoles/american xor port/input skip/.initial=.15}
+\ctikzset{tripoles/american xor port/distance/.initial=.1} 
+\ctikzset{tripoles/american xor port/aaa/.initial=.6}
+\ctikzset{tripoles/american xor port/bbb/.initial=.4} 
+\ctikzset{tripoles/american xor port/ccc/.initial=.5} 
+\ctikzset{tripoles/american xor port/ddd/.initial=.0}
+\ctikzset{tripoles/american xnor port/width/.initial=1.1}
+\ctikzset{tripoles/american xnor port/height/.initial=.8}
+\ctikzset{tripoles/american xnor port/port width/.initial=.7}
+\ctikzset{tripoles/american xnor port/input height/.initial=.5}
+\ctikzset{tripoles/american xnor port/input skip/.initial=.15}
+\ctikzset{tripoles/american xnor port/distance/.initial=.1} 
+\ctikzset{tripoles/american xnor port/aaa/.initial=.6}
+\ctikzset{tripoles/american xnor port/bbb/.initial=.4} 
+\ctikzset{tripoles/american xnor port/ccc/.initial=.5} 
+\ctikzset{tripoles/american xnor port/ddd/.initial=.0}
+\ctikzset{tripoles/american xnor port/circle width/.initial=.15}
+\ctikzset{tripoles/european and port/width/.initial=1.4}
+\ctikzset{tripoles/european and port/height/.initial=.65}
+\ctikzset{tripoles/european and port/reserved/.initial=.6}
+\ctikzset{tripoles/european and port/input height/.initial=.6}
+\ctikzset{tripoles/european or port/width/.initial=1.4}
+\ctikzset{tripoles/european or port/height/.initial=.65}
+\ctikzset{tripoles/european or port/reserved/.initial=.6}
+\ctikzset{tripoles/european or port/input height/.initial=.6}
+\ctikzset{tripoles/european xor port/width/.initial=1.4}
+\ctikzset{tripoles/european xor port/height/.initial=.65}
+\ctikzset{tripoles/european xor port/reserved/.initial=.6}
+\ctikzset{tripoles/european xor port/input height/.initial=.6}
+\ctikzset{tripoles/european nand port/width/.initial=1.4}
+\ctikzset{tripoles/european nand port/not height/.initial=.3}
+\ctikzset{tripoles/european nand port/not width/.initial=.8}
+\ctikzset{tripoles/european nand port/height/.initial=.65}
+\ctikzset{tripoles/european nand port/reserved/.initial=.6}
+\ctikzset{tripoles/european nand port/input height/.initial=.6}
+\ctikzset{tripoles/european not port/width/.initial=1.4}
+\ctikzset{tripoles/european not port/not height/.initial=.3}
+\ctikzset{tripoles/european not port/not width/.initial=.8}
+\ctikzset{tripoles/european not port/height/.initial=.65}
+\ctikzset{tripoles/european not port/reserved/.initial=.6}
+\ctikzset{tripoles/european not port/input height/.initial=0}
+\ctikzset{tripoles/european xnor port/width/.initial=1.4}
+\ctikzset{tripoles/european xnor port/not height/.initial=.3}
+\ctikzset{tripoles/european xnor port/not width/.initial=.8}
+\ctikzset{tripoles/european xnor port/height/.initial=.65}
+\ctikzset{tripoles/european xnor port/reserved/.initial=.6}
+\ctikzset{tripoles/european xnor port/input height/.initial=.6}
+\ctikzset{tripoles/european nor port/width/.initial=1.4}
+\ctikzset{tripoles/european nor port/not height/.initial=.3}
+\ctikzset{tripoles/european nor port/not width/.initial=.8}
+\ctikzset{tripoles/european nor port/height/.initial=.65}
+\ctikzset{tripoles/european nor port/reserved/.initial=.6}
+\ctikzset{tripoles/european nor port/input height/.initial=.6}
+\ctikzset{tripoles/op amp/width/.initial=1.7}
+\ctikzset{tripoles/op amp/port width/.initial=.7}
+\ctikzset{tripoles/op amp/height/.initial=1.4}
+\ctikzset{tripoles/op amp/input height/.initial=.5}
+\ctikzset{tripoles/op amp/up pos/.initial=.45}
+\ctikzset{tripoles/plain amp/width/.initial=1.7}
+\ctikzset{tripoles/plain amp/port width/.initial=.7}
+\ctikzset{tripoles/plain amp/height/.initial=1.4}
+\ctikzset{tripoles/plain amp/input height/.initial=.5}
+\ctikzset{tripoles/plain amp/up pos/.initial=.45}
+
+\ctikzset{tripoles/thyristor/height/.initial=1.10}
+\ctikzset{tripoles/thyristor/height 2/.initial=.5}
+\ctikzset{tripoles/thyristor/width/.initial=1.0}
+\ctikzset{tripoles/thyristor/diode height/.initial=.5}
+\ctikzset{tripoles/thyristor/diode width left/.initial=.4}
+\ctikzset{tripoles/thyristor/diode width right/.initial=.3}
+
+\ctikzset{tripoles/triac/height/.initial=1.1}
+\ctikzset{tripoles/triac/width/.initial=1}
+\ctikzset{tripoles/triac/diode width left/.initial=.3}
+\ctikzset{tripoles/triac/diode width right/.initial=.3}
+
+\ctikzset{tripoles/spdt/width/.initial=.85}
+\ctikzset{tripoles/spdt/height/.initial=.45}
+\ctikzset{tripoles/spdt/margin/.initial=.45}
+
+\ctikzset{tripoles/toggleswitch/height/.initial=.8}
+\ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
+\ctikzset{tripoles/toggleswitch/width/.initial=.80}
+
+\ctikzset{tripoles/mixer/width/.initial=0.7}
+\ctikzset{tripoles/adder/width/.initial=0.7}
+\ctikzset{tripoles/circulator/width/.initial=.7}
+
+\ctikzset{tripoles/wilkinson/height/.initial=1.3}
+\ctikzset{tripoles/wilkinson/width/.initial=1.3}
+
+\ctikzset{quadpoles/transformer/width/.initial=1.5}
+\ctikzset{quadpoles/transformer/width1/.initial=.4}
+\ctikzset{quadpoles/transformer/height/.initial=1.5}
+\ctikzset{quadpoles/transformer/height1/.initial=.8}
+\ctikzset{quadpoles/transformer core/width/.initial=1.5}
+\ctikzset{quadpoles/transformer core/height/.initial=1.5}
+\ctikzset{quadpoles/transformer core/core height/.initial=.5}
+\ctikzset{quadpoles/transformer core/core width/.initial=.05}
+\ctikzset{quadpoles/gyrator/width/.initial=1.5}
+\ctikzset{quadpoles/gyrator/height/.initial=1.5}
+\ctikzset{quadpoles/coupler/width/.initial=1.3}
+\ctikzset{quadpoles/coupler/height/.initial=1.3}
+
+\ctikzset{bipole/.is family}
+\ctikzset{bipole/kind/.initial = }
+\ctikzset{bipole/name/.initial = }
+\newif\ifpgf at circuit@bipole at reversed
+\ctikzset{bipole/reversed/.is if=pgf at circuit@bipole at reversed}
+\newif\ifpgf at circuit@bipole at isvoltage
+\ctikzset{bipole/is voltage/.is if=pgf at circuit@bipole at isvoltage}
+\newif\ifpgf at circuit@bipole at iscurrent
+\ctikzset{bipole/is current/.is if=pgf at circuit@bipole at iscurrent}
+
+\ctikzset{bipole/voltage/.is family}
+\newif\ifpgf at circuit@bipole at voltage@backward
+\ctikzset{bipole/voltage/direction/.is choice}
+\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
+\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at voltage@backwardtrue}}
+\newif\ifpgf at circuit@bipole at voltage@below
+\ctikzset{bipole/voltage/position/.is choice}
+\ctikzset{bipole/voltage/position/above/.code={\pgf at circuit@bipole at voltage@belowfalse}}
+\ctikzset{bipole/voltage/position/below/.code={\pgf at circuit@bipole at voltage@belowtrue}}
+
+\ctikzset{bipole/voltage/label/unit/.initial=}
+\ctikzset{bipole/voltage/label/name/.initial=}
+
+\ctikzset{bipole/current/.is family}
+\newif\ifpgf at circuit@bipole at current@backward
+\ctikzset{bipole/current/direction/.is choice}
+\ctikzset{bipole/current/direction/forward/.code={\pgf at circuit@bipole at current@backwardfalse}}
+\ctikzset{bipole/current/direction/backward/.code={\pgf at circuit@bipole at current@backwardtrue}}
+\newif\ifpgf at circuit@bipole at current@before
+\ctikzset{bipole/current/x position/.is choice}
+\ctikzset{bipole/current/x position/after/.code={\pgf at circuit@bipole at current@beforefalse}}
+\ctikzset{bipole/current/x position/before/.code={\pgf at circuit@bipole at current@beforetrue}}
+\newif\ifpgf at circuit@bipole at current@below
+\ctikzset{bipole/current/y position/.is choice}
+\ctikzset{bipole/current/y position/above/.code={\pgf at circuit@bipole at current@belowfalse}}
+\ctikzset{bipole/current/y position/below/.code={\pgf at circuit@bipole at current@belowtrue}}
+
+\ctikzset{bipole/current/label/unit/.initial=}
+\ctikzset{bipole/current/label/name/.initial=}
+
+\ctikzset{bipole/label/.is family}
+\ctikzset{bipole/label/position/.initial=90}
+\ctikzset{bipole/label/unit/.initial=}
+\ctikzset{bipole/label/name/.initial=}
+\ctikzset{bipole/nodes/.is family}
+\ctikzset{bipole/nodes/left/.is choice}
+\ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
+\ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
+\ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
+\ctikzset{bipole/nodes/right/.is choice}
+\ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
+\ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
+\ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
+
+
+\newif\ifpgf at circuit@europeanresistor
+\ctikzset{resistor/.is choice}
+\ctikzset{resistor/american/.code = \pgf at circuit@europeanresistorfalse }
+\ctikzset{resistor/european/.code = \pgf at circuit@europeanresistortrue }
+
+\ctikzset{inductor/.is choice}
+\ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
+\ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
+\ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
+
+\newif\ifpgf at circuit@fulldiode
+\ctikzset{diode/.is if=pgf at circuit@fulldiode}
+\ctikzset{diode/.is choice}
+\ctikzset{diode/empty/.code = \pgf at circuit@fulldiodefalse }
+\ctikzset{diode/full/.code = \pgf at circuit@fulldiodetrue }
+\ctikzset{thickness/.initial=2}
+\ctikzset{color/.initial=black}
+\pgfkeys{/tikz/color/.add code={}{\ctikzset{color=#1}}}
+
+
+\newif\ifpgf at circ@siunitx
+\newif\ifpgf at circ@siunitx at res
+
+\ctikzset{voltage/.is family}
+\ctikzset{voltage/distance from node/.initial=.5} %\pgf at circ@Rlen units
+\ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
+\ctikzset{voltage/bump a/.initial=1.2}
+\ctikzset{voltage/bump b/.initial=1.5}
+\ctikzset{voltage/european label distance/.initial=1.4}
+\ctikzset{voltage/american label distance/.initial=1.1}
+% special cases
+\ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
+\ctikzset{bipoles/generic/voltage/bump b/.initial=2}
+\ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
+%\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
+\ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
+\ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
+\ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
+\ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
+\ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
+\ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
+\ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
+\ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
+\ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
+\ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
+\ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
+%\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
+\ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
+%\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
+\ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
+%\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
+\ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
+%\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
+\ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
+%\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
+%\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
+
+\ctikzset{current/.is family}
+\ctikzset{current/distance/.initial = .5}
+
+\tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
+\tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
+\tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
+\tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
+\tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
+\tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
+
+\newif\ifpgf at circuit@europeangfsurgearrester
+\ctikzset{gas filled surge arrester/.is choice}
+\ctikzset{gas filled surge arrester/european/.code= {\pgf at circuit@europeangfsurgearrestertrue } }
+\ctikzset{gas filled surge arrester/american/.code= {\pgf at circuit@europeangfsurgearresterfalse } } 
+
+\tikzset{american gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = american } }
+\tikzset{european gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = european } }
+\tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
+\tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
+\tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
+\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full } }
+\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty } }
+\tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
+\tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
+\tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
+\tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester } }
+\tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
+
+% I should try to make the tree clearer (this voltaege conflicts with the options above)
+
+\newif\ifpgf at circuit@europeanvoltage
+\ctikzset{voltage/.is choice}
+\ctikzset{voltage/american/.code = {\pgf at circuit@europeanvoltagefalse } }
+\ctikzset{voltage/european/.code = {\pgf at circuit@europeanvoltagetrue } }
+
+\newif\ifpgf at circuit@europeancurrent
+\ctikzset{current/.is choice}
+\ctikzset{current/american/.code = \pgf at circuit@europeancurrentfalse }
+\ctikzset{current/european/.code = \pgf at circuit@europeancurrenttrue }
+
+\ctikzset{label/align/.is choice}
+\ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
+\ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
+\ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
+%% dependencies
+
+
+
+
+%%%%%%%%%% new
+\pgfkeys{\circuitikzbasekey/.search also={/tikz}}
+
+
+
+
+
+%%%%%%%%%%% Springe nach pgfcircutils
+%%%---------- open: pgfcircutils.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%\def\pgf at circ@handleSI#1{%
+ % \pgf at circ@siunitx at resfalse
+%  
+ % \edef\len{\stringlength[e]{#1}}
+  %\testmatchingchar[e]{#1}{\len}{>}%
+  %\ifmatchingchar%
+  %  \ifnum\findchars{#1}{<}=0
+	%  \def\pgf at circ@handleSI at val{\substring{#1}{1}{\findchars{#1}{<}-1}}
+	  %\def\pgf at circ@handleSI at unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
+	  %\pgf at circ@siunitx at restrue
+%	\else
+%	\fi
+  %\else 
+  %\fi
+%}
+
+\def\pgf at circ@handleSI#1{
+	\noexpandarg
+        	\def\pgf at temp{}
+	\StrBetween{#1}{<}{>}[\pgf at circ@handleSI at unit]
+	\StrLen{\pgf at circ@handleSI at unit}[\pgf at circ@handleSI at unit@len]
+
+	\ifnum\pgf at circ@handleSI at unit@len=0  
+	  \pgf at circ@siunitx at resfalse  
+	\else  
+	  \IfEndWith{#1}{>}{
+	  	\pgf at circ@siunitx at restrue 
+		\noexpandarg
+	  	\StrBefore{#1}{<}[\pgf at circ@handleSI at val]		
+                %\typeout{si |#1|}
+	  }{
+	  	\pgf at circ@siunitx at resfalse 
+                %\typeout{no si |#1|}
+	  }
+	\fi
+}
+
+\def\pgf at circ@finallabel#1{%
+		\edef\pgf at temp{}%
+		\edef\pgf at circ@temp{\ctikzvalof{bipole/#1label/unit}}%
+		\ifx\pgf at temp\pgf at circ@temp%
+			\ctikzvalof{bipole/#1label/name}%
+		\else%
+			$\SI{\ctikzvalof{bipole/#1label/name}}{\ctikzvalof{bipole/#1label/unit}}$%
+		\fi%
+}
+
+\def\pgf at circ@ifkeyempty#1{
+	\pgfextra{
+		\ctikzset{#1/.get=\pgf at circ@temp}
+		\edef\pgf at temp{}
+	}
+	\ifx\pgf at circ@temp\pgf at temp
+}
+
+
+%%%---------- close: pgfcircutils
+%%%%%%%%%%% Springe nach pgfcircmath
+%%%---------- open: pgfcircmath.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%    Math routines
+
+\def\pgf at circ@stripdecimals#1.#2\pgf at nil{#1}
+
+% angle between 0 and 360
+\def\pgf at circ@slope#1#2{%
+ \pgf at process{#1}%
+ \pgf at xa=\pgf at x%
+ \pgf at ya=\pgf at y%
+ \pgf at process{#2}%
+ \advance\pgf at x by-\pgf at xa%
+ \advance\pgf at y by-\pgf at ya%
+ \ifdim\pgf at x<0.1pt 
+ 	\ifdim\pgf at x>-0.1pt % vertical
+		\ifdim\pgf at y<0pt
+			\def\pgfmathresult{-90.0}
+		\else
+			\def\pgfmathresult{+90.0}
+		\fi 	
+ 	\else % oblique with dx < 0
+		\pgfmathdivide{\pgf at y}{\pgf at x}
+		\pgfmathatan{\pgfmathresult}
+		\ifdim\pgf at x<0pt
+			\pgfmathsubtract{\pgfmathresult}{+180}
+		\fi
+ 	\fi
+ \else % oblique with dx > 0
+	\pgfmathdivide{\pgf at y}{\pgf at x}
+	\pgfmathatan{\pgfmathresult}
+	\ifdim\pgf at x<0pt
+		\pgfmathsubtract{\pgfmathresult}{+180}
+	\fi
+ \fi
+ \pgf at x=\pgfmathresult pt
+ \ifdim\pgf at x<0pt
+	\pgfmathadd{\pgfmathresult}{+360} 
+ \fi
+ }
+
+  	
+%%%---------- close: pgfcircmath
+
+%%%%%%%%%%% Springe nach pgfcircshapes
+%%%---------- open: pgfcircshapes.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%  Other shapes
+
+
+%% Nothing
+
+\pgfdeclareshape{emptyshape}{
+	\savedanchor{\northeast}{%
+		\pgf at x=.5\wd\pgfnodeparttextbox%
+		\pgf at y=.5\ht\pgfnodeparttextbox%
+   }
+	\anchor{north}{
+		\northeast
+		\pgf at x=0cm
+	}
+	\anchor{east}{%
+		\northeast
+		\pgf at y=0cm
+   }
+	\anchor{south}{%
+		\northeast
+		\pgf at y=-\pgf at y
+		\pgf at x=0cm
+   }
+	\anchor{west}{
+		\northeast
+		\pgf at y=0cm
+		\pgf at x=-\pgf at x
+	}
+	\anchor{text}{%
+		\pgfpointorigin
+   }
+	\anchor{center}{
+		\pgfpointorigin
+	}
+}
+
+%% Full terminal
+
+\pgfdeclareshape{circ}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchorborder{
+		\pgf at circ@res at left=\pgf at x
+		\pgf at circ@res at up=\pgf at y
+		\pgfpointborderellipse{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}
+}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}		
+	}
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{draw,fill}		
+		\endpgfscope
+
+		}
+}
+
+%% Empty terminal
+
+\pgfdeclareshape{ocirc}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchorborder{
+		\pgf at circ@res at left=\pgf at x
+		\pgf at circ@res at up=\pgf at y
+		\pgfpointborderellipse{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}
+}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}		
+	}
+
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfsetfillcolor{white}
+			\pgfusepath{draw,fill}		
+		\endpgfscope
+
+		}
+}
+
+%% Current arrow
+
+\pgfdeclareshape{currarrow}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\divide \pgf at circ@res at step by 16
+
+			\pgfpathmoveto{\pgfpoint{-.7\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{0pt}}			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{draw,fill}
+
+		\endpgfscope
+	}
+
+}
+
+%% Current arrow
+
+\pgfdeclareshape{inputarrow}{
+	\savedanchor{\tip}{
+		\pgfpointorigin
+	}
+	\anchor{center}{
+		\tip
+	}
+	\anchor{tip}{
+		\tip
+	}
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\divide \pgf at circ@res at step by 16
+
+			\pgfpathmoveto{\pgfpoint{-1.7\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{0pt}{0pt}}
+			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{0pt}}			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{fill}
+
+		\endpgfscope
+	}
+
+}
+
+%%%---------- close: pgfcircshapes
+%%%%%%%%%%% Springe nach pgfcircmonopoles
+%%%---------- open: pgfcircmonopoles.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Monopoles
+
+%% Ground symbol
+
+\pgfdeclareshape{ground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{draw}
+		
+			
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+
+}
+
+
+
+\pgfdeclareshape{rground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+						
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+}
+
+\pgfdeclareshape{tground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			%\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+			\pgfusepath{draw}
+						
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+}
+
+\pgfdeclareshape{sground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{0}{-1.8\pgf at circ@res at step}}
+			\pgfpathclose
+			\pgfusepath{draw}
+						
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+
+}
+
+% noiseless ground
+\pgfdeclareshape{nground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfusepath{draw}
+			
+			\pgfpathmoveto{\pgfpoint{1.3\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfpatharc{0}{180}{1.3\pgf at circ@res at step}
+			\pgfusepath{draw}
+					
+			\pgfsetlinewidth{\pgfstartlinewidth}
+		\endpgfscope
+	}
+}
+
+% protective ground
+\pgfdeclareshape{pground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathcircle{\pgfpoint{0pt}{-\pgf at circ@res at step}} {1.2\pgf at circ@res at step}
+			\pgfusepath{draw}
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfusepath{draw}
+					
+			\pgfsetlinewidth{\pgfstartlinewidth}
+		\endpgfscope
+	}
+}
+
+% chassis ground 
+\pgfdeclareshape{cground}{ 
+\anchor{center}{ 
+    \pgfpointorigin 
+} 
+\behindforegroundpath{       
+    \pgf at circ@res at step=\ctikzvalof{monopoles/chassis/width}\pgf at circ@Rlen 
+ 
+    \pgfscope        
+        \pgfpathmoveto{\pgfpointorigin} 
+        \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}} 
+        \pgfusepath{draw}
+
+        \pgfpathmoveto{\pgfpoint{-1.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
+        \pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
+        \pgfpathmoveto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+        \pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
+        \pgfusepath{draw}                        
+    \endpgfscope 
+    } 
+}
+
+% Contributed by Leonardo Azzinnari
+\pgfdeclareshape{tlinestub}{
+	\anchor{center}{\pgfpointorigin}
+	\behindforegroundpath{
+		\pgfstartlinewidth=\pgflinewidth
+		
+		\pgf at circ@res at step=\ctikzvalof{bipoles/tline/width} \pgf at circ@Rlen
+        \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+        
+            \pgfpathmoveto{\pgfpointorigin}
+            \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0pt}}
+            \pgfusepath{draw}
+         \pgfscope
+            \pgfpathellipse{\pgfpoint{0.5\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0.125\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+            \pgfpathlineto{\pgfpoint{1.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+            \pgfpatharc{90}{-90}{0.125\pgf at circ@res at step and 0.25\pgf at circ@res at step}
+            \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-0.25\pgf at circ@res at step}}
+            \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+            \pgfusepath{draw}
+         \endpgfscope
+      }
+}
+                            
+
+
+
+\pgfdeclareshape{antenna}{
+\anchor{center}{\pgfpointorigin}
+	\savedanchor{\northeast}{
+		\pgf at circ@res at step=\ctikzvalof{monopoles/antenna/width}\pgf at circ@Rlen
+		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
+		\pgf at y=6\pgf at circ@res at step
+	}
+	\anchor{text}{
+		\northeast
+		\pgf at x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf at x
+		\pgf at y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf at y
+	}
+   \behindforegroundpath{
+     \pgfstartlinewidth=\pgflinewidth
+     \pgf at circ@res at step=\ctikzvalof{monopoles/antenna/width}\pgf at circ@Rlen
+                           
+        % \pgfpathmoveto{\pgfpointorigin}
+        % \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
+        % \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
+        %     \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+        
+        \pgftransformxshift{ -4\pgf at circ@res at step }
+
+        \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
+        \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             
+         \pgfusepath{draw}
+             
+          \pgfscope   
+          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+             \pgfusepath{draw}
+           \endpgfscope
+                           \pgfsetlinewidth{\pgfstartlinewidth}
+                        
+                           }
+     }
+
+
+\pgfdeclareshape{txantenna}{
+	\anchor{center}{\pgfpointorigin}
+	\savedanchor{\northeast}{
+		\pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
+		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
+		\pgf at y=6\pgf at circ@res at step
+	}
+	\anchor{text}{
+		\northeast
+		\pgf at x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf at x
+		\pgf at y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf at y
+	}
+       \behindforegroundpath{
+       \pgfstartlinewidth=\pgflinewidth
+       \pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
+        
+         \pgfpathmoveto{\pgfpointorigin}
+         \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
+         \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             
+         \pgfusepath{draw}
+             
+          \pgfscope   
+          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+             \pgfusepath{draw}
+           \endpgfscope
+          \pgfpathmoveto{\pgfpoint{5.5\pgf at circ@res at step}{6\pgf at circ@res at step}}
+%        \pgfpatharc{60}{-60}{\pgf at circ@res at step and \pgf at circ@res at step}
+        \pgfpatharc{30}{-30}{2\pgf at circ@res at step}         \pgfpathmoveto{\pgfpoint{6\pgf at circ@res at step}{6.25\pgf at circ@res at step}}
+        \pgfpatharc{30}{-30}{2.5\pgf at circ@res at step}
+        \pgfpathmoveto{\pgfpoint{6.5\pgf at circ@res at step}{6.5\pgf at circ@res at step}}
+        \pgfpatharc{30}{-30}{3\pgf at circ@res at step}
+        \pgfpathmoveto{\pgfpoint{7\pgf at circ@res at step}{6.75\pgf at circ@res at step}}
+        \pgfpatharc{30}{-30}{3.5\pgf at circ@res at step}
+        \pgfpathmoveto{\pgfpoint{7.5\pgf at circ@res at step}{7\pgf at circ@res at step}}
+        \pgfpatharc{30}{-30}{4\pgf at circ@res at step}
+        \pgfusepath{draw}
+        \pgfsetlinewidth{\pgfstartlinewidth}
+        
+        }
+     }
+
+
+\pgfdeclareshape{rxantenna}{
+	\anchor{center}{\pgfpointorigin}
+	\savedanchor{\northeast}{
+		\pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
+		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
+		\pgf at y=6\pgf at circ@res at step
+	}
+	\anchor{text}{
+		\northeast
+		\pgf at x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf at x
+		\pgf at y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf at y
+	}
+    \behindforegroundpath{
+        \pgfstartlinewidth=\pgflinewidth
+        \pgf at circ@res at step=\ctikzvalof{monopoles/rxantenna/width}\pgf at circ@Rlen
+             
+         \pgfpathmoveto{\pgfpointorigin}
+         \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
+         \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             
+         \pgfusepath{draw}
+             
+          \pgfscope   
+          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+             \pgfusepath{draw}
+           \endpgfscope
+           
+           \pgfpathmoveto{\pgfpoint{6\pgf at circ@res at step}{7\pgf at circ@res at step}}
+%             \pgfpatharc{60}{-60}{\pgf at circ@res at step and \pgf at circ@res at step}
+             \pgfpatharc{150}{210}{4\pgf at circ@res at step}              \pgfpathmoveto{\pgfpoint{6.5\pgf at circ@res at step}{6.75\pgf at circ@res at step}}
+             \pgfpatharc{150}{210}{3.5\pgf at circ@res at step}
+             \pgfpathmoveto{\pgfpoint{7\pgf at circ@res at step}{6.5\pgf at circ@res at step}}
+             \pgfpatharc{150}{210}{3\pgf at circ@res at step}
+             \pgfpathmoveto{\pgfpoint{7.5\pgf at circ@res at step}{6.25\pgf at circ@res at step}}
+             \pgfpatharc{150}{210}{2.5\pgf at circ@res at step}
+             \pgfpathmoveto{\pgfpoint{8\pgf at circ@res at step}{6\pgf at circ@res at step}}
+             \pgfpatharc{150}{210}{2\pgf at circ@res at step}
+             \pgfusepath{draw}
+             \pgfsetlinewidth{\pgfstartlinewidth}
+             
+             }
+}
+
+% Vcc
+\pgfdeclareshape{vcc}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{text}{
+		\pgf at x=0pt
+		\pgf at y=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
+		\pgf at y=2\pgf at y
+		\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
+		\pgf at x=-.5\wd\pgfnodeparttextbox
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{1.5\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{0}{1.5\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{.8\pgf at circ@res at step}}
+			\pgfusepath{draw}
+									
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+
+}
+
+% match
+\pgfdeclareshape{match}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{text}{
+		\pgf at x=\ctikzvalof{monopoles/match/width}\pgf at circ@Rlen
+		\pgf at x=1.5\pgf at x
+		\advance \pgf at x by -.5\wd\pgfnodeparttextbox
+		\pgf at y=-1.5\ht\pgfnodeparttextbox
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/match/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0pt}}
+			\pgfusepath{draw}
+
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0}}
+			\pgfusepath{fill}
+									
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+
+}
+
+% oscillator
+\pgfdeclareshape{oscillator}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{north}{
+		\pgf at x=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
+		\pgf at x=-0.5\pgf at x
+		\pgf at y=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
+		\pgf at y=0.5\pgf at y
+	}
+	\anchor{south}{
+		\pgf at x=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
+		\pgf at x=-0.5\pgf at x
+		\pgf at y=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
+		\pgf at y=-0.5\pgf at y
+	}
+	\anchor{east}{
+		\pgfpointorigin
+		\pgf at x=-\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
+	}
+	\anchor{west}{
+		\pgfpointorigin
+	}
+	\anchor{text}{
+		\pgf at x=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
+		\pgf at x=-2\pgf at x
+		\advance \pgf at x by -.5\wd\pgfnodeparttextbox
+		\pgf at y=-\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
+		\advance \pgf at y by -1.5\ht\pgfnodeparttextbox
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
+		\pgf at circ@res at step=.5\pgf at circ@res at step
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfstartlinewidth=\pgflinewidth
+			
+			% draw circle
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\pgfpathcircle{\pgfpoint{-\pgf at circ@res at step}{0}} {\pgf at circ@res at step}
+			\pgfusepath{draw}
+
+			% draw inner sine waves
+			\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+			\pgfsetlinewidth{\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-1.5\pgf at circ@res at step}{0\pgf at circ@res at step}}
+			\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+			\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+			\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+			\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+			\pgfusepath{draw}
+					
+			\pgfsetlinewidth{\pgfstartlinewidth}
+
+		\endpgfscope
+	}
+}
+
+%%%---------- close: pgfcircmonopoles
+%%%%%%%%%%% Springe nach pgfcircbipoles
+%%%---------- open: pgfcircbipoles.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%% Generic macro for defining a bipole shape
+% #1 - additional anchors
+% #2 - lower y-size of the bipole (from the center).
+% #3 - #shape is the name of the shape
+% #4 - upper y-size of the bipole (from the center)
+% #5 - width of the bipole
+% #6 - macros drawing the bipole
+
+
+\long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
+	\pgfdeclareshape{#3shape}{
+	
+	\savedanchor{\northeast}{
+		\pgf at y=#4\pgf at circ@Rlen
+		\pgf at y=.5\pgf at y
+		\pgf at x=#5\pgf at circ@Rlen
+		\pgf at x=.5\pgf at x
+	}
+	\savedanchor{\northeastborder}{
+		\pgf at y=#4\pgf at circ@Rlen
+		\pgf at y=.5\pgf at y
+		\pgf at y=\ctikzvalof{bipoles/border margin}\pgf at y
+		\pgf at x=#5\pgf at circ@Rlen
+		\pgf at x=.5\pgf at x
+		\pgf at x=\ctikzvalof{bipoles/border margin}\pgf at x
+	}
+	\savedanchor{\southwestborder}{
+		\pgf at y=-#2\pgf at circ@Rlen
+		\pgf at y=.5\pgf at y
+		\pgf at y=\ctikzvalof{bipoles/border margin}\pgf at y
+		\pgf at x=-#5\pgf at circ@Rlen
+		\pgf at x=.5\pgf at x
+		\pgf at x=\ctikzvalof{bipoles/border margin}\pgf at x
+	}
+	\savedanchor{\southwest}{
+		\pgf at y=-#2\pgf at circ@Rlen
+		\pgf at y=.5\pgf at y
+		\pgf at x=-#5\pgf at circ@Rlen
+		\pgf at x=.5\pgf at x
+	}
+	\savedanchor{\centerpoint}{
+		\pgf at circ@res at down=-#2\pgf at circ@Rlen
+		\pgf at circ@res at up=#4\pgf at circ@Rlen
+		\pgfpointorigin
+		\pgf at y=\pgf at circ@res at up
+		\advance\pgf at y by\pgf at circ@res at down
+		\pgf at y=.5\pgf at y
+	}
+	\anchor{center}{\pgfpointorigin}
+	\anchor{n}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at x=0cm
+	}
+	\anchor{ne}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+	}
+	\anchor{nw}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at x=-\pgf at x
+	}
+	\anchor{e}{%
+		\ifpgf at circuit@bipole at reversed\else\southwest\northeast\fi
+		\pgf at y=0cm
+   }
+	\anchor{s}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at x=0cm
+   }
+	\anchor{se}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at x=-\pgf at x
+   }
+	\anchor{sw}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+   }
+	\anchor{w}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{north}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at x=0cm
+	}
+	\anchor{east}{%
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+   }
+	\anchor{south}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at x=0cm
+   }
+	\anchor{west}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{right}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+	\anchor{above}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at x=0cm
+	}
+	\anchor{left}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+   }
+	\anchor{below}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at x=0cm                    
+   }
+	\anchor{a}{%
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+   }
+	\anchor{b} {
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\savedanchor{\textanchor}{%
+		\pgf at y=\ht\pgfnodeparttextbox
+		\pgf at x=-.5\wd\pgfnodeparttextbox
+   }
+	\anchor{text}{%
+		\textanchor
+   }
+	\anchorborder{%
+		\def\pgf at temp{false}
+		\ifpgf at circuit@bipole at reversed\pgf at temp
+			\pgf at circ@res at left=-\pgf at x
+			\pgf at circ@res at right=-\pgf at y
+		\else
+			\pgf at circ@res at left=\pgf at x
+			\pgf at circ@res at right=\pgf at y
+		\fi
+		\ifdim\pgf at circ@res at right>0cm
+			\pgfpointborderrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at right}}{\northeastborder}
+		\else
+	  		\southwestborder	
+	  	\pgfpointborderrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at right}}{\pgfpoint{-\pgf at x}{-\pgf at y}}
+		\fi
+	}
+	
+	#1
+	
+	\backgroundpath{	
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+		
+		\northeast
+		\pgf at circ@res at up = \pgf at y 
+		\pgf at circ@res at zero = 0cm
+		\pgf at circ@res at left = -\pgf at x
+		\pgf at circ@res at right = \pgf at x
+		\southwest
+		\pgf at circ@res at down = \pgf at y
+
+ 		\pgfstartlinewidth=\pgflinewidth
+		
+		#6
+			
+		\pgfsetlinewidth{\pgfstartlinewidth}
+	}
+	}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Standard bipole shapes declarations
+
+%% Resistor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 12
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+		\pgfusepath{draw} 
+}
+
+
+
+%% Variable resistor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vresistor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 12
+		\def\myfrac{.5}
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfusepath{draw}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at other}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at other}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+%% Capacitor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/capacitor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 5
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+}
+
+
+%% Polar Capacitor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/pcapacitor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 5
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+				
+		\pgfscope
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}{\pgf at circ@res at up}}
+			\pgftransformrotate{-90}
+			\pgfpathsine{\pgfpoint{\pgf at circ@res at up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}}
+			\pgfpathcosine{\pgfpoint{\pgf at circ@res at up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}}
+			\pgfusepath{draw}
+		\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+}
+
+%% Battery
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/battery/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 6
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+
+		\pgfusepath{draw}
+}
+
+
+%% Battery 1
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfusepath{draw}
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at down}}
+		
+
+
+
+		\pgfusepath{draw}
+}
+
+
+
+%% cute inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
+	\pgf at circ@res at step=\ctikzvalof{bipoles/cuteinductor/width}\pgf at circ@Rlen
+	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/cuteinductor/coils}
+
+	\pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/cuteinductor/height}\pgf at circ@Rlen
+	\pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude
+	\pgfdecorationsegmentlength = \pgf at circ@res at step
+	\pgfdecorationsegmentaspect=.6
+	
+	\pgfdecoration{{coil}{\pgfdecoratedremainingdistance}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\endpgfdecoration
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfusepath{stroke}	
+}
+
+
+
+%% american inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
+	\pgf at circ@res at step=\ctikzvalof{bipoles/americaninductor/width}\pgf at circ@Rlen
+	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/americaninductor/coils}
+
+	\pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/americaninductor/height}\pgf at circ@Rlen
+	\pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude
+	\pgfdecorationsegmentlength = 1.99\pgf at circ@res at step
+	
+	\pgfdecoration{{bumps}{\pgfdecoratedremainingdistance}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\endpgfdecoration
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfusepath{stroke}	
+}
+
+
+
+
+
+%% Independent voltage source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+}
+
+
+%% Independent voltage source - American style
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourceam/height}}{vsourceAM}{\ctikzvalof{bipoles/vsourceam/height}}{\ctikzvalof{bipoles/vsourceam/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+
+	
+	\pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at down]{$+$}
+	\pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at up]{$-$}
+
+	\pgfusepath{draw}
+}
+
+
+
+%% Independent sinusoidal voltage source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesin/height}}{vsourcesin}{\ctikzvalof{bipoles/vsourcesin/height}}{\ctikzvalof{bipoles/vsourcesin/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}		
+		
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+
+% contributed by Alistair Kwan
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesquare/height}}{vsourcesquare}{\ctikzvalof{bipoles/vsourcesquare/height}}{\ctikzvalof{bipoles/vsourcesquare/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}		
+		
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-1\pgf at circ@res at up}{0cm}}
+			\pgfpathlineto{\pgfpoint{-1\pgf at circ@res at up}{1\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0\pgf at circ@res at up}{1\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0\pgf at circ@res at up}{-1\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at up}{-1\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at up}{0\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+%% Independent current source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isource}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+	\pgfusepath{draw}
+}
+
+
+
+
+%% Independent current source - American
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isourceam/height}}{isourceAM}{\ctikzvalof{bipoles/isourceam/height}}{\ctikzvalof{bipoles/isourceam/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}
+
+	\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at left}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+	\pgfscope
+		\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+	\endpgfscope
+}
+
+
+
+
+%% Independent sinusoidal current source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isourcesin}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}
+	
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+
+}
+
+
+%% Controlled voltage source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsource/height}}{cvsource}{\ctikzvalof{bipoles/cvsource/height}}{\ctikzvalof{bipoles/cvsource/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfusepath{draw}		
+}
+
+
+
+
+%% Controlled voltage source - American
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourceam/height}}{cvsourceAM}{\ctikzvalof{bipoles/cvsourceam/height}}{\ctikzvalof{bipoles/cvsourceam/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf at circ@res at left]{$+$}
+			\pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf at circ@res at right]{$-$}
+			\pgfusepath{draw}		
+}
+
+
+%% Controlled sinusoidal voltage source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cvsourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfscope
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfusepath{draw}		
+		\endpgfscope	
+
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+%% Controlled sinusoidal current source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cisourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfscope
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfusepath{draw}		
+		\endpgfscope	
+
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+
+%% Controlled current source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisource/height}}{cisource}{\ctikzvalof{bipoles/cisource/height}}{\ctikzvalof{bipoles/cisource/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfusepath{draw}		
+}
+
+
+
+
+%% Controlled current source - American
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisourceam/height}}{cisourceAM}{\ctikzvalof{bipoles/cisourceam/height}}{\ctikzvalof{bipoles/cisourceam/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfusepath{draw}		
+
+	\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at left}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+	\pgfscope
+		\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfnode{currarrow}{center}{}{}{\pgfusepath{draw}}
+	\endpgfscope
+}
+
+%% Black generic diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulldiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% Black Zener diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+%% Black Schottky diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{.8\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{.8\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+
+}
+
+%% Black tunnel diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulltdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+%% Black light emitting diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulllediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsend{latex'}
+			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+}
+
+%% Black photodiode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullpdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsstart{latex'}
+			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
+			\pgfusepath{draw}
+}
+
+%% Black varcap
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+	
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+	\endpgfscope
+}
+
+%% Empty generic diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptydiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% Empty Zener diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+%% Empty Schottky diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{.8\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{.8\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+
+}
+
+%% Empty tunnel diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptytdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+%% Empty light emitting diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptylediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsend{latex'}
+			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
+			\pgfusepath{draw}
+}
+
+%% Empty photodiode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptypdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsstart{latex'}
+			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
+			\pgfusepath{draw}
+}
+
+%% Empty varcap
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+	
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+	\endpgfscope
+}
+
+%% Closing SPST
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{cspst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
+
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathmoveto{\pgfpoint{.9\pgf at circ@res at left}{.9\pgf at circ@res at up}}
+            \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf at circ@Rlen}
+			%\pgfsetarrowsend{latex'}
+			\pgfusepath{draw}
+			
+			\pgfpathmoveto{\pgfpoint{.1\pgf at circ@res at right}{-.25\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{.14\pgf at circ@res at right}{-.35\pgf at circ@res at up}}
+            \pgfsetarrowsend{latex'}
+			\pgfusepath{draw}	
+
+}
+
+%% Opening SPST
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{ospst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
+
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathmoveto{\pgfpoint{.3\pgf at circ@res at right}{.1\pgf at circ@res at down}}
+            \pgfpatharc{15}{50}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf at circ@Rlen}
+            %\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			
+			\pgfpathmoveto{\pgfpoint{.85\pgf at circ@res at left}{1.25\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{.87\pgf at circ@res at left}{1.26\pgf at circ@res at up}}
+            \pgfsetarrowsend{latex'}
+			\pgfusepath{draw}
+            
+
+}
+
+
+%% Push Button
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pushbutton/height 2}}{pushbutton}{\ctikzvalof{bipoles/pushbutton/height}}{\ctikzvalof{bipoles/pushbutton/width}}{
+
+			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at up}}
+			\pgfpathmoveto{\pgfpoint{0}{.5\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0}{\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			
+			\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+			\pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
+			\pgftransformshift{\pgfpoint{2\pgf at circ@res at right}{0pt}}
+			\pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Ammeter
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
+	\def\pgf at circ@temp{right}
+	\ifx\tikz at res@label at pos\pgf at circ@temp
+		\pgf at circ@res at step=-1.2\pgf at circ@res at up
+	\else
+		\def\pgf at circ@temp{below}
+		\ifx\tikz at res@label at pos\pgf at circ@temp
+			\pgf at circ@res at step=-1.2\pgf at circ@res at up
+		\else
+			\pgf at circ@res at step=1.2\pgf at circ@res at up
+		\fi
+	\fi
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}		
+	\pgfpointorigin	\pgf at circ@res at other =  \pgf at x  \advance \pgf at circ@res at other by -\pgf at circ@res at up
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfscope
+			\pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
+			\pgfusepath{draw}		
+		\endpgfscope	
+
+	\pgfsetlinewidth{\pgfstartlinewidth}
+
+	\pgfsetarrowsend{latex}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	\pgfsetarrowsend{}
+
+	
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+
+	\pgfnode{circle}{center}{\textbf{A}}{}{}
+}
+
+%% Voltmeter
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
+	\def\pgf at circ@temp{right}
+	\ifx\tikz at res@label at pos\pgf at circ@temp
+		\pgf at circ@res at step=-1.2\pgf at circ@res at up
+	\else
+		\def\pgf at circ@temp{below}
+		\ifx\tikz at res@label at pos\pgf at circ@temp
+			\pgf at circ@res at step=-1.2\pgf at circ@res at up
+		\else
+			\pgf at circ@res at step=1.2\pgf at circ@res at up
+		\fi
+	\fi
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}		
+	\pgfpointorigin	\pgf at circ@res at other =  \pgf at x  \advance \pgf at circ@res at other by -\pgf at circ@res at up
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfscope
+			\pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
+			\pgfusepath{draw}		
+		\endpgfscope	
+
+	\pgfsetlinewidth{\pgfstartlinewidth}
+
+	\pgfsetarrowsend{latex}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	\pgfsetarrowsend{}
+
+	
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+
+	\pgfnode{circle}{center}{\textbf{V}}{}{}
+		
+}
+
+%% Short circuit
+
+\pgfcircdeclarebipole{}{0}{short}{0}{0}{ }
+
+%% Open circuit
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/open/height}}{open}{\ctikzvalof{bipoles/open/height}}{\ctikzvalof{bipoles/open/width}}{
+
+}
+
+%% Generic bipole - used as resistor by some (bleah)
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
+
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		%\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+}
+
+
+%% fuse
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfusepath{draw}
+		
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+}
+
+
+
+%% Generic bipole, filled - used as inductor by some (bleah)
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fullgeneric/height}}{fullgeneric}{\ctikzvalof{bipoles/fullgeneric/height}}{\ctikzvalof{bipoles/fullgeneric/width}}{
+
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		%\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw,fill} 
+}
+
+
+%% Generic asymmetric bipole 
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ageneric/height}}{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		%\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+
+			\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+			\pgfusepath{stroke,fill}		
+}
+
+
+%% asymmetric fuse
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfusepath{draw}
+		
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw}
+		
+		\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+			\pgfusepath{stroke,fill}		 
+}
+
+
+
+
+%% Memristor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/memristor/height}}{memristor}{\ctikzvalof{bipoles/memristor/height}}{\ctikzvalof{bipoles/memristor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.72*\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.72*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.35*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.35*\pgf at circ@res at left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.05*\pgf at circ@res at left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.05*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.42*\pgf at circ@res at right}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.42*\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{.8*\pgf at circ@res at right}{0pt}}
+					
+		\pgfusepath{draw} 
+
+			\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+			\pgfusepath{stroke,fill}		
+}
+
+
+
+
+%% Generic empty tunable
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{.4\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{.4\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.5\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.5\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+%% Photoresistor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}{\pgfpoint{\pgf at circ@res at right}{-\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.3\pgf at circ@res at right}{-1.2\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.05\pgf at circ@res at right}{-1.2\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+
+%% Thermistor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf at circ@res at up}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		%\pgfscope
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{-\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		%\endpgfscope
+}
+
+
+%% Thermistor PTC
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf at circ@res at up}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{-\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\tiny$\vartheta$}
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.62\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.62\pgf at circ@res at left}{.7\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.45\pgf at circ@res at left}{.7\pgf at circ@res at down}}
+		\pgfusepath{draw}
+}
+
+%% Thermistor NTC
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf at circ@res at up}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{-\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\tiny$\vartheta$}
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.62\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.62\pgf at circ@res at left}{.7\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at left}{.7\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.45\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+}
+
+%% thermocouple
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathlineto{\pgfpoint{0}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfusepath{draw}
+}
+
+%% Varistor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf at circ@res at up}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{-\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\pgftext[top,x=.65\pgf at circ@res at left,y=1.2\pgf at circ@res at down]{{\tiny\textsf{U}}}
+}
+
+
+
+%% Generic full tunable
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{.4\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{.4\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw,fill}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.5\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.5\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+%% Variable Cute Inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
+	\pgf at circ@res at step=\ctikzvalof{bipoles/vcuteinductor/width}\pgf at circ@Rlen
+	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/vcuteinductor/coils}
+
+	\pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/vcuteinductor/coil height}\pgf at circ@Rlen
+	\pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude
+	\pgfdecorationsegmentlength = \pgf at circ@res at step
+	\pgfdecorationsegmentaspect=.6
+	
+	\pgfdecoration{{coil}{\pgfdecoratedremainingdistance}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\endpgfdecoration
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfusepath{stroke}	
+	
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+%% variable american inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
+	\pgf at circ@res at step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf at circ@Rlen
+	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/vamericaninductor/coils}
+
+	\pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/vamericaninductor/height}\pgf at circ@Rlen
+	\pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude
+	\pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude % per freccia
+	\pgfdecorationsegmentlength = 1.99\pgf at circ@res at step
+	
+	\pgfdecoration{{bumps}{\pgfdecoratedremainingdistance}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\endpgfdecoration
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfusepath{stroke}	
+	
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+
+%% Variable Capacitor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/vcapacitor/width}\pgf at circ@Rlen
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf at circ@res at right
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{0pt}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfusepath{draw}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Handling of terminals
+
+
+%% Easily usable styles
+
+\ctikzset{*-/.style =  {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
+
+\tikzset{reversed/.style = {\circuitikzbasekey/bipole/reversed=true}}
+
+
+%% The output routine
+
+\def\drawpoles{
+	\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{empty}  }
+	\ifx\pgf at temp\pgf at circ@temp 
+		{ (\tikztostart) node[ocirc] {} }
+	\else 
+		\pgfextra{ \def\pgf at temp{full}  }
+		\ifx\pgf at temp\pgf at circ@temp
+			{ (\tikztostart) node[circ] {} }
+		\fi
+	\fi
+	\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{empty}  }
+	\ifx\pgf at temp\pgf at circ@temp
+		{ (\tikztotarget) node[ocirc] {} }
+	\else
+		\pgfextra{ \def\pgf at temp{full}  }
+		\ifx\pgf at temp\pgf at circ@temp
+			{ (\tikztotarget) node[circ] {} }
+		\fi
+	\fi 
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%% Lamp
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{.7071*\pgf at circ@res at left}{.7071*\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.7071*\pgf at circ@res at right}{.7071*\pgf at circ@res at down}}
+	\pgfpathmoveto{\pgfpoint{.7071*\pgf at circ@res at left}{.7071*\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{.7071*\pgf at circ@res at right}{.7071*\pgf at circ@res at up}}
+	\pgfusepath{draw}
+}
+
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height}
+                        }{tline}{\ctikzvalof{bipoles/tline/height}
+                                 }{\ctikzvalof{bipoles/tline/width}
+                                   }    
+          {
+          \pgf at circ@res at step=.2\pgf at circ@res at right % half x axis
+          \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+          \pgfpathellipse{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{0}}
+                         {\pgfpoint{\pgf at circ@res at step}{0}}
+                         {\pgfpoint{0}{-\pgf at circ@res at up}}
+          \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{\pgf at circ@res at up}}
+          \pgfpathlineto{\pgfpoint{\pgf at circ@res at left+\pgf at circ@res at step}{\pgf at circ@res at up}}
+          \pgfpatharc{-90}{90}{-\pgf at circ@res at step and -\pgf at circ@res at up}
+          \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{\pgf at circ@res at down}}
+          \pgfusepath{draw}
+}
+
+
+
+
+%% SQUID added by Cor Molenaar 5 March 2010
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid/height}}{squid}{\ctikzvalof{bipoles/squid/height}}{\ctikzvalof{bipoles/squid/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{1.35*\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.65*\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.65*\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{1.35*\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{1.35*\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.65*\pgf at circ@res at down}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.65*\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{1.35*\pgf at circ@res at down}}
+
+	\pgfusepath{draw}
+}
+
+
+
+% Generic barrier added by Cor Molenaar 5 March 2010
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/barrier/height}}{barrier}{\ctikzvalof{bipoles/barrier/height}}{\ctikzvalof{bipoles/barrier/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at step}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at step}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.35*\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.35*\pgf at circ@res at down}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.35*\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.35*\pgf at circ@res at up}}
+
+	\pgfusepath{draw}
+}
+
+
+% Contributed by Danilo Piazzalunga
+ 
+\pgfdeclareshape{buffer}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at left}{0pt}}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	
+		\pgfusepath{draw}
+	  
+	  }
+	}
+
+
+
+
+
+\pgfdeclareshape{plain amp}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{-}{
+		\inOne
+	  }
+	  \anchor{+}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\up{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+	    \pgfpointlineattime{
+			\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{
+			\pgfpoint{
+				\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
+				{\pgf at circ@res at up}}
+			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	  }
+	  \anchor{up}{
+		\up
+	  }
+	  \anchor{down}{
+		\up
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at up}}
+	
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at down}}
+		
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+
+						
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		
+	  
+	  }
+	}
+	
+%% Generic two port box
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/twoport/height}}{twoport}{\ctikzvalof{bipoles/twoport/height}}{\ctikzvalof{bipoles/twoport/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/twoport/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% draw inner symbol
+		\pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
+		
+}
+
+%% voltage controled oscillator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vco/width}}{vco}{\ctikzvalof{bipoles/twoport/width}}{\ctikzvalof{bipoles/vco/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vco/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		
+		% draw circle
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathcircle{\pgfpoint{0}{0}} {\pgf at circ@res at step}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% draw inner sine waves
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-.5\pgf at circ@res at step}{0\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		
+}
+
+%% bandpass filter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandpass/width}}{bandpass}{\ctikzvalof{bipoles/bandpass/width}}{\ctikzvalof{bipoles/bandpass/width}}{
+		
+		\pgf at circ@res at step = \ctikzvalof{bipoles/bandpass/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{0.35\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.65\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.65\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{-0.35\pgf at circ@res at step}}
+		\pgfusepath{draw}
+}
+
+%% highpass filter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/highpass/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.65\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{-0.35\pgf at circ@res at step}}
+		\pgfusepath{draw}
+}
+
+%% lowpass filter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lowpass/width}}{lowpass}{\ctikzvalof{bipoles/lowpass/width}}{\ctikzvalof{bipoles/lowpass/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/lowpass/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{0.35\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.65\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+}
+
+%% ADC
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/adc/width}}{adc}{\ctikzvalof{bipoles/adc/width}}{\ctikzvalof{bipoles/adc/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/adc/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\texti{A}
+		\def\textii{D}
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\def\texti{D}
+			\def\textii{A}
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\def\texti{D}
+			\def\textii{A}
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+			\def\texti{A}
+			\def\textii{D}
+		\fi\fi
+
+		% draw inner symbol					
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\textsf{\texti}}
+		\pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textsf{\textii}}
+}
+
+%% DAC
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dac/width}}{dac}{\ctikzvalof{bipoles/dac/width}}{\ctikzvalof{bipoles/dac/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/dac/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\texti{D}
+		\def\textii{A}
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\def\texti{A}
+			\def\textii{D}
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\def\texti{A}
+			\def\textii{D}
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+			\def\texti{D}
+			\def\textii{A}
+		\fi\fi
+
+		% draw inner symbol					
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\textsf{\texti}}
+		\pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textsf{\textii}}
+}
+
+%% DSP
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dsp/width}}{dsp}{\ctikzvalof{bipoles/dsp/width}}{\ctikzvalof{bipoles/dsp/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/dsp/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgftext[center,x=0,y=0]{\textsf{DSP}}
+}
+
+%% FFT
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fft/width}}{fft}{\ctikzvalof{bipoles/fft/width}}{\ctikzvalof{bipoles/fft/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/fft/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgftext[center,x=0,y=0]{\textsf{FFT}}
+}
+
+%% Amplifier
+\pgfcircdeclarebipole{}{
+		%\ifpgf at circuit@box
+			\ctikzvalof{bipoles/twoport/width}
+		%\else
+		%	\ctikzvalof{bipoles/amp/width}
+		%\fi
+	}{amp}{
+		%\ifpgf at circuit@box
+			\ctikzvalof{bipoles/twoport/width}
+		%\else
+		%	\ctikzvalof{bipoles/amp/width}
+	%	\fi
+	}{
+	%	\ifpgf at circuit@box
+			\ctikzvalof{bipoles/twoport/width}
+	%	\else
+	%		\ctikzvalof{bipoles/amp/width}
+	%	\fi
+	}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/amp/width}\pgf at circ@Rlen
+
+
+		% draw outer box
+		%\ifpgf at circuit@box
+		%	\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+		%\fi
+		% draw outer box
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		% draw input arrow
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at left}{0.75\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.63\pgf at circ@res at right}{0}}
+		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.75\pgf at circ@res at down}}
+		\pgfpathclose
+		\pgfusepath{draw}
+}
+
+
+%% variable amplifier
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamp/width}}{vamp}{\ctikzvalof{bipoles/vamp/width}}{\ctikzvalof{bipoles/vamp/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vamp/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at left}{0.75\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.63\pgf at circ@res at right}{0}}
+		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.75\pgf at circ@res at down}}
+		\pgfpathclose
+		\pgfusepath{draw}
+		
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.7\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% pi attenuator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piattenuator/width}}{piattenuator}{\ctikzvalof{bipoles/piattenuator/width}}{\ctikzvalof{bipoles/piattenuator/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/piattenuator/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% variable pi attenuator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vpiattenuator/width}}{vpiattenuator}{\ctikzvalof{bipoles/vpiattenuator/width}}{\ctikzvalof{bipoles/vpiattenuator/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% T attenuator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tattenuator/width}}{tattenuator}{\ctikzvalof{bipoles/tattenuator/width}}{\ctikzvalof{bipoles/tattenuator/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/tattenuator/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% variable T attenuator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vtattenuator/width}}{vtattenuator}{\ctikzvalof{bipoles/vtattenuator/width}}{\ctikzvalof{bipoles/vtattenuator/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vtattenuator/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% phase shifter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{phaseshifter}{\ctikzvalof{bipoles/phaseshifter/width}}{\ctikzvalof{bipoles/phaseshifter/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/phaseshifter/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% inner symbol
+		\pgftext[center,x=0,y=0]{\Large$\varphi$}
+}
+
+%% variable phase shifter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{vphaseshifter}{\ctikzvalof{bipoles/vphaseshifter/width}}{\ctikzvalof{bipoles/vphaseshifter/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% inner symbol
+		\pgftext[center,x=0,y=0]{\Large$\varphi$}
+		
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0.65\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.65\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% detector
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/detector/width}}{detector}{\ctikzvalof{bipoles/detector/width}}{\ctikzvalof{bipoles/detector/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/detector/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% draw inner stuff
+		\pgfsetlinewidth{0.8\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{0.75\pgf at circ@res at right}{0}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@fulldiode
+			\pgfmathparse{2\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/generic/width}}
+			\pgftransformscale{\pgfmathresult}
+			\pgfnode{fulldiodeshape}{center}{}{pgf at fulldiode}{\pgfusepath{fill}}
+		\else
+			\pgfmathparse{2\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/resistor/width}}
+			\pgftransformscale{\pgfmathresult}
+			\pgfnode{emptydiodeshape}{center}{}{pgf at emptydiode}{\pgfusepath{fill}}
+		\fi
+		
+}
+
+
+
+
+%% european gas filled surge arrester
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/european gas filled surge arrester/height}}{european gas filled surge arrester}{\ctikzvalof{bipoles/european gas filled surge arrester/height}}{\ctikzvalof{bipoles/european gas filled surge arrester/width}}{
+
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		%\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf at circ@res at left}{0pt}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}	
+				\pgfusepath{draw} 
+	
+		\endpgfscope
+}
+
+
+
+
+%% american gas filled surge arrester
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/american gas filled surge arrester/height}}{american gas filled surge arrester}{\ctikzvalof{bipoles/american gas filled surge arrester/height}}{\ctikzvalof{bipoles/american gas filled surge arrester/width}}{
+	%\def\pgf at circ@temp{right}
+	%\ifx\tikz at res@label at pos\pgf at circ@temp
+	%	\pgf at circ@res at step=-1.2\pgf at circ@res at up
+	%\else
+%		\def\pgf at circ@temp{below}
+%		\ifx\tikz at res@label at pos\pgf at circ@temp
+%			\pgf at circ@res at step=-1.2\pgf at circ@res at up
+%		\else
+%			\pgf at circ@res at step=1.2\pgf at circ@res at up
+%		\fi
+%	\fi
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}		
+	\pgfpointorigin	\pgf at circ@res at other =  \pgf at x  \advance \pgf at circ@res at other by -\pgf at circ@res at up
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfscope
+			\pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
+			\pgfusepath{draw}		
+		\endpgfscope	
+
+	\pgfsetlinewidth{\pgfstartlinewidth}
+
+
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+
+	\pgfnode{circle}{center}{}{}{}
+	
+	\pgfscope
+		\pgfsetarrowsend{latex}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfusepath{draw}	
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfusepath{draw}	
+	\endpgfscope{}
+	
+	%\pgftransformshift{\pgfpoint{.25\pgf at circ@res at left}{.45\pgf at circ@res at down}}
+	%\pgfnode{circ}{center}{}{}{}
+	%\pgftransformshift{}
+	\pgfcircle{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot x}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot y}\pgf at circ@res at down}}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/size}\pgf at circ@res at down}
+	\pgfusepath{fill}
+}
+
+
+
+
+
+
+%%%---------- close: pgfcircbipoles
+%%%%%%%%%%% Springe nach pgfcirctripoles
+%%%---------- open: pgfcirctripoles.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Tripoles
+
+
+\pgfdeclareshape{mixer}
+{
+	\savedanchor\northwest{
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	}
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{left}{%
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in 1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	}	  
+	\anchor{in 2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{in2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{center}{
+		\pgf at y=0pt
+		\pgf at x=0pt
+	}
+	\anchor{east}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x  
+	}
+	\anchor{west}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	}
+	\anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	}
+	\anchor{north west}{
+		\northwest
+	}
+	\anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	}
+	\backgroundpath{
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+		\pgf at circ@res at step=\ctikzvalof{tripoles/mixer/width}\pgf at circ@Rlen
+			
+		\pgfscope
+			\pgfstartlinewidth=\pgflinewidth
+			
+			% draw outer circle
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
+			\pgfusepath{draw}
+			
+			% draw inner stuff
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf at circ@res at step}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+		\endpgfscope				  
+	}
+}
+
+\pgfdeclareshape{adder}
+{
+	\savedanchor\northwest{
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	}
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{left}{%
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in 1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	}	  
+	\anchor{in 2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{in2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{center}{
+		\pgf at y=0pt
+		\pgf at x=0pt
+	}
+	\anchor{east}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x  
+	}
+	\anchor{west}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	}
+	\anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	}
+	\anchor{north west}{
+		\northwest
+	}
+	\anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	}
+	\backgroundpath{
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+		\pgf at circ@res at step=\ctikzvalof{tripoles/adder/width}\pgf at circ@Rlen
+			
+		\pgfscope
+			\pgfstartlinewidth=\pgflinewidth
+			
+			% draw outer circle
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
+			\pgfusepath{draw}
+			
+			% draw inner stuff
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpointpolar{180}{0.3\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpointpolar{270}{0.3\pgf at circ@res at step}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+		\endpgfscope				  
+	}
+}
+
+
+
+	\pgfdeclareshape{spdt}
+	{
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{left}{%
+	  	\northwest
+	  	\pgf at y=0pt
+	  }
+	  \anchor{in}{
+	  	\northwest
+	  	\pgf at y=0pt
+	  }	  
+	  \anchor{out 1}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{out 2}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }
+  	  \anchor{center}{
+		\pgf at y=0pt
+		\pgf at x=0pt
+	  }
+	  \anchor{east}{
+	  	\northwest
+		\pgf at y=0pt
+	  	\pgf at x=-\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x  
+			\pgf at circ@res at left = \pgf at x  
+			\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf at circ@res at left
+			
+		
+	  	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	  	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+		
+		\pgfusepath{draw}
+		
+		\pgfscope
+			\pgftransformshift{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+			\pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
+		\endpgfscope
+		\pgfscope
+			\pgftransformshift{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
+			\pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}}
+		\endpgfscope
+		\pgfscope
+			\pgftransformshift{\pgfpoint{\pgf at circ@res at other}{0pt}}
+			\pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
+		\endpgfscope
+		
+		
+		\pgfscope
+			\pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
+			\pgfpathlineto{
+				\pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf at circ@res at other}{-100pt}}}
+				{\pgfpoint{-.05\pgf at circ@res at up}{-.05\pgf at circ@res at up}}
+			}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+		\endpgfscope
+	  }
+	}
+	
+	
+	
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%%       Logic ports
+%%
+
+
+
+
+
+
+\long\def\pgfcircdeclarelogicport#1#2{
+	\pgfdeclareshape{american #1 port}
+	{
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{in 1}{
+		\inOne
+	  }
+	  \anchor{in}{
+		\inOne
+	  }	  
+	  \anchor{in 2}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+  	  \anchor{center}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{east}{
+	  	\left
+	  	\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\left
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+			#2
+	  
+	  }
+	}
+}
+
+
+\pgfcircdeclarelogicport{and}{
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
+		{0pt}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+		{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+		{\pgf at circ@res at down}}
+	\pgfpathcurveto
+		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
+			{.5\pgf at circ@res at down}}
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
+			{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
+			{.5\pgf at circ@res at up}}
+		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+			{\pgf at circ@res at up}}	
+	\pgfusepath{draw}
+}
+
+
+
+\pgfcircdeclarelogicport{nand}{
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at right}
+		{0pt}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{2\pgflinewidth}
+
+	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf at circ@res at right
+	\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at right
+	
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\pgfpathcurveto
+		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{.5\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{.5\pgf at circ@res at up}}
+		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
+			{\pgf at circ@res at up}}	
+	\pgfpathellipse
+		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
+
+	\pgfusepath{draw}
+}
+
+
+\pgfcircdeclarelogicport{nor}{
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf at circ@res at right}
+		{0pt}}	
+	
+	\pgfusepath{draw}
+	
+	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf at circ@res at right
+	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf at circ@res at right
+		
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
+
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
+		
+	\pgfpathellipse
+		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
+		
+	\pgfusepath{draw}
+}
+
+
+
+
+\pgfcircdeclarelogicport{or}{
+
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf at circ@res at right}
+		{0pt}}	
+	
+	\pgfusepath{draw}
+	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf at circ@res at right
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
+
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
+	\pgfusepath{draw}
+}
+
+
+\pgfcircdeclarelogicport{xor}{
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf at circ@res at right}
+		{0pt}}	
+	
+	\pgfusepath{draw}
+	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf at circ@res at right
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
+
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
+		
+	\def\pgf at circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf at circ@res at right+}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at up}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{.95*\pgf at circ@res at down}}	
+				
+	\pgfusepath{draw}
+}
+
+
+
+\pgfcircdeclarelogicport{xnor}{
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf at circ@res at right}
+		{0pt}}	
+	
+	\pgfusepath{draw}
+	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf at circ@res at right
+	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf at circ@res at right
+
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
+
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
+		
+	\def\pgf at circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/distance}\pgf at circ@res at right+}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at up}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{.95*\pgf at circ@res at down}}	
+		
+		
+	\pgfpathellipse
+		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
+				
+	\pgfusepath{draw}
+}
+
+
+\pgfdeclareshape{american not port}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{center}{
+	  	\pgfpointorigin
+	  }
+	  \anchor{east}{
+	  	\left
+	  	\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\left
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+		\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf at circ@res at right
+						
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfusepath{draw}
+		\pgfpathellipse
+			{\pgfpoint{\pgf at circ@res at step-.5\pgf at circ@res at other}{0pt}}
+			{\pgfpoint{.5\pgf at circ@res at other}{0pt}}
+			{\pgfpoint{0pt}{.5\pgf at circ@res at other}}
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at left}{0pt}}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	
+		\pgfusepath{draw}
+	  
+	  }
+	}
+
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% #1 - name
+% #2 - text inside
+% #3 - number of inputs
+% #4 - is it a not
+
+\long\def\pgfcircdeclareeurologicport#1#2#3#4{
+	\pgfdeclareshape{european #1 port}
+	{
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{in}{
+		\inOne
+	  }
+	  \anchor{in 1}{
+		\inOne
+	  }
+	  \anchor{in 2}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+  	  \anchor{center}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{east}{
+	  	\left
+	  	\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\left
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			\def\pgf at temp{1}
+			\def\pgf at circ@temp{#3}
+			\ifx\pgftemp\pgf at circ@temp % one input
+				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfpathlineto{
+					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}{0pt}}
+			\else % two inputs
+				\pgfpathmoveto{
+					\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at up}}
+				\pgfpathlineto{
+					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at up}}
+					%
+				\pgfpathmoveto{
+					\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at down}}
+				\pgfpathlineto{
+					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at down}}
+			\fi%
+			%
+			%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+			\pgfpathlineto{
+				\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{0pt}}
+			%
+			\edef\pgf at temp{not}
+			\edef\pgf at circ@temp{#4}
+			\ifx\pgf at temp\pgf at circ@temp % is a not
+				\pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf at circ@res at right}{0pt}}
+				\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not height}\pgf at circ@res at up}}
+			\fi
+			%
+			\pgfusepath{draw}
+			%
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgftext{#2}
+			%
+			%
+			%
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfpathrectanglecorners
+				{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}{\pgf at circ@res at up}}
+				{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{\pgf at circ@res at down}}
+			\pgfusepath{draw}
+%
+%
+	  }
+	}
+}
+
+
+
+\pgfcircdeclareeurologicport{and}{$\&$}{2}{}
+\pgfcircdeclareeurologicport{or}{$\ge 1$}{2}{}
+\pgfcircdeclareeurologicport{xor}{$=1$}{2}{}
+\pgfcircdeclareeurologicport{not}{$1$}{1}{not}
+\pgfcircdeclareeurologicport{nand}{$\&$}{2}{not}
+\pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
+\pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\long\def\pgfcircdeclaretransistor#1#2#3{
+	\pgfdeclareshape{#1}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northeast{% upper right
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x=0pt
+	  }
+%	  \savedanchor\northeast{%
+%		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+%		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf at y
+%		\pgf at y=.5\pgf at y
+%		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+%		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf at x
+%	  }
+	  \savedanchor\left{%center left
+	  	\pgf at y=0pt
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf at x
+	  }
+	  \anchor{text}{
+		  \northeast
+		  \pgfpoint
+			  {12\pgf at circ@res at right +0.2*(\pgf at circ@res at right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left)}
+			  {0.6\pgf at y}
+      }
+	  %
+	  		% pseudo-bipole
+		  \anchor{left}{ % south
+		  	\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{right}{
+		  	\northeast
+		  }  
+		\anchor{north}{
+			\northeast
+			\pgf at circ@res at step=\pgf at y
+			\left
+			\pgf at y=\pgf at circ@res at step
+			\pgf at x=.5\pgf at x
+		}  
+		  \anchor{west}{
+			\left
+		  }
+		  \anchor{east}{
+		  	\pgf at x=0pt
+			\pgf at y=0pt
+		  }  
+	  \anchor{south}{
+			\northeast
+			\pgf at circ@res at step=\pgf at y
+			\left
+			\pgf at y=-\pgf at circ@res at step
+			\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south west}{
+			\northeast
+			\pgf at circ@res at step=\pgf at y
+			\left
+			\pgf at y=-\pgf at circ@res at step
+	  }
+	  \anchor{north east}{
+		\northeast
+	  }
+	  \anchor{north west}{
+			\northeast
+			\pgf at circ@res at step=\pgf at y
+			\left
+			\pgf at y=\pgf at circ@res at step
+	  }
+	  \anchor{south east}{
+		\northeast
+		\pgf at y=-\pgf at y
+	  }	  
+	  
+	  #2
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			%
+			%
+			\northeast
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = \pgf at x
+			\left
+			\pgf at circ@res at left = \pgf at x
+			%
+			#3
+	  %
+	  }
+	}
+}
+
+
+
+
+
+
+\long\def\pgfcircdeclaremos#1#2#3{
+	\pgfcircdeclaretransistor{#1}{
+		  \anchor{G}{
+			\left
+		  }
+		  \anchor{gate}{
+			\left
+		  }
+		  \anchor{B}{
+			\left
+			\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at x
+		  }
+		  \anchor{base}{
+			\left
+			\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at x
+		  }
+		  #2
+	  }
+	  {#3}
+}
+
+
+
+
+
+
+
+
+
+\pgfcircdeclaremos{nmos}{
+		  \anchor{D}{
+			\northeast
+		  }
+		  \anchor{drain}{
+			\northeast
+		  }
+		  \anchor{S}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{source}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
+
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at down}}
+
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
+			\pgfusepath{draw}
+			
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+		\ifpgf at circuit@mos at arrows
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.6}{%
+				\pgfpoint%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}%
+			}{%
+				\pgfpoint
+					{\pgf at circ@res at right}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+		\fi
+
+					
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfusepath{draw}
+}
+
+
+\pgfcircdeclaremos{pmos}{
+		  \anchor{S}{
+			\northeast
+		  }
+		  \anchor{source}{
+			\northeast
+		  }
+		  \anchor{D}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{drain}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+		\ifpgf at circuit@mos at arrows
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.4}{%
+				\pgfpoint%
+					{\pgf at circ@res at right}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}%
+			}{%
+				\pgfpoint
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+		\fi
+
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
+
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
+					
+					
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfusepath{draw}
+			
+			\pgfpathcircle{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+			\pgfusepath{draw,fill}		
+
+}
+
+
+
+
+
+
+
+\pgfcircdeclaretransistor{pnp}{
+		  \anchor{E}{
+			\northeast
+		  }
+		  \anchor{emitter}{
+			\northeast
+		  }
+		  \anchor{B}{
+			\left
+		  }
+		  \anchor{base}{
+			\left
+		  }		  
+		  \anchor{C}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{collector}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+}{
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
+			\pgfusepath{draw}
+	
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\pgf at circ@res at right}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf at circ@res at up}%
+			}{%
+				\pgfpoint
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf at circ@res at up}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+		
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfusepath{draw}
+}
+
+
+
+
+
+
+\pgfcircdeclaretransistor{npn}{
+		  \anchor{C}{
+			\northeast
+		  }
+		  \anchor{collector}{
+			\northeast
+		  }
+		  \anchor{B}{
+			\left
+		  }
+		  \anchor{base}{
+			\left
+		  }		  
+		  \anchor{E}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{emitter}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
+			\pgfusepath{draw}
+	
+			\pgfscope
+			\pgfslopedattimetrue
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf at circ@res at down}%
+			}{%
+				\pgfpoint{\pgf at circ@res at right}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf at circ@res at down}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+		
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfusepath{draw}
+			
+			
+}
+
+
+
+\pgfcircdeclaretransistor{pigbt}{
+		  \anchor{E}{
+			\northeast
+		  }
+		  \anchor{emitter}{
+			\northeast
+		  }
+		  \anchor{B}{
+			\left
+		  }
+		  \anchor{base}{
+			\left
+		  }		  
+		  \anchor{C}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{collector}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+}{
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
+			%\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
+			\pgfusepath{draw}
+	
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\pgf at circ@res at right}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}%
+			}{%
+				\pgfpoint
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+		
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfusepath{draw}
+			
+			
+}
+
+
+
+\pgfcircdeclaretransistor{nigbt}{
+		  \anchor{C}{
+			\northeast
+		  }
+		  \anchor{collector}{
+			\northeast
+		  }
+		  \anchor{B}{
+			\left
+		  }
+		  \anchor{base}{
+			\left
+		  }		  
+		  \anchor{E}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{emitter}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+}{
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
+			%\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
+			\pgfusepath{draw}
+	
+			\pgfscope
+			\pgfslopedattimetrue
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}%
+			}{%
+				\pgfpoint{\pgf at circ@res at right}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+		
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfusepath{draw}
+			
+			
+}
+
+
+
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Contrib
+
+
+%%
+% IGFET (e.g. MOSFET)
+\long\def\pgfcircdeclarefet#1#2#3{
+  \pgfcircdeclaretransistor{#1}{
+      \anchor{B}{
+      \left
+      \pgf at x=\pgf at circ@res at right
+      }
+      \anchor{base}{
+      \left
+      \pgf at x=\pgf at circ@res at right
+      }
+      #2
+    }
+    {#3}
+}
+
+
+
+\pgfcircdeclarefet{nfet}{
+      \anchor{D}{
+      \northeast
+      }
+      \anchor{drain}{
+      \northeast
+      }
+      \anchor{S}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{source}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{G}{
+         \left
+      }
+      \anchor{gate}{
+         \left
+      }
+
+}{%
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
+
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up*0.45}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up*0.25}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down*0.25}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down*0.45}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down}}
+
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+      
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+      
+      \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
+      \pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+      
+      \pgfscope
+      \pgfslopedattimetrue 
+      \pgfallowupsidedownattimetrue
+      \pgfresetnontranslationattimefalse
+      \pgftransformlineattime{.6}{%
+        \pgfpoint
+          {\pgf at circ@res at right}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }{%
+        \pgfpoint%
+          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }
+      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+      \endpgfscope
+
+          
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfusepath{draw}
+}
+
+
+\pgfcircdeclarefet{pfet}{
+      \anchor{D}{
+      \northeast
+      }
+      \anchor{drain}{
+      \northeast
+      }
+      \anchor{S}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{source}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{G}{
+         \left
+      }
+      \anchor{gate}{
+         \left
+      }
+
+}{%
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
+	  \pgfusepath{draw}
+
+	 \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up*0.45}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up*0.25}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down*0.25}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down*0.45}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down}}
+	  \pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+      
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+      
+      \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
+      %\pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+      
+      \pgfscope
+      \pgfslopedattimetrue 
+      \pgfallowupsidedownattimetrue
+      \pgfresetnontranslationattimefalse
+      \pgftransformlineattime{.6}{%
+        \pgfpoint
+          {\pgf at circ@res at right}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }{%
+        \pgfpoint%
+          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }
+	  \pgftransformrotate{180}
+      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+      \endpgfscope
+
+          
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfusepath{draw}
+}
+
+
+
+% N-CHANNEL IGFET ENHANCEMENT TYPE
+\pgfcircdeclarefet{nigfete}{
+      \anchor{D}{
+      \northeast
+      }
+      \anchor{drain}{
+      \northeast
+      }
+      \anchor{S}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{source}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{G}{
+         \northeast
+         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
+         \left
+         \pgf at y=-\pgf at circ@res at step
+      }
+      \anchor{gate}{
+         \northeast
+         \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
+      }
+}{%
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+      % DRAIN CONNECTION 
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
+      % DRAIN
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
+
+      % GATE, ENHANCEMENT TYPE (DASHED)
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up*0.45}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up*0.25}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down*0.25}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down*0.45}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down}}
+
+      % BULK
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgf at circ@res at up+\pgf at circ@res at down}}
+
+      % SOURCE
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+      
+      % GATE
+      \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+      \pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+      
+      % ARROW
+      \pgfscope
+      \pgfslopedattimetrue 
+      \pgfallowupsidedownattimetrue
+      \pgfresetnontranslationattimefalse
+      \pgftransformlineattime{.6}{%
+        \pgfpoint
+          {\pgf at circ@res at right}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }{%
+        \pgfpoint%
+          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }
+      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+      \endpgfscope
+
+      % GATE CONNECTION
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+      \pgfusepath{draw}
+}
+
+% N-CHANNEL IGFET DEPLETION TYPE
+\pgfcircdeclarefet{nigfetd}{
+      \anchor{D}{
+      \northeast
+      }
+      \anchor{drain}{
+      \northeast
+      }
+      \anchor{S}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{source}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{G}{
+         \northeast
+         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
+         \left
+         \pgf at y=-\pgf at circ@res at step
+      }
+      \anchor{gate}{
+         \northeast
+         \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
+      }
+
+}{%
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+      % DRAIN CONNECTION 
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
+      % DRAIN
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
+
+      % GATE, DEPLETION TYPE
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf at circ@res at down}}
+
+      % BULK
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgf at circ@res at up+\pgf at circ@res at down}}
+
+      % SOURCE
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+      
+      % GATE
+      \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
+      \pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+      
+      % ARROW
+      \pgfscope
+      \pgfslopedattimetrue 
+      \pgfallowupsidedownattimetrue
+      \pgfresetnontranslationattimefalse
+      \pgftransformlineattime{.6}{%
+        \pgfpoint
+          {\pgf at circ@res at right}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }{%
+        \pgfpoint%
+          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }
+      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+      \endpgfscope
+
+      % GATE CONNECTION
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
+      %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
+      \pgfusepath{draw}
+}
+
+% P-CHANNEL IGFET ENHANCEMENT TYPE
+\pgfcircdeclarefet{pigfete}{
+      \anchor{D}{
+      \northeast
+      }
+      \anchor{drain}{
+      \northeast
+      }
+      \anchor{S}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{source}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{G}{
+         \northeast
+         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
+         \left
+         \pgf at y=-\pgf at circ@res at step
+      }
+      \anchor{gate}{
+         \northeast
+         \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
+      }
+}{%
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+      % DRAIN CONNECTION 
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
+      % DRAIN
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
+	  \pgfusepath{draw}
+	  
+      % GATE, DASHED, BOLD
+	  \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up*0.45}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up*0.25}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down*0.25}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down*0.45}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down}}
+	  \pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+	  
+      % BULK
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgf at circ@res at up+\pgf at circ@res at down}}
+
+      % SOURCE
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+      
+      % GATE
+      \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
+      %\pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+      
+      % ARROW
+      \pgfscope
+      \pgfslopedattimetrue 
+      \pgfallowupsidedownattimetrue
+      \pgfresetnontranslationattimefalse
+      % Arrow has to be rotated, as this is a p-channel fet
+      \pgftransformrotate{180}
+      \pgftransformlineattime{-.6}{%
+        \pgfpoint
+          {\pgf at circ@res at right}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }{%
+        \pgfpoint%
+          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }
+      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+      \endpgfscope
+
+      % GATE CONNECTION (in line with source)
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
+      %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
+      \pgfusepath{draw}
+}
+
+% P-CHANNEL IGFET DEPLETION TYPE
+\pgfcircdeclarefet{pigfetd}{
+      \anchor{D}{
+      \northeast
+      }
+      \anchor{drain}{
+      \northeast
+      }
+      \anchor{S}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{source}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{G}{
+         \northeast
+         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
+         \left
+         \pgf at y=-\pgf at circ@res at step
+      }
+      \anchor{gate}{
+         \northeast
+         \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
+      }
+}{%
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+      % DRAIN CONNECTION 
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
+      % DRAIN
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
+	  
+      \pgfusepath{draw}
+      
+	  
+      % GATE DEPLETION TYPE
+	  \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf at circ@res at down}}
+	  \pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+	  
+      % BULK
+	  
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgf at circ@res at up+\pgf at circ@res at down}}
+
+      
+      % SOURCE
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+      
+      % GATE
+      \pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
+      %\pgfsetlinewidth{2\pgflinewidth}
+      \pgfusepath{draw}
+      \endpgfscope
+      
+      % ARROW
+      \pgfscope
+      \pgfslopedattimetrue 
+      \pgfallowupsidedownattimetrue
+      \pgfresetnontranslationattimefalse
+      % PFET!
+      \pgftransformrotate{180}
+      \pgftransformlineattime{-.6}{%
+        \pgfpoint
+          {\pgf at circ@res at right}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }{%
+        \pgfpoint%
+          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }
+      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+      \endpgfscope
+
+      % GATE CONNECTION
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
+      %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
+      \pgfusepath{draw}
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Contrib Danilo Piazzalunga
+
+
+
+
+
+
+\pgfcircdeclaretransistor{njfet}{
+		  \anchor{G}{
+			\left
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf at y
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at y
+			\pgf at y=-.5\pgf at y
+		  }
+		  \anchor{gate}{
+			\left
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf at y
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at y
+			\pgf at y=-.5\pgf at y
+		  }
+		  \anchor{D}{
+			\northeast
+		  }
+		  \anchor{drain}{
+			\northeast
+		  }
+		  \anchor{S}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{source}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at up}}
+
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
+			\pgfusepath{draw}
+			
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.6}{%
+				\pgfpoint{\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}%
+			}{%
+				\pgfpoint
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+
+					
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
+			\pgfusepath{draw}
+}
+
+
+\pgfcircdeclaretransistor{pjfet}{
+		  \anchor{G}{
+			\left
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf at y
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at y
+			\pgf at y=.5\pgf at y
+		  }
+		  \anchor{gate}{
+			\left
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf at y
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at y
+			\pgf at y=.5\pgf at y
+		  }
+		  \anchor{S}{
+			\northeast
+		  }
+		  \anchor{source}{
+			\northeast
+		  }
+		  \anchor{D}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+		  \anchor{drain}{
+			\northeast
+			\pgf at y=-\pgf at y
+		  }
+}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
+			\pgfusepath{draw}
+			
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.4}{%
+				\pgfpoint%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
+			}{%
+				\pgfpoint{\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+
+					
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+}
+
+
+
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+
+
+
+
+% ISFET
+\pgfcircdeclarefet{isfet}{
+      \anchor{D}{
+      \northeast
+      }
+      \anchor{drain}{
+      \northeast
+      }
+      \anchor{S}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+      \anchor{source}{
+      \northeast
+      \pgf at y=-\pgf at y
+      }
+}{%
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+      % DRAIN CONNECTION 
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
+      % DRAIN
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
+      \pgfusepath{draw}
+      
+      % GATE, DEPLETION TYPE
+      \pgfscope %% added
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf at circ@res at down}}
+      \pgfsetlinewidth{2\pgflinewidth} %% added
+      \pgfusepath{draw} %% added
+      \endpgfscope %% added
+      
+      % BULK
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgf at circ@res at up+\pgf at circ@res at down}}
+
+      % SOURCE
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+      
+      % GATE
+      %\pgfscope
+      %\pgfpathmoveto{\pgfpoint
+       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf at circ@res at left}
+       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
+      %\pgfpathlineto{\pgfpoint
+       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf at circ@res at left}
+       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
+      %\pgfsetlinewidth{2\pgflinewidth}
+      %\pgfusepath{draw}
+      %\endpgfscope
+      
+      % ARROW
+      \pgfscope
+      \pgfslopedattimetrue 
+      \pgfallowupsidedownattimetrue
+      \pgfresetnontranslationattimefalse
+      \pgftransformlineattime{.6}{%
+        \pgfpoint
+          {\pgf at circ@res at right}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }{%
+        \pgfpoint%
+          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }
+      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+      \endpgfscope
+      \pgfusepath{draw}
+      
+      % Wavy lines
+      	\pgfscope
+			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%% Black thyristor
+
+\pgfcircdeclarebipole{
+	\anchor{gate}{
+		\northeast
+	}
+	\anchor{anode}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{G}{
+		\northeast
+	}
+	\anchor{cathode}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+}{\ctikzvalof{tripoles/thyristor/height 2}}{thyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgf at circ@res at other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf at circ@res at left
+	\pgf at circ@res at step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf at circ@res at right
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at other}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+				
+		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}} 
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfusepath{draw,fill}
+		
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+	
+}
+
+
+%% Empty triac
+
+\pgfcircdeclarebipole{
+	\anchor{gate}{
+		\northeast
+	}
+	\anchor{G}{
+		\northeast
+	}
+	\anchor{anode}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{cathode}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+}{\ctikzvalof{tripoles/triac/height}}{triac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgf at circ@res at other = \ctikzvalof{tripoles/triac/diode width left}\pgf at circ@res at left
+	\pgf at circ@res at step = \ctikzvalof{tripoles/triac/diode width right}\pgf at circ@res at right
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at step}{0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at other}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}} % sqrt(1/2)
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+	
+}
+
+
+
+
+
+
+
+
+
+\pgfcircdeclarebipole{
+	\anchor{out 1}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+	\anchor{out 2}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=.8\pgf at y
+	}
+}{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+	\pgfpathlineto{\pgfpoint{.3\pgf at circ@res at left}{0pt}}
+	\pgfusepath{draw}
+	\pgfscope
+	\pgfpathmoveto{\pgfpoint{.3\pgf at circ@res at left}{0pt}}
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{.5\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	\endpgfscope
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{0}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{.8\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{.8\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{.15\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	
+	
+	\pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.2\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	
+	\pgfsetdash{{.08\pgf at circ@res at up}{.04\pgf at circ@res at up}{.7\pgf at circ@res at up}{.04\pgf at circ@res at up}{.8\pgf at circ@res at up}}{0cm}
+	\pgfpathmoveto{\pgfpoint{0}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0}{.8\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.2\pgf at circ@res at left}{.6\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0}{.4\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0}{.2\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	\pgfsetdash{}{0cm}
+}
+
+
+
+
+
+
+
+
+
+
+\pgfdeclareshape{op amp}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{-}{
+		\inOne
+	  }
+	  \anchor{+}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\up{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+	    \pgfpointlineattime{
+			\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
+			\pgfpoint{
+				\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+				{\pgf at circ@res at up}}
+			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	  }
+	  \anchor{up}{
+		\up
+	  }
+	  \anchor{down}{
+		\up
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  	\anchor{west}{
+		  	\left
+    	  }
+		  \anchor{east}{
+		  	\left
+		  	\pgf at x=-\pgf at x
+		  }  
+	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+	\pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}]{\scriptsize\ $-$}
+	
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+	\pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}]{\scriptsize\ $+$}
+		
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+
+						
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		
+	  
+	  }
+	}
+	
+
+
+
+%% Potentiometer
+\pgfcircdeclarebipole{
+	\anchor{wiper}{
+		\northeast
+		\pgfpoint{0pt}{\pgf at y}
+	}
+	\anchor{W}{
+		\northeast
+		\pgfpoint{0pt}{\pgf at y}
+	}	
+}{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/potentiometer/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 12
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+		\pgfusepath{draw} 
+		
+		\pgfscope
+		%\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+
+
+%% Generic tunable 
+
+\pgfcircdeclarebipole{
+	\anchor{wiper}{
+		\northeast
+		\pgfpoint{0pt}{\pgf at y}
+	}
+}{\ctikzvalof{bipoles/generic potentiometer/height 2}}{genericpotentiometer}{\ctikzvalof{bipoles/generic potentiometer/height}}{\ctikzvalof{bipoles/generic potentiometer/width}}{
+
+		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at down}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+		
+		\pgfscope
+		%\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+\pgfdeclareshape{circulator}
+{
+	\savedanchor\northwest{
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	}
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{left}{%
+		\northwest
+	  	\pgf at y=0pt
+	}
+	\anchor{1}{
+		\northwest
+		\pgf at y=0pt
+	}	  
+	\anchor{2}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{3}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{east}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x  
+	}
+	\anchor{west}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	}
+	\anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	}
+	\anchor{north west}{
+		\northwest
+	}
+	\anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	}
+	\backgroundpath{
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+		\pgf at circ@res at step=\ctikzvalof{tripoles/circulator/width}\pgf at circ@Rlen
+			
+		\pgfscope
+			\pgfstartlinewidth=\pgflinewidth
+			
+			% draw outer circle
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
+			\pgfusepath{draw}
+			
+			% inner arrow
+			\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsend{latex}
+			\pgfpathmoveto{\pgfpoint{-0.25\pgf at circ@res at step}{0}}
+			\pgfpatharc{180}{-90} {0.25\pgf at circ@res at step}
+			\pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf at circ@res at step}}
+			\pgfusepath{draw}
+		\endpgfscope				  
+	}
+}
+
+
+% Wilkinson divider
+\pgfdeclareshape{wilkinson}{
+		\anchor{center}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=0pt
+		}
+		\savedanchor\northwest{%
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=.5\pgf at x
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf at x
+			}
+		\anchor{north}{
+			\northwest
+			\pgf at x=0pt
+		}
+		\anchor{south}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=-\pgf at y
+		}
+		\anchor{west}{
+			\northwest
+			\pgf at y=0pt
+		}
+		\anchor{east}{
+			\northwest
+			\pgf at y=0pt
+			\pgf at x=-\pgf at x
+		}
+		\anchor{south west}{
+			\northwest
+			\pgf at y=-\pgf at y
+		}
+		\anchor{north east}{
+			\northwest
+			\pgf at x=-\pgf at x
+		}
+			\anchor{north west}{
+			\northwest
+		}
+		\anchor{south east}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-\pgf at y
+		}
+		\anchor{in}{
+			\northwest
+			\pgf at y=0pt
+		}
+		\anchor{out1}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{out2}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{text}{
+			\northwest
+			\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
+			\pgf at x=-.5\wd\pgfnodeparttextbox
+		}
+		\backgroundpath{			
+				\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+				\northwest
+				\pgf at circ@res at up = \pgf at y 
+				\pgf at circ@res at down = -\pgf at y
+				\pgf at circ@res at right = -\pgf at x
+				\pgf at circ@res at left = \pgf at x
+			
+				\pgfstartlinewidth=\pgflinewidth
+
+				% draw outer box
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+				\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+				\pgfusepath{draw}
+				
+				% draw inner stuff
+				\pgfsetlinewidth{\pgfstartlinewidth}
+				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
+				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+				\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}				
+				
+				\pgfusepath{draw}
+				
+				\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+				% draw inner resisitor - european or american style is recognised
+				{
+					\pgftransformshift{\pgfpoint{0.5\pgf at circ@res at right}{0pt}}
+					\pgftransformrotate{90}
+					
+					% calculate size of resistor
+					\ifpgf at circuit@europeanresistor
+						\pgfmathparse{\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
+						\pgftransformscale{\pgfmathresult}
+						\pgfnode{genericshape}{center}{}{pgf at generic}{\pgfusepath{fill}}
+					\else
+						\pgfmathparse{\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
+						\pgftransformscale{\pgfmathresult}
+						\pgfnode{resistorshape}{center}{}{pgf at resistor}{\pgfusepath{fill}}
+					\fi
+				}
+				
+				\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at up}}
+				
+				\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at down}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+				\pgfusepath{draw}
+
+		}
+}
+
+
+%%%---------- close: pgfcirctripoles
+%%%%%%%%%%% Springe nach pgfcircquadpoles
+%%%---------- open: pgfcircquadpoles.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Quadripoles
+
+\long\def\pgfcircdeclarequadpole#1#2#3{
+	\pgfdeclareshape{#1}
+	{
+	  \anchor{center}{
+	  	\northwest
+		\pgf at x=0pt
+	  }
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=.5\pgf at x
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf at x
+	  }
+	  \anchor{A2}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{B1}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{A1}{
+		\northwest
+	  }
+	  \anchor{B2}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+	  	\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south}{
+	  	\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{west}{
+	  	\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{east}{
+	  	\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \anchor{base}{
+	  	\northwest
+		\pgf at x=0pt	  	
+	  }
+	  #3
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+			%\pgf at circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			
+			#2
+	  
+	  }
+	}
+}
+
+
+
+\def\pgf at circ@drawtransformerbasicanchor{
+	\pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
+	 \anchor{AA2}{
+		\northwest
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=-\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{BB1}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{AA1}{
+		\northwest
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{BB2}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=-\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+}
+
+\def\pgf at circ@drawtransformerbasicbody{
+	\def\stretto{.4}
+	\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\stretto\pgf at circ@res at left}%
+					{\pgf at circ@res at up}%
+			}{%
+				\pgfpoint
+					{\stretto\pgf at circ@res at left}%
+					{\pgf at circ@res at down}%
+			}
+			
+			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+			\def\pgf at temp{european}%
+			\ifx\pgf at temp\pgf at circ@temp%
+				\pgfnode{fullgenericshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+			\else%
+				\def\pgf at temp{cute}
+				\ifx\pgf at temp\pgf at circ@temp%
+					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+				\else%
+					\pgfnode{americaninductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+				\fi%
+			\fi%
+
+			
+	\endpgfscope
+	\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\stretto\pgf at circ@res at right}%
+					{\pgf at circ@res at down}%
+			}{%
+				\pgfpoint
+					{\stretto\pgf at circ@res at right}%
+					{\pgf at circ@res at up}%
+			}
+
+			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+			\def\pgf at temp{european}%
+			\ifx\pgf at temp\pgf at circ@temp%
+				\pgfnode{fullgenericshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+			\else%
+				\def\pgf at temp{cute} 
+				\ifx\pgf at temp\pgf at circ@temp%
+					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+				\else%
+					\pgfnode{americaninductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+				\fi%
+			\fi%
+			
+	\endpgfscope
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpointanchor{pgf at inductor1}{b}}
+	
+	\pgfpathmoveto{\pgfpointanchor{pgf at inductor1}{a}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpointanchor{pgf at inductor2}{a}}
+	
+	\pgfpathmoveto{\pgfpointanchor{pgf at inductor2}{b}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+}
+
+
+	
+	% contrib Kristofer M. Monisit
+	
+	\pgfdeclareshape{fd op amp}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{-}{
+		\inOne
+	  }
+	  \anchor{+}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\up{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+			\pgf at circ@res at up = \pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+	    \pgfpointlineattime{
+			\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
+			\pgfpoint{
+				\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+				{\pgf at circ@res at up}}
+			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	  }
+	  \anchor{up}{
+		\up
+	  }
+	  \anchor{down}{
+		\up
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out +}{
+		\northwest
+		\pgf at y=.5\pgf at y
+		\pgf at x=-.7\pgf at x
+	  }
+	  \anchor{out -}{
+		\northwest
+		\pgf at y=-.5\pgf at y
+		\pgf at x=-.7\pgf at x
+	  }
+	  \anchor{west}{
+	  	\left
+      }
+		\anchor{east}{
+			\left
+			\pgf at x=-\pgf at x
+		}
+
+	  \backgroundpath{
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+      \northwest
+      \pgf at circ@res at up = \pgf at y
+      \pgf at circ@res at down = -\pgf at y
+      \pgf at circ@res at right = -\pgf at x
+      \pgf at circ@res at left = \pgf at x
+
+      % Negative input terminal
+      \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}]{\scriptsize\ $-$}
+  
+
+      % Positive input terminal
+      \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}]{\scriptsize\ $+$}
+  
+
+      % Negative output terminal
+      \pgfpathmoveto{\pgfpoint
+        {0.7\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at down}]{\scriptsize\ $-$}
+  
+
+      % Positive output terminal
+      \pgfpathmoveto{\pgfpoint
+        {0.7\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at up}]{\scriptsize\ $+$}
+  
+
+      % Draw them all!
+      \pgfusepath{draw}
+
+      % Triangle
+      \pgfscope
+        \pgfsetlinewidth{2\pgflinewidth}
+        \pgftransformxshift{.7\pgf at circ@res at left}
+        \pgf at circ@res at step=\pgf at circ@res at right
+        \advance\pgf at circ@res at step by -\pgf at circ@res at left
+        \pgf at circ@res at step=.7\pgf at circ@res at step
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfusepath{draw}
+      \endpgfscope
+	  }
+	}
+
+
+
+
+\pgfcircdeclarequadpole{transformer}{
+
+	\pgf at circ@drawtransformerbasicbody
+
+}{\pgf at circ@drawtransformerbasicanchor}
+
+\pgfcircdeclarequadpole{transformer core}{
+
+	\pgf at circ@drawtransformerbasicbody
+	
+	\pgfmoveto{\pgfpoint%
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
+					}
+	\pgflineto{
+				\pgfpoint
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
+					}
+
+	\pgfmoveto{\pgfpoint%
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
+					}
+	\pgflineto{
+				\pgfpoint
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
+					}					
+	
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
+	\pgfusepath{draw}
+}{\pgf at circ@drawtransformerbasicanchor}
+
+
+\pgfcircdeclarequadpole{gyrator}{
+
+	\def\stretto{.4}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at left}{.7*\stretto\pgf at circ@res at down}}
+	\pgfpatharc{90}{270}{.7*\stretto\pgf at circ@res at down}
+	
+	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at right}{.7*\stretto\pgf at circ@res at up}}
+	\pgfpatharc{-90}{90}{.7*\stretto\pgf at circ@res at down}
+	\pgfusepath{draw}
+
+}{}
+
+%% coupler
+% defines a general outer box for couplers
+% TikZ usage: 
+%		\draw (0,0) node[coupler](coup){\SI{-3}{dB}}
+%		(coup.port1) to[short,-o] ++(-1,0)
+%
+
+\long\def\pgfcircdeclarecoupler#1#2{
+	\pgfdeclareshape{#1}{
+		\anchor{center}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=0pt
+		}
+		\savedanchor\northwest{%
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/height}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=.5\pgf at x
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/width}\pgf at x
+			}
+		\anchor{north}{
+			\northwest
+			\pgf at x=0pt
+		}
+		\anchor{south}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=-\pgf at y
+		}
+		\anchor{west}{
+			\northwest
+			\pgf at y=0pt
+		}
+		\anchor{east}{
+			\northwest
+			\pgf at y=0pt
+			\pgf at x=-\pgf at x
+		}
+		\anchor{south west}{
+			\northwest
+			\pgf at y=-\pgf at y
+		}
+		\anchor{north east}{
+			\northwest
+			\pgf at x=-\pgf at x
+		}
+			\anchor{north west}{
+			\northwest
+		}
+		\anchor{south east}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-\pgf at y
+		}
+		\anchor{port1}{
+			\northwest
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{port2}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{port3}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{port4}{
+			\northwest
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{1}{
+			\northwest
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{2}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{3}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{4}{
+			\northwest
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{text}{
+			\northwest
+			\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
+			\pgf at x=-.5\wd\pgfnodeparttextbox
+		}
+		\backgroundpath{			
+				\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+				\northwest
+				\pgf at circ@res at up = \pgf at y 
+				\pgf at circ@res at down = -\pgf at y
+				\pgf at circ@res at right = -\pgf at x
+				\pgf at circ@res at left = \pgf at x
+			
+				\pgfstartlinewidth=\pgflinewidth
+
+				% draw outer box
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+				\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+				\pgfusepath{draw}
+				
+				% draw inner stuff
+				#2
+
+		}
+	}
+}
+
+% straight coupler
+\pgfcircdeclarecoupler{coupler}{
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+	\pgfsetarrows{latex-latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
+	\pgfsetarrows{latex-latex}
+	\pgfusepath{draw}
+}
+
+% "bended" coupler
+\pgfcircdeclarecoupler{coupler2}{
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
+	\pgfpatharc{0}{90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
+	\pgfpatharc{0}{-90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
+	\pgfpatharc{180}{90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
+	\pgfpatharc{-180}{-90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	
+	
+}
+
+%%%---------- close: pgfcircquadpoles
+%%%%%%%%%%% Springe nach pgfcircnpoles
+%%%---------- open: pgfcircnpoles.tex
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% N-poles
+
+\pgfkeys{/tikz/circuitikz,lab/.code={
+	
+
+}}
+
+\long\def\pgfcircdeclarenpole#1#2#3{
+	\pgfdeclareshape{#1}
+	{
+	  \anchor{center}{
+	  	\northwest
+		\pgf at x=0pt
+	  }
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=.5\pgf at x
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf at x
+	  }
+	  \anchor{A2}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{B1}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{A1}{
+		\northwest
+	  }
+	  \anchor{B2}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+	  	\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south}{
+	  	\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{west}{
+	  	\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{east}{
+	  	\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \anchor{base}{
+	  	\northwest
+		\pgf at x=0pt	  	
+	  }
+	  #3
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+			%\pgf at circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			
+			#2
+	  
+	  }
+	}
+}
+
+
+
+\def\pgf at circ@drawtransformerbasicanchor{
+	\pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
+	 \anchor{AA2}{
+		\northwest
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=-\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{BB1}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{AA1}{
+		\northwest
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{BB2}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=-\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+}
+
+\def\pgf at circ@drawtransformerbasicbody{
+	\def\stretto{.4}
+	\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\stretto\pgf at circ@res at left}%
+					{\pgf at circ@res at up}%
+			}{%
+				\pgfpoint
+					{\stretto\pgf at circ@res at left}%
+					{\pgf at circ@res at down}%
+			}
+			
+			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+			\def\pgf at temp{european}%
+			\ifx\pgf at temp\pgf at circ@temp%
+				\pgfnode{fullgenericshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+			\else%
+				\def\pgf at temp{cute}
+				\ifx\pgf at temp\pgf at circ@temp%
+					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+				\else%
+					\pgfnode{americaninductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+				\fi%
+			\fi%
+
+			
+	\endpgfscope
+	\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\stretto\pgf at circ@res at right}%
+					{\pgf at circ@res at down}%
+			}{%
+				\pgfpoint
+					{\stretto\pgf at circ@res at right}%
+					{\pgf at circ@res at up}%
+			}
+
+			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+			\def\pgf at temp{european}%
+			\ifx\pgf at temp\pgf at circ@temp%
+				\pgfnode{fullgenericshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+			\else%
+				\def\pgf at temp{cute} 
+				\ifx\pgf at temp\pgf at circ@temp%
+					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+				\else%
+					\pgfnode{americaninductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+				\fi%
+			\fi%
+			
+	\endpgfscope
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpointanchor{pgf at inductor1}{b}}
+	
+	\pgfpathmoveto{\pgfpointanchor{pgf at inductor1}{a}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpointanchor{pgf at inductor2}{a}}
+	
+	\pgfpathmoveto{\pgfpointanchor{pgf at inductor2}{b}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+}
+
+
+	
+	% contrib Kristofer M. Monisit
+	
+	\pgfdeclareshape{fd op amp}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{-}{
+		\inOne
+	  }
+	  \anchor{+}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\up{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+			\pgf at circ@res at up = \pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+	    \pgfpointlineattime{
+			\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
+			\pgfpoint{
+				\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+				{\pgf at circ@res at up}}
+			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	  }
+	  \anchor{up}{
+		\up
+	  }
+	  \anchor{down}{
+		\up
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out +}{
+		\northwest
+		\pgf at y=.5\pgf at y
+		\pgf at x=-.7\pgf at x
+	  }
+	  \anchor{out -}{
+		\northwest
+		\pgf at y=-.5\pgf at y
+		\pgf at x=-.7\pgf at x
+	  }
+	  \anchor{west}{
+	  	\left
+      }
+		\anchor{east}{
+			\left
+			\pgf at x=-\pgf at x
+		}
+
+	  \backgroundpath{
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+      \northwest
+      \pgf at circ@res at up = \pgf at y
+      \pgf at circ@res at down = -\pgf at y
+      \pgf at circ@res at right = -\pgf at x
+      \pgf at circ@res at left = \pgf at x
+
+      % Negative input terminal
+      \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}]{\scriptsize\ $-$}
+  
+
+      % Positive input terminal
+      \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}]{\scriptsize\ $+$}
+  
+
+      % Negative output terminal
+      \pgfpathmoveto{\pgfpoint
+        {0.7\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at down}]{\scriptsize\ $-$}
+  
+
+      % Positive output terminal
+      \pgfpathmoveto{\pgfpoint
+        {0.7\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at up}]{\scriptsize\ $+$}
+  
+
+      % Draw them all!
+      \pgfusepath{draw}
+
+      % Triangle
+      \pgfscope
+        \pgfsetlinewidth{2\pgflinewidth}
+        \pgftransformxshift{.7\pgf at circ@res at left}
+        \pgf at circ@res at step=\pgf at circ@res at right
+        \advance\pgf at circ@res at step by -\pgf at circ@res at left
+        \pgf at circ@res at step=.7\pgf at circ@res at step
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfusepath{draw}
+      \endpgfscope
+	  }
+	}
+
+
+
+
+\pgfcircdeclarequadpole{transformer}{
+
+	\pgf at circ@drawtransformerbasicbody
+
+}{\pgf at circ@drawtransformerbasicanchor}
+
+\pgfcircdeclarequadpole{transformer core}{
+
+	\pgf at circ@drawtransformerbasicbody
+	
+	\pgfmoveto{\pgfpoint%
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
+					}
+	\pgflineto{
+				\pgfpoint
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
+					}
+
+	\pgfmoveto{\pgfpoint%
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
+					}
+	\pgflineto{
+				\pgfpoint
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
+					}					
+	
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
+	\pgfusepath{draw}
+}{\pgf at circ@drawtransformerbasicanchor}
+
+
+\pgfcircdeclarequadpole{gyrator}{
+
+	\def\stretto{.4}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at left}{.7*\stretto\pgf at circ@res at down}}
+	\pgfpatharc{90}{270}{.7*\stretto\pgf at circ@res at down}
+	
+	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at right}{.7*\stretto\pgf at circ@res at up}}
+	\pgfpatharc{-90}{90}{.7*\stretto\pgf at circ@res at down}
+	\pgfusepath{draw}
+
+}{}
+
+%% coupler
+% defines a general outer box for couplers
+% TikZ usage: 
+%		\draw (0,0) node[coupler](coup){\SI{-3}{dB}}
+%		(coup.port1) to[short,-o] ++(-1,0)
+%
+
+\long\def\pgfcircdeclarecoupler#1#2{
+	\pgfdeclareshape{#1}{
+		\anchor{center}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=0pt
+		}
+		\savedanchor\northwest{%
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/height}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=.5\pgf at x
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/width}\pgf at x
+			}
+		\anchor{north}{
+			\northwest
+			\pgf at x=0pt
+		}
+		\anchor{south}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=-\pgf at y
+		}
+		\anchor{west}{
+			\northwest
+			\pgf at y=0pt
+		}
+		\anchor{east}{
+			\northwest
+			\pgf at y=0pt
+			\pgf at x=-\pgf at x
+		}
+		\anchor{south west}{
+			\northwest
+			\pgf at y=-\pgf at y
+		}
+		\anchor{north east}{
+			\northwest
+			\pgf at x=-\pgf at x
+		}
+			\anchor{north west}{
+			\northwest
+		}
+		\anchor{south east}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-\pgf at y
+		}
+		\anchor{port1}{
+			\northwest
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{port2}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{port3}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{port4}{
+			\northwest
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{1}{
+			\northwest
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{2}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{3}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{4}{
+			\northwest
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{text}{
+			\northwest
+			\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
+			\pgf at x=-.5\wd\pgfnodeparttextbox
+		}
+		\backgroundpath{			
+				\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+				\northwest
+				\pgf at circ@res at up = \pgf at y 
+				\pgf at circ@res at down = -\pgf at y
+				\pgf at circ@res at right = -\pgf at x
+				\pgf at circ@res at left = \pgf at x
+			
+				\pgfstartlinewidth=\pgflinewidth
+
+				% draw outer box
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+				\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+				\pgfusepath{draw}
+				
+				% draw inner stuff
+				#2
+
+		}
+	}
+}
+
+% straight coupler
+\pgfcircdeclarecoupler{coupler}{
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+	\pgfsetarrows{latex-latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
+	\pgfsetarrows{latex-latex}
+	\pgfusepath{draw}
+}
+
+% "bended" coupler
+\pgfcircdeclarecoupler{coupler2}{
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
+	\pgfpatharc{0}{90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
+	\pgfpatharc{0}{-90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
+	\pgfpatharc{180}{90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
+	\pgfpatharc{-180}{-90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	
+	
+}
+
+%%%---------- close: pgfcircnpoles
+
+%%%%%%%%%%% Springe nach pgfcirclabel
+%%%---------- open: pgfcirclabel.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bipole label positioning
+
+%% Options
+\ctikzset{label/.style = { l=#1 } }
+\ctikzset{l/.code = { 
+	\pgfkeys{/tikz/circuitikz/bipole/label/name=#1}
+	\ctikzsetvalof{bipole/label/unit}{}
+	\ifpgf at circ@siunitx 
+		\pgf at circ@handleSI{#1}
+		\ifpgf at circ@siunitx at res 
+			\edef\pgf at temp{\pgf at circ@handleSI at val}
+			\pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf at temp}
+			\edef\pgf at temp{\pgf at circ@handleSI at unit}
+			\pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf at temp}
+		\else
+		\fi
+	\else
+	\fi
+}}
+
+\ctikzset{label above/.code = { 
+	l=#1, 
+	\circuitikzbasekey/bipole/label/position=90 }
+}
+\ctikzset{l^/.style = { 
+	l=#1,
+	\circuitikzbasekey/bipole/label/position=90 } 
+}
+
+\ctikzset{label below/.code = { 
+	l=#1,
+	\circuitikzbasekey/bipole/label/position=-90 } 
+}
+\ctikzset{l_/.style = { 
+	l=#1,
+	\circuitikzbasekey/bipole/label/position=-90 } 
+}
+
+
+
+\def\pgf at circ@drawlabel{
+		\pgfextra{
+			\edef\pgf at temp{\ctikzvalof{label/align}}
+			\def\pgf at circ@temp{straight}
+		}
+		\ifx\pgf at temp\pgf at circ@temp %straight
+			\pgf at circ@drawreglabel
+		\else
+			\pgfextra{\def\pgf at circ@temp{rotate}}
+			\ifx\pgf at temp\pgf at circ@temp %rotate
+				\pgf at circ@drawrotlabel
+			\else % smart
+				\pgf at circ@drawsmartlabel				
+			\fi
+		\fi
+}
+
+\def\pgf at circ@drawsmartlabel{
+	\pgfextra{
+		%\pgfmathadd{\pgf at circ@direction}{360}
+		\pgfmathmod{\pgf at circ@direction}{90}
+		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+	}
+	\ifnum \pgfcircmathresult > 20 
+		\ifnum \pgfcircmathresult < 70 % NON quasi retto
+			\pgf at circ@drawrotlabel
+		\else
+			\pgf at circ@drawreglabel
+		\fi
+	\else 
+		\pgf at circ@drawreglabel
+	\fi
+}
+
+%% Output routing
+%% #1 - node name
+
+\def\pgf at circ@drawrotlabel{
+	\pgfextra{
+		% calcolo rotazione label
+		\def\pgf at circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
+		\edef\pgfcirclabrot{\pgf at circ@direction} % primo e quarto quadrante
+		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % terzo e secondo
+			\pgfmathsubtract{\pgf at circ@direction}{180}
+			\edef\pgfcirclabrot{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+			\pgfmathadd{\pgf at circ@temp}{180} %%%
+			\edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil} %%%
+		\fi\fi
+		
+		\ifnum \ctikzvalof{mirror value} = -1
+			\pgfmathadd{\pgf at circ@temp}{180}
+			\edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+		\fi
+	}
+	coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.north)$)
+	(labelcoor) node [rotate=\pgfcirclabrot] {\pgf at circ@finallabel{}} % c'era un transform shape
+}
+
+\def\pgf at circ@drawreglabel{
+	\pgfextra{
+		\pgfmathsubtract{\pgf at circ@direction}{90}
+		\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+		
+		\edef\pgf at circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
+		\ifnum \pgf at circ@temp < 0
+			\pgfmathadd{\pgf at circ@labanc}{180}
+			\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+		\fi
+		
+		\ifnum \ctikzvalof{mirror value} = -1
+			\pgfmathadd{\pgf at circ@labanc}{180}
+			\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+		\fi
+	}
+	node [ anchor = \pgf at circ@labanc] 
+	  at (\ctikzvalof{bipole/name}.\pgf at circ@temp) {\pgf at circ@finallabel{}}
+}
+
+
+\ctikzset{text/.style = { t=#1 } }
+\ctikzset{t/.code = { 
+	\ctikzsetvalof{bipoles/twoport/text}{#1}
+}}
+
+%%%---------- close: pgfcirclabel
+%%%%%%%%%%% Springe nach pgfcircvoltage
+%%%---------- open: pgfcircvoltage.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%  Voltage management
+
+
+\ctikzset{v^>/.style = {
+		v = #1,
+		\circuitikzbasekey/bipole/voltage/direction = forward,
+		\circuitikzbasekey/bipole/voltage/position = above
+	}
+}
+
+\ctikzset{v^</.style = {
+		v = #1,
+		\circuitikzbasekey/bipole/voltage/direction = backward,
+		\circuitikzbasekey/bipole/voltage/position = above
+	}
+}
+
+\ctikzset{v_>/.style = {
+		v = #1,
+		\circuitikzbasekey/bipole/voltage/direction = forward,
+		\circuitikzbasekey/bipole/voltage/position = below
+	} 
+}
+
+\ctikzset{v_</.style = {
+		v = #1,
+		\circuitikzbasekey/bipole/voltage/direction = backward,
+		\circuitikzbasekey/bipole/voltage/position = below
+	} 
+}
+
+
+% Default position varies whether the component is a voltage source
+% or not
+\ctikzset{v/.code = {
+			\ifpgf at circuit@bipole at isvoltage
+				\pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
+					\circuitikzbasekey/bipole/voltage/direction=forward}
+			\else
+				\pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
+					\circuitikzbasekey/bipole/voltage/direction=backward}
+			\fi
+	\pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1}
+	\ctikzsetvalof{bipole/voltage/label/unit}{}
+	\ifpgf at circ@siunitx 
+		\pgf at circ@handleSI{#1}
+		\ifpgf at circ@siunitx at res 
+			\edef\pgf at temp{\pgf at circ@handleSI at val}
+			\pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf at temp}
+			\edef\pgf at temp{\pgf at circ@handleSI at unit}
+			\pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/unit}{\pgf at temp}
+		\else
+		\fi
+	\else
+	\fi
+	} 
+}
+
+\ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
+\ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position  = above} }
+\ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
+\ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
+
+
+%% Output routine for generic bipoles
+
+\def\pgf at circ@drawvoltagegeneric{
+	\pgfextra{
+		\ifnum \ctikzvalof{mirror value}=-1
+						\ifpgf at circuit@bipole at voltage@below\pgf at circuit@bipole at voltage@belowfalse\else\pgf at circuit@bipole at voltage@belowtrue\fi
+		\fi
+		
+		\ifpgf at circuit@bipole at voltage@below
+			\def\pgf at circ@voltage at angle{90}
+		\else
+			\def\pgf at circ@voltage at angle{-90} 
+		\fi	
+		
+		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
+		\pgfkeysifdefined{\pgf at temp}
+			{ \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
+			{ \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} }
+		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}
+		\pgfkeysifdefined{\pgf at temp}
+			{ \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
+			{ \edef\bumpb{\ctikzvalof{voltage/bump b}} }
+	}
+
+	coordinate (pgfcirc at mid) at ($(\tikztostart) ! \distacefromnode ! (\ctikzvalof{bipole/name}.left)$)
+	coordinate (pgfcirc at Vfrom) at ($(pgfcirc at mid) ! -\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen ! \pgf at circ@voltage at angle:(\ctikzvalof{bipole/name}.left)$) 
+   
+	coordinate (pgfcirc at mid) at ($(\tikztotarget) ! \distacefromnode ! (\ctikzvalof{bipole/name}.right)$)
+	coordinate (pgfcirc at Vto) at ($(pgfcirc at mid) ! \ctikzvalof{voltage/distance from line}\pgf at circ@Rlen ! \pgf at circ@voltage at angle : (\ctikzvalof{bipole/name}.right)$)
+
+	\ifpgf at circuit@bipole at voltage@below
+		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
+		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
+	\else
+		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$)
+		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$)
+	\fi
+
+	\ifpgf at circuit@europeanvoltage
+		\ifpgf at circuit@bipole at voltage@backward
+			(pgfcirc at Vto) .. controls (pgfcirc at Vcont2)  and (pgfcirc at Vcont1) .. 
+				node[currarrow, sloped,  allow upside down, pos=1] {} 
+			(pgfcirc at Vfrom) 
+		\else
+			(pgfcirc at Vfrom) .. controls (pgfcirc at Vcont1)  and (pgfcirc at Vcont2) ..
+				node[currarrow, sloped,  allow upside down, pos=1] {}
+			(pgfcirc at Vto) 	
+		\fi	
+	\else
+		\ifpgf at circuit@bipole at voltage@backward
+			(pgfcirc at Vfrom) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{\scriptsize$+$}   
+			(pgfcirc at Vto) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{$-$}
+		\else
+			(pgfcirc at Vfrom) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{\scriptsize$-$}   
+			(pgfcirc at Vto) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{$+$}
+		\fi	
+	\fi
+}
+
+%% Output routine for voltage sources
+
+\def\pgf at circ@drawvoltagegenerator{
+	\ifpgf at circuit@bipole at voltage@below
+		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
+		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
+	\else
+		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
+		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
+	\fi
+
+	\ifpgf at circuit@europeanvoltage
+		\ifpgf at circuit@bipole at voltage@backward
+			(pgfcirc at Vcont2)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vcont1)
+		\else
+			(pgfcirc at Vcont1)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vcont2)
+		\fi
+	
+	\else % american voltage
+		
+		\pgfextra{
+			\def\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}}
+			\def\pgf at circ@temp{battery}
+			\ifx\pgf at temp\pgf at circ@temp
+				\edef\pgf at circ@batteria{battery}
+			\else
+				\def\pgf at circ@temp{battery1}
+				\ifx\pgf at temp\pgf at circ@temp
+					\edef\pgf at circ@batteria{battery}
+				\else
+					\edef\pgf at circ@batteria{false}
+				\fi
+			\fi
+			\edef\pgf at circ@temp{battery}
+		}
+		
+		\ifx\pgf at circ@batteria\pgf at circ@temp % if it is a battery, must put + and -
+			\ifpgf at circuit@bipole at voltage@backward
+				(pgfcirc at Vcont2)  node {$-$}  (pgfcirc at Vcont1) node {$+$}
+			\else
+				(pgfcirc at Vcont1)  node {$-$}  (pgfcirc at Vcont2) node {$+$}
+			\fi
+		\fi
+		
+	\fi
+}
+
+%% Output routine
+
+\def\pgf at circ@drawvoltage{   % node name 
+	\pgfextra{
+		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+
+		\ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
+			\ifpgf at circuit@bipole at voltage@below
+				\def\pgf at circ@bipole at voltage@label at anchor{north west} 
+			\else \def\pgf at circ@bipole at voltage@label at anchor{south east}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
+			\ifpgf at circuit@bipole at voltage@below
+				\def\pgf at circ@bipole at voltage@label at anchor{west} 
+			\else \def\pgf at circ@bipole at voltage@label at anchor{east} 
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
+			\ifpgf at circuit@bipole at voltage@below
+				 \def\pgf at circ@bipole at voltage@label at anchor{south west}
+			\else \def\pgf at circ@bipole at voltage@label at anchor{north east}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
+			\ifpgf at circuit@bipole at voltage@below
+				  \def\pgf at circ@bipole at voltage@label at anchor{south}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{north}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
+			\ifpgf at circuit@bipole at voltage@below
+				 \def\pgf at circ@bipole at voltage@label at anchor{south east}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{north west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
+			\ifpgf at circuit@bipole at voltage@below
+				 \def\pgf at circ@bipole at voltage@label at anchor{east}
+			\else \def\pgf at circ@bipole at voltage@label at anchor{west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
+			\ifpgf at circuit@bipole at voltage@below
+				  \def\pgf at circ@bipole at voltage@label at anchor{north east}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{south west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
+			\ifpgf at circuit@bipole at voltage@below
+				 \def\pgf at circ@bipole at voltage@label at anchor{north}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{south} 
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
+			\ifpgf at circuit@bipole at voltage@below
+				  \def\pgf at circ@bipole at voltage@label at anchor{north}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{south}
+			\fi
+		\fi\fi
+
+		\ifpgf at circuit@bipole at voltage@below
+			\def\pgf at circ@bipole at voltage@label at where{-90}
+		\else
+			\def\pgf at circ@bipole at voltage@label at where{90}
+		\fi
+		
+		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
+		\pgfkeysifdefined{\pgf at temp}
+			{ \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
+			{ \edef\eudist{\ctikzvalof{voltage/european label distance}} }
+	}
+
+		\ifpgf at circuit@bipole at isvoltage
+			\pgf at circ@drawvoltagegenerator 
+		\else
+			\pgf at circ@drawvoltagegeneric 
+		\fi
+		(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)
+		coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
+			\ifpgf at circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi !
+			(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)$)
+		node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=0] 
+			  at (Vlab) { \pgf at circ@finallabel{voltage/} }
+}
+
+
+
+
+
+%		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! 
+%			\ctikzvalof{voltage/bump b} !
+%			(\ctikzvalof{bipole/name}.-110) $)
+%		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! 
+%			\ctikzvalof{voltage/bump b} ! 
+%			(\ctikzvalof{bipole/name}.-70) $)
+%	\else
+%		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! 
+%			\ctikzvalof{voltage/bump b} !
+%			(\ctikzvalof{bipole/name}.110) $)
+%		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! 
+%			\ctikzvalof{voltage/bump b} ! 
+%			(\ctikzvalof{bipole/name}.70) $)
+%	\fi
+%%%---------- close: pgfcircvoltage
+%%%%%%%%%%% Springe nach pgfcirccurrent
+%%%---------- open: pgfcirccurrent.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Current handling
+
+%% Options
+
+
+\ctikzset{i^>/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = forward,
+		\circuitikzbasekey/bipole/current/x position = after,
+		\circuitikzbasekey/bipole/current/y position = above
+	}
+}
+
+\ctikzset{i_>/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = forward,
+		\circuitikzbasekey/bipole/current/x position = after,
+		\circuitikzbasekey/bipole/current/y position = below
+	}
+}
+
+\ctikzset{i>^/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = forward,
+		\circuitikzbasekey/bipole/current/x position = before,
+		\circuitikzbasekey/bipole/current/y position = above
+	}
+}
+
+\ctikzset{i>_/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = forward,
+		\circuitikzbasekey/bipole/current/x position = before,
+		\circuitikzbasekey/bipole/current/y position = below
+	}
+}
+
+\ctikzset{i^</.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = backward,
+		\circuitikzbasekey/bipole/current/x position = after,
+		\circuitikzbasekey/bipole/current/y position = above
+	}
+}
+
+\ctikzset{i_</.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = backward,
+		\circuitikzbasekey/bipole/current/x position = after,
+		\circuitikzbasekey/bipole/current/y position = below
+	}
+}
+
+\ctikzset{i<^/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = backward,
+		\circuitikzbasekey/bipole/current/x position = before,
+		\circuitikzbasekey/bipole/current/y position = above
+	}
+}
+
+\ctikzset{i<_/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = backward,
+		\circuitikzbasekey/bipole/current/x position = before,
+		\circuitikzbasekey/bipole/current/y position = below
+	}
+}
+
+\ctikzset{i/.code = {
+%			\ifpgf at circuit@bipole at iscurrent
+%				\pgfkeys{\circuitikzbasekey/bipole/current/position=above}
+%			\else
+%				\pgfkeys{\circuitikzbasekey/bipole/current/position=below}
+%			\fi
+			\pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
+					\circuitikzbasekey/bipole/current/x position = after,
+					\circuitikzbasekey/bipole/current/y position = above }
+	\pgfkeys{/tikz/circuitikz/bipole/current/label/name=#1}
+	\ctikzsetvalof{bipole/current/label/unit}{}
+	\ifpgf at circ@siunitx 
+		\pgf at circ@handleSI{#1}
+		\ifpgf at circ@siunitx at res 
+			\edef\pgf at temp{\pgf at circ@handleSI at val}
+			\pgfkeyslet{/tikz/circuitikz/bipole/current/label/name}{\pgf at temp}
+			\edef\pgf at temp{\pgf at circ@handleSI at unit}
+			\pgfkeyslet{/tikz/circuitikz/bipole/current/label/unit}{\pgf at temp}
+		\else
+		\fi
+	\else
+	\fi
+}
+}
+
+\ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward } }
+\ctikzset{i_/.style = { i = #1, \circuitikzbasekey/bipole/current/y position = below } }
+\ctikzset{i>/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } }
+\ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } }
+
+
+\def\pgf at circ@drawnormalcurrent{
+			\ifpgf at circuit@bipole at current@before
+				\ifpgf at circuit@bipole at current@backward
+					{  (\ctikzvalof{bipole/name}.left) -- 
+							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+						(\tikztostart)  
+					}
+				\else
+					{  (\tikztostart) -- 
+							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+						(\ctikzvalof{bipole/name}.left)  
+					}
+				\fi
+			\else
+				\ifpgf at circuit@bipole at current@backward
+					{ 	(\tikztotarget) -- 
+							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+						(\ctikzvalof{bipole/name}.right)  
+					}
+				\else
+					{ 	(\ctikzvalof{bipole/name}.right) -- 
+							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {}
+						(\tikztotarget)  
+					}
+				\fi
+			\fi
+}
+
+%% Output routine 
+%% #1 - node name
+
+\def\pgf at circ@drawcurrent{
+	\pgfextra{
+		\edef\pgf at circ@ffffff{\pgf at circ@direction}
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@ffffff\pgf at nil}
+
+		\ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
+			\ifpgf at circuit@bipole at current@below
+				\def\pgf at circ@dir{north west} \else \def\pgf at circ@dir{south east}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
+			\ifpgf at circuit@bipole at current@below
+				\def\pgf at circ@dir{west} \else \def\pgf at circ@dir{east} 
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{south west}\else \def\pgf at circ@dir{north east}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
+			\ifpgf at circuit@bipole at current@below
+				  \def\pgf at circ@dir{south}\else\def\pgf at circ@dir{north}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{south east}\else\def\pgf at circ@dir{north west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{east}\else \def\pgf at circ@dir{west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
+			\ifpgf at circuit@bipole at current@below
+				  \def\pgf at circ@dir{north east}\else\def\pgf at circ@dir{south west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult <5
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{north}\else\def\pgf at circ@dir{south} 
+			\fi
+		\fi
+		\ifnum\pgfcircmathresult >355
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{north}\else\def\pgf at circ@dir{south} 
+			\fi
+		\fi
+		
+		\ifpgf at circuit@bipole at current@below
+			\def\pgf at circ@bipole at current@label at where{-90}
+		\else
+			\def\pgf at circ@bipole at current@label at where{+90}
+		\fi
+	}
+
+	
+		\pgfextra{	\def\pgf at temp{short} \edef\pgf at circ@temp{\ctikzvalof{bipole/kind}} }
+		
+		\ifx\pgf at circ@temp\pgf at temp % caso di corrente (centrata) su un corto
+			\ifpgf at circuit@bipole at current@backward
+				{ (\tikztotarget) -- 
+					node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+				  (\tikztostart)  }
+			\else
+				{ (\tikztostart) -- 
+					node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+				  (\tikztotarget)  }
+			\fi
+			
+		\else % altri bipoli - e quindi tra nodo e target
+
+			\ifpgf at circuit@bipole at iscurrent
+				\ifpgf at circuit@europeancurrent
+					\pgf at circ@drawnormalcurrent
+				\else 
+				\fi
+			\else
+				\pgf at circ@drawnormalcurrent
+			\fi
+		\fi
+
+	\ifpgf at circuit@bipole at iscurrent
+		 node [anchor=\pgf at circ@dir] at (\ctikzvalof{bipole/name}.\pgf at circ@bipole at current@label at where) 
+		 	{ \pgf at circ@finallabel{current/} }
+	\else
+		(Iarrow.\pgf at circ@bipole at current@label at where) node [anchor=\pgf at circ@dir] 	
+			{ \pgf at circ@finallabel{current/} } 
+	\fi
+
+}
+
+
+
+
+%%%---------- close: pgfcirccurrent
+%%%%%%%%%%% Springe nach pgfcircinputarrows
+%%%---------- open: pgfcircinputarrows.tex
+% Copyright 2013 by Stefan Erhardt
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Show input arrows for selected parts
+
+
+\ctikzset{>/.style = {
+		\circuitikzbasekey/inputarrow = true
+	}
+}
+
+
+
+
+
+%%%---------- close: pgfcircinputarrows
+
+
+
+
+%%%---------- close: circuitikz.code
+
+\ExecuteOptions{europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
+
+\ProcessOptions\relax
+
+\ifpgf at circ@siunitx
+    \RequirePackage{xstring}[2009/03/13]
+	%\expandafter\let\csname angstrom\endcsname\relax
+	\RequirePackage{siunitx}
+\fi
+
+%%%%%%%%%%% Springe nach circuitikz1.code
+%%%---------- open: circuitikz1.code.tex
+%%%%%%%%%%%%
+%% Dimensions
+
+% coordinate bipoli
+\newdimen\pgf at circ@res at up \newdimen\pgf at circ@res at down \newdimen\pgf at circ@res at zero
+\newdimen\pgf at circ@res at left \newdimen\pgf at circ@res at right
+\newdimen\pgf at circ@res at other
+\newdimen\pgf at circ@res at step
+
+% thickness iniziale
+\newdimen \pgfstartlinewidth
+
+\pgf at circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+
+
+
+% Names
+\ctikzset{name/.style = { n=#1 } }
+\ctikzset{n/.code = { 
+	\pgfkeys{/tikz/circuitikz/bipole/name=#1}
+}}
+
+% Reflect the node along
+\ctikzset{mirrored/.is choice}
+\ctikzset{mirror value/.initial=1}
+\ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} }
+\ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
+\ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
+
+% Initialize paths
+\def\pgfcircresetpath{
+	\ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90, 
+		bipole/reversed=false, bipole/kind=,
+	  	bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
+	  	bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,
+		bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
+		bipole/current/y position=above, bipole/current/direction=forward, 
+		mirrored=false
+   }
+}
+
+
+%% Generic bipole path
+\def\pgf at circ@bipole at path#1#2{
+	\pgfextra{
+		\ctikzset{bipole/kind = #1}
+		
+		\edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
+		\def\pgf at circ@temp{}
+		\ifx\pgf at temp\pgf at circ@temp % if it has not a name
+			\pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
+			\ctikzset{bipole/name = #2\pgf at circ@rand} % create it
+		\fi
+
+		\def\pgf at temp{open}
+		\def\pgf at circ@temp{#1}
+	}
+	\ifpgf at circuit@bipole at reversed
+		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
+		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {} 	
+	\else
+		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
+		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {} 
+	\fi
+	\pgfextra{
+		\pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
+					   {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
+		\edef\pgf at circ@direction{\pgfmathresult}		
+	}
+	($(\tikztostart) ! .5 ! (\tikztotarget)$) 
+		node[#1shape, rotate=\pgf at circ@direction, yscale=\ctikzvalof{mirror value}] 
+			(\ctikzvalof{bipole/name}) {}
+	\ifx\pgf at temp\pgf at circ@temp  % if it is an open
+	\else
+		(\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.left) 
+		(\ctikzvalof{bipole/name}.right)  -- (\ctikzvalof{bipole/name}end.center) 
+	\fi
+	\pgf at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabel\fi
+	\drawpoles
+	\pgf at circ@ifkeyempty{bipole/voltage/label/name}\else\pgf at circ@drawvoltage\fi
+	\pgf at circ@ifkeyempty{bipole/current/label/name}\else\pgf at circ@drawcurrent\fi
+	% reset
+	\pgfextra{
+		\pgfcircresetpath
+	}  
+	(\tikztotarget) 	\tikztonodes  % e si continua
+}
+
+
+%% Path definitions
+
+\def\pgf at circ@resistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{generic}{#1}\else\pgf at circ@bipole at path{resistor}{#1}\fi}
+\def\pgf at circ@vresistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{tgeneric}{#1}\else\pgf at circ@bipole at path{vresistor}{#1}\fi}
+\def\pgf at circ@potentiometer at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{genericpotentiometer}{#1}\else\pgf at circ@bipole at path{potentiometer}{#1}\fi}
+\def\pgf at circ@thermistor at path#1{\pgf at circ@bipole at path{thermistor}{#1}}
+\def\pgf at circ@thermistorptc at path#1{\pgf at circ@bipole at path{thermistorptc}{#1}}
+\def\pgf at circ@thermistorntc at path#1{\pgf at circ@bipole at path{thermistorntc}{#1}}
+\def\pgf at circ@varistor at path#1{\pgf at circ@bipole at path{varistor}{#1}}
+\def\pgf at circ@capacitor at path#1{\pgf at circ@bipole at path{capacitor}{#1}}
+\def\pgf at circ@polarcapacitor at path#1{\pgf at circ@bipole at path{polarcapacitor}{#1}}
+\def\pgf at circ@vcapacitor at path#1{\pgf at circ@bipole at path{vcapacitor}{#1}}
+\def\pgf at circ@battery at path#1{\pgf at circ@bipole at path{battery}{#1}}
+\def\pgf at circ@battery1 at path#1{\pgf at circ@bipole at path{battery1}{#1}}
+\def\pgf at circ@europeaninductor at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
+\def\pgf at circ@americaninductor at path#1{\pgf at circ@bipole at path{americaninductor}{#1}}
+\def\pgf at circ@cuteinductor at path#1{\pgf at circ@bipole at path{cuteinductor}{#1}}
+\def\pgf at circ@inductor at path#1{%
+	\pgfextra{
+		\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+		\def\pgf at temp{european}%
+	}
+	\ifx\pgf at temp\pgf at circ@temp%
+		\pgf at circ@europeaninductor at path{#1}%
+	\else%
+		\pgfextra{	\def\pgf at temp{cute} }%
+		\ifx\pgf at temp\pgf at circ@temp%
+			\pgf at circ@cuteinductor at path{#1}%
+		\else%
+			\pgf at circ@americaninductor at path{#1}%
+		\fi%
+	\fi%
+}
+\def\pgf at circ@vinductor at path#1{
+	\pgfextra{
+		\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+		\def\pgf at temp{european}%
+	}
+	\ifx\pgf at temp\pgf at circ@temp%
+		\pgf at circ@veuropeaninductor at path{#1}%
+	\else%
+		\pgfextra{	\def\pgf at temp{cute} }%
+		\ifx\pgf at temp\pgf at circ@temp%
+			\pgf at circ@vcuteinductor at path{#1}%
+		\else%
+			\pgf at circ@vamericaninductor at path{#1}%
+		\fi%
+	\fi%
+}
+\def\pgf at circ@veuropeaninductor at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
+\def\pgf at circ@vamericaninductor at path#1{\pgf at circ@bipole at path{vamericaninductor}{#1}}
+\def\pgf at circ@vcuteinductor at path#1{\pgf at circ@bipole at path{vcuteinductor}{#1}}
+\def\pgf at circ@lamp at path#1{\pgf at circ@bipole at path{lamp}{#1}}
+\def\pgf at circ@vsource at path#1{\pgf at circ@bipole at path{vsource}{#1}}
+\def\pgf at circ@vsourceam at path#1{\pgf at circ@bipole at path{vsourceAM}{#1}}
+\def\pgf at circ@vsourcesin at path#1{\pgf at circ@bipole at path{vsourcesin}{#1}}
+\def\pgf at circ@isource at path#1{\pgf at circ@bipole at path{isource}{#1}}
+\def\pgf at circ@isourcesin at path#1{\pgf at circ@bipole at path{isourcesin}{#1}}
+\def\pgf at circ@vsourcesquare at path#1{\pgf at circ@bipole at path{vsourcesquare}{#1}}
+\def\pgf at circ@isourceam at path#1{\pgf at circ@bipole at path{isourceAM}{#1}}
+\def\pgf at circ@cvsource at path#1{\pgf at circ@bipole at path{cvsource}{#1}}
+\def\pgf at circ@cvsourceam at path#1{\pgf at circ@bipole at path{cvsourceAM}{#1}}
+\def\pgf at circ@cvsourcesin at path#1{\pgf at circ@bipole at path{cvsourcesin}{#1}}
+\def\pgf at circ@cisource at path#1{\pgf at circ@bipole at path{cisource}{#1}}
+\def\pgf at circ@cisourceam at path#1{\pgf at circ@bipole at path{cisourceAM}{#1}}
+\def\pgf at circ@cisourcesin at path#1{\pgf at circ@bipole at path{cisourcesin}{#1}}
+\def\pgf at circ@fulldiode at path#1{\pgf at circ@bipole at path{fulldiode}{#1}}
+\def\pgf at circ@fullzdiode at path#1{\pgf at circ@bipole at path{fullzdiode}{#1}}
+\def\pgf at circ@fullsdiode at path#1{\pgf at circ@bipole at path{fullsdiode}{#1}}
+\def\pgf at circ@fulltdiode at path#1{\pgf at circ@bipole at path{fulltdiode}{#1}}
+\def\pgf at circ@fulllediode at path#1{\pgf at circ@bipole at path{fulllediode}{#1}}
+\def\pgf at circ@fullpdiode at path#1{\pgf at circ@bipole at path{fullpdiode}{#1}}
+\def\pgf at circ@fullvarcap at path#1{\pgf at circ@bipole at path{fullvarcap}{#1}}
+\def\pgf at circ@emptydiode at path#1{\pgf at circ@bipole at path{emptydiode}{#1}}
+\def\pgf at circ@emptyzdiode at path#1{\pgf at circ@bipole at path{emptyzdiode}{#1}}
+\def\pgf at circ@emptysdiode at path#1{\pgf at circ@bipole at path{emptysdiode}{#1}}
+\def\pgf at circ@emptytdiode at path#1{\pgf at circ@bipole at path{emptytdiode}{#1}}
+\def\pgf at circ@emptylediode at path#1{\pgf at circ@bipole at path{emptylediode}{#1}}
+\def\pgf at circ@emptypdiode at path#1{\pgf at circ@bipole at path{emptypdiode}{#1}}
+\def\pgf at circ@emptyvarcap at path#1{\pgf at circ@bipole at path{emptyvarcap}{#1}}
+\def\pgf at circ@short at path#1{\pgf at circ@bipole at path{short}{#1}}
+\def\pgf at circ@cspst at path#1{\pgf at circ@bipole at path{cspst}{#1}}
+\def\pgf at circ@ospst at path#1{\pgf at circ@bipole at path{ospst}{#1}}
+\def\pgf at circ@pushbutton at path#1{\pgf at circ@bipole at path{pushbutton}{#1}}
+\def\pgf at circ@open at path#1{\pgf at circ@bipole at path{open}{#1}}
+\def\pgf at circ@generic at path#1{\pgf at circ@bipole at path{generic}{#1}}
+\def\pgf at circ@ageneric at path#1{\pgf at circ@bipole at path{ageneric}{#1}}
+\def\pgf at circ@tgeneric at path#1{\pgf at circ@bipole at path{tgeneric}{#1}}
+\def\pgf at circ@fullgeneric at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
+\def\pgf at circ@tfullgeneric at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
+\def\pgf at circ@ammeter at path#1{\pgf at circ@bipole at path{ammeter}{#1}}
+\def\pgf at circ@voltmeter at path#1{\pgf at circ@bipole at path{voltmeter}{#1}}
+\def\pgf at circ@empty at path#1{}
+\def\pgf at circ@photoresistor at path#1{\pgf at circ@bipole at path{photoresistor}{#1}}
+\def\pgf at circ@thyristor at path#1{\pgf at circ@bipole at path{thyristor}{#1}}
+\def\pgf at circ@toggleswitch at path#1{\pgf at circ@bipole at path{toggleswitch}{#1}}
+\def\pgf at circ@memristor at path#1{\pgf at circ@bipole at path{memristor}{#1}}
+\def\pgf at circ@triac at path#1{\pgf at circ@bipole at path{triac}{#1}}
+\def\pgf at circ@tline at path#1{\pgf at circ@bipole at path{tline}{#1}}
+\def\pgf at circ@squid at path#1{\pgf at circ@bipole at path{squid}{#1}}
+\def\pgf at circ@barrier at path#1{\pgf at circ@bipole at path{barrier}{#1}}
+\def\pgf at circ@thermocouple at path#1{\pgf at circ@bipole at path{thermocouple}{#1}}
+\def\pgf at circ@fuse at path#1{\pgf at circ@bipole at path{fuse}{#1}}
+\def\pgf at circ@afuse at path#1{\pgf at circ@bipole at path{afuse}{#1}}
+
+\def\pgf at circ@twoport at path#1{\pgf at circ@bipole at path{twoport}{#1}}
+\def\pgf at circ@vco at path#1{\pgf at circ@bipole at path{vco}{#1}}
+\def\pgf at circ@bandpass at path#1{\pgf at circ@bipole at path{bandpass}{#1}}
+\def\pgf at circ@highpass at path#1{\pgf at circ@bipole at path{highpass}{#1}}
+\def\pgf at circ@lowpass at path#1{\pgf at circ@bipole at path{lowpass}{#1}}
+\def\pgf at circ@adc at path#1{\pgf at circ@bipole at path{adc}{#1}}
+\def\pgf at circ@dac at path#1{\pgf at circ@bipole at path{dac}{#1}}
+\def\pgf at circ@dsp at path#1{\pgf at circ@bipole at path{dsp}{#1}}
+\def\pgf at circ@fft at path#1{\pgf at circ@bipole at path{fft}{#1}}
+\def\pgf at circ@amp at path#1{\pgf at circ@bipole at path{amp}{#1}}
+\def\pgf at circ@vamp at path#1{\pgf at circ@bipole at path{vamp}{#1}}
+\def\pgf at circ@piattenuator at path#1{\pgf at circ@bipole at path{piattenuator}{#1}}
+\def\pgf at circ@vpiattenuator at path#1{\pgf at circ@bipole at path{vpiattenuator}{#1}}
+\def\pgf at circ@tattenuator at path#1{\pgf at circ@bipole at path{tattenuator}{#1}}
+\def\pgf at circ@vtattenuator at path#1{\pgf at circ@bipole at path{vtattenuator}{#1}}
+\def\pgf at circ@phaseshifter at path#1{\pgf at circ@bipole at path{phaseshifter}{#1}}
+\def\pgf at circ@vphaseshifter at path#1{\pgf at circ@bipole at path{vphaseshifter}{#1}}
+\def\pgf at circ@detector at path#1{\pgf at circ@bipole at path{detector}{#1}}
+
+
+%% Styles
+
+%% Aggiungere per thyristor e tripoli semplici
+
+%\def\ctikzsetbipole#1#2{%
+%	\tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
+%}
+%\ctikzsetbipole{resistor}{\pgf at circ@resistor at path}
+
+\tikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@resistor at path, l=#1}}
+\tikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{resistor}{#1}, l=#1}}
+\tikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{generic}{#1}, l=#1}}
+\tikzset{ammeter/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@ammeter at path, l=#1}}
+\tikzset{voltmeter/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@voltmeter at path, l=#1}}
+\tikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@potentiometer at path, l=#1}}
+\tikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@varistor at path, l=#1}}
+\tikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@photoresistor at path, l=#1}}
+\tikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistor at path, l=#1}}
+\tikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorptc at path, l=#1}}
+\tikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorntc at path, l=#1}}
+\tikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{potentiometer}{#1}, l=#1}}
+\tikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{genericpotentiometer}{#1}, l=#1}}
+\tikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vresistor at path, l=#1}}
+\tikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{vresistor}{#1}, l=#1}}
+\tikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{tgeneric}{#1}, l=#1}}
+\tikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@capacitor at path, l=#1}}
+\tikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@polarcapacitor at path, l=#1}}
+\tikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcapacitor at path, l=#1}}
+\tikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery1 at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@inductor at path, l=#1}}
+\tikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americaninductor at path, l=#1}}
+\tikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cuteinductor at path, l=#1}}
+\tikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@europeaninductor at path, l=#1}}
+\tikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vinductor at path, l=#1}}
+\tikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@veuropeaninductor at path, l=#1}}
+\tikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamericaninductor at path, l=#1}}
+\tikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcuteinductor at path, l=#1}}
+\tikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tline at path, l=#1}}
+\tikzset{transmission line/.style = {tline = #1}}
+\tikzset{TL/.style = {tline = #1}}
+\tikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\tikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\tikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\tikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\tikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
+\tikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesquare at path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
+\tikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\tikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+
+\tikzset{voltage source/.style = {\ifpgf at circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{current source/.style = {\ifpgf at circuit@europeancurrent european \else american \fi current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\tikzset{controlled voltage source/.style = {\ifpgf at circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{controlled current source/.style = {\ifpgf at circuit@europeancurrent european \else american \fi controlled current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
+
+
+\tikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@generic at path, l=#1}}
+\tikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ageneric at path, l=#1}}
+\tikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tgeneric at path, l=#1}}
+\tikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullgeneric at path, l=#1}}
+\tikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tfullgeneric at path, l=#1}}
+\tikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@short at path}}
+\tikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@open at path}}
+
+\tikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lamp at path}}
+
+\tikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@squid at path}}
+\tikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@barrier at path}}
+\tikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermocouple at path}}
+\tikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fuse at path}}
+\tikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@afuse at path}}
+
+\tikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@twoport at path}}
+\tikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vco at path}}
+\tikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bandpass at path}}
+\tikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@highpass at path}}
+\tikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lowpass at path}}
+\tikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@adc at path}}
+\tikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dac at path}}
+\tikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dsp at path}}
+\tikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fft at path}}
+\tikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@amp at path}}
+\tikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamp at path}}
+\tikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piattenuator at path}}
+\tikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vpiattenuator at path}}
+\tikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tattenuator at path}}
+\tikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vtattenuator at path}}
+\tikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@phaseshifter at path}}
+\tikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vphaseshifter at path}}
+\tikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@detector at path}}
+
+
+
+\tikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulldiode at path}}
+\tikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullsdiode at path}}
+\tikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullzdiode at path}}
+\tikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulltdiode at path}}
+\tikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullpdiode at path}}
+\tikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulllediode at path}}
+\tikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullvarcap at path}}
+
+\tikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptydiode at path}}
+\tikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptysdiode at path}}
+\tikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyzdiode at path}}
+\tikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptytdiode at path}}
+\tikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptypdiode at path}}
+\tikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptylediode at path}}
+\tikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyvarcap at path}}
+
+	\tikzset{Schottky diode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi Schottky diode}}
+	\tikzset{Zener diode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi Zener diode}}
+	\tikzset{tunnel diode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi tunnel diode}}
+	\tikzset{photodiode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi photodiode}}
+	\tikzset{led/.style = {\ifpgf at circuit@fulldiode full \else empty \fi led}}
+	\tikzset{varcap/.style = {\ifpgf at circuit@fulldiode full \else empty \fi varcap}}
+	\tikzset{diode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi diode}}
+	
+\tikzset{thyristor/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@thyristor at path}}
+\tikzset{memristor/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@memristor at path}}
+\tikzset{triac/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@triac at path}}
+
+\tikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cspst at path, l=#1}}
+\tikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ospst at path, l=#1}}
+\tikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pushbutton at path, l=#1}}
+\tikzset{toggle switch/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@toggleswitch at path}}
+
+\tikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ammeter at path}}
+\tikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@voltmeter at path}}
+
+% short forms
+\tikzset{vsource/.style = {voltage source = #1}}
+\tikzset{isource/.style = {current source = #1}}
+\tikzset{cisource/.style = {controlled current source = #1}}
+\tikzset{cvsource/.style = {controlled voltage source = #1}}
+\tikzset{vsourcesin/.style = {sinusoidal voltage source = #1}}
+\tikzset{vsourcesquare/.style = {square voltage source = #1}}
+\tikzset{isourcesin/.style = {sinusoidal current source = #1}}
+\tikzset{cisourcesin/.style = {controlled sinusoidal current source = #1}}
+\tikzset{cvsourcesin/.style = {controlled sinusoidal  voltage source = #1}}
+
+\tikzset{controlled vsource/.style = {controlled voltage source = #1}}
+\tikzset{controlled isource/.style = {controlled current source = #1}}
+\tikzset{controlled vsourcesin/.style = {controlled sinusoidal  voltage source = #1}}
+\tikzset{controlled isourcesin/.style = {controlled sinusoidal current source = #1}}
+
+\tikzset{R/.style= {resistor = #1}}
+\tikzset{vR/.style= {variable resistor = #1}}
+\tikzset{phR/.style= {photoresistor = #1}}
+\tikzset{thR/.style= {thermistor = #1}}
+\tikzset{thRp/.style= {thermistor ptc= #1}}
+\tikzset{thRn/.style= {thermistor ntc= #1}}
+\tikzset{pR/.style= {potentiometer = #1}}
+\tikzset{C/.style = {capacitor = #1}}
+\tikzset{pC/.style = {polar capacitor = #1}}
+\tikzset{vC/.style = {variable capacitor = #1}}
+\tikzset{L/.style = {inductor = #1}}
+\tikzset{vL/.style = {variable inductor = #1}}
+\tikzset{V/.style = {voltage source = #1}}
+\tikzset{cV/.style = {controlled voltage source = #1}}
+\tikzset{sV/.style = {sinusoidal voltage source = #1}}
+\tikzset{sqV/.style = {square voltage source = #1}}
+\tikzset{csV/.style = {controlled sinusoidal voltage source = #1}}
+\def\pgf at temp#1{ 
+	\tikzset{V#1/.style = {voltage source, v#1=##1} } 
+	\tikzset{cV#1/.style = {controlled  voltage source, v#1=##1} } 
+	\tikzset{sV#1/.style = {sinusoidal  voltage source, v#1=##1} } 
+	\tikzset{csV#1/.style = {controlled sinusoidal voltage source, v#1=##1} } 
+}
+\pgf at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<} 
+\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_} 
+\tikzset{I/.style = {current source = #1}}
+\tikzset{cI/.style = {controlled current source = #1}}
+\tikzset{sI/.style = {sinusoidal current source = #1}}
+\tikzset{csI/.style = {controlled sinusoidal current source = #1}}
+\def\pgf at temp#1{ 
+	\tikzset{I#1/.style = {current source, i#1=##1} } 
+	\tikzset{cI#1/.style = {controlled current source, i#1=##1} } 
+	\tikzset{sI#1/.style = {sinusoidal current source, i#1=##1} } 
+	\tikzset{csI#1/.style = {controlled sinusoidal current source, i#1=##1} } 
+}
+\pgf at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<} 
+\pgf at temp{>_} \pgf at temp{<_} \pgf at temp{>^} \pgf at temp{<^} 
+\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_} 
+\tikzset{Do/.style = {empty diode}}
+\tikzset{tDo/.style = {empty tunnel diode}}
+\tikzset{zDo/.style = {empty Zener diode}}
+\tikzset{sDo/.style = {empty Schottky diode}}
+\tikzset{pDo/.style = {empty photodiode}}
+\tikzset{leDo/.style = {empty led}}
+\tikzset{VCo/.style = {empty varcap}}
+\tikzset{D*/.style = {full diode}}
+\tikzset{tD*/.style = {full tunnel diode}}
+\tikzset{zD*/.style = {full Zener diode}}
+\tikzset{sD*/.style = {full Schottky diode}}
+\tikzset{pD*/.style = {full photodiode}}
+\tikzset{leD*/.style = {full led}}
+\tikzset{VC*/.style = {full varcap}}
+\tikzset{D/.style = {diode}}
+\tikzset{tD/.style = {tunnel diode}}
+\tikzset{zD/.style = {Zener diode}}
+\tikzset{sD/.style = {Schottky diode}}
+\tikzset{pD/.style = {photodiode}}
+\tikzset{leD/.style = {led}}
+\tikzset{VC/.style = {varcap}}
+
+\tikzset{Tr/.style = {triac}}
+\tikzset{Mr/.style = {memristor}}
+\tikzset{Ty/.style = {thyristor}}
+
+\tikzset{cspst/.style = {closing switch = #1}}
+\tikzset{ospst/.style = {opening switch = #1}}
+
+\tikzset{afuse/.style = {asymmetric fuse=#1}}
+
+
+\def\inheritlogicport#1#2{
+	\pgfdeclareshape{#2 port}{
+		\inheritsavedanchors[from=#1 #2 port]
+		\inheritbackgroundpath[from=#1 #2 port]
+		\inheritanchor[from=#1 #2 port]{in}
+		\inheritanchor[from=#1 #2 port]{in 1}
+		\inheritanchor[from=#1 #2 port]{in 2}
+		\inheritanchor[from=#1 #2 port]{out}
+		\inheritanchor[from=#1 #2 port]{center}
+		\inheritanchor[from=#1 #2 port]{left}
+	}
+}
+
+\ifpgf at circuit@europeanlogicport
+	\inheritlogicport{european}{and}
+	\inheritlogicport{european}{or}
+	\inheritlogicport{european}{xor}
+	\inheritlogicport{european}{not}
+	\inheritlogicport{european}{nand}
+	\inheritlogicport{european}{nor}
+	\inheritlogicport{european}{xnor}
+\else
+	\inheritlogicport{american}{and}
+	\inheritlogicport{american}{or}
+	\inheritlogicport{american}{xor}
+	\inheritlogicport{american}{not}
+	\inheritlogicport{american}{nand}
+	\inheritlogicport{american}{nor}
+	\inheritlogicport{american}{xnor}
+\fi
+
+% Transistor like bipoles
+
+\def\pgf at circ@trans at path#1#2{
+	\pgfextra{
+		\edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
+		\def\pgf at circ@temp{#2}
+		\ifx\pgf at temp\pgf at circ@temp % if it has not a name
+			\pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
+			\ctikzset{bipole/name = trans\pgf at circ@rand} % create it
+		\fi
+	}
+	\ifpgf at circuit@bipole at reversed
+		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
+		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {} 	
+	\else
+		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
+		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {} 
+	\fi
+	\pgfextra{
+		\pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
+					   {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
+		\pgfmathadd{\pgfmathresult}{-90}
+		\edef\pgf at circ@direction{\pgfmathresult}
+	}
+	($(\tikztostart) ! .5 ! (\tikztotarget)$) 
+		node[#1, /tikz/rotate=\pgf at circ@direction, xscale=\ctikzvalof{mirror value}] 
+			(\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
+	(\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.left) 
+	(\ctikzvalof{bipole/name}.right)  -- (\ctikzvalof{bipole/name}end.center) 
+	\pgfextra{
+		\pgfcircresetpath
+	}  
+	(\tikztotarget) 	\tikztonodes  % e si continua
+}
+
+
+\def\pgf at circ@definetranspath#1{
+	\tikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@trans at path{#1}{}, l=##1}}
+}
+
+\pgf at circ@definetranspath{nmos}
+\pgf at circ@definetranspath{pmos}
+\pgf at circ@definetranspath{npn}
+\pgf at circ@definetranspath{pnp}
+\pgf at circ@definetranspath{nfet}
+\pgf at circ@definetranspath{nigfete}
+\pgf at circ@definetranspath{nigfetd}
+\pgf at circ@definetranspath{pfet}
+\pgf at circ@definetranspath{pigfete}
+\pgf at circ@definetranspath{pigfetd}
+\pgf at circ@definetranspath{njfet}
+\pgf at circ@definetranspath{pjfet}
+\pgf at circ@definetranspath{pigbt}
+\pgf at circ@definetranspath{nigbt}
+%%%---------- close: circuitikz1.code
+
+\newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
+
+
+\endinput
+


Property changes on: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4-body.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4.sty	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.4.sty	2021-07-06 20:31:34 UTC (rev 59856)
@@ -1,4 +1,7 @@
-% Copyright 2007-2009 by Massimo Redaelli
+% Copyright 2018-2021 by Romano Giannetti
+% Copyright 2015-2021 by Stefan Lindner
+% Copyright 2013-2021 by Stefan Erhardt
+% Copyright 2007-2021 by Massimo Redaelli
 %
 % This file may be distributed and/or modified
 %
@@ -5,7 +8,7 @@
 % 1. under the LaTeX Project Public License and/or
 % 2. under the GNU Public License.
 %
-% See the file doc/LICENSE for more details.
+% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
 
 
 %%%%%
@@ -23,10105 +26,6 @@
 \ProvidesPackage{circuitikz-0.4}%
     [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
 
-%% Version 2.0 of pgf/TikZ is required
-\RequirePackage{tikz}
-\usetikzlibrary{calc}
-\usepgflibrary{decorations.pathmorphing,arrows}
+\input{circuitikz-0.4-body.tex}
 
-\DeclareOption{european}{
-	\ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
-	 \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester = european} 
-}
 
-\DeclareOption{american}{
-	\ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester = american}
-	\ctikzset{logic ports = american}
-}
-
-\DeclareOption{fulldiodes}{
-	\ctikzset{diode = full}
-}
-
-\DeclareOption{emptydiodes}{
-	\ctikzset{diode = empty}
-}
-
-\DeclareOption{europeanvoltages}{
-	\ctikzset{voltage=european}
-}
-
-\DeclareOption{americanvoltages}{
-	\ctikzset{voltage=american}
-}
-
-\DeclareOption{europeancurrents}{
-	\ctikzset{current = european}
-}
-
-\DeclareOption{americancurrents}{
-	\ctikzset{current = american}
-}
-
-\DeclareOption{europeanvoltages}{
-	\ctikzset{voltage = european}
-}
-
-\DeclareOption{americanresistors}{
-	\ctikzset{resistor = american}
-}
-
-\DeclareOption{europeanresistors}{
-	\ctikzset{resistor = european}
-}
-
-\DeclareOption{americaninductors}{
-	\ctikzset{inductor = american}
-}
-
-\DeclareOption{europeaninductors}{
-	\ctikzset{inductor = european}
-}
-
-\DeclareOption{cuteinductors}{
-	\ctikzset{inductor = cute}
-}
-
-\DeclareOption{americanports}{
-	\ctikzset{logic ports = american}
-}
-
-\DeclareOption{europeanports}{
-	\ctikzset{logic ports = european}
-}
-
-\DeclareOption{americangfsurgearrester}{
-	\ctikzset{gas filled surge arrester = american}
-}
-
-\DeclareOption{europeangfsurgearrester}{
-	\ctikzset{gas filled surge arrester = european}
-}
-
-
-\DeclareOption{siunitx}{
-	\pgf at circ@siunitxtrue
-}
-
-\DeclareOption{nosiunitx}{
-	\pgf at circ@siunitxfalse
-}
-
-\DeclareOption{arrowmos}{
-	\pgf at circuit@mos at arrowstrue
-}
-
-\DeclareOption{noarrowmos}{
-	\pgf at circuit@mos at arrowsfalse
-}
-
-\DeclareOption{straightlabels}{
-	\ctikzset{label/align = straight}
-}
-
-\DeclareOption{rotatelabels}{
-	\ctikzset{label/align = rotate}
-}
-
-\DeclareOption{smartlabels}{
-	\ctikzset{label/align = smart}
-}
-
-
-
-\DeclareOption{fulldiode}{
-	\ctikzset{diode = full}
-}
-
-\DeclareOption{emptydiode}{
-	\ctikzset{diode = empty}
-}
-
-\DeclareOption{europeanvoltage}{
-	\ctikzset{voltage=european}
-}
-
-\DeclareOption{americanvoltage}{
-	\ctikzset{voltage=american}
-}
-
-\DeclareOption{europeancurrent}{
-	\ctikzset{current = european}
-}
-
-\DeclareOption{americancurrent}{
-	\ctikzset{current = american}
-}
-
-\DeclareOption{europeanvoltage}{
-	\ctikzset{voltage = european}
-}
-
-\DeclareOption{americanresistor}{
-	\ctikzset{resistor = american}
-}
-
-\DeclareOption{europeanresistor}{
-	\ctikzset{resistor = european}
-}
-
-\DeclareOption{americaninductor}{
-	\ctikzset{inductor = american}
-}
-
-\DeclareOption{europeaninductor}{
-	\ctikzset{inductor = european}
-}
-
-\DeclareOption{cuteinductor}{
-	\ctikzset{inductor = cute}
-}
-
-\DeclareOption{americanport}{
-	\ctikzset{logic ports = american}
-}
-
-\DeclareOption{europeanport}{
-	\ctikzset{logic ports = european}
-}
-
-\DeclareOption{europeanport}{
-	\ctikzset{logic ports = european}
-}
-
-\DeclareOption{betterproportions}{
-	\ctikzset{monopoles/ground/width/.initial=.15}
-
-	\ctikzset{bipoles/resistor/height/.initial=.23}
-	\ctikzset{bipoles/resistor/width/.initial=.6}
-	\ctikzset{bipoles/capacitor/height/.initial=.4}
-	\ctikzset{bipoles/capacitor/width/.initial=.1}
-	\ctikzset{bipoles/potentiometer/height/.initial=.6}
-	\ctikzset{bipoles/potentiometer/height 2/.initial=.23}
-	\ctikzset{bipoles/potentiometer/width/.initial=.6}
-	\ctikzset{bipoles/photoresistor/height/.initial=.6}
-	\ctikzset{bipoles/photoresistor/height 2/.initial=.23}
-	\ctikzset{bipoles/photoresistor/width/.initial=.6}
-	\ctikzset{bipoles/thermistor/main/.initial=.7}
-	\ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7
-	\ctikzset{bipoles/thermistor/width/.initial=.6}
-	\ctikzset{bipoles/thermistorntc/width/.initial=.6}
-	\ctikzset{bipoles/thermistorntc/main/.initial=.7}
-	\ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7
-	\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7
-	\ctikzset{bipoles/thermistorptc/width/.initial=.6}
-	\ctikzset{bipoles/thermistorptc/main/.initial=.7}
-	\ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7
-	\ctikzset{bipoles/varistor/main/.initial=.7}
-	\ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7
-	\ctikzset{bipoles/varistor/width/.initial=.6}
-	\ctikzset{bipoles/vresistor/height/.initial=.45}
-	\ctikzset{bipoles/vresistor/width/.initial=.6}
-	\ctikzset{bipoles/cuteinductor/height/.initial=.23}
-	\ctikzset{bipoles/cuteinductor/width/.initial=.6}
-	\ctikzset{bipoles/cuteinductor/coils/.initial=6}
-	\ctikzset{bipoles/americaninductor/height/.initial=.23}
-	\ctikzset{bipoles/americaninductor/height 2/.initial=.1}
-	\ctikzset{bipoles/americaninductor/width/.initial=.6}
-	\ctikzset{bipoles/americaninductor/coils/.initial=4}
-	\ctikzset{bipoles/vcuteinductor/height/.initial=.6}
-	\ctikzset{bipoles/vcuteinductor/coil height/.initial=.23}
-	\ctikzset{bipoles/vcuteinductor/width/.initial=.6}
-	\ctikzset{bipoles/vcuteinductor/coils/.initial=6}
-	\ctikzset{bipoles/vamericaninductor/height/.initial=.45}
-	\ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
-	\ctikzset{bipoles/vamericaninductor/width/.initial=.6}
-	\ctikzset{bipoles/vamericaninductor/coils/.initial=4}
-	\ctikzset{bipoles/generic/height/.initial=.23}
-	\ctikzset{bipoles/generic/width/.initial=.6}
-	\ctikzset{bipoles/generic potentiometer/height/.initial=.6}
-	\ctikzset{bipoles/generic potentiometer/height 2/.initial=.23}
-	\ctikzset{bipoles/generic potentiometer/width/.initial=.6}
-	\ctikzset{bipoles/ageneric/height/.initial=.23}
-	\ctikzset{bipoles/ageneric/width/.initial=.6}
-	\ctikzset{bipoles/memristor/height/.initial=.23}
-	\ctikzset{bipoles/memristor/wave height/.initial=.375}
-	\ctikzset{bipoles/memristor/width/.initial=.60}
-	\ctikzset{bipoles/tgeneric/height/.initial=.525}
-	\ctikzset{bipoles/tgeneric/width/.initial=.6}
-	\ctikzset{bipoles/tfullgeneric/height/.initial=.525}
-	\ctikzset{bipoles/tfullgeneric/width/.initial=.60}
-	\ctikzset{bipoles/fullgeneric/height/.initial=.23}
-	\ctikzset{bipoles/fullgeneric/width/.initial=.6}
-	\ctikzset{bipoles/diode/height/.initial=.3}
-	\ctikzset{bipoles/diode/width/.initial=.25}
-	
-	\ctikzset{tripoles/thyristor/height/.initial=.66}
-	\ctikzset{tripoles/thyristor/height 2/.initial=.3}
-	\ctikzset{tripoles/thyristor/width/.initial=.6}
-	\ctikzset{tripoles/thyristor/diode height/.initial=.3}
-	\ctikzset{tripoles/thyristor/diode width left/.initial=.4}
-	\ctikzset{tripoles/thyristor/diode width right/.initial=.3}
-
-	\ctikzset{tripoles/triac/height/.initial=.66}
-	\ctikzset{tripoles/triac/width/.initial=.6}
-	\ctikzset{tripoles/triac/diode width left/.initial=.3}
-	\ctikzset{tripoles/triac/diode width right/.initial=.3}
-}
-
-%%%%%%%%%
-
-
-
-%%%%%%%%%%% Springe nach circuitikz.code
-%%%---------- open: circuitikz.code.tex
-
-%% Options
-
-
-
-
-%% Keys
-
-\long\def\pgf at circ@comment#1{}
-
-\def\circuitikzbasekey{/tikz/circuitikz}
-
-\pgfkeys{\circuitikzbasekey/.is family}
-
-\def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
-\let\ctikzset\circuitikzset
-\def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
-\def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
-
-\newif\ifpgf at circuit@inputarrow
-\ctikzset{inputarrow/.is choice}
-\ctikzset{inputarrow/true/.code={\pgf at circuit@inputarrowtrue}}
-\ctikzset{inputarrow/false/.code={\pgf at circuit@inputarrowfalse}}
-
-\ctikzset{bipoles/.is family}
-\ctikzset{bipoles/border margin/.initial=1.1}
-\ctikzset{bipoles/thickness/.initial=2} 
-\ctikzset{bipoles/length/.initial=1.4cm} 
-\ctikzset{nodes width/.initial=.04}
-\newdimen\pgf at circ@Rlen 
-\ctikzset{bipoles/length/.code={\pgf at circ@Rlen = #1}} 
-
-
-\ctikzset{monopoles/.is family}
-\ctikzset{monopoles/ground/width/.initial=.25}
-\ctikzset{monopoles/chassis/width/.initial=.25}
-\ctikzset{monopoles/alternative chassis/width/.initial=.25}
-\ctikzset{monopoles/equipotentiality/width/.initial=.25}
-\ctikzset{monopoles/tlinestub/width/.initial=.25}          
-\ctikzset{monopoles/antenna/width/.initial=.25}            
-\ctikzset{monopoles/antenna/label/xanchor/.initial=.4}            
-\ctikzset{monopoles/antenna/label/yanchor/.initial=.75}            
-\ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}            
-\ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}            
-\ctikzset{monopoles/txantenna/width/.initial=.25}
-\ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}            
-\ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}            
-\ctikzset{monopoles/rxantenna/width/.initial=.25}
-\ctikzset{monopoles/tground/thickness/.initial=3}
-\ctikzset{monopoles/vcc/width/.initial=.2}
-\ctikzset{monopoles/match/width/.initial=.4}
-\ctikzset{monopoles/oscillator/width/.initial=.7}
-
-\ctikzset{bipoles/resistor/height/.initial=.3}
-\ctikzset{bipoles/resistor/width/.initial=.8}
-\ctikzset{bipoles/potentiometer/height/.initial=.8}
-\ctikzset{bipoles/potentiometer/height 2/.initial=.3}
-\ctikzset{bipoles/potentiometer/width/.initial=.8}
-\ctikzset{bipoles/photoresistor/height/.initial=.6}
-\ctikzset{bipoles/photoresistor/height 2/.initial=.3}
-\ctikzset{bipoles/photoresistor/width/.initial=.8}
-\ctikzset{bipoles/thermistor/main/.initial=.7}
-\ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
-\ctikzset{bipoles/thermistorntc/width/.initial=.8}
-\ctikzset{bipoles/thermistorntc/main/.initial=.7}
-\ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
-\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
-\ctikzset{bipoles/thermistorptc/width/.initial=.8}
-\ctikzset{bipoles/thermistorptc/main/.initial=.7}
-\ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
-\ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
-\ctikzset{bipoles/thermistor/width/.initial=.8}
-\ctikzset{bipoles/varistor/main/.initial=.7}
-\ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
-\ctikzset{bipoles/varistor/width/.initial=.8}
-\ctikzset{bipoles/vresistor/height/.initial=.6}
-\ctikzset{bipoles/vresistor/width/.initial=.8}
-\ctikzset{bipoles/cuteinductor/height/.initial=.3}
-\ctikzset{bipoles/cuteinductor/width/.initial=.8}
-\ctikzset{bipoles/cuteinductor/coils/.initial=6}
-\ctikzset{bipoles/americaninductor/height/.initial=.3}
-\ctikzset{bipoles/americaninductor/height 2/.initial=.1}
-\ctikzset{bipoles/americaninductor/width/.initial=.8}
-\ctikzset{bipoles/americaninductor/coils/.initial=4}
-\ctikzset{bipoles/vcuteinductor/height/.initial=.6}
-\ctikzset{bipoles/vcuteinductor/coil height/.initial=.3}
-\ctikzset{bipoles/vcuteinductor/width/.initial=.8}
-\ctikzset{bipoles/vcuteinductor/coils/.initial=6}
-\ctikzset{bipoles/vamericaninductor/height/.initial=.6}
-\ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
-\ctikzset{bipoles/vamericaninductor/width/.initial=.8}
-\ctikzset{bipoles/vamericaninductor/coils/.initial=4}
-\ctikzset{bipoles/isource/height/.initial=.60}
-\ctikzset{bipoles/isource/width/.initial=.60}
-\ctikzset{bipoles/isourceam/height/.initial=.60}
-\ctikzset{bipoles/isourceam/width/.initial=.60}
-\ctikzset{bipoles/vsource/height/.initial=.60}
-\ctikzset{bipoles/vsource/width/.initial=.60}
-\ctikzset{bipoles/vsourceam/height/.initial=.60}
-\ctikzset{bipoles/vsourceam/width/.initial=.60}
-\ctikzset{bipoles/vsourceam/margin/.initial=.7}
-\ctikzset{bipoles/isourcesin/height/.initial=.60}
-\ctikzset{bipoles/isourcesin/width/.initial=.60}
-\ctikzset{bipoles/vsourcesin/height/.initial=.60}
-\ctikzset{bipoles/vsourcesin/width/.initial=.60}
-\ctikzset{bipoles/vsourcesquare/height/.initial=.60}
-\ctikzset{bipoles/vsourcesquare/width/.initial=.60}
-\ctikzset{bipoles/cisource/height/.initial=.7}
-\ctikzset{bipoles/cisource/width/.initial=.7}
-\ctikzset{bipoles/cisourceam/height/.initial=.7}
-\ctikzset{bipoles/cisourceam/width/.initial=.7}
-\ctikzset{bipoles/cvsource/height/.initial=.7}
-\ctikzset{bipoles/cvsource/width/.initial=.7}
-\ctikzset{bipoles/cvsourceam/height/.initial=.7}
-\ctikzset{bipoles/cvsourceam/width/.initial=.7}
-\ctikzset{bipoles/cvsourceam/margin/.initial=.7}
-\ctikzset{bipoles/cvsourceam/text scale/.initial=1}
-\ctikzset{bipoles/cisourcesin/width/.initial=.7}
-\ctikzset{bipoles/cvsourcesin/height/.initial=.7}
-\ctikzset{bipoles/cvsourcesin/width/.initial=.7}
-\ctikzset{bipoles/capacitor/height/.initial=.6}
-\ctikzset{bipoles/capacitor/width/.initial=.2}
-\ctikzset{bipoles/pcapacitor/height/.initial=.6}
-\ctikzset{bipoles/pcapacitor/width/.initial=.2}
-\ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
-\ctikzset{bipoles/vcapacitor/height/.initial=.6}
-\ctikzset{bipoles/vcapacitor/width/.initial=.5}
-\ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
-\ctikzset{bipoles/battery/height/.initial=.6}
-\ctikzset{bipoles/battery/width/.initial=.3}
-\ctikzset{bipoles/battery1/height/.initial=.6}
-\ctikzset{bipoles/battery1/width/.initial=.3}
-\ctikzset{bipoles/diode/height/.initial=.50}
-\ctikzset{bipoles/diode/width/.initial=.40}
-\ctikzset{bipoles/varcap/height/.initial=.50}
-\ctikzset{bipoles/varcap/width/.initial=.45}
-\ctikzset{bipoles/interr/height/.initial=.35}
-\ctikzset{bipoles/interr/width/.initial=.35}
-\ctikzset{bipoles/interr/height 2/.initial=.1}
-\ctikzset{bipoles/generic/height/.initial=.30}
-\ctikzset{bipoles/generic/width/.initial=.80}
-\ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
-\ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
-\ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
-\ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
-\ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
-\ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
-\ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
-\ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
-\ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
-\ctikzset{bipoles/fuse/height/.initial=.20}
-\ctikzset{bipoles/fuse/width/.initial=.50}
-\ctikzset{bipoles/afuse/height/.initial=.20}
-\ctikzset{bipoles/afuse/width/.initial=.50}
-\ctikzset{bipoles/generic potentiometer/height/.initial=.80}
-\ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
-\ctikzset{bipoles/generic potentiometer/width/.initial=.80}
-\ctikzset{bipoles/ageneric/height/.initial=.30}
-\ctikzset{bipoles/ageneric/width/.initial=.80}
-\ctikzset{bipoles/memristor/height/.initial=.30}
-\ctikzset{bipoles/memristor/wave height/.initial=.5}
-\ctikzset{bipoles/memristor/width/.initial=.80}
-\ctikzset{bipoles/tgeneric/height/.initial=.70}
-\ctikzset{bipoles/tgeneric/width/.initial=.80}
-\ctikzset{bipoles/tfullgeneric/height/.initial=.70}
-\ctikzset{bipoles/tfullgeneric/width/.initial=.80}
-\ctikzset{bipoles/fullgeneric/height/.initial=.30}
-\ctikzset{bipoles/fullgeneric/width/.initial=.80}
-\ctikzset{bipoles/open/height/.initial=.25}
-\ctikzset{bipoles/open/width/.initial=.8}
-\ctikzset{bipoles/ammeter/height/.initial=.60}
-\ctikzset{bipoles/ammeter/width/.initial=.60}
-\ctikzset{bipoles/voltmeter/height/.initial=.60}
-\ctikzset{bipoles/voltmeter/width/.initial=.60}
-\ctikzset{bipoles/buffer/height/.initial=1}
-\ctikzset{bipoles/buffer/width/.initial=1}
-\ctikzset{bipoles/not port/width/.initial=1}
-\ctikzset{bipoles/not port/height/.initial=.8}
-\ctikzset{bipoles/not port/circle width/.initial=.15}
-\ctikzset{bipoles/lamp/height/.initial=.60}
-\ctikzset{bipoles/lamp/width/.initial=.60}
-\ctikzset{bipoles/tline/height/.initial=.3}
-\ctikzset{bipoles/tline/width/.initial=.8}
-\ctikzset{bipoles/squid/height/.initial=.60}
-\ctikzset{bipoles/squid/width/.initial=.60}
-\ctikzset{bipoles/barrier/height/.initial=.60}
-\ctikzset{bipoles/barrier/width/.initial=.60}
-\ctikzset{bipoles/thermocouple/height/.initial=.250}
-\ctikzset{bipoles/thermocouple/height 2/.initial=.60}
-\ctikzset{bipoles/thermocouple/width/.initial=.140}
-\ctikzset{bipoles/pushbutton/height/.initial=.5}
-\ctikzset{bipoles/pushbutton/height 2/.initial=.0}
-\ctikzset{bipoles/pushbutton/width/.initial=.50}
-\ctikzset{bipoles/twoport/width/.initial=.7}
-\ctikzset{bipoles/twoport/height/.initial=.7}
-\ctikzset{bipoles/twoport/text/.initial=}
-\ctikzset{bipoles/vco/width/.initial=.7}
-\ctikzset{bipoles/bandpass/width/.initial=.7}
-\ctikzset{bipoles/highpass/width/.initial=.7}
-\ctikzset{bipoles/lowpass/width/.initial=.7}
-\ctikzset{bipoles/adc/width/.initial=.7}
-\ctikzset{bipoles/dac/width/.initial=.7}
-\ctikzset{bipoles/dsp/width/.initial=.7}
-\ctikzset{bipoles/fft/width/.initial=.7}
-\ctikzset{bipoles/amp/width/.initial=.7}
-\ctikzset{bipoles/vamp/width/.initial=.7}
-\ctikzset{bipoles/piattenuator/width/.initial=.7}
-\ctikzset{bipoles/vpiattenuator/width/.initial=.7}
-\ctikzset{bipoles/tattenuator/width/.initial=.7}
-\ctikzset{bipoles/vtattenuator/width/.initial=.7}
-\ctikzset{bipoles/phaseshifter/width/.initial=.7}
-\ctikzset{bipoles/vphaseshifter/width/.initial=.7}
-\ctikzset{bipoles/detector/width/.initial=.7}
-
-\newif\ifpgf at circuit@mos at arrows
-\ctikzset{tripoles/mos style/.is choice}
-\ctikzset{tripoles/mos style/no arrows/.code={\pgf at circuit@mos at arrowsfalse}}
-\ctikzset{tripoles/mos style/arrows/.code={\pgf at circuit@mos at arrowstrue}}
-\ctikzset{tripoles/nmos/width/.initial=.7}
-\ctikzset{tripoles/nmos/gate height/.initial=.35}
-\ctikzset{tripoles/nmos/base height/.initial=.5}
-\ctikzset{tripoles/nmos/height/.initial=1.1}
-\ctikzset{tripoles/nmos/base width/.initial=.5}
-\ctikzset{tripoles/nmos/gate width/.initial=.62}
-\ctikzset{tripoles/pmos/width/.initial=.7}
-\ctikzset{tripoles/pmos/gate height/.initial=.35}
-\ctikzset{tripoles/pmos/base height/.initial=.5}
-\ctikzset{tripoles/pmos/height/.initial=1.1}
-\ctikzset{tripoles/pmos/base width/.initial=.5}
-\ctikzset{tripoles/pmos/gate width/.initial=.62}
-
-\ctikzset{tripoles/nfet/width/.initial=.7}
-\ctikzset{tripoles/nfet/gate height/.initial=.35}
-\ctikzset{tripoles/nfet/base height/.initial=.5}
-\ctikzset{tripoles/nfet/height/.initial=1.1}
-\ctikzset{tripoles/nfet/base width/.initial=.5}
-\ctikzset{tripoles/nfet/gate width/.initial=.62}
-
-\ctikzset{tripoles/pfet/width/.initial=.7}
-\ctikzset{tripoles/pfet/gate height/.initial=.35}
-\ctikzset{tripoles/pfet/base height/.initial=.5}
-\ctikzset{tripoles/pfet/height/.initial=1.1}
-\ctikzset{tripoles/pfet/base width/.initial=.5}
-\ctikzset{tripoles/pfet/gate width/.initial=.62}
-
-\ctikzset{tripoles/nigfete/width/.initial=.7}
-\ctikzset{tripoles/nigfete/gate height/.initial=.35}
-\ctikzset{tripoles/nigfete/base height/.initial=.5}
-\ctikzset{tripoles/nigfete/height/.initial=1.1}
-\ctikzset{tripoles/nigfete/base width/.initial=.5}
-\ctikzset{tripoles/nigfete/gate width/.initial=.62}
-
-\ctikzset{tripoles/nigfetd/width/.initial=.7}
-\ctikzset{tripoles/nigfetd/gate height/.initial=.35}
-\ctikzset{tripoles/nigfetd/base height/.initial=.5}
-\ctikzset{tripoles/nigfetd/height/.initial=1.1}
-\ctikzset{tripoles/nigfetd/base width/.initial=.5}
-\ctikzset{tripoles/nigfetd/gate width/.initial=.62}
-
-\ctikzset{tripoles/pigfete/width/.initial=.7}
-\ctikzset{tripoles/pigfete/gate height/.initial=.35}
-\ctikzset{tripoles/pigfete/base height/.initial=.5}
-\ctikzset{tripoles/pigfete/height/.initial=1.1}
-\ctikzset{tripoles/pigfete/base width/.initial=.5}
-\ctikzset{tripoles/pigfete/gate width/.initial=.62}
-
-\ctikzset{tripoles/pigfetd/width/.initial=.7}
-\ctikzset{tripoles/pigfetd/gate height/.initial=.35}
-\ctikzset{tripoles/pigfetd/base height/.initial=.5}
-\ctikzset{tripoles/pigfetd/height/.initial=1.1}
-\ctikzset{tripoles/pigfetd/base width/.initial=.5}
-\ctikzset{tripoles/pigfetd/gate width/.initial=.62}
-
-\ctikzset{tripoles/npn/width/.initial=.6}
-\ctikzset{tripoles/npn/gate height/.initial=.45}
-\ctikzset{tripoles/npn/gate height 2/.initial=.15}
-\ctikzset{tripoles/npn/base height/.initial=.4}
-\ctikzset{tripoles/npn/height/.initial=1.1}
-\ctikzset{tripoles/npn/gate width/.initial=.5}
-
-
-
-\ctikzset{tripoles/pnp/width/.initial=.6}
-\ctikzset{tripoles/pnp/gate height/.initial=.45}
-\ctikzset{tripoles/pnp/gate height 2/.initial=.15}
-\ctikzset{tripoles/pnp/base height/.initial=.4}
-\ctikzset{tripoles/pnp/height/.initial=1.1}
-\ctikzset{tripoles/pnp/gate width/.initial=.5}
-
-\ctikzset{tripoles/pigbt/width/.initial=.6}
-\ctikzset{tripoles/pigbt/gate height/.initial=.45}
-\ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
-\ctikzset{tripoles/pigbt/base height/.initial=.4}
-\ctikzset{tripoles/pigbt/height/.initial=1.1}
-\ctikzset{tripoles/pigbt/gate width/.initial=.62}
-\ctikzset{tripoles/pigbt/base width/.initial=.5}
-\ctikzset{tripoles/nigbt/width/.initial=.6}
-\ctikzset{tripoles/nigbt/gate height/.initial=.45}
-\ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
-\ctikzset{tripoles/nigbt/base height/.initial=.4}
-\ctikzset{tripoles/nigbt/height/.initial=1.1}
-\ctikzset{tripoles/nigbt/gate width/.initial=.62}
-\ctikzset{tripoles/nigbt/base width/.initial=.5}
-
-\ctikzset{tripoles/njfet/width/.initial=.7}
-\ctikzset{tripoles/njfet/gate height/.initial=.5}
-\ctikzset{tripoles/njfet/gate height 2/.initial=.35}
-\ctikzset{tripoles/njfet/gate width/.initial=.5}
-\ctikzset{tripoles/njfet/height/.initial=1.1}
-\ctikzset{tripoles/pjfet/width/.initial=.7}
-\ctikzset{tripoles/pjfet/gate height/.initial=.5}
-\ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
-\ctikzset{tripoles/pjfet/gate width/.initial=.5}
-\ctikzset{tripoles/pjfet/height/.initial=1.1}
-
-\ctikzset{tripoles/isfet/width/.initial=1}
-\ctikzset{tripoles/isfet/gate height/.initial=.35}
-\ctikzset{tripoles/isfet/base height/.initial=.5}
-\ctikzset{tripoles/isfet/height/.initial=1.1}
-\ctikzset{tripoles/isfet/base width/.initial=.3}
-\ctikzset{tripoles/isfet/gate width/.initial=.5}
-\ctikzset{tripoles/isfet/wave width/.initial=.16}
-\ctikzset{tripoles/isfet/wave amp/.initial=.06}
-\ctikzset{tripoles/isfet/waves y sep/.initial=.22}
-\ctikzset{tripoles/isfet/waves x sep/.initial=.8}
-
-\newif\ifpgf at circuit@europeanlogicport
-\ctikzset{logic ports/.is choice}
-\ctikzset{logic ports/european/.code= {\pgf at circuit@europeanlogicporttrue } }
-\ctikzset{logic ports/american/.code= {\pgf at circuit@europeanlogicportfalse } } 
-
-\newif\ifpgf at circuit@bipole at voltage@backward
-\ctikzset{bipole/voltage/direction/.is choice}
-\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
-\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at voltage@backwardtrue}}
-
-\ctikzset{tripoles/american and port/width/.initial=1.1}
-\ctikzset{tripoles/american and port/height/.initial=.8}
-\ctikzset{tripoles/american and port/port width/.initial=.7}
-\ctikzset{tripoles/american and port/input height/.initial=.5}
-\ctikzset{tripoles/american nand port/width/.initial=1.1}
-\ctikzset{tripoles/american nand port/height/.initial=.8}
-\ctikzset{tripoles/american nand port/port width/.initial=.7}
-\ctikzset{tripoles/american nand port/circle width/.initial=.15}
-\ctikzset{tripoles/american nand port/input height/.initial=.5}
-\ctikzset{tripoles/american or port/width/.initial=1.1}
-\ctikzset{tripoles/american or port/height/.initial=.8}
-\ctikzset{tripoles/american or port/port width/.initial=.7}
-\ctikzset{tripoles/american or port/input height/.initial=.5}
-\ctikzset{tripoles/american or port/input skip/.initial=.25}
-\ctikzset{tripoles/american or port/aaa/.initial=.6}
-\ctikzset{tripoles/american or port/bbb/.initial=.4} 
-\ctikzset{tripoles/american or port/ccc/.initial=.5} 
-\ctikzset{tripoles/american or port/ddd/.initial=.0}
-\ctikzset{tripoles/american nor port/width/.initial=1.1}
-\ctikzset{tripoles/american nor port/height/.initial=.8}
-\ctikzset{tripoles/american nor port/port width/.initial=.7}
-\ctikzset{tripoles/american nor port/input height/.initial=.5}
-\ctikzset{tripoles/american nor port/input skip/.initial=.25}
-\ctikzset{tripoles/american nor port/circle width/.initial=.15}
-\ctikzset{tripoles/american nor port/aaa/.initial=.6}
-\ctikzset{tripoles/american nor port/bbb/.initial=.4} 
-\ctikzset{tripoles/american nor port/ccc/.initial=.5} 
-\ctikzset{tripoles/american nor port/ddd/.initial=.0}
-\ctikzset{tripoles/american xor port/width/.initial=1.1}
-\ctikzset{tripoles/american xor port/height/.initial=.8}
-\ctikzset{tripoles/american xor port/port width/.initial=.7}
-\ctikzset{tripoles/american xor port/input height/.initial=.5}
-\ctikzset{tripoles/american xor port/input skip/.initial=.15}
-\ctikzset{tripoles/american xor port/distance/.initial=.1} 
-\ctikzset{tripoles/american xor port/aaa/.initial=.6}
-\ctikzset{tripoles/american xor port/bbb/.initial=.4} 
-\ctikzset{tripoles/american xor port/ccc/.initial=.5} 
-\ctikzset{tripoles/american xor port/ddd/.initial=.0}
-\ctikzset{tripoles/american xnor port/width/.initial=1.1}
-\ctikzset{tripoles/american xnor port/height/.initial=.8}
-\ctikzset{tripoles/american xnor port/port width/.initial=.7}
-\ctikzset{tripoles/american xnor port/input height/.initial=.5}
-\ctikzset{tripoles/american xnor port/input skip/.initial=.15}
-\ctikzset{tripoles/american xnor port/distance/.initial=.1} 
-\ctikzset{tripoles/american xnor port/aaa/.initial=.6}
-\ctikzset{tripoles/american xnor port/bbb/.initial=.4} 
-\ctikzset{tripoles/american xnor port/ccc/.initial=.5} 
-\ctikzset{tripoles/american xnor port/ddd/.initial=.0}
-\ctikzset{tripoles/american xnor port/circle width/.initial=.15}
-\ctikzset{tripoles/european and port/width/.initial=1.4}
-\ctikzset{tripoles/european and port/height/.initial=.65}
-\ctikzset{tripoles/european and port/reserved/.initial=.6}
-\ctikzset{tripoles/european and port/input height/.initial=.6}
-\ctikzset{tripoles/european or port/width/.initial=1.4}
-\ctikzset{tripoles/european or port/height/.initial=.65}
-\ctikzset{tripoles/european or port/reserved/.initial=.6}
-\ctikzset{tripoles/european or port/input height/.initial=.6}
-\ctikzset{tripoles/european xor port/width/.initial=1.4}
-\ctikzset{tripoles/european xor port/height/.initial=.65}
-\ctikzset{tripoles/european xor port/reserved/.initial=.6}
-\ctikzset{tripoles/european xor port/input height/.initial=.6}
-\ctikzset{tripoles/european nand port/width/.initial=1.4}
-\ctikzset{tripoles/european nand port/not height/.initial=.3}
-\ctikzset{tripoles/european nand port/not width/.initial=.8}
-\ctikzset{tripoles/european nand port/height/.initial=.65}
-\ctikzset{tripoles/european nand port/reserved/.initial=.6}
-\ctikzset{tripoles/european nand port/input height/.initial=.6}
-\ctikzset{tripoles/european not port/width/.initial=1.4}
-\ctikzset{tripoles/european not port/not height/.initial=.3}
-\ctikzset{tripoles/european not port/not width/.initial=.8}
-\ctikzset{tripoles/european not port/height/.initial=.65}
-\ctikzset{tripoles/european not port/reserved/.initial=.6}
-\ctikzset{tripoles/european not port/input height/.initial=0}
-\ctikzset{tripoles/european xnor port/width/.initial=1.4}
-\ctikzset{tripoles/european xnor port/not height/.initial=.3}
-\ctikzset{tripoles/european xnor port/not width/.initial=.8}
-\ctikzset{tripoles/european xnor port/height/.initial=.65}
-\ctikzset{tripoles/european xnor port/reserved/.initial=.6}
-\ctikzset{tripoles/european xnor port/input height/.initial=.6}
-\ctikzset{tripoles/european nor port/width/.initial=1.4}
-\ctikzset{tripoles/european nor port/not height/.initial=.3}
-\ctikzset{tripoles/european nor port/not width/.initial=.8}
-\ctikzset{tripoles/european nor port/height/.initial=.65}
-\ctikzset{tripoles/european nor port/reserved/.initial=.6}
-\ctikzset{tripoles/european nor port/input height/.initial=.6}
-\ctikzset{tripoles/op amp/width/.initial=1.7}
-\ctikzset{tripoles/op amp/port width/.initial=.7}
-\ctikzset{tripoles/op amp/height/.initial=1.4}
-\ctikzset{tripoles/op amp/input height/.initial=.5}
-\ctikzset{tripoles/op amp/up pos/.initial=.45}
-\ctikzset{tripoles/plain amp/width/.initial=1.7}
-\ctikzset{tripoles/plain amp/port width/.initial=.7}
-\ctikzset{tripoles/plain amp/height/.initial=1.4}
-\ctikzset{tripoles/plain amp/input height/.initial=.5}
-\ctikzset{tripoles/plain amp/up pos/.initial=.45}
-
-\ctikzset{tripoles/thyristor/height/.initial=1.10}
-\ctikzset{tripoles/thyristor/height 2/.initial=.5}
-\ctikzset{tripoles/thyristor/width/.initial=1.0}
-\ctikzset{tripoles/thyristor/diode height/.initial=.5}
-\ctikzset{tripoles/thyristor/diode width left/.initial=.4}
-\ctikzset{tripoles/thyristor/diode width right/.initial=.3}
-
-\ctikzset{tripoles/triac/height/.initial=1.1}
-\ctikzset{tripoles/triac/width/.initial=1}
-\ctikzset{tripoles/triac/diode width left/.initial=.3}
-\ctikzset{tripoles/triac/diode width right/.initial=.3}
-
-\ctikzset{tripoles/spdt/width/.initial=.85}
-\ctikzset{tripoles/spdt/height/.initial=.45}
-\ctikzset{tripoles/spdt/margin/.initial=.45}
-
-\ctikzset{tripoles/toggleswitch/height/.initial=.8}
-\ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
-\ctikzset{tripoles/toggleswitch/width/.initial=.80}
-
-\ctikzset{tripoles/mixer/width/.initial=0.7}
-\ctikzset{tripoles/adder/width/.initial=0.7}
-\ctikzset{tripoles/circulator/width/.initial=.7}
-
-\ctikzset{tripoles/wilkinson/height/.initial=1.3}
-\ctikzset{tripoles/wilkinson/width/.initial=1.3}
-
-\ctikzset{quadpoles/transformer/width/.initial=1.5}
-\ctikzset{quadpoles/transformer/width1/.initial=.4}
-\ctikzset{quadpoles/transformer/height/.initial=1.5}
-\ctikzset{quadpoles/transformer/height1/.initial=.8}
-\ctikzset{quadpoles/transformer core/width/.initial=1.5}
-\ctikzset{quadpoles/transformer core/height/.initial=1.5}
-\ctikzset{quadpoles/transformer core/core height/.initial=.5}
-\ctikzset{quadpoles/transformer core/core width/.initial=.05}
-\ctikzset{quadpoles/gyrator/width/.initial=1.5}
-\ctikzset{quadpoles/gyrator/height/.initial=1.5}
-\ctikzset{quadpoles/coupler/width/.initial=1.3}
-\ctikzset{quadpoles/coupler/height/.initial=1.3}
-
-\ctikzset{bipole/.is family}
-\ctikzset{bipole/kind/.initial = }
-\ctikzset{bipole/name/.initial = }
-\newif\ifpgf at circuit@bipole at reversed
-\ctikzset{bipole/reversed/.is if=pgf at circuit@bipole at reversed}
-\newif\ifpgf at circuit@bipole at isvoltage
-\ctikzset{bipole/is voltage/.is if=pgf at circuit@bipole at isvoltage}
-\newif\ifpgf at circuit@bipole at iscurrent
-\ctikzset{bipole/is current/.is if=pgf at circuit@bipole at iscurrent}
-
-\ctikzset{bipole/voltage/.is family}
-\newif\ifpgf at circuit@bipole at voltage@backward
-\ctikzset{bipole/voltage/direction/.is choice}
-\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
-\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at voltage@backwardtrue}}
-\newif\ifpgf at circuit@bipole at voltage@below
-\ctikzset{bipole/voltage/position/.is choice}
-\ctikzset{bipole/voltage/position/above/.code={\pgf at circuit@bipole at voltage@belowfalse}}
-\ctikzset{bipole/voltage/position/below/.code={\pgf at circuit@bipole at voltage@belowtrue}}
-
-\ctikzset{bipole/voltage/label/unit/.initial=}
-\ctikzset{bipole/voltage/label/name/.initial=}
-
-\ctikzset{bipole/current/.is family}
-\newif\ifpgf at circuit@bipole at current@backward
-\ctikzset{bipole/current/direction/.is choice}
-\ctikzset{bipole/current/direction/forward/.code={\pgf at circuit@bipole at current@backwardfalse}}
-\ctikzset{bipole/current/direction/backward/.code={\pgf at circuit@bipole at current@backwardtrue}}
-\newif\ifpgf at circuit@bipole at current@before
-\ctikzset{bipole/current/x position/.is choice}
-\ctikzset{bipole/current/x position/after/.code={\pgf at circuit@bipole at current@beforefalse}}
-\ctikzset{bipole/current/x position/before/.code={\pgf at circuit@bipole at current@beforetrue}}
-\newif\ifpgf at circuit@bipole at current@below
-\ctikzset{bipole/current/y position/.is choice}
-\ctikzset{bipole/current/y position/above/.code={\pgf at circuit@bipole at current@belowfalse}}
-\ctikzset{bipole/current/y position/below/.code={\pgf at circuit@bipole at current@belowtrue}}
-
-\ctikzset{bipole/current/label/unit/.initial=}
-\ctikzset{bipole/current/label/name/.initial=}
-
-\ctikzset{bipole/label/.is family}
-\ctikzset{bipole/label/position/.initial=90}
-\ctikzset{bipole/label/unit/.initial=}
-\ctikzset{bipole/label/name/.initial=}
-\ctikzset{bipole/nodes/.is family}
-\ctikzset{bipole/nodes/left/.is choice}
-\ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
-\ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
-\ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
-\ctikzset{bipole/nodes/right/.is choice}
-\ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
-\ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
-\ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
-
-
-\newif\ifpgf at circuit@europeanresistor
-\ctikzset{resistor/.is choice}
-\ctikzset{resistor/american/.code = \pgf at circuit@europeanresistorfalse }
-\ctikzset{resistor/european/.code = \pgf at circuit@europeanresistortrue }
-
-\ctikzset{inductor/.is choice}
-\ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
-\ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
-\ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
-
-\newif\ifpgf at circuit@fulldiode
-\ctikzset{diode/.is if=pgf at circuit@fulldiode}
-\ctikzset{diode/.is choice}
-\ctikzset{diode/empty/.code = \pgf at circuit@fulldiodefalse }
-\ctikzset{diode/full/.code = \pgf at circuit@fulldiodetrue }
-\ctikzset{thickness/.initial=2}
-\ctikzset{color/.initial=black}
-\pgfkeys{/tikz/color/.add code={}{\ctikzset{color=#1}}}
-
-
-\newif\ifpgf at circ@siunitx
-\newif\ifpgf at circ@siunitx at res
-
-\ctikzset{voltage/.is family}
-\ctikzset{voltage/distance from node/.initial=.5} %\pgf at circ@Rlen units
-\ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
-\ctikzset{voltage/bump a/.initial=1.2}
-\ctikzset{voltage/bump b/.initial=1.5}
-\ctikzset{voltage/european label distance/.initial=1.4}
-\ctikzset{voltage/american label distance/.initial=1.1}
-% special cases
-\ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
-\ctikzset{bipoles/generic/voltage/bump b/.initial=2}
-\ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
-%\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
-\ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
-\ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
-\ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
-\ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
-\ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
-\ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
-\ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
-\ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
-\ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
-\ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
-\ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
-%\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
-\ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
-%\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
-\ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
-%\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
-\ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
-%\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
-\ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
-%\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
-%\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
-
-\ctikzset{current/.is family}
-\ctikzset{current/distance/.initial = .5}
-
-\tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
-\tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
-\tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
-\tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
-\tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
-\tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
-
-\newif\ifpgf at circuit@europeangfsurgearrester
-\ctikzset{gas filled surge arrester/.is choice}
-\ctikzset{gas filled surge arrester/european/.code= {\pgf at circuit@europeangfsurgearrestertrue } }
-\ctikzset{gas filled surge arrester/american/.code= {\pgf at circuit@europeangfsurgearresterfalse } } 
-
-\tikzset{american gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = american } }
-\tikzset{european gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = european } }
-\tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
-\tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
-\tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
-\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full } }
-\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty } }
-\tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
-\tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
-\tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
-\tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester } }
-\tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
-
-% I should try to make the tree clearer (this voltaege conflicts with the options above)
-
-\newif\ifpgf at circuit@europeanvoltage
-\ctikzset{voltage/.is choice}
-\ctikzset{voltage/american/.code = {\pgf at circuit@europeanvoltagefalse } }
-\ctikzset{voltage/european/.code = {\pgf at circuit@europeanvoltagetrue } }
-
-\newif\ifpgf at circuit@europeancurrent
-\ctikzset{current/.is choice}
-\ctikzset{current/american/.code = \pgf at circuit@europeancurrentfalse }
-\ctikzset{current/european/.code = \pgf at circuit@europeancurrenttrue }
-
-\ctikzset{label/align/.is choice}
-\ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
-\ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
-\ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
-%% dependencies
-
-
-
-
-%%%%%%%%%% new
-\pgfkeys{\circuitikzbasekey/.search also={/tikz}}
-
-
-
-
-
-%%%%%%%%%%% Springe nach pgfcircutils
-%%%---------- open: pgfcircutils.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%\def\pgf at circ@handleSI#1{%
- % \pgf at circ@siunitx at resfalse
-%  
- % \edef\len{\stringlength[e]{#1}}
-  %\testmatchingchar[e]{#1}{\len}{>}%
-  %\ifmatchingchar%
-  %  \ifnum\findchars{#1}{<}=0
-	%  \def\pgf at circ@handleSI at val{\substring{#1}{1}{\findchars{#1}{<}-1}}
-	  %\def\pgf at circ@handleSI at unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
-	  %\pgf at circ@siunitx at restrue
-%	\else
-%	\fi
-  %\else 
-  %\fi
-%}
-
-\def\pgf at circ@handleSI#1{
-	\noexpandarg
-        	\def\pgf at temp{}
-	\StrBetween{#1}{<}{>}[\pgf at circ@handleSI at unit]
-	\StrLen{\pgf at circ@handleSI at unit}[\pgf at circ@handleSI at unit@len]
-
-	\ifnum\pgf at circ@handleSI at unit@len=0  
-	  \pgf at circ@siunitx at resfalse  
-	\else  
-	  \IfEndWith{#1}{>}{
-	  	\pgf at circ@siunitx at restrue 
-		\noexpandarg
-	  	\StrBefore{#1}{<}[\pgf at circ@handleSI at val]		
-                %\typeout{si |#1|}
-	  }{
-	  	\pgf at circ@siunitx at resfalse 
-                %\typeout{no si |#1|}
-	  }
-	\fi
-}
-
-\def\pgf at circ@finallabel#1{%
-		\edef\pgf at temp{}%
-		\edef\pgf at circ@temp{\ctikzvalof{bipole/#1label/unit}}%
-		\ifx\pgf at temp\pgf at circ@temp%
-			\ctikzvalof{bipole/#1label/name}%
-		\else%
-			$\SI{\ctikzvalof{bipole/#1label/name}}{\ctikzvalof{bipole/#1label/unit}}$%
-		\fi%
-}
-
-\def\pgf at circ@ifkeyempty#1{
-	\pgfextra{
-		\ctikzset{#1/.get=\pgf at circ@temp}
-		\edef\pgf at temp{}
-	}
-	\ifx\pgf at circ@temp\pgf at temp
-}
-
-
-%%%---------- close: pgfcircutils
-%%%%%%%%%%% Springe nach pgfcircmath
-%%%---------- open: pgfcircmath.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%    Math routines
-
-\def\pgf at circ@stripdecimals#1.#2\pgf at nil{#1}
-
-% angle between 0 and 360
-\def\pgf at circ@slope#1#2{%
- \pgf at process{#1}%
- \pgf at xa=\pgf at x%
- \pgf at ya=\pgf at y%
- \pgf at process{#2}%
- \advance\pgf at x by-\pgf at xa%
- \advance\pgf at y by-\pgf at ya%
- \ifdim\pgf at x<0.1pt 
- 	\ifdim\pgf at x>-0.1pt % vertical
-		\ifdim\pgf at y<0pt
-			\def\pgfmathresult{-90.0}
-		\else
-			\def\pgfmathresult{+90.0}
-		\fi 	
- 	\else % oblique with dx < 0
-		\pgfmathdivide{\pgf at y}{\pgf at x}
-		\pgfmathatan{\pgfmathresult}
-		\ifdim\pgf at x<0pt
-			\pgfmathsubtract{\pgfmathresult}{+180}
-		\fi
- 	\fi
- \else % oblique with dx > 0
-	\pgfmathdivide{\pgf at y}{\pgf at x}
-	\pgfmathatan{\pgfmathresult}
-	\ifdim\pgf at x<0pt
-		\pgfmathsubtract{\pgfmathresult}{+180}
-	\fi
- \fi
- \pgf at x=\pgfmathresult pt
- \ifdim\pgf at x<0pt
-	\pgfmathadd{\pgfmathresult}{+360} 
- \fi
- }
-
-  	
-%%%---------- close: pgfcircmath
-
-%%%%%%%%%%% Springe nach pgfcircshapes
-%%%---------- open: pgfcircshapes.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%  Other shapes
-
-
-%% Nothing
-
-\pgfdeclareshape{emptyshape}{
-	\savedanchor{\northeast}{%
-		\pgf at x=.5\wd\pgfnodeparttextbox%
-		\pgf at y=.5\ht\pgfnodeparttextbox%
-   }
-	\anchor{north}{
-		\northeast
-		\pgf at x=0cm
-	}
-	\anchor{east}{%
-		\northeast
-		\pgf at y=0cm
-   }
-	\anchor{south}{%
-		\northeast
-		\pgf at y=-\pgf at y
-		\pgf at x=0cm
-   }
-	\anchor{west}{
-		\northeast
-		\pgf at y=0cm
-		\pgf at x=-\pgf at x
-	}
-	\anchor{text}{%
-		\pgfpointorigin
-   }
-	\anchor{center}{
-		\pgfpointorigin
-	}
-}
-
-%% Full terminal
-
-\pgfdeclareshape{circ}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchorborder{
-		\pgf at circ@res at left=\pgf at x
-		\pgf at circ@res at up=\pgf at y
-		\pgfpointborderellipse{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}
-}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}		
-	}
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{draw,fill}		
-		\endpgfscope
-
-		}
-}
-
-%% Empty terminal
-
-\pgfdeclareshape{ocirc}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchorborder{
-		\pgf at circ@res at left=\pgf at x
-		\pgf at circ@res at up=\pgf at y
-		\pgfpointborderellipse{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}
-}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}		
-	}
-
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfsetfillcolor{white}
-			\pgfusepath{draw,fill}		
-		\endpgfscope
-
-		}
-}
-
-%% Current arrow
-
-\pgfdeclareshape{currarrow}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\divide \pgf at circ@res at step by 16
-
-			\pgfpathmoveto{\pgfpoint{-.7\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{0pt}}			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{draw,fill}
-
-		\endpgfscope
-	}
-
-}
-
-%% Current arrow
-
-\pgfdeclareshape{inputarrow}{
-	\savedanchor{\tip}{
-		\pgfpointorigin
-	}
-	\anchor{center}{
-		\tip
-	}
-	\anchor{tip}{
-		\tip
-	}
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\divide \pgf at circ@res at step by 16
-
-			\pgfpathmoveto{\pgfpoint{-1.7\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{0pt}{0pt}}
-			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{0pt}}			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{fill}
-
-		\endpgfscope
-	}
-
-}
-
-%%%---------- close: pgfcircshapes
-%%%%%%%%%%% Springe nach pgfcircmonopoles
-%%%---------- open: pgfcircmonopoles.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Monopoles
-
-%% Ground symbol
-
-\pgfdeclareshape{ground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{draw}
-		
-			
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-
-}
-
-
-
-\pgfdeclareshape{rground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-						
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-}
-
-\pgfdeclareshape{tground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			%\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-			\pgfusepath{draw}
-						
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-}
-
-\pgfdeclareshape{sground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{0}{-1.8\pgf at circ@res at step}}
-			\pgfpathclose
-			\pgfusepath{draw}
-						
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-
-}
-
-% noiseless ground
-\pgfdeclareshape{nground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfusepath{draw}
-			
-			\pgfpathmoveto{\pgfpoint{1.3\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfpatharc{0}{180}{1.3\pgf at circ@res at step}
-			\pgfusepath{draw}
-					
-			\pgfsetlinewidth{\pgfstartlinewidth}
-		\endpgfscope
-	}
-}
-
-% protective ground
-\pgfdeclareshape{pground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathcircle{\pgfpoint{0pt}{-\pgf at circ@res at step}} {1.2\pgf at circ@res at step}
-			\pgfusepath{draw}
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfusepath{draw}
-					
-			\pgfsetlinewidth{\pgfstartlinewidth}
-		\endpgfscope
-	}
-}
-
-% chassis ground 
-\pgfdeclareshape{cground}{ 
-\anchor{center}{ 
-    \pgfpointorigin 
-} 
-\behindforegroundpath{       
-    \pgf at circ@res at step=\ctikzvalof{monopoles/chassis/width}\pgf at circ@Rlen 
- 
-    \pgfscope        
-        \pgfpathmoveto{\pgfpointorigin} 
-        \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}} 
-        \pgfusepath{draw}
-
-        \pgfpathmoveto{\pgfpoint{-1.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
-        \pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
-        \pgfpathmoveto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-        \pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
-        \pgfusepath{draw}                        
-    \endpgfscope 
-    } 
-}
-
-% Contributed by Leonardo Azzinnari
-\pgfdeclareshape{tlinestub}{
-	\anchor{center}{\pgfpointorigin}
-	\behindforegroundpath{
-		\pgfstartlinewidth=\pgflinewidth
-		
-		\pgf at circ@res at step=\ctikzvalof{bipoles/tline/width} \pgf at circ@Rlen
-        \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-        
-            \pgfpathmoveto{\pgfpointorigin}
-            \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0pt}}
-            \pgfusepath{draw}
-         \pgfscope
-            \pgfpathellipse{\pgfpoint{0.5\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0.125\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-            \pgfpathlineto{\pgfpoint{1.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-            \pgfpatharc{90}{-90}{0.125\pgf at circ@res at step and 0.25\pgf at circ@res at step}
-            \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-0.25\pgf at circ@res at step}}
-            \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-            \pgfusepath{draw}
-         \endpgfscope
-      }
-}
-                            
-
-
-
-\pgfdeclareshape{antenna}{
-\anchor{center}{\pgfpointorigin}
-	\savedanchor{\northeast}{
-		\pgf at circ@res at step=\ctikzvalof{monopoles/antenna/width}\pgf at circ@Rlen
-		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
-		\pgf at y=6\pgf at circ@res at step
-	}
-	\anchor{text}{
-		\northeast
-		\pgf at x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf at x
-		\pgf at y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf at y
-	}
-   \behindforegroundpath{
-     \pgfstartlinewidth=\pgflinewidth
-     \pgf at circ@res at step=\ctikzvalof{monopoles/antenna/width}\pgf at circ@Rlen
-                           
-        % \pgfpathmoveto{\pgfpointorigin}
-        % \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
-        % \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
-        %     \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-        
-        \pgftransformxshift{ -4\pgf at circ@res at step }
-
-        \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
-        \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             
-         \pgfusepath{draw}
-             
-          \pgfscope   
-          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-             \pgfusepath{draw}
-           \endpgfscope
-                           \pgfsetlinewidth{\pgfstartlinewidth}
-                        
-                           }
-     }
-
-
-\pgfdeclareshape{txantenna}{
-	\anchor{center}{\pgfpointorigin}
-	\savedanchor{\northeast}{
-		\pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
-		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
-		\pgf at y=6\pgf at circ@res at step
-	}
-	\anchor{text}{
-		\northeast
-		\pgf at x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf at x
-		\pgf at y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf at y
-	}
-       \behindforegroundpath{
-       \pgfstartlinewidth=\pgflinewidth
-       \pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
-        
-         \pgfpathmoveto{\pgfpointorigin}
-         \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
-         \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             
-         \pgfusepath{draw}
-             
-          \pgfscope   
-          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-             \pgfusepath{draw}
-           \endpgfscope
-          \pgfpathmoveto{\pgfpoint{5.5\pgf at circ@res at step}{6\pgf at circ@res at step}}
-%        \pgfpatharc{60}{-60}{\pgf at circ@res at step and \pgf at circ@res at step}
-        \pgfpatharc{30}{-30}{2\pgf at circ@res at step}         \pgfpathmoveto{\pgfpoint{6\pgf at circ@res at step}{6.25\pgf at circ@res at step}}
-        \pgfpatharc{30}{-30}{2.5\pgf at circ@res at step}
-        \pgfpathmoveto{\pgfpoint{6.5\pgf at circ@res at step}{6.5\pgf at circ@res at step}}
-        \pgfpatharc{30}{-30}{3\pgf at circ@res at step}
-        \pgfpathmoveto{\pgfpoint{7\pgf at circ@res at step}{6.75\pgf at circ@res at step}}
-        \pgfpatharc{30}{-30}{3.5\pgf at circ@res at step}
-        \pgfpathmoveto{\pgfpoint{7.5\pgf at circ@res at step}{7\pgf at circ@res at step}}
-        \pgfpatharc{30}{-30}{4\pgf at circ@res at step}
-        \pgfusepath{draw}
-        \pgfsetlinewidth{\pgfstartlinewidth}
-        
-        }
-     }
-
-
-\pgfdeclareshape{rxantenna}{
-	\anchor{center}{\pgfpointorigin}
-	\savedanchor{\northeast}{
-		\pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
-		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
-		\pgf at y=6\pgf at circ@res at step
-	}
-	\anchor{text}{
-		\northeast
-		\pgf at x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf at x
-		\pgf at y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf at y
-	}
-    \behindforegroundpath{
-        \pgfstartlinewidth=\pgflinewidth
-        \pgf at circ@res at step=\ctikzvalof{monopoles/rxantenna/width}\pgf at circ@Rlen
-             
-         \pgfpathmoveto{\pgfpointorigin}
-         \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
-         \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             
-         \pgfusepath{draw}
-             
-          \pgfscope   
-          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-             \pgfusepath{draw}
-           \endpgfscope
-           
-           \pgfpathmoveto{\pgfpoint{6\pgf at circ@res at step}{7\pgf at circ@res at step}}
-%             \pgfpatharc{60}{-60}{\pgf at circ@res at step and \pgf at circ@res at step}
-             \pgfpatharc{150}{210}{4\pgf at circ@res at step}              \pgfpathmoveto{\pgfpoint{6.5\pgf at circ@res at step}{6.75\pgf at circ@res at step}}
-             \pgfpatharc{150}{210}{3.5\pgf at circ@res at step}
-             \pgfpathmoveto{\pgfpoint{7\pgf at circ@res at step}{6.5\pgf at circ@res at step}}
-             \pgfpatharc{150}{210}{3\pgf at circ@res at step}
-             \pgfpathmoveto{\pgfpoint{7.5\pgf at circ@res at step}{6.25\pgf at circ@res at step}}
-             \pgfpatharc{150}{210}{2.5\pgf at circ@res at step}
-             \pgfpathmoveto{\pgfpoint{8\pgf at circ@res at step}{6\pgf at circ@res at step}}
-             \pgfpatharc{150}{210}{2\pgf at circ@res at step}
-             \pgfusepath{draw}
-             \pgfsetlinewidth{\pgfstartlinewidth}
-             
-             }
-}
-
-% Vcc
-\pgfdeclareshape{vcc}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchor{text}{
-		\pgf at x=0pt
-		\pgf at y=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
-		\pgf at y=2\pgf at y
-		\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
-		\pgf at x=-.5\wd\pgfnodeparttextbox
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{1.5\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{0}{1.5\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{.8\pgf at circ@res at step}}
-			\pgfusepath{draw}
-									
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-
-}
-
-% match
-\pgfdeclareshape{match}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchor{text}{
-		\pgf at x=\ctikzvalof{monopoles/match/width}\pgf at circ@Rlen
-		\pgf at x=1.5\pgf at x
-		\advance \pgf at x by -.5\wd\pgfnodeparttextbox
-		\pgf at y=-1.5\ht\pgfnodeparttextbox
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/match/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0pt}}
-			\pgfusepath{draw}
-
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0}}
-			\pgfusepath{fill}
-									
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-
-}
-
-% oscillator
-\pgfdeclareshape{oscillator}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchor{north}{
-		\pgf at x=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
-		\pgf at x=-0.5\pgf at x
-		\pgf at y=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
-		\pgf at y=0.5\pgf at y
-	}
-	\anchor{south}{
-		\pgf at x=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
-		\pgf at x=-0.5\pgf at x
-		\pgf at y=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
-		\pgf at y=-0.5\pgf at y
-	}
-	\anchor{east}{
-		\pgfpointorigin
-		\pgf at x=-\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
-	}
-	\anchor{west}{
-		\pgfpointorigin
-	}
-	\anchor{text}{
-		\pgf at x=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
-		\pgf at x=-2\pgf at x
-		\advance \pgf at x by -.5\wd\pgfnodeparttextbox
-		\pgf at y=-\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
-		\advance \pgf at y by -1.5\ht\pgfnodeparttextbox
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/oscillator/width}\pgf at circ@Rlen
-		\pgf at circ@res at step=.5\pgf at circ@res at step
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfstartlinewidth=\pgflinewidth
-			
-			% draw circle
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-			\pgfpathcircle{\pgfpoint{-\pgf at circ@res at step}{0}} {\pgf at circ@res at step}
-			\pgfusepath{draw}
-
-			% draw inner sine waves
-			\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-			\pgfsetlinewidth{\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-1.5\pgf at circ@res at step}{0\pgf at circ@res at step}}
-			\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-			\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-			\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-			\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-			\pgfusepath{draw}
-					
-			\pgfsetlinewidth{\pgfstartlinewidth}
-
-		\endpgfscope
-	}
-}
-
-%%%---------- close: pgfcircmonopoles
-%%%%%%%%%%% Springe nach pgfcircbipoles
-%%%---------- open: pgfcircbipoles.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%% Generic macro for defining a bipole shape
-% #1 - additional anchors
-% #2 - lower y-size of the bipole (from the center).
-% #3 - #shape is the name of the shape
-% #4 - upper y-size of the bipole (from the center)
-% #5 - width of the bipole
-% #6 - macros drawing the bipole
-
-
-\long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
-	\pgfdeclareshape{#3shape}{
-	
-	\savedanchor{\northeast}{
-		\pgf at y=#4\pgf at circ@Rlen
-		\pgf at y=.5\pgf at y
-		\pgf at x=#5\pgf at circ@Rlen
-		\pgf at x=.5\pgf at x
-	}
-	\savedanchor{\northeastborder}{
-		\pgf at y=#4\pgf at circ@Rlen
-		\pgf at y=.5\pgf at y
-		\pgf at y=\ctikzvalof{bipoles/border margin}\pgf at y
-		\pgf at x=#5\pgf at circ@Rlen
-		\pgf at x=.5\pgf at x
-		\pgf at x=\ctikzvalof{bipoles/border margin}\pgf at x
-	}
-	\savedanchor{\southwestborder}{
-		\pgf at y=-#2\pgf at circ@Rlen
-		\pgf at y=.5\pgf at y
-		\pgf at y=\ctikzvalof{bipoles/border margin}\pgf at y
-		\pgf at x=-#5\pgf at circ@Rlen
-		\pgf at x=.5\pgf at x
-		\pgf at x=\ctikzvalof{bipoles/border margin}\pgf at x
-	}
-	\savedanchor{\southwest}{
-		\pgf at y=-#2\pgf at circ@Rlen
-		\pgf at y=.5\pgf at y
-		\pgf at x=-#5\pgf at circ@Rlen
-		\pgf at x=.5\pgf at x
-	}
-	\savedanchor{\centerpoint}{
-		\pgf at circ@res at down=-#2\pgf at circ@Rlen
-		\pgf at circ@res at up=#4\pgf at circ@Rlen
-		\pgfpointorigin
-		\pgf at y=\pgf at circ@res at up
-		\advance\pgf at y by\pgf at circ@res at down
-		\pgf at y=.5\pgf at y
-	}
-	\anchor{center}{\pgfpointorigin}
-	\anchor{n}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at x=0cm
-	}
-	\anchor{ne}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-	}
-	\anchor{nw}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at x=-\pgf at x
-	}
-	\anchor{e}{%
-		\ifpgf at circuit@bipole at reversed\else\southwest\northeast\fi
-		\pgf at y=0cm
-   }
-	\anchor{s}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at x=0cm
-   }
-	\anchor{se}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at x=-\pgf at x
-   }
-	\anchor{sw}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-   }
-	\anchor{w}{
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-	}
-	\anchor{north}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at x=0cm
-	}
-	\anchor{east}{%
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-   }
-	\anchor{south}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at x=0cm
-   }
-	\anchor{west}{
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-	}
-	\anchor{right}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-	}
-	\anchor{above}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at x=0cm
-	}
-	\anchor{left}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-   }
-	\anchor{below}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at x=0cm                    
-   }
-	\anchor{a}{%
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-   }
-	\anchor{b} {
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-	}
-	\savedanchor{\textanchor}{%
-		\pgf at y=\ht\pgfnodeparttextbox
-		\pgf at x=-.5\wd\pgfnodeparttextbox
-   }
-	\anchor{text}{%
-		\textanchor
-   }
-	\anchorborder{%
-		\def\pgf at temp{false}
-		\ifpgf at circuit@bipole at reversed\pgf at temp
-			\pgf at circ@res at left=-\pgf at x
-			\pgf at circ@res at right=-\pgf at y
-		\else
-			\pgf at circ@res at left=\pgf at x
-			\pgf at circ@res at right=\pgf at y
-		\fi
-		\ifdim\pgf at circ@res at right>0cm
-			\pgfpointborderrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at right}}{\northeastborder}
-		\else
-	  		\southwestborder	
-	  	\pgfpointborderrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at right}}{\pgfpoint{-\pgf at x}{-\pgf at y}}
-		\fi
-	}
-	
-	#1
-	
-	\backgroundpath{	
-		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-		
-		\northeast
-		\pgf at circ@res at up = \pgf at y 
-		\pgf at circ@res at zero = 0cm
-		\pgf at circ@res at left = -\pgf at x
-		\pgf at circ@res at right = \pgf at x
-		\southwest
-		\pgf at circ@res at down = \pgf at y
-
- 		\pgfstartlinewidth=\pgflinewidth
-		
-		#6
-			
-		\pgfsetlinewidth{\pgfstartlinewidth}
-	}
-	}
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Standard bipole shapes declarations
-
-%% Resistor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 12
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by \pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
-		\pgfusepath{draw} 
-}
-
-
-
-%% Variable resistor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/vresistor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 12
-		\def\myfrac{.5}
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by \pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-		\pgfusepath{draw}
-		
-		\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at other}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at other}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-
-%% Capacitor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/capacitor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 5
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-}
-
-
-%% Polar Capacitor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/pcapacitor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 5
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-				
-		\pgfscope
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}{\pgf at circ@res at up}}
-			\pgftransformrotate{-90}
-			\pgfpathsine{\pgfpoint{\pgf at circ@res at up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}}
-			\pgfpathcosine{\pgfpoint{\pgf at circ@res at up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}}
-			\pgfusepath{draw}
-		\endpgfscope
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-}
-
-%% Battery
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/battery/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 6
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-
-		\pgfusepath{draw}
-}
-
-
-%% Battery 1
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
-		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{0}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
-		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{0}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0}}
-		\pgfusepath{draw}
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at down}}
-		
-
-
-
-		\pgfusepath{draw}
-}
-
-
-
-%% cute inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
-	\pgf at circ@res at step=\ctikzvalof{bipoles/cuteinductor/width}\pgf at circ@Rlen
-	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/cuteinductor/coils}
-
-	\pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/cuteinductor/height}\pgf at circ@Rlen
-	\pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude
-	\pgfdecorationsegmentlength = \pgf at circ@res at step
-	\pgfdecorationsegmentaspect=.6
-	
-	\pgfdecoration{{coil}{\pgfdecoratedremainingdistance}}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\endpgfdecoration
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfusepath{stroke}	
-}
-
-
-
-%% american inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
-	\pgf at circ@res at step=\ctikzvalof{bipoles/americaninductor/width}\pgf at circ@Rlen
-	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/americaninductor/coils}
-
-	\pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/americaninductor/height}\pgf at circ@Rlen
-	\pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude
-	\pgfdecorationsegmentlength = 1.99\pgf at circ@res at step
-	
-	\pgfdecoration{{bumps}{\pgfdecoratedremainingdistance}}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\endpgfdecoration
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfusepath{stroke}	
-}
-
-
-
-
-
-%% Independent voltage source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-}
-
-
-%% Independent voltage source - American style
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourceam/height}}{vsourceAM}{\ctikzvalof{bipoles/vsourceam/height}}{\ctikzvalof{bipoles/vsourceam/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-
-	
-	\pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at down]{$+$}
-	\pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at up]{$-$}
-
-	\pgfusepath{draw}
-}
-
-
-
-%% Independent sinusoidal voltage source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesin/height}}{vsourcesin}{\ctikzvalof{bipoles/vsourcesin/height}}{\ctikzvalof{bipoles/vsourcesin/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-	\pgfusepath{draw}		
-		
-		\pgf at circ@res at up = .5\pgf at circ@res at up
-		\pgfscope
-			\pgftransformrotate{90}
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
-			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
-			\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-
-
-% contributed by Alistair Kwan
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesquare/height}}{vsourcesquare}{\ctikzvalof{bipoles/vsourcesquare/height}}{\ctikzvalof{bipoles/vsourcesquare/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-	\pgfusepath{draw}		
-		
-		\pgf at circ@res at up = .5\pgf at circ@res at up
-		\pgfscope
-			\pgftransformrotate{90}
-			\pgfpathmoveto{\pgfpoint{-1\pgf at circ@res at up}{0cm}}
-			\pgfpathlineto{\pgfpoint{-1\pgf at circ@res at up}{1\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{0\pgf at circ@res at up}{1\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{0\pgf at circ@res at up}{-1\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at up}{-1\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at up}{0\pgf at circ@res at up}}
-			\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-%% Independent current source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isource}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
-	\pgfpointorigin
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
-	\pgfusepath{draw}
-}
-
-
-
-
-%% Independent current source - American
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isourceam/height}}{isourceAM}{\ctikzvalof{bipoles/isourceam/height}}{\ctikzvalof{bipoles/isourceam/width}}{
-	\pgfpointorigin
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-	\pgfusepath{draw}
-
-	\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at left}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-	\pgfscope
-		\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
-		\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-	\endpgfscope
-}
-
-
-
-
-%% Independent sinusoidal current source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isourcesin}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
-	\pgfpointorigin
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-	\pgfusepath{draw}
-	
-		\pgf at circ@res at up = .5\pgf at circ@res at up
-		\pgfscope
-			\pgftransformrotate{90}
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
-			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
-			\pgfusepath{draw}
-		\endpgfscope
-
-}
-
-
-%% Controlled voltage source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsource/height}}{cvsource}{\ctikzvalof{bipoles/cvsource/height}}{\ctikzvalof{bipoles/cvsource/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-			\pgfusepath{draw}		
-}
-
-
-
-
-%% Controlled voltage source - American
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourceam/height}}{cvsourceAM}{\ctikzvalof{bipoles/cvsourceam/height}}{\ctikzvalof{bipoles/cvsourceam/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf at circ@res at left]{$+$}
-			\pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf at circ@res at right]{$-$}
-			\pgfusepath{draw}		
-}
-
-
-%% Controlled sinusoidal voltage source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cvsourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-		\pgfscope
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfusepath{draw}		
-		\endpgfscope	
-
-		\pgf at circ@res at up = .5\pgf at circ@res at up
-		\pgfscope
-			\pgftransformrotate{90}
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
-			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
-			\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-
-%% Controlled sinusoidal current source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cisourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-		\pgfscope
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfusepath{draw}		
-		\endpgfscope	
-
-		\pgf at circ@res at up = .5\pgf at circ@res at up
-		\pgfscope
-			\pgftransformrotate{90}
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
-			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
-			\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-
-
-%% Controlled current source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisource/height}}{cisource}{\ctikzvalof{bipoles/cisource/height}}{\ctikzvalof{bipoles/cisource/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
-			\pgfusepath{draw}		
-}
-
-
-
-
-%% Controlled current source - American
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisourceam/height}}{cisourceAM}{\ctikzvalof{bipoles/cisourceam/height}}{\ctikzvalof{bipoles/cisourceam/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-			\pgfusepath{draw}		
-
-	\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at left}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-	\pgfscope
-		\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
-		\pgfnode{currarrow}{center}{}{}{\pgfusepath{draw}}
-	\endpgfscope
-}
-
-%% Black generic diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulldiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw,fill}
-	\endpgfscope
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-}
-
-%% Black Zener diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw,fill}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-}
-
-%% Black Schottky diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-		
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw,fill}
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{.8\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{.8\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-
-}
-
-%% Black tunnel diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulltdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-		
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw,fill}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-}
-
-%% Black light emitting diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulllediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-		
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw,fill}
-	\endpgfscope
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfsetarrowsend{latex'}
-			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
-			\pgfusepath{draw}
-			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
-			\pgfusepath{draw}
-
-}
-
-%% Black photodiode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullpdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw,fill}
-	\endpgfscope
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfsetarrowsstart{latex'}
-			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
-			\pgfusepath{draw}
-			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
-			\pgfusepath{draw}
-}
-
-%% Black varcap
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw,fill}
-	
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		
-	\endpgfscope
-}
-
-%% Empty generic diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptydiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw}
-	\endpgfscope
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-}
-
-%% Empty Zener diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-}
-
-%% Empty Schottky diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-		
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw}
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{.8\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{.8\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-
-}
-
-%% Empty tunnel diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptytdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-		
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-}
-
-%% Empty light emitting diode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptylediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-		
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw}
-	\endpgfscope
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfsetarrowsend{latex'}
-			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
-			\pgfusepath{draw}
-			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
-			\pgfusepath{draw}
-}
-
-%% Empty photodiode
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptypdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw}
-	\endpgfscope
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfsetarrowsstart{latex'}
-			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
-			\pgfusepath{draw}
-			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
-			\pgfusepath{draw}
-}
-
-%% Empty varcap
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at left}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
-		\pgfusepath{draw}
-	
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		
-	\endpgfscope
-}
-
-%% Closing SPST
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{cspst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
-
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathmoveto{\pgfpoint{.9\pgf at circ@res at left}{.9\pgf at circ@res at up}}
-            \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf at circ@Rlen}
-			%\pgfsetarrowsend{latex'}
-			\pgfusepath{draw}
-			
-			\pgfpathmoveto{\pgfpoint{.1\pgf at circ@res at right}{-.25\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{.14\pgf at circ@res at right}{-.35\pgf at circ@res at up}}
-            \pgfsetarrowsend{latex'}
-			\pgfusepath{draw}	
-
-}
-
-%% Opening SPST
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{ospst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
-
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathmoveto{\pgfpoint{.3\pgf at circ@res at right}{.1\pgf at circ@res at down}}
-            \pgfpatharc{15}{50}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf at circ@Rlen}
-            %\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfusepath{draw}
-			
-			\pgfpathmoveto{\pgfpoint{.85\pgf at circ@res at left}{1.25\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{.87\pgf at circ@res at left}{1.26\pgf at circ@res at up}}
-            \pgfsetarrowsend{latex'}
-			\pgfusepath{draw}
-            
-
-}
-
-
-%% Push Button
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pushbutton/height 2}}{pushbutton}{\ctikzvalof{bipoles/pushbutton/height}}{\ctikzvalof{bipoles/pushbutton/width}}{
-
-			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at up}}
-			\pgfpathmoveto{\pgfpoint{0}{.5\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{0}{\pgf at circ@res at up}}
-			\pgfusepath{draw}
-			
-			\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-			\pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
-			\pgftransformshift{\pgfpoint{2\pgf at circ@res at right}{0pt}}
-			\pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
-}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% Ammeter
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
-	\def\pgf at circ@temp{right}
-	\ifx\tikz at res@label at pos\pgf at circ@temp
-		\pgf at circ@res at step=-1.2\pgf at circ@res at up
-	\else
-		\def\pgf at circ@temp{below}
-		\ifx\tikz at res@label at pos\pgf at circ@temp
-			\pgf at circ@res at step=-1.2\pgf at circ@res at up
-		\else
-			\pgf at circ@res at step=1.2\pgf at circ@res at up
-		\fi
-	\fi
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}		
-	\pgfpointorigin	\pgf at circ@res at other =  \pgf at x  \advance \pgf at circ@res at other by -\pgf at circ@res at up
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-		\pgfscope
-			\pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
-			\pgfusepath{draw}		
-		\endpgfscope	
-
-	\pgfsetlinewidth{\pgfstartlinewidth}
-
-	\pgfsetarrowsend{latex}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\pgfusepath{draw}
-	\pgfsetarrowsend{}
-
-	
-	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-
-	\pgfnode{circle}{center}{\textbf{A}}{}{}
-}
-
-%% Voltmeter
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
-	\def\pgf at circ@temp{right}
-	\ifx\tikz at res@label at pos\pgf at circ@temp
-		\pgf at circ@res at step=-1.2\pgf at circ@res at up
-	\else
-		\def\pgf at circ@temp{below}
-		\ifx\tikz at res@label at pos\pgf at circ@temp
-			\pgf at circ@res at step=-1.2\pgf at circ@res at up
-		\else
-			\pgf at circ@res at step=1.2\pgf at circ@res at up
-		\fi
-	\fi
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}		
-	\pgfpointorigin	\pgf at circ@res at other =  \pgf at x  \advance \pgf at circ@res at other by -\pgf at circ@res at up
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-		\pgfscope
-			\pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
-			\pgfusepath{draw}		
-		\endpgfscope	
-
-	\pgfsetlinewidth{\pgfstartlinewidth}
-
-	\pgfsetarrowsend{latex}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\pgfusepath{draw}
-	\pgfsetarrowsend{}
-
-	
-	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-
-	\pgfnode{circle}{center}{\textbf{V}}{}{}
-		
-}
-
-%% Short circuit
-
-\pgfcircdeclarebipole{}{0}{short}{0}{0}{ }
-
-%% Open circuit
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/open/height}}{open}{\ctikzvalof{bipoles/open/height}}{\ctikzvalof{bipoles/open/width}}{
-
-}
-
-%% Generic bipole - used as resistor by some (bleah)
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
-
-		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
-		%\divide \pgf at circ@res at step by 14
-
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-					
-		\pgfusepath{draw} 
-}
-
-
-%% fuse
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
-		\pgfusepath{draw}
-		
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-					
-		\pgfusepath{draw} 
-}
-
-
-
-%% Generic bipole, filled - used as inductor by some (bleah)
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fullgeneric/height}}{fullgeneric}{\ctikzvalof{bipoles/fullgeneric/height}}{\ctikzvalof{bipoles/fullgeneric/width}}{
-
-		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
-		%\divide \pgf at circ@res at step by 14
-
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-					
-		\pgfusepath{draw,fill} 
-}
-
-
-%% Generic asymmetric bipole 
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ageneric/height}}{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
-		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
-		%\divide \pgf at circ@res at step by 14
-
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-					
-		\pgfusepath{draw} 
-
-			\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-			\pgfusepath{stroke,fill}		
-}
-
-
-%% asymmetric fuse
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
-		\pgfusepath{draw}
-		
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-					
-		\pgfusepath{draw}
-		
-		\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-			\pgfusepath{stroke,fill}		 
-}
-
-
-
-
-%% Memristor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/memristor/height}}{memristor}{\ctikzvalof{bipoles/memristor/height}}{\ctikzvalof{bipoles/memristor/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 14
-
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{.72*\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{.72*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.35*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.35*\pgf at circ@res at left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-.05*\pgf at circ@res at left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-.05*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.42*\pgf at circ@res at right}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.42*\pgf at circ@res at right}{0pt}}
-		\pgfpathlineto{\pgfpoint{.8*\pgf at circ@res at right}{0pt}}
-					
-		\pgfusepath{draw} 
-
-			\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-			\pgfusepath{stroke,fill}		
-}
-
-
-
-
-%% Generic empty tunable
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/width}}{
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{.4\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{.4\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfusepath{draw}
-		
-		\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.5\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-.5\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\endpgfscope
-}
-
-%% Photoresistor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}{\pgfpoint{\pgf at circ@res at right}{-\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfusepath{draw}
-		
-		\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.3\pgf at circ@res at right}{-1.2\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.05\pgf at circ@res at right}{-1.2\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-
-
-%% Thermistor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf at circ@res at up}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfusepath{draw}
-		
-		%\pgfscope
-		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{-\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		%\endpgfscope
-}
-
-
-%% Thermistor PTC
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf at circ@res at up}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfusepath{draw}
-		
-		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{-\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\tiny$\vartheta$}
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.62\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{.62\pgf at circ@res at left}{.7\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{.45\pgf at circ@res at left}{.7\pgf at circ@res at down}}
-		\pgfusepath{draw}
-}
-
-%% Thermistor NTC
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf at circ@res at up}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfusepath{draw}
-		
-		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{-\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\tiny$\vartheta$}
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.62\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{.62\pgf at circ@res at left}{.7\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at left}{.7\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{.45\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-}
-
-%% thermocouple
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathlineto{\pgfpoint{0}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{0}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
-		\pgfusepath{draw}
-}
-
-%% Varistor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf at circ@res at up}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfusepath{draw}
-		
-		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{-\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\pgftext[top,x=.65\pgf at circ@res at left,y=1.2\pgf at circ@res at down]{{\tiny\textsf{U}}}
-}
-
-
-
-%% Generic full tunable
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 14
-
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{.4\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{.4\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfusepath{draw,fill}
-		
-		\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.5\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-.5\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-%% Variable Cute Inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
-	\pgf at circ@res at step=\ctikzvalof{bipoles/vcuteinductor/width}\pgf at circ@Rlen
-	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/vcuteinductor/coils}
-
-	\pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/vcuteinductor/coil height}\pgf at circ@Rlen
-	\pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude
-	\pgfdecorationsegmentlength = \pgf at circ@res at step
-	\pgfdecorationsegmentaspect=.6
-	
-	\pgfdecoration{{coil}{\pgfdecoratedremainingdistance}}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\endpgfdecoration
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfusepath{stroke}	
-	
-		\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-%% variable american inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
-	\pgf at circ@res at step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf at circ@Rlen
-	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/vamericaninductor/coils}
-
-	\pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/vamericaninductor/height}\pgf at circ@Rlen
-	\pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude
-	\pgfdecorationsegmentamplitude=.45\pgfdecorationsegmentamplitude % per freccia
-	\pgfdecorationsegmentlength = 1.99\pgf at circ@res at step
-	
-	\pgfdecoration{{bumps}{\pgfdecoratedremainingdistance}}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\endpgfdecoration
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfusepath{stroke}	
-	
-		\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-
-
-%% Variable Capacitor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
-		%\pgf at circ@res at step = \ctikzvalof{bipoles/vcapacitor/width}\pgf at circ@Rlen
-		\pgf at circ@res at step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf at circ@res at right
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\endpgfscope
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{0pt}}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfusepath{draw}
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Handling of terminals
-
-
-%% Easily usable styles
-
-\ctikzset{*-/.style =  {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
-\ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
-\ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
-\ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
-\ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
-\ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
-\ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
-\ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
-
-\tikzset{reversed/.style = {\circuitikzbasekey/bipole/reversed=true}}
-
-
-%% The output routine
-
-\def\drawpoles{
-	\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{empty}  }
-	\ifx\pgf at temp\pgf at circ@temp 
-		{ (\tikztostart) node[ocirc] {} }
-	\else 
-		\pgfextra{ \def\pgf at temp{full}  }
-		\ifx\pgf at temp\pgf at circ@temp
-			{ (\tikztostart) node[circ] {} }
-		\fi
-	\fi
-	\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{empty}  }
-	\ifx\pgf at temp\pgf at circ@temp
-		{ (\tikztotarget) node[ocirc] {} }
-	\else
-		\pgfextra{ \def\pgf at temp{full}  }
-		\ifx\pgf at temp\pgf at circ@temp
-			{ (\tikztotarget) node[circ] {} }
-		\fi
-	\fi 
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-%% Lamp
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-	\pgfpathmoveto{\pgfpoint{.7071*\pgf at circ@res at left}{.7071*\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{.7071*\pgf at circ@res at right}{.7071*\pgf at circ@res at down}}
-	\pgfpathmoveto{\pgfpoint{.7071*\pgf at circ@res at left}{.7071*\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{.7071*\pgf at circ@res at right}{.7071*\pgf at circ@res at up}}
-	\pgfusepath{draw}
-}
-
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height}
-                        }{tline}{\ctikzvalof{bipoles/tline/height}
-                                 }{\ctikzvalof{bipoles/tline/width}
-                                   }    
-          {
-          \pgf at circ@res at step=.2\pgf at circ@res at right % half x axis
-          \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-          \pgfpathellipse{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{0}}
-                         {\pgfpoint{\pgf at circ@res at step}{0}}
-                         {\pgfpoint{0}{-\pgf at circ@res at up}}
-          \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{\pgf at circ@res at up}}
-          \pgfpathlineto{\pgfpoint{\pgf at circ@res at left+\pgf at circ@res at step}{\pgf at circ@res at up}}
-          \pgfpatharc{-90}{90}{-\pgf at circ@res at step and -\pgf at circ@res at up}
-          \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{\pgf at circ@res at down}}
-          \pgfusepath{draw}
-}
-
-
-
-
-%% SQUID added by Cor Molenaar 5 March 2010
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid/height}}{squid}{\ctikzvalof{bipoles/squid/height}}{\ctikzvalof{bipoles/squid/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
-	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{1.35*\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.65*\pgf at circ@res at up}}
-	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.65*\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{1.35*\pgf at circ@res at up}}
-	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{1.35*\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.65*\pgf at circ@res at down}}
-	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.65*\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{1.35*\pgf at circ@res at down}}
-
-	\pgfusepath{draw}
-}
-
-
-
-% Generic barrier added by Cor Molenaar 5 March 2010
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/barrier/height}}{barrier}{\ctikzvalof{bipoles/barrier/height}}{\ctikzvalof{bipoles/barrier/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at step}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at step}}
-	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.35*\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.35*\pgf at circ@res at down}}
-	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.35*\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.35*\pgf at circ@res at up}}
-
-	\pgfusepath{draw}
-}
-
-
-% Contributed by Danilo Piazzalunga
- 
-\pgfdeclareshape{buffer}
-	{
-	  \anchor{center}{\pgfpointorigin}
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \savedanchor\left{%
-	  	\pgf at y=0pt
-	  }
-	  \anchor{in}{
-		\northwest
-		\pgf at y=0pt
-	  }
-	  \anchor{out}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	  }
-	  
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-			
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-			
-	\pgfscope
-		\pgfsetlinewidth{2\pgflinewidth}
-		\pgftransformxshift{.7\pgf at circ@res at left}
-		\pgf at circ@res at step=\pgf at circ@res at right
-		\advance\pgf at circ@res at step by -\pgf at circ@res at left
-		\pgf at circ@res at step=.7\pgf at circ@res at step
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-		\pgfusepath{draw}
-	\endpgfscope
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at left}{0pt}}
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-	
-		\pgfusepath{draw}
-	  
-	  }
-	}
-
-
-
-
-
-\pgfdeclareshape{plain amp}
-	{
-	  \anchor{center}{\pgfpointorigin}
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \savedanchor\left{%
-	  	\pgf at y=0pt
-	  }
-	  \savedanchor\inOne{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }	  
-	  \anchor{-}{
-		\inOne
-	  }
-	  \anchor{+}{
-		\inOne
-		\pgf at y=-\pgf at y
-	  }
-	  \savedanchor\up{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-	    \pgfpointlineattime{
-			\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{
-			\pgfpoint{
-				\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
-				{\pgf at circ@res at up}}
-			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-	  }
-	  \anchor{up}{
-		\up
-	  }
-	  \anchor{down}{
-		\up
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{out}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	  }
-	  
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-			
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-			
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at up}}
-	
-
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at down}}
-		
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-	
-	\pgfusepath{draw}
-
-						
-	\pgfscope
-		\pgfsetlinewidth{2\pgflinewidth}
-		\pgftransformxshift{.7\pgf at circ@res at left}
-		\pgf at circ@res at step=\pgf at circ@res at right
-		\advance\pgf at circ@res at step by -\pgf at circ@res at left
-		\pgf at circ@res at step=.7\pgf at circ@res at step
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-		\pgfusepath{draw}
-	\endpgfscope
-		
-		
-	  
-	  }
-	}
-	
-%% Generic two port box
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/twoport/height}}{twoport}{\ctikzvalof{bipoles/twoport/height}}{\ctikzvalof{bipoles/twoport/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/twoport/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-		
-		% draw inner symbol
-		\pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
-		
-}
-
-%% voltage controled oscillator
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vco/width}}{vco}{\ctikzvalof{bipoles/twoport/width}}{\ctikzvalof{bipoles/vco/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/vco/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-		
-		% draw circle
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathcircle{\pgfpoint{0}{0}} {\pgf at circ@res at step}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-		
-		% draw inner sine waves
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{-.5\pgf at circ@res at step}{0\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-		
-}
-
-%% bandpass filter
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandpass/width}}{bandpass}{\ctikzvalof{bipoles/bandpass/width}}{\ctikzvalof{bipoles/bandpass/width}}{
-		
-		\pgf at circ@res at step = \ctikzvalof{bipoles/bandpass/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step
-		
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-		
-		% draw inner symbol
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{0.35\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.65\pgf at circ@res at step}}
-		\pgfusepath{draw}
-
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.65\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{-0.35\pgf at circ@res at step}}
-		\pgfusepath{draw}
-}
-
-%% highpass filter
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/highpass/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-
-		% draw inner symbol
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
-		\pgfusepath{draw}
-
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.65\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{-0.35\pgf at circ@res at step}}
-		\pgfusepath{draw}
-}
-
-%% lowpass filter
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lowpass/width}}{lowpass}{\ctikzvalof{bipoles/lowpass/width}}{\ctikzvalof{bipoles/lowpass/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/lowpass/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-
-		% draw inner symbol
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{0.35\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.65\pgf at circ@res at step}}
-		\pgfusepath{draw}
-
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
-		\pgfusepath{draw}
-
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-		\pgfusepath{draw}
-}
-
-%% ADC
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/adc/width}}{adc}{\ctikzvalof{bipoles/adc/width}}{\ctikzvalof{bipoles/adc/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/adc/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\texti{A}
-		\def\textii{D}
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\def\texti{D}
-			\def\textii{A}
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-			\def\texti{D}
-			\def\textii{A}
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-			\def\texti{A}
-			\def\textii{D}
-		\fi\fi
-
-		% draw inner symbol					
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		
-		\pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\textsf{\texti}}
-		\pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textsf{\textii}}
-}
-
-%% DAC
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dac/width}}{dac}{\ctikzvalof{bipoles/dac/width}}{\ctikzvalof{bipoles/dac/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/dac/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\texti{D}
-		\def\textii{A}
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\def\texti{A}
-			\def\textii{D}
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-			\def\texti{A}
-			\def\textii{D}
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-			\def\texti{D}
-			\def\textii{A}
-		\fi\fi
-
-		% draw inner symbol					
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		
-		\pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\textsf{\texti}}
-		\pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textsf{\textii}}
-}
-
-%% DSP
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dsp/width}}{dsp}{\ctikzvalof{bipoles/dsp/width}}{\ctikzvalof{bipoles/dsp/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/dsp/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step
-		
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-
-		% draw inner symbol
-		\pgftext[center,x=0,y=0]{\textsf{DSP}}
-}
-
-%% FFT
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fft/width}}{fft}{\ctikzvalof{bipoles/fft/width}}{\ctikzvalof{bipoles/fft/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/fft/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step
-		
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-
-		% draw inner symbol
-		\pgftext[center,x=0,y=0]{\textsf{FFT}}
-}
-
-%% Amplifier
-\pgfcircdeclarebipole{}{
-		%\ifpgf at circuit@box
-			\ctikzvalof{bipoles/twoport/width}
-		%\else
-		%	\ctikzvalof{bipoles/amp/width}
-		%\fi
-	}{amp}{
-		%\ifpgf at circuit@box
-			\ctikzvalof{bipoles/twoport/width}
-		%\else
-		%	\ctikzvalof{bipoles/amp/width}
-	%	\fi
-	}{
-	%	\ifpgf at circuit@box
-			\ctikzvalof{bipoles/twoport/width}
-	%	\else
-	%		\ctikzvalof{bipoles/amp/width}
-	%	\fi
-	}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/amp/width}\pgf at circ@Rlen
-
-
-		% draw outer box
-		%\ifpgf at circuit@box
-		%	\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
-		%\fi
-		% draw outer box
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		% draw input arrow
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at left}{0.75\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0.63\pgf at circ@res at right}{0}}
-		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.75\pgf at circ@res at down}}
-		\pgfpathclose
-		\pgfusepath{draw}
-}
-
-
-%% variable amplifier
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamp/width}}{vamp}{\ctikzvalof{bipoles/vamp/width}}{\ctikzvalof{bipoles/vamp/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/vamp/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at left}{0.75\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0.63\pgf at circ@res at right}{0}}
-		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.75\pgf at circ@res at down}}
-		\pgfpathclose
-		\pgfusepath{draw}
-		
-		\pgfsetarrowsend{latex}
-		\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.7\pgf at circ@res at up}}
-		\pgfusepath{draw}
-}
-
-%% pi attenuator
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piattenuator/width}}{piattenuator}{\ctikzvalof{bipoles/piattenuator/width}}{\ctikzvalof{bipoles/piattenuator/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/piattenuator/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-
-		% draw inner symbol
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-}
-
-%% variable pi attenuator
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vpiattenuator/width}}{vpiattenuator}{\ctikzvalof{bipoles/vpiattenuator/width}}{\ctikzvalof{bipoles/vpiattenuator/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-
-		% draw inner symbol
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-
-		\pgfsetarrowsend{latex}
-		\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
-		\pgfusepath{draw}
-}
-
-%% T attenuator
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tattenuator/width}}{tattenuator}{\ctikzvalof{bipoles/tattenuator/width}}{\ctikzvalof{bipoles/tattenuator/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/tattenuator/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-
-		% draw inner symbol
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-}
-
-%% variable T attenuator
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vtattenuator/width}}{vtattenuator}{\ctikzvalof{bipoles/vtattenuator/width}}{\ctikzvalof{bipoles/vtattenuator/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/vtattenuator/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-
-		% draw inner symbol
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-		\pgfusepath{draw}
-		
-		\pgfsetarrowsend{latex}
-		\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
-		\pgfusepath{draw}
-}
-
-%% phase shifter
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{phaseshifter}{\ctikzvalof{bipoles/phaseshifter/width}}{\ctikzvalof{bipoles/phaseshifter/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/phaseshifter/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-		
-		% inner symbol
-		\pgftext[center,x=0,y=0]{\Large$\varphi$}
-}
-
-%% variable phase shifter
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{vphaseshifter}{\ctikzvalof{bipoles/vphaseshifter/width}}{\ctikzvalof{bipoles/vphaseshifter/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% rotate inner symbol
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-			\pgftransformrotate{270}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-			\pgftransformrotate{180}
-		\fi\fi
-		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-			\pgftransformrotate{90}
-		\fi\fi
-		
-		% inner symbol
-		\pgftext[center,x=0,y=0]{\Large$\varphi$}
-		
-		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfsetarrowsend{latex}
-		\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0.65\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.65\pgf at circ@res at up}}
-		\pgfusepath{draw}
-}
-
-%% detector
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/detector/width}}{detector}{\ctikzvalof{bipoles/detector/width}}{\ctikzvalof{bipoles/detector/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/detector/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 2
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		% draw outer box
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@inputarrow
-			{
-				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
-				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-			}
-		\fi
-		
-		% draw inner stuff
-		\pgfsetlinewidth{0.8\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0}}
-		\pgfpathlineto{\pgfpoint{0.75\pgf at circ@res at right}{0}}
-		\pgfusepath{draw}
-		
-		\ifpgf at circuit@fulldiode
-			\pgfmathparse{2\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/generic/width}}
-			\pgftransformscale{\pgfmathresult}
-			\pgfnode{fulldiodeshape}{center}{}{pgf at fulldiode}{\pgfusepath{fill}}
-		\else
-			\pgfmathparse{2\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/resistor/width}}
-			\pgftransformscale{\pgfmathresult}
-			\pgfnode{emptydiodeshape}{center}{}{pgf at emptydiode}{\pgfusepath{fill}}
-		\fi
-		
-}
-
-
-
-
-%% european gas filled surge arrester
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/european gas filled surge arrester/height}}{european gas filled surge arrester}{\ctikzvalof{bipoles/european gas filled surge arrester/height}}{\ctikzvalof{bipoles/european gas filled surge arrester/width}}{
-
-		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
-		%\divide \pgf at circ@res at step by 14
-
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-					
-		\pgfusepath{draw} 
-		
-		\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf at circ@res at left}{0pt}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}	
-				\pgfusepath{draw} 
-	
-		\endpgfscope
-}
-
-
-
-
-%% american gas filled surge arrester
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/american gas filled surge arrester/height}}{american gas filled surge arrester}{\ctikzvalof{bipoles/american gas filled surge arrester/height}}{\ctikzvalof{bipoles/american gas filled surge arrester/width}}{
-	%\def\pgf at circ@temp{right}
-	%\ifx\tikz at res@label at pos\pgf at circ@temp
-	%	\pgf at circ@res at step=-1.2\pgf at circ@res at up
-	%\else
-%		\def\pgf at circ@temp{below}
-%		\ifx\tikz at res@label at pos\pgf at circ@temp
-%			\pgf at circ@res at step=-1.2\pgf at circ@res at up
-%		\else
-%			\pgf at circ@res at step=1.2\pgf at circ@res at up
-%		\fi
-%	\fi
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}		
-	\pgfpointorigin	\pgf at circ@res at other =  \pgf at x  \advance \pgf at circ@res at other by -\pgf at circ@res at up
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-		\pgfscope
-			\pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
-			\pgfusepath{draw}		
-		\endpgfscope	
-
-	\pgfsetlinewidth{\pgfstartlinewidth}
-
-
-	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfusepath{draw}
-
-	\pgfnode{circle}{center}{}{}{}
-	
-	\pgfscope
-		\pgfsetarrowsend{latex}
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf at circ@res at right}{\pgf at circ@res at zero}}
-		\pgfusepath{draw}	
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgfusepath{draw}	
-	\endpgfscope{}
-	
-	%\pgftransformshift{\pgfpoint{.25\pgf at circ@res at left}{.45\pgf at circ@res at down}}
-	%\pgfnode{circ}{center}{}{}{}
-	%\pgftransformshift{}
-	\pgfcircle{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot x}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot y}\pgf at circ@res at down}}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/size}\pgf at circ@res at down}
-	\pgfusepath{fill}
-}
-
-
-
-
-
-
-%%%---------- close: pgfcircbipoles
-%%%%%%%%%%% Springe nach pgfcirctripoles
-%%%---------- open: pgfcirctripoles.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Tripoles
-
-
-\pgfdeclareshape{mixer}
-{
-	\savedanchor\northwest{
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	}
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchor{left}{%
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{in 1}{
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{in1}{
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{in}{
-		\northwest
-		\pgf at y=0pt
-	}	  
-	\anchor{in 2}{
-		\northwest
-		\pgf at y=-\pgf at y
-		\pgf at x=0pt
-	}
-	\anchor{in2}{
-		\northwest
-		\pgf at y=-\pgf at y
-		\pgf at x=0pt
-	}
-	\anchor{out}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	}
-	\anchor{center}{
-		\pgf at y=0pt
-		\pgf at x=0pt
-	}
-	\anchor{east}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x  
-	}
-	\anchor{west}{
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{south}{
-		\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	}
-	\anchor{north}{
-		\northwest
-		\pgf at x=0pt
-	}
-	\anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	}
-	\anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	}
-	\anchor{north west}{
-		\northwest
-	}
-	\anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	}
-	\backgroundpath{
-		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-		\pgf at circ@res at step=\ctikzvalof{tripoles/mixer/width}\pgf at circ@Rlen
-			
-		\pgfscope
-			\pgfstartlinewidth=\pgflinewidth
-			
-			% draw outer circle
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
-			\pgfusepath{draw}
-			
-			% draw inner stuff
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf at circ@res at step}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-		\endpgfscope				  
-	}
-}
-
-\pgfdeclareshape{adder}
-{
-	\savedanchor\northwest{
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	}
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchor{left}{%
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{in 1}{
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{in1}{
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{in}{
-		\northwest
-		\pgf at y=0pt
-	}	  
-	\anchor{in 2}{
-		\northwest
-		\pgf at y=-\pgf at y
-		\pgf at x=0pt
-	}
-	\anchor{in2}{
-		\northwest
-		\pgf at y=-\pgf at y
-		\pgf at x=0pt
-	}
-	\anchor{out}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	}
-	\anchor{center}{
-		\pgf at y=0pt
-		\pgf at x=0pt
-	}
-	\anchor{east}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x  
-	}
-	\anchor{west}{
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{south}{
-		\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	}
-	\anchor{north}{
-		\northwest
-		\pgf at x=0pt
-	}
-	\anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	}
-	\anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	}
-	\anchor{north west}{
-		\northwest
-	}
-	\anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	}
-	\backgroundpath{
-		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-		\pgf at circ@res at step=\ctikzvalof{tripoles/adder/width}\pgf at circ@Rlen
-			
-		\pgfscope
-			\pgfstartlinewidth=\pgflinewidth
-			
-			% draw outer circle
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
-			\pgfusepath{draw}
-			
-			% draw inner stuff
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpointpolar{180}{0.3\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpointpolar{270}{0.3\pgf at circ@res at step}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-		\endpgfscope				  
-	}
-}
-
-
-
-	\pgfdeclareshape{spdt}
-	{
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \anchor{left}{%
-	  	\northwest
-	  	\pgf at y=0pt
-	  }
-	  \anchor{in}{
-	  	\northwest
-	  	\pgf at y=0pt
-	  }	  
-	  \anchor{out 1}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{out 2}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }
-  	  \anchor{center}{
-		\pgf at y=0pt
-		\pgf at x=0pt
-	  }
-	  \anchor{east}{
-	  	\northwest
-		\pgf at y=0pt
-	  	\pgf at x=-\pgf at x  
-	  }
-	  \anchor{west}{
-	  	\northwest
-		\pgf at y=0pt
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-		\northwest
-		\pgf at x=0pt
-	  }
-	  \anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{north west}{
-		\northwest
-	  }
-	  \anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }	  
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-			
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x  
-			\pgf at circ@res at left = \pgf at x  
-			\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf at circ@res at left
-			
-		
-	  	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	  	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-		
-		\pgfusepath{draw}
-		
-		\pgfscope
-			\pgftransformshift{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-			\pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
-		\endpgfscope
-		\pgfscope
-			\pgftransformshift{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
-			\pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}}
-		\endpgfscope
-		\pgfscope
-			\pgftransformshift{\pgfpoint{\pgf at circ@res at other}{0pt}}
-			\pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
-		\endpgfscope
-		
-		
-		\pgfscope
-			\pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
-			\pgfpathlineto{
-				\pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf at circ@res at other}{-100pt}}}
-				{\pgfpoint{-.05\pgf at circ@res at up}{-.05\pgf at circ@res at up}}
-			}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-		\endpgfscope
-	  }
-	}
-	
-	
-	
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%%       Logic ports
-%%
-
-
-
-
-
-
-\long\def\pgfcircdeclarelogicport#1#2{
-	\pgfdeclareshape{american #1 port}
-	{
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \savedanchor\left{%
-	  	\pgf at y=0pt
-	  }
-	  \savedanchor\inOne{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }	  
-	  \anchor{in 1}{
-		\inOne
-	  }
-	  \anchor{in}{
-		\inOne
-	  }	  
-	  \anchor{in 2}{
-		\inOne
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{out}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	  }
-  	  \anchor{center}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-.8\pgf at x  
-	  }
-	  \anchor{east}{
-	  	\left
-	  	\pgf at x=-.8\pgf at x  
-	  }
-	  \anchor{west}{
-	  	\left
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-		\northwest
-		\pgf at x=0pt
-	  }
-	  \anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{north west}{
-		\northwest
-	  }
-	  \anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }	  
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-			
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-			
-			#2
-	  
-	  }
-	}
-}
-
-
-\pgfcircdeclarelogicport{and}{
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at up}}
-	
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
-		{0pt}}
-	
-	\pgfusepath{draw}
-	
-	\pgfsetlinewidth{2\pgflinewidth}
-	\pgfpathmoveto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
-		{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
-		{\pgf at circ@res at down}}
-	\pgfpathcurveto
-		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint
-			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
-			{.5\pgf at circ@res at down}}
-		{\pgfpoint
-			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
-			{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint
-			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
-			{.5\pgf at circ@res at up}}
-		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint
-			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
-			{\pgf at circ@res at up}}	
-	\pgfusepath{draw}
-}
-
-
-
-\pgfcircdeclarelogicport{nand}{
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at up}}
-	
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at right}
-		{0pt}}
-	
-	\pgfusepath{draw}
-	
-	\pgfsetlinewidth{2\pgflinewidth}
-
-	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf at circ@res at right
-	\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at right
-	
-	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
-	\pgfpathcurveto
-		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{.5\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{.5\pgf at circ@res at up}}
-		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint
-			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
-			{\pgf at circ@res at up}}	
-	\pgfpathellipse
-		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
-		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
-		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
-
-	\pgfusepath{draw}
-}
-
-
-\pgfcircdeclarelogicport{nor}{
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at up}}
-	
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint
-		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf at circ@res at right}
-		{0pt}}	
-	
-	\pgfusepath{draw}
-	
-	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf at circ@res at right
-	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf at circ@res at right
-		
-	\pgfsetlinewidth{2\pgflinewidth}
-	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
-
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
-		
-	\pgfpathellipse
-		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
-		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
-		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
-		
-	\pgfusepath{draw}
-}
-
-
-
-
-\pgfcircdeclarelogicport{or}{
-
-	
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at up}}
-	
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint
-		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf at circ@res at right}
-		{0pt}}	
-	
-	\pgfusepath{draw}
-	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf at circ@res at right
-	\pgfsetlinewidth{2\pgflinewidth}
-	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
-
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
-	\pgfusepath{draw}
-}
-
-
-\pgfcircdeclarelogicport{xor}{
-
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at up}}
-	
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint
-		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf at circ@res at right}
-		{0pt}}	
-	
-	\pgfusepath{draw}
-	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf at circ@res at right
-	\pgfsetlinewidth{2\pgflinewidth}
-	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
-
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
-		
-	\def\pgf at circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf at circ@res at right+}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at up}}
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{.95*\pgf at circ@res at down}}	
-				
-	\pgfusepath{draw}
-}
-
-
-
-\pgfcircdeclarelogicport{xnor}{
-
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at up}}
-	
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint
-		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf at circ@res at right}
-		{0pt}}	
-	
-	\pgfusepath{draw}
-	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf at circ@res at right
-	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf at circ@res at right
-
-	\pgfsetlinewidth{2\pgflinewidth}
-	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
-
-	\pgfpathcurveto
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
-		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
-		
-	\def\pgf at circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/distance}\pgf at circ@res at right+}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{\pgf at circ@res at up}}
-	
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at up}}
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{0pt}}
-	\pgfpathcurveto
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at down}}
-		{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{.95*\pgf at circ@res at down}}	
-		
-		
-	\pgfpathellipse
-		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
-		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
-		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
-				
-	\pgfusepath{draw}
-}
-
-
-\pgfdeclareshape{american not port}
-	{
-	  \anchor{center}{\pgfpointorigin}
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \savedanchor\left{%
-	  	\pgf at y=0pt
-	  }
-	  \anchor{in}{
-		\northwest
-		\pgf at y=0pt
-	  }
-	  \anchor{out}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{center}{
-	  	\pgfpointorigin
-	  }
-	  \anchor{east}{
-	  	\left
-	  	\pgf at x=-.8\pgf at x  
-	  }
-	  \anchor{west}{
-	  	\left
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-		\northwest
-		\pgf at x=0pt
-	  }
-	  	  \anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{north west}{
-		\northwest
-	  }
-	  \anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }	  
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-			
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-			
-		\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf at circ@res at right
-						
-	\pgfscope
-		\pgfsetlinewidth{2\pgflinewidth}
-		\pgftransformxshift{.7\pgf at circ@res at left}
-		\pgf at circ@res at step=\pgf at circ@res at right
-		\advance\pgf at circ@res at step by -\pgf at circ@res at left
-		\pgf at circ@res at step=.7\pgf at circ@res at step
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-		\pgfusepath{draw}
-		\pgfpathellipse
-			{\pgfpoint{\pgf at circ@res at step-.5\pgf at circ@res at other}{0pt}}
-			{\pgfpoint{.5\pgf at circ@res at other}{0pt}}
-			{\pgfpoint{0pt}{.5\pgf at circ@res at other}}
-		\pgfusepath{draw}
-	\endpgfscope
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at left}{0pt}}
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-	
-		\pgfusepath{draw}
-	  
-	  }
-	}
-
-
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-% #1 - name
-% #2 - text inside
-% #3 - number of inputs
-% #4 - is it a not
-
-\long\def\pgfcircdeclareeurologicport#1#2#3#4{
-	\pgfdeclareshape{european #1 port}
-	{
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \savedanchor\left{%
-	  	\pgf at y=0pt
-	  }
-	  \savedanchor\inOne{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }	  
-	  \anchor{in}{
-		\inOne
-	  }
-	  \anchor{in 1}{
-		\inOne
-	  }
-	  \anchor{in 2}{
-		\inOne
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{out}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	  }
-  	  \anchor{center}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-.8\pgf at x  
-	  }
-	  \anchor{east}{
-	  	\left
-	  	\pgf at x=-.8\pgf at x  
-	  }
-	  \anchor{west}{
-	  	\left
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-		\northwest
-		\pgf at x=0pt
-	  }
-	  \anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{north west}{
-		\northwest
-	  }
-	  \anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }	  
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-			\def\pgf at temp{1}
-			\def\pgf at circ@temp{#3}
-			\ifx\pgftemp\pgf at circ@temp % one input
-				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfpathlineto{
-					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}{0pt}}
-			\else % two inputs
-				\pgfpathmoveto{
-					\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at up}}
-				\pgfpathlineto{
-					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at up}}
-					%
-				\pgfpathmoveto{
-					\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at down}}
-				\pgfpathlineto{
-					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at down}}
-			\fi%
-			%
-			%
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-			\pgfpathlineto{
-				\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{0pt}}
-			%
-			\edef\pgf at temp{not}
-			\edef\pgf at circ@temp{#4}
-			\ifx\pgf at temp\pgf at circ@temp % is a not
-				\pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf at circ@res at right}{0pt}}
-				\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not height}\pgf at circ@res at up}}
-			\fi
-			%
-			\pgfusepath{draw}
-			%
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgftext{#2}
-			%
-			%
-			%
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfpathrectanglecorners
-				{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}{\pgf at circ@res at up}}
-				{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{\pgf at circ@res at down}}
-			\pgfusepath{draw}
-%
-%
-	  }
-	}
-}
-
-
-
-\pgfcircdeclareeurologicport{and}{$\&$}{2}{}
-\pgfcircdeclareeurologicport{or}{$\ge 1$}{2}{}
-\pgfcircdeclareeurologicport{xor}{$=1$}{2}{}
-\pgfcircdeclareeurologicport{not}{$1$}{1}{not}
-\pgfcircdeclareeurologicport{nand}{$\&$}{2}{not}
-\pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
-\pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-\long\def\pgfcircdeclaretransistor#1#2#3{
-	\pgfdeclareshape{#1}
-	{
-	  \anchor{center}{\pgfpointorigin}
-	  \savedanchor\northeast{% upper right
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x=0pt
-	  }
-%	  \savedanchor\northeast{%
-%		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-%		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf at y
-%		\pgf at y=.5\pgf at y
-%		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-%		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf at x
-%	  }
-	  \savedanchor\left{%center left
-	  	\pgf at y=0pt
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf at x
-	  }
-	  \anchor{text}{
-		  \northeast
-		  \pgfpoint
-			  {12\pgf at circ@res at right +0.2*(\pgf at circ@res at right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left)}
-			  {0.6\pgf at y}
-      }
-	  %
-	  		% pseudo-bipole
-		  \anchor{left}{ % south
-		  	\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{right}{
-		  	\northeast
-		  }  
-		\anchor{north}{
-			\northeast
-			\pgf at circ@res at step=\pgf at y
-			\left
-			\pgf at y=\pgf at circ@res at step
-			\pgf at x=.5\pgf at x
-		}  
-		  \anchor{west}{
-			\left
-		  }
-		  \anchor{east}{
-		  	\pgf at x=0pt
-			\pgf at y=0pt
-		  }  
-	  \anchor{south}{
-			\northeast
-			\pgf at circ@res at step=\pgf at y
-			\left
-			\pgf at y=-\pgf at circ@res at step
-			\pgf at x=.5\pgf at x
-	  }
-	  \anchor{south west}{
-			\northeast
-			\pgf at circ@res at step=\pgf at y
-			\left
-			\pgf at y=-\pgf at circ@res at step
-	  }
-	  \anchor{north east}{
-		\northeast
-	  }
-	  \anchor{north west}{
-			\northeast
-			\pgf at circ@res at step=\pgf at y
-			\left
-			\pgf at y=\pgf at circ@res at step
-	  }
-	  \anchor{south east}{
-		\northeast
-		\pgf at y=-\pgf at y
-	  }	  
-	  
-	  #2
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			%
-			%
-			\northeast
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = \pgf at x
-			\left
-			\pgf at circ@res at left = \pgf at x
-			%
-			#3
-	  %
-	  }
-	}
-}
-
-
-
-
-
-
-\long\def\pgfcircdeclaremos#1#2#3{
-	\pgfcircdeclaretransistor{#1}{
-		  \anchor{G}{
-			\left
-		  }
-		  \anchor{gate}{
-			\left
-		  }
-		  \anchor{B}{
-			\left
-			\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at x
-		  }
-		  \anchor{base}{
-			\left
-			\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at x
-		  }
-		  #2
-	  }
-	  {#3}
-}
-
-
-
-
-
-
-
-
-
-\pgfcircdeclaremos{nmos}{
-		  \anchor{D}{
-			\northeast
-		  }
-		  \anchor{drain}{
-			\northeast
-		  }
-		  \anchor{S}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{source}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-}{%
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
-
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at down}}
-
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
-			\pgfusepath{draw}
-			
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-		\ifpgf at circuit@mos at arrows
-			\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgfresetnontranslationattimefalse
-			\pgftransformlineattime{.6}{%
-				\pgfpoint%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}%
-			}{%
-				\pgfpoint
-					{\pgf at circ@res at right}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}%
-			}
-			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-			\endpgfscope
-		\fi
-
-					
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
-				{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfusepath{draw}
-}
-
-
-\pgfcircdeclaremos{pmos}{
-		  \anchor{S}{
-			\northeast
-		  }
-		  \anchor{source}{
-			\northeast
-		  }
-		  \anchor{D}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{drain}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-}{%
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-
-		\ifpgf at circuit@mos at arrows
-			\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgfresetnontranslationattimefalse
-			\pgftransformlineattime{.4}{%
-				\pgfpoint%
-					{\pgf at circ@res at right}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}%
-			}{%
-				\pgfpoint
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}%
-			}
-			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-			\endpgfscope
-		\fi
-
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf at circ@res at down}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
-
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
-					
-					
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
-				{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfusepath{draw}
-			
-			\pgfpathcircle{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
-				{\pgf at circ@res at up+\pgf at circ@res at down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
-			\pgfusepath{draw,fill}		
-
-}
-
-
-
-
-
-
-
-\pgfcircdeclaretransistor{pnp}{
-		  \anchor{E}{
-			\northeast
-		  }
-		  \anchor{emitter}{
-			\northeast
-		  }
-		  \anchor{B}{
-			\left
-		  }
-		  \anchor{base}{
-			\left
-		  }		  
-		  \anchor{C}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{collector}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-}{
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at down}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
-			\pgfusepath{draw}
-	
-			\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgfresetnontranslationattimefalse
-			\pgftransformlineattime{.5}{%
-				\pgfpoint%
-					{\pgf at circ@res at right}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf at circ@res at up}%
-			}{%
-				\pgfpoint
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf at circ@res at up}%
-			}
-			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-			\endpgfscope
-		
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf at circ@res at left}
-				{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfusepath{draw}
-}
-
-
-
-
-
-
-\pgfcircdeclaretransistor{npn}{
-		  \anchor{C}{
-			\northeast
-		  }
-		  \anchor{collector}{
-			\northeast
-		  }
-		  \anchor{B}{
-			\left
-		  }
-		  \anchor{base}{
-			\left
-		  }		  
-		  \anchor{E}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{emitter}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-}{%
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at down}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
-			\pgfusepath{draw}
-	
-			\pgfscope
-			\pgfslopedattimetrue
-			\pgfallowupsidedownattimetrue
-			\pgfresetnontranslationattimefalse
-			\pgftransformlineattime{.5}{%
-				\pgfpoint%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf at circ@res at down}%
-			}{%
-				\pgfpoint{\pgf at circ@res at right}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf at circ@res at down}%
-			}
-			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-			\endpgfscope
-		
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf at circ@res at left}
-				{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfusepath{draw}
-			
-			
-}
-
-
-
-\pgfcircdeclaretransistor{pigbt}{
-		  \anchor{E}{
-			\northeast
-		  }
-		  \anchor{emitter}{
-			\northeast
-		  }
-		  \anchor{B}{
-			\left
-		  }
-		  \anchor{base}{
-			\left
-		  }		  
-		  \anchor{C}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{collector}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-}{
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
-			%\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
-			\pgfusepath{draw}
-	
-			\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgfresetnontranslationattimefalse
-			\pgftransformlineattime{.5}{%
-				\pgfpoint%
-					{\pgf at circ@res at right}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}%
-			}{%
-				\pgfpoint
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}%
-			}
-			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-			\endpgfscope
-		
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
-				{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfusepath{draw}
-			
-			
-}
-
-
-
-\pgfcircdeclaretransistor{nigbt}{
-		  \anchor{C}{
-			\northeast
-		  }
-		  \anchor{collector}{
-			\northeast
-		  }
-		  \anchor{B}{
-			\left
-		  }
-		  \anchor{base}{
-			\left
-		  }		  
-		  \anchor{E}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{emitter}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-}{
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
-			%\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
-			\pgfusepath{draw}
-	
-			\pgfscope
-			\pgfslopedattimetrue
-			\pgfallowupsidedownattimetrue
-			\pgfresetnontranslationattimefalse
-			\pgftransformlineattime{.5}{%
-				\pgfpoint%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}%
-			}{%
-				\pgfpoint{\pgf at circ@res at right}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}%
-			}
-			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-			\endpgfscope
-		
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
-				{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-			\pgfusepath{draw}
-			
-			
-}
-
-
-
-
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Contrib
-
-
-%%
-% IGFET (e.g. MOSFET)
-\long\def\pgfcircdeclarefet#1#2#3{
-  \pgfcircdeclaretransistor{#1}{
-      \anchor{B}{
-      \left
-      \pgf at x=\pgf at circ@res at right
-      }
-      \anchor{base}{
-      \left
-      \pgf at x=\pgf at circ@res at right
-      }
-      #2
-    }
-    {#3}
-}
-
-
-
-\pgfcircdeclarefet{nfet}{
-      \anchor{D}{
-      \northeast
-      }
-      \anchor{drain}{
-      \northeast
-      }
-      \anchor{S}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{source}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{G}{
-         \left
-      }
-      \anchor{gate}{
-         \left
-      }
-
-}{%
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
-
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up*0.45}}
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up*0.25}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down*0.25}}
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down*0.45}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down}}
-
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-      
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
-      \pgfusepath{draw}
-      
-      \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
-      \pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-      
-      \pgfscope
-      \pgfslopedattimetrue 
-      \pgfallowupsidedownattimetrue
-      \pgfresetnontranslationattimefalse
-      \pgftransformlineattime{.6}{%
-        \pgfpoint
-          {\pgf at circ@res at right}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }{%
-        \pgfpoint%
-          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }
-      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-      \endpgfscope
-
-          
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfusepath{draw}
-}
-
-
-\pgfcircdeclarefet{pfet}{
-      \anchor{D}{
-      \northeast
-      }
-      \anchor{drain}{
-      \northeast
-      }
-      \anchor{S}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{source}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{G}{
-         \left
-      }
-      \anchor{gate}{
-         \left
-      }
-
-}{%
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
-	  \pgfusepath{draw}
-
-	 \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up*0.45}}
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up*0.25}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down*0.25}}
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down*0.45}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down}}
-	  \pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-      
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
-      \pgfusepath{draw}
-      
-      \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
-      %\pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-      
-      \pgfscope
-      \pgfslopedattimetrue 
-      \pgfallowupsidedownattimetrue
-      \pgfresetnontranslationattimefalse
-      \pgftransformlineattime{.6}{%
-        \pgfpoint
-          {\pgf at circ@res at right}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }{%
-        \pgfpoint%
-          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }
-	  \pgftransformrotate{180}
-      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-      \endpgfscope
-
-          
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfusepath{draw}
-}
-
-
-
-% N-CHANNEL IGFET ENHANCEMENT TYPE
-\pgfcircdeclarefet{nigfete}{
-      \anchor{D}{
-      \northeast
-      }
-      \anchor{drain}{
-      \northeast
-      }
-      \anchor{S}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{source}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{G}{
-         \northeast
-         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
-         \left
-         \pgf at y=-\pgf at circ@res at step
-      }
-      \anchor{gate}{
-         \northeast
-         \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
-      }
-}{%
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-      % DRAIN CONNECTION 
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
-      % DRAIN
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
-
-      % GATE, ENHANCEMENT TYPE (DASHED)
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up*0.45}}
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up*0.25}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down*0.25}}
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down*0.45}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down}}
-
-      % BULK
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgf at circ@res at up+\pgf at circ@res at down}}
-
-      % SOURCE
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
-      % SOURCE CONNECTION
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
-      \pgfusepath{draw}
-      
-      % GATE
-      \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
-      \pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-      
-      % ARROW
-      \pgfscope
-      \pgfslopedattimetrue 
-      \pgfallowupsidedownattimetrue
-      \pgfresetnontranslationattimefalse
-      \pgftransformlineattime{.6}{%
-        \pgfpoint
-          {\pgf at circ@res at right}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }{%
-        \pgfpoint%
-          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }
-      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-      \endpgfscope
-
-      % GATE CONNECTION
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
-      \pgfusepath{draw}
-}
-
-% N-CHANNEL IGFET DEPLETION TYPE
-\pgfcircdeclarefet{nigfetd}{
-      \anchor{D}{
-      \northeast
-      }
-      \anchor{drain}{
-      \northeast
-      }
-      \anchor{S}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{source}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{G}{
-         \northeast
-         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
-         \left
-         \pgf at y=-\pgf at circ@res at step
-      }
-      \anchor{gate}{
-         \northeast
-         \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
-      }
-
-}{%
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-      % DRAIN CONNECTION 
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
-      % DRAIN
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
-
-      % GATE, DEPLETION TYPE
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf at circ@res at down}}
-
-      % BULK
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgf at circ@res at up+\pgf at circ@res at down}}
-
-      % SOURCE
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
-      % SOURCE CONNECTION
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
-      \pgfusepath{draw}
-      
-      % GATE
-      \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
-      \pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-      
-      % ARROW
-      \pgfscope
-      \pgfslopedattimetrue 
-      \pgfallowupsidedownattimetrue
-      \pgfresetnontranslationattimefalse
-      \pgftransformlineattime{.6}{%
-        \pgfpoint
-          {\pgf at circ@res at right}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }{%
-        \pgfpoint%
-          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }
-      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-      \endpgfscope
-
-      % GATE CONNECTION
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
-      %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
-      \pgfusepath{draw}
-}
-
-% P-CHANNEL IGFET ENHANCEMENT TYPE
-\pgfcircdeclarefet{pigfete}{
-      \anchor{D}{
-      \northeast
-      }
-      \anchor{drain}{
-      \northeast
-      }
-      \anchor{S}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{source}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{G}{
-         \northeast
-         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
-         \left
-         \pgf at y=-\pgf at circ@res at step
-      }
-      \anchor{gate}{
-         \northeast
-         \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
-      }
-}{%
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-      % DRAIN CONNECTION 
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
-      % DRAIN
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
-	  \pgfusepath{draw}
-	  
-      % GATE, DASHED, BOLD
-	  \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up*0.45}}
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up*0.25}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down*0.25}}
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down*0.45}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down}}
-	  \pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-	  
-      % BULK
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgf at circ@res at up+\pgf at circ@res at down}}
-
-      % SOURCE
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
-      % SOURCE CONNECTION
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
-      \pgfusepath{draw}
-      
-      % GATE
-      \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
-      %\pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-      
-      % ARROW
-      \pgfscope
-      \pgfslopedattimetrue 
-      \pgfallowupsidedownattimetrue
-      \pgfresetnontranslationattimefalse
-      % Arrow has to be rotated, as this is a p-channel fet
-      \pgftransformrotate{180}
-      \pgftransformlineattime{-.6}{%
-        \pgfpoint
-          {\pgf at circ@res at right}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }{%
-        \pgfpoint%
-          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }
-      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-      \endpgfscope
-
-      % GATE CONNECTION (in line with source)
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
-      %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
-      \pgfusepath{draw}
-}
-
-% P-CHANNEL IGFET DEPLETION TYPE
-\pgfcircdeclarefet{pigfetd}{
-      \anchor{D}{
-      \northeast
-      }
-      \anchor{drain}{
-      \northeast
-      }
-      \anchor{S}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{source}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{G}{
-         \northeast
-         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
-         \left
-         \pgf at y=-\pgf at circ@res at step
-      }
-      \anchor{gate}{
-         \northeast
-         \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
-      }
-}{%
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-      % DRAIN CONNECTION 
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
-      % DRAIN
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
-	  
-      \pgfusepath{draw}
-      
-	  
-      % GATE DEPLETION TYPE
-	  \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf at circ@res at down}}
-	  \pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-	  
-      % BULK
-	  
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgf at circ@res at up+\pgf at circ@res at down}}
-
-      
-      % SOURCE
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
-      % SOURCE CONNECTION
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
-      \pgfusepath{draw}
-      
-      % GATE
-      \pgfscope
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
-      %\pgfsetlinewidth{2\pgflinewidth}
-      \pgfusepath{draw}
-      \endpgfscope
-      
-      % ARROW
-      \pgfscope
-      \pgfslopedattimetrue 
-      \pgfallowupsidedownattimetrue
-      \pgfresetnontranslationattimefalse
-      % PFET!
-      \pgftransformrotate{180}
-      \pgftransformlineattime{-.6}{%
-        \pgfpoint
-          {\pgf at circ@res at right}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }{%
-        \pgfpoint%
-          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }
-      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-      \endpgfscope
-
-      % GATE CONNECTION
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
-      %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
-      \pgfusepath{draw}
-}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% Contrib Danilo Piazzalunga
-
-
-
-
-
-
-\pgfcircdeclaretransistor{njfet}{
-		  \anchor{G}{
-			\left
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf at y
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at y
-			\pgf at y=-.5\pgf at y
-		  }
-		  \anchor{gate}{
-			\left
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf at y
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at y
-			\pgf at y=-.5\pgf at y
-		  }
-		  \anchor{D}{
-			\northeast
-		  }
-		  \anchor{drain}{
-			\northeast
-		  }
-		  \anchor{S}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{source}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-}{%
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at up}}
-
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
-			\pgfusepath{draw}
-			
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf at circ@res at down}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgfresetnontranslationattimefalse
-			\pgftransformlineattime{.6}{%
-				\pgfpoint{\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}%
-			}{%
-				\pgfpoint
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}%
-			}
-			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-			\endpgfscope
-
-					
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
-			\pgfusepath{draw}
-}
-
-
-\pgfcircdeclaretransistor{pjfet}{
-		  \anchor{G}{
-			\left
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf at y
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at y
-			\pgf at y=.5\pgf at y
-		  }
-		  \anchor{gate}{
-			\left
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf at y
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at y
-			\pgf at y=.5\pgf at y
-		  }
-		  \anchor{S}{
-			\northeast
-		  }
-		  \anchor{source}{
-			\northeast
-		  }
-		  \anchor{D}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-		  \anchor{drain}{
-			\northeast
-			\pgf at y=-\pgf at y
-		  }
-}{%
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
-
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}		
-			\pgfusepath{draw}
-			
-			\pgfscope
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf at circ@res at down}}
-			\pgfsetlinewidth{2\pgflinewidth}
-			\pgfusepath{draw}
-			\endpgfscope
-			
-			\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgfresetnontranslationattimefalse
-			\pgftransformlineattime{.4}{%
-				\pgfpoint%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
-			}{%
-				\pgfpoint{\pgf at circ@res at left}%
-					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
-			}
-			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-			\endpgfscope
-
-					
-			\pgfpathmoveto{\pgfpoint
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}
-				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-}
-
-
-
-
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-
-
-
-
-
-% ISFET
-\pgfcircdeclarefet{isfet}{
-      \anchor{D}{
-      \northeast
-      }
-      \anchor{drain}{
-      \northeast
-      }
-      \anchor{S}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-      \anchor{source}{
-      \northeast
-      \pgf at y=-\pgf at y
-      }
-}{%
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-      % DRAIN CONNECTION 
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
-      % DRAIN
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
-      \pgfusepath{draw}
-      
-      % GATE, DEPLETION TYPE
-      \pgfscope %% added
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf at circ@res at down}}
-      \pgfsetlinewidth{2\pgflinewidth} %% added
-      \pgfusepath{draw} %% added
-      \endpgfscope %% added
-      
-      % BULK
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
-        {\pgf at circ@res at up+\pgf at circ@res at down}}
-       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgf at circ@res at up+\pgf at circ@res at down}}
-
-      % SOURCE
-      \pgfpathmoveto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
-      % SOURCE CONNECTION
-      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
-      \pgfusepath{draw}
-      
-      % GATE
-      %\pgfscope
-      %\pgfpathmoveto{\pgfpoint
-       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf at circ@res at left}
-       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
-      %\pgfpathlineto{\pgfpoint
-       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf at circ@res at left}
-       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
-      %\pgfsetlinewidth{2\pgflinewidth}
-      %\pgfusepath{draw}
-      %\endpgfscope
-      
-      % ARROW
-      \pgfscope
-      \pgfslopedattimetrue 
-      \pgfallowupsidedownattimetrue
-      \pgfresetnontranslationattimefalse
-      \pgftransformlineattime{.6}{%
-        \pgfpoint
-          {\pgf at circ@res at right}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }{%
-        \pgfpoint%
-          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}%
-          {\pgf at circ@res at up+\pgf at circ@res at down}%
-      }
-      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
-      \endpgfscope
-      \pgfusepath{draw}
-      
-      % Wavy lines
-      	\pgfscope
-			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-
-			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{0cm}}
-			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-
-			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
-			\pgfusepath{draw}
-		\endpgfscope
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-%% Black thyristor
-
-\pgfcircdeclarebipole{
-	\anchor{gate}{
-		\northeast
-	}
-	\anchor{anode}{
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-	}
-	\anchor{G}{
-		\northeast
-	}
-	\anchor{cathode}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-	}
-}{\ctikzvalof{tripoles/thyristor/height 2}}{thyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgf at circ@res at other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf at circ@res at left
-	\pgf at circ@res at step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf at circ@res at right
-
-	\pgfscope
-		\pgftransformxshift{\pgf at circ@res at other}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-				
-		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}} 
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-		\pgfusepath{draw,fill}
-		
-		\pgfsetlinewidth{\pgfstartlinewidth}
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-		\pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at down}}
-	
-	\pgfusepath{draw}
-	
-	\pgfsetlinewidth{\pgfstartlinewidth}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	
-	\pgfusepath{draw}
-	
-}
-
-
-%% Empty triac
-
-\pgfcircdeclarebipole{
-	\anchor{gate}{
-		\northeast
-	}
-	\anchor{G}{
-		\northeast
-	}
-	\anchor{anode}{
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-	}
-	\anchor{cathode}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-	}
-}{\ctikzvalof{tripoles/triac/height}}{triac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-	\pgf at circ@res at other = \ctikzvalof{tripoles/triac/diode width left}\pgf at circ@res at left
-	\pgf at circ@res at step = \ctikzvalof{tripoles/triac/diode width right}\pgf at circ@res at right
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-	\pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at step}{0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-	\pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at other}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
-	
-	\pgfusepath{draw}
-	
-	\pgfsetlinewidth{\pgfstartlinewidth}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}} % sqrt(1/2)
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	
-	\pgfusepath{draw}
-	
-}
-
-
-
-
-
-
-
-
-
-\pgfcircdeclarebipole{
-	\anchor{out 1}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-	}
-	\anchor{out 2}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=.8\pgf at y
-	}
-}{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-	\pgfpathlineto{\pgfpoint{.3\pgf at circ@res at left}{0pt}}
-	\pgfusepath{draw}
-	\pgfscope
-	\pgfpathmoveto{\pgfpoint{.3\pgf at circ@res at left}{0pt}}
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{.5\pgf at circ@res at up}}
-	\pgfusepath{draw}
-	\endpgfscope
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{0}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{.8\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{.8\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{.15\pgf at circ@res at up}}
-	\pgfusepath{draw}
-	
-	
-	\pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{.2\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfusepath{draw}
-	
-	\pgfsetdash{{.08\pgf at circ@res at up}{.04\pgf at circ@res at up}{.7\pgf at circ@res at up}{.04\pgf at circ@res at up}{.8\pgf at circ@res at up}}{0cm}
-	\pgfpathmoveto{\pgfpoint{0}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0}{.8\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{.2\pgf at circ@res at left}{.6\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0}{.4\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0}{.2\pgf at circ@res at up}}
-	\pgfusepath{draw}
-	\pgfsetdash{}{0cm}
-}
-
-
-
-
-
-
-
-
-
-
-\pgfdeclareshape{op amp}
-	{
-	  \anchor{center}{\pgfpointorigin}
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-		\northwest
-	  }
-	  \savedanchor\left{%
-	  	\pgf at y=0pt
-	  }
-	  \savedanchor\inOne{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }	  
-	  \anchor{-}{
-		\inOne
-	  }
-	  \anchor{+}{
-		\inOne
-		\pgf at y=-\pgf at y
-	  }
-	  \savedanchor\up{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-	    \pgfpointlineattime{
-			\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
-			\pgfpoint{
-				\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-				{\pgf at circ@res at up}}
-			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-	  }
-	  \anchor{up}{
-		\up
-	  }
-	  \anchor{down}{
-		\up
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{out}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	  }
-	  	\anchor{west}{
-		  	\left
-    	  }
-		  \anchor{east}{
-		  	\left
-		  	\pgf at x=-\pgf at x
-		  }  
-	  
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-			
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-			
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-	\pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}]{\scriptsize\ $-$}
-	
-
-	\pgfpathmoveto{\pgfpoint
-		{\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-	\pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}]{\scriptsize\ $+$}
-		
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-	
-	\pgfusepath{draw}
-
-						
-	\pgfscope
-		\pgfsetlinewidth{2\pgflinewidth}
-		\pgftransformxshift{.7\pgf at circ@res at left}
-		\pgf at circ@res at step=\pgf at circ@res at right
-		\advance\pgf at circ@res at step by -\pgf at circ@res at left
-		\pgf at circ@res at step=.7\pgf at circ@res at step
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-		\pgfusepath{draw}
-	\endpgfscope
-		
-		
-	  
-	  }
-	}
-	
-
-
-
-%% Potentiometer
-\pgfcircdeclarebipole{
-	\anchor{wiper}{
-		\northeast
-		\pgfpoint{0pt}{\pgf at y}
-	}
-	\anchor{W}{
-		\northeast
-		\pgfpoint{0pt}{\pgf at y}
-	}	
-}{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/potentiometer/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 12
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-		\pgf at circ@res at other = \pgf at circ@res at left
-		\advance\pgf at circ@res at other by \pgf at circ@res at step 
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-		\advance\pgf at circ@res at other by \pgf at circ@res at step
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
-		\pgfusepath{draw} 
-		
-		\pgfscope
-		%\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-
-
-
-%% Generic tunable 
-
-\pgfcircdeclarebipole{
-	\anchor{wiper}{
-		\northeast
-		\pgfpoint{0pt}{\pgf at y}
-	}
-}{\ctikzvalof{bipoles/generic potentiometer/height 2}}{genericpotentiometer}{\ctikzvalof{bipoles/generic potentiometer/height}}{\ctikzvalof{bipoles/generic potentiometer/width}}{
-
-		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 14
-
-		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at down}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-					
-		\pgfusepath{draw} 
-		
-		\pgfscope
-		%\pgfsetlinewidth{\pgfstartlinewidth}
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		\endpgfscope
-}
-
-
-\pgfdeclareshape{circulator}
-{
-	\savedanchor\northwest{
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	}
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchor{left}{%
-		\northwest
-	  	\pgf at y=0pt
-	}
-	\anchor{1}{
-		\northwest
-		\pgf at y=0pt
-	}	  
-	\anchor{2}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	}
-	\anchor{3}{
-		\northwest
-		\pgf at y=-\pgf at y
-		\pgf at x=0pt
-	}
-	\anchor{east}{
-		\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x  
-	}
-	\anchor{west}{
-		\northwest
-		\pgf at y=0pt
-	}
-	\anchor{south}{
-		\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	}
-	\anchor{north}{
-		\northwest
-		\pgf at x=0pt
-	}
-	\anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	}
-	\anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	}
-	\anchor{north west}{
-		\northwest
-	}
-	\anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	}
-	\backgroundpath{
-		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-		\pgf at circ@res at step=\ctikzvalof{tripoles/circulator/width}\pgf at circ@Rlen
-			
-		\pgfscope
-			\pgfstartlinewidth=\pgflinewidth
-			
-			% draw outer circle
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
-			\pgfusepath{draw}
-			
-			% inner arrow
-			\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfsetarrowsend{latex}
-			\pgfpathmoveto{\pgfpoint{-0.25\pgf at circ@res at step}{0}}
-			\pgfpatharc{180}{-90} {0.25\pgf at circ@res at step}
-			\pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf at circ@res at step}}
-			\pgfusepath{draw}
-		\endpgfscope				  
-	}
-}
-
-
-% Wilkinson divider
-\pgfdeclareshape{wilkinson}{
-		\anchor{center}{
-			\northwest
-			\pgf at x=0pt
-			\pgf at y=0pt
-		}
-		\savedanchor\northwest{%
-			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf at y
-			\pgf at y=.5\pgf at y
-			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at x=.5\pgf at x
-			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf at x
-			}
-		\anchor{north}{
-			\northwest
-			\pgf at x=0pt
-		}
-		\anchor{south}{
-			\northwest
-			\pgf at x=0pt
-			\pgf at y=-\pgf at y
-		}
-		\anchor{west}{
-			\northwest
-			\pgf at y=0pt
-		}
-		\anchor{east}{
-			\northwest
-			\pgf at y=0pt
-			\pgf at x=-\pgf at x
-		}
-		\anchor{south west}{
-			\northwest
-			\pgf at y=-\pgf at y
-		}
-		\anchor{north east}{
-			\northwest
-			\pgf at x=-\pgf at x
-		}
-			\anchor{north west}{
-			\northwest
-		}
-		\anchor{south east}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=-\pgf at y
-		}
-		\anchor{in}{
-			\northwest
-			\pgf at y=0pt
-		}
-		\anchor{out1}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{out2}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{text}{
-			\northwest
-			\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
-			\pgf at x=-.5\wd\pgfnodeparttextbox
-		}
-		\backgroundpath{			
-				\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-				\northwest
-				\pgf at circ@res at up = \pgf at y 
-				\pgf at circ@res at down = -\pgf at y
-				\pgf at circ@res at right = -\pgf at x
-				\pgf at circ@res at left = \pgf at x
-			
-				\pgfstartlinewidth=\pgflinewidth
-
-				% draw outer box
-				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-				\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-				\pgfusepath{draw}
-				
-				% draw inner stuff
-				\pgfsetlinewidth{\pgfstartlinewidth}
-				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
-				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
-				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
-				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
-				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
-				\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}				
-				
-				\pgfusepath{draw}
-				
-				\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-				% draw inner resisitor - european or american style is recognised
-				{
-					\pgftransformshift{\pgfpoint{0.5\pgf at circ@res at right}{0pt}}
-					\pgftransformrotate{90}
-					
-					% calculate size of resistor
-					\ifpgf at circuit@europeanresistor
-						\pgfmathparse{\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
-						\pgftransformscale{\pgfmathresult}
-						\pgfnode{genericshape}{center}{}{pgf at generic}{\pgfusepath{fill}}
-					\else
-						\pgfmathparse{\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
-						\pgftransformscale{\pgfmathresult}
-						\pgfnode{resistorshape}{center}{}{pgf at resistor}{\pgfusepath{fill}}
-					\fi
-				}
-				
-				\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
-				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at up}}
-				
-				\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at down}}
-				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
-				\pgfusepath{draw}
-
-		}
-}
-
-
-%%%---------- close: pgfcirctripoles
-%%%%%%%%%%% Springe nach pgfcircquadpoles
-%%%---------- open: pgfcircquadpoles.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Quadripoles
-
-\long\def\pgfcircdeclarequadpole#1#2#3{
-	\pgfdeclareshape{#1}
-	{
-	  \anchor{center}{
-	  	\northwest
-		\pgf at x=0pt
-	  }
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=.5\pgf at x
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf at x
-	  }
-	  \anchor{A2}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{B1}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{A1}{
-		\northwest
-	  }
-	  \anchor{B2}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-	  	\northwest
-		\pgf at x=0pt
-	  }
-	  \anchor{south}{
-	  	\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{west}{
-	  	\northwest
-		\pgf at y=0pt
-	  }
-	  \anchor{east}{
-	  	\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{north west}{
-		\northwest
-	  }
-	  \anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }	  
-	  \anchor{base}{
-	  	\northwest
-		\pgf at x=0pt	  	
-	  }
-	  #3
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-			
-			%\pgf at circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			
-			#2
-	  
-	  }
-	}
-}
-
-
-
-\def\pgf at circ@drawtransformerbasicanchor{
-	\pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
-	 \anchor{AA2}{
-		\northwest
-		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
-		\pgf at x=.7\pgf at x
-		\pgf at y=-\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
-	  }
-	  \anchor{BB1}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
-		\pgf at x=.7\pgf at x
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
-	  }
-	  \anchor{AA1}{
-		\northwest
-		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
-		\pgf at x=.7\pgf at x
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
-	  }
-	  \anchor{BB2}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
-		\pgf at x=.7\pgf at x
-		\pgf at y=-\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
-	  }
-}
-
-\def\pgf at circ@drawtransformerbasicbody{
-	\def\stretto{.4}
-	\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgftransformlineattime{.5}{%
-				\pgfpoint%
-					{\stretto\pgf at circ@res at left}%
-					{\pgf at circ@res at up}%
-			}{%
-				\pgfpoint
-					{\stretto\pgf at circ@res at left}%
-					{\pgf at circ@res at down}%
-			}
-			
-			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
-			\def\pgf at temp{european}%
-			\ifx\pgf at temp\pgf at circ@temp%
-				\pgfnode{fullgenericshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
-			\else%
-				\def\pgf at temp{cute}
-				\ifx\pgf at temp\pgf at circ@temp%
-					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
-				\else%
-					\pgfnode{americaninductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
-				\fi%
-			\fi%
-
-			
-	\endpgfscope
-	\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgftransformlineattime{.5}{%
-				\pgfpoint%
-					{\stretto\pgf at circ@res at right}%
-					{\pgf at circ@res at down}%
-			}{%
-				\pgfpoint
-					{\stretto\pgf at circ@res at right}%
-					{\pgf at circ@res at up}%
-			}
-
-			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
-			\def\pgf at temp{european}%
-			\ifx\pgf at temp\pgf at circ@temp%
-				\pgfnode{fullgenericshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
-			\else%
-				\def\pgf at temp{cute} 
-				\ifx\pgf at temp\pgf at circ@temp%
-					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
-				\else%
-					\pgfnode{americaninductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
-				\fi%
-			\fi%
-			
-	\endpgfscope
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpointanchor{pgf at inductor1}{b}}
-	
-	\pgfpathmoveto{\pgfpointanchor{pgf at inductor1}{a}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpointanchor{pgf at inductor2}{a}}
-	
-	\pgfpathmoveto{\pgfpointanchor{pgf at inductor2}{b}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-	
-	\pgfusepath{draw}
-	
-}
-
-
-	
-	% contrib Kristofer M. Monisit
-	
-	\pgfdeclareshape{fd op amp}
-	{
-	  \anchor{center}{\pgfpointorigin}
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-		\northwest
-	  }
-	  \savedanchor\left{%
-	  	\pgf at y=0pt
-	  }
-	  \savedanchor\inOne{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \anchor{-}{
-		\inOne
-	  }
-	  \anchor{+}{
-		\inOne
-		\pgf at y=-\pgf at y
-	  }
-	  \savedanchor\up{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-			\pgf at circ@res at up = \pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-	    \pgfpointlineattime{
-			\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
-			\pgfpoint{
-				\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-				{\pgf at circ@res at up}}
-			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-	  }
-	  \anchor{up}{
-		\up
-	  }
-	  \anchor{down}{
-		\up
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{out +}{
-		\northwest
-		\pgf at y=.5\pgf at y
-		\pgf at x=-.7\pgf at x
-	  }
-	  \anchor{out -}{
-		\northwest
-		\pgf at y=-.5\pgf at y
-		\pgf at x=-.7\pgf at x
-	  }
-	  \anchor{west}{
-	  	\left
-      }
-		\anchor{east}{
-			\left
-			\pgf at x=-\pgf at x
-		}
-
-	  \backgroundpath{
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-
-      \northwest
-      \pgf at circ@res at up = \pgf at y
-      \pgf at circ@res at down = -\pgf at y
-      \pgf at circ@res at right = -\pgf at x
-      \pgf at circ@res at left = \pgf at x
-
-      % Negative input terminal
-      \pgfpathmoveto{\pgfpoint
-        {\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}]{\scriptsize\ $-$}
-  
-
-      % Positive input terminal
-      \pgfpathmoveto{\pgfpoint
-        {\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}]{\scriptsize\ $+$}
-  
-
-      % Negative output terminal
-      \pgfpathmoveto{\pgfpoint
-        {0.7\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at down}]{\scriptsize\ $-$}
-  
-
-      % Positive output terminal
-      \pgfpathmoveto{\pgfpoint
-        {0.7\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at up}]{\scriptsize\ $+$}
-  
-
-      % Draw them all!
-      \pgfusepath{draw}
-
-      % Triangle
-      \pgfscope
-        \pgfsetlinewidth{2\pgflinewidth}
-        \pgftransformxshift{.7\pgf at circ@res at left}
-        \pgf at circ@res at step=\pgf at circ@res at right
-        \advance\pgf at circ@res at step by -\pgf at circ@res at left
-        \pgf at circ@res at step=.7\pgf at circ@res at step
-        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-        \pgfusepath{draw}
-      \endpgfscope
-	  }
-	}
-
-
-
-
-\pgfcircdeclarequadpole{transformer}{
-
-	\pgf at circ@drawtransformerbasicbody
-
-}{\pgf at circ@drawtransformerbasicanchor}
-
-\pgfcircdeclarequadpole{transformer core}{
-
-	\pgf at circ@drawtransformerbasicbody
-	
-	\pgfmoveto{\pgfpoint%
-					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
-					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
-					}
-	\pgflineto{
-				\pgfpoint
-					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
-					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
-					}
-
-	\pgfmoveto{\pgfpoint%
-					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
-					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
-					}
-	\pgflineto{
-				\pgfpoint
-					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
-					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
-					}					
-	
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
-	\pgfusepath{draw}
-}{\pgf at circ@drawtransformerbasicanchor}
-
-
-\pgfcircdeclarequadpole{gyrator}{
-
-	\def\stretto{.4}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-	
-	\pgfusepath{draw}
-	
-	\pgfsetlinewidth{2\pgflinewidth}
-	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at left}{.7*\stretto\pgf at circ@res at down}}
-	\pgfpatharc{90}{270}{.7*\stretto\pgf at circ@res at down}
-	
-	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at right}{.7*\stretto\pgf at circ@res at up}}
-	\pgfpatharc{-90}{90}{.7*\stretto\pgf at circ@res at down}
-	\pgfusepath{draw}
-
-}{}
-
-%% coupler
-% defines a general outer box for couplers
-% TikZ usage: 
-%		\draw (0,0) node[coupler](coup){\SI{-3}{dB}}
-%		(coup.port1) to[short,-o] ++(-1,0)
-%
-
-\long\def\pgfcircdeclarecoupler#1#2{
-	\pgfdeclareshape{#1}{
-		\anchor{center}{
-			\northwest
-			\pgf at x=0pt
-			\pgf at y=0pt
-		}
-		\savedanchor\northwest{%
-			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/height}\pgf at y
-			\pgf at y=.5\pgf at y
-			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at x=.5\pgf at x
-			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/width}\pgf at x
-			}
-		\anchor{north}{
-			\northwest
-			\pgf at x=0pt
-		}
-		\anchor{south}{
-			\northwest
-			\pgf at x=0pt
-			\pgf at y=-\pgf at y
-		}
-		\anchor{west}{
-			\northwest
-			\pgf at y=0pt
-		}
-		\anchor{east}{
-			\northwest
-			\pgf at y=0pt
-			\pgf at x=-\pgf at x
-		}
-		\anchor{south west}{
-			\northwest
-			\pgf at y=-\pgf at y
-		}
-		\anchor{north east}{
-			\northwest
-			\pgf at x=-\pgf at x
-		}
-			\anchor{north west}{
-			\northwest
-		}
-		\anchor{south east}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=-\pgf at y
-		}
-		\anchor{port1}{
-			\northwest
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{port2}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{port3}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{port4}{
-			\northwest
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{1}{
-			\northwest
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{2}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{3}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{4}{
-			\northwest
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{text}{
-			\northwest
-			\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
-			\pgf at x=-.5\wd\pgfnodeparttextbox
-		}
-		\backgroundpath{			
-				\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-				\northwest
-				\pgf at circ@res at up = \pgf at y 
-				\pgf at circ@res at down = -\pgf at y
-				\pgf at circ@res at right = -\pgf at x
-				\pgf at circ@res at left = \pgf at x
-			
-				\pgfstartlinewidth=\pgflinewidth
-
-				% draw outer box
-				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-				\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-				\pgfusepath{draw}
-				
-				% draw inner stuff
-				#2
-
-		}
-	}
-}
-
-% straight coupler
-\pgfcircdeclarecoupler{coupler}{
-	\pgfsetlinewidth{\pgfstartlinewidth}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
-	\pgfusepath{draw}
-	
-	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-	\pgfsetarrows{latex-latex}
-	\pgfusepath{draw}
-	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
-	\pgfsetarrows{latex-latex}
-	\pgfusepath{draw}
-}
-
-% "bended" coupler
-\pgfcircdeclarecoupler{coupler2}{
-	\pgfsetlinewidth{\pgfstartlinewidth}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
-	\pgfusepath{draw}
-	
-	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
-	\pgfpatharc{0}{90} {0.4\pgf at circ@res at up}
-	\pgfsetarrowsend{latex}
-	\pgfusepath{draw}
-	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
-	\pgfpatharc{0}{-90} {0.4\pgf at circ@res at up}
-	\pgfsetarrowsend{latex}
-	\pgfusepath{draw}
-	
-	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
-	\pgfpatharc{180}{90} {0.4\pgf at circ@res at up}
-	\pgfsetarrowsend{latex}
-	\pgfusepath{draw}
-	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
-	\pgfpatharc{-180}{-90} {0.4\pgf at circ@res at up}
-	\pgfsetarrowsend{latex}
-	\pgfusepath{draw}
-	
-	
-}
-
-%%%---------- close: pgfcircquadpoles
-%%%%%%%%%%% Springe nach pgfcircnpoles
-%%%---------- open: pgfcircnpoles.tex
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% N-poles
-
-\pgfkeys{/tikz/circuitikz,lab/.code={
-	
-
-}}
-
-\long\def\pgfcircdeclarenpole#1#2#3{
-	\pgfdeclareshape{#1}
-	{
-	  \anchor{center}{
-	  	\northwest
-		\pgf at x=0pt
-	  }
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=.5\pgf at x
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf at x
-	  }
-	  \anchor{A2}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{B1}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{A1}{
-		\northwest
-	  }
-	  \anchor{B2}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-	  	\northwest
-		\pgf at x=0pt
-	  }
-	  \anchor{south}{
-	  	\northwest
-		\pgf at x=0pt
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{west}{
-	  	\northwest
-		\pgf at y=0pt
-	  }
-	  \anchor{east}{
-	  	\northwest
-		\pgf at y=0pt
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{south west}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north east}{
-		\northwest
-		\pgf at x=-\pgf at x
-	  }
-	  \anchor{north west}{
-		\northwest
-	  }
-	  \anchor{south east}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at y=-\pgf at y
-	  }	  
-	  \anchor{base}{
-	  	\northwest
-		\pgf at x=0pt	  	
-	  }
-	  #3
-	  \backgroundpath{			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-			\northwest
-			\pgf at circ@res at up = \pgf at y 
-			\pgf at circ@res at down = -\pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-			
-			%\pgf at circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			
-			#2
-	  
-	  }
-	}
-}
-
-
-
-\def\pgf at circ@drawtransformerbasicanchor{
-	\pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
-	 \anchor{AA2}{
-		\northwest
-		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
-		\pgf at x=.7\pgf at x
-		\pgf at y=-\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
-	  }
-	  \anchor{BB1}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
-		\pgf at x=.7\pgf at x
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
-	  }
-	  \anchor{AA1}{
-		\northwest
-		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
-		\pgf at x=.7\pgf at x
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
-	  }
-	  \anchor{BB2}{
-		\northwest
-		\pgf at x=-\pgf at x
-		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
-		\pgf at x=.7\pgf at x
-		\pgf at y=-\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
-	  }
-}
-
-\def\pgf at circ@drawtransformerbasicbody{
-	\def\stretto{.4}
-	\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgftransformlineattime{.5}{%
-				\pgfpoint%
-					{\stretto\pgf at circ@res at left}%
-					{\pgf at circ@res at up}%
-			}{%
-				\pgfpoint
-					{\stretto\pgf at circ@res at left}%
-					{\pgf at circ@res at down}%
-			}
-			
-			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
-			\def\pgf at temp{european}%
-			\ifx\pgf at temp\pgf at circ@temp%
-				\pgfnode{fullgenericshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
-			\else%
-				\def\pgf at temp{cute}
-				\ifx\pgf at temp\pgf at circ@temp%
-					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
-				\else%
-					\pgfnode{americaninductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
-				\fi%
-			\fi%
-
-			
-	\endpgfscope
-	\pgfscope             
-			\pgfslopedattimetrue 
-			\pgfallowupsidedownattimetrue
-			\pgftransformlineattime{.5}{%
-				\pgfpoint%
-					{\stretto\pgf at circ@res at right}%
-					{\pgf at circ@res at down}%
-			}{%
-				\pgfpoint
-					{\stretto\pgf at circ@res at right}%
-					{\pgf at circ@res at up}%
-			}
-
-			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
-			\def\pgf at temp{european}%
-			\ifx\pgf at temp\pgf at circ@temp%
-				\pgfnode{fullgenericshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
-			\else%
-				\def\pgf at temp{cute} 
-				\ifx\pgf at temp\pgf at circ@temp%
-					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
-				\else%
-					\pgfnode{americaninductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
-				\fi%
-			\fi%
-			
-	\endpgfscope
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpointanchor{pgf at inductor1}{b}}
-	
-	\pgfpathmoveto{\pgfpointanchor{pgf at inductor1}{a}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpointanchor{pgf at inductor2}{a}}
-	
-	\pgfpathmoveto{\pgfpointanchor{pgf at inductor2}{b}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-	
-	\pgfusepath{draw}
-	
-}
-
-
-	
-	% contrib Kristofer M. Monisit
-	
-	\pgfdeclareshape{fd op amp}
-	{
-	  \anchor{center}{\pgfpointorigin}
-	  \savedanchor\northwest{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \anchor{south}{
-		\northwest
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{north}{
-		\northwest
-	  }
-	  \savedanchor\left{%
-	  	\pgf at y=0pt
-	  }
-	  \savedanchor\inOne{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-	  }
-	  \anchor{-}{
-		\inOne
-	  }
-	  \anchor{+}{
-		\inOne
-		\pgf at y=-\pgf at y
-	  }
-	  \savedanchor\up{%
-		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
-		\pgf at y=.5\pgf at y
-		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
-		\pgf at x=.5\pgf at x
-			\pgf at circ@res at up = \pgf at y
-			\pgf at circ@res at right = -\pgf at x
-			\pgf at circ@res at left = \pgf at x
-	    \pgfpointlineattime{
-			\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
-			\pgfpoint{
-				\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-				{\pgf at circ@res at up}}
-			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-	  }
-	  \anchor{up}{
-		\up
-	  }
-	  \anchor{down}{
-		\up
-		\pgf at y=-\pgf at y
-	  }
-	  \anchor{out +}{
-		\northwest
-		\pgf at y=.5\pgf at y
-		\pgf at x=-.7\pgf at x
-	  }
-	  \anchor{out -}{
-		\northwest
-		\pgf at y=-.5\pgf at y
-		\pgf at x=-.7\pgf at x
-	  }
-	  \anchor{west}{
-	  	\left
-      }
-		\anchor{east}{
-			\left
-			\pgf at x=-\pgf at x
-		}
-
-	  \backgroundpath{
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-
-      \northwest
-      \pgf at circ@res at up = \pgf at y
-      \pgf at circ@res at down = -\pgf at y
-      \pgf at circ@res at right = -\pgf at x
-      \pgf at circ@res at left = \pgf at x
-
-      % Negative input terminal
-      \pgfpathmoveto{\pgfpoint
-        {\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}]{\scriptsize\ $-$}
-  
-
-      % Positive input terminal
-      \pgfpathmoveto{\pgfpoint
-        {\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}]{\scriptsize\ $+$}
-  
-
-      % Negative output terminal
-      \pgfpathmoveto{\pgfpoint
-        {0.7\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
-      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at down}]{\scriptsize\ $-$}
-  
-
-      % Positive output terminal
-      \pgfpathmoveto{\pgfpoint
-        {0.7\pgf at circ@res at right}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-      \pgfpathlineto{\pgfpoint
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
-        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
-      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at up}]{\scriptsize\ $+$}
-  
-
-      % Draw them all!
-      \pgfusepath{draw}
-
-      % Triangle
-      \pgfscope
-        \pgfsetlinewidth{2\pgflinewidth}
-        \pgftransformxshift{.7\pgf at circ@res at left}
-        \pgf at circ@res at step=\pgf at circ@res at right
-        \advance\pgf at circ@res at step by -\pgf at circ@res at left
-        \pgf at circ@res at step=.7\pgf at circ@res at step
-        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
-        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-        \pgfusepath{draw}
-      \endpgfscope
-	  }
-	}
-
-
-
-
-\pgfcircdeclarequadpole{transformer}{
-
-	\pgf at circ@drawtransformerbasicbody
-
-}{\pgf at circ@drawtransformerbasicanchor}
-
-\pgfcircdeclarequadpole{transformer core}{
-
-	\pgf at circ@drawtransformerbasicbody
-	
-	\pgfmoveto{\pgfpoint%
-					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
-					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
-					}
-	\pgflineto{
-				\pgfpoint
-					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
-					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
-					}
-
-	\pgfmoveto{\pgfpoint%
-					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
-					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
-					}
-	\pgflineto{
-				\pgfpoint
-					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
-					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
-					}					
-	
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
-	\pgfusepath{draw}
-}{\pgf at circ@drawtransformerbasicanchor}
-
-
-\pgfcircdeclarequadpole{gyrator}{
-
-	\def\stretto{.4}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-	
-	\pgfusepath{draw}
-	
-	\pgfsetlinewidth{2\pgflinewidth}
-	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at left}{.7*\stretto\pgf at circ@res at down}}
-	\pgfpatharc{90}{270}{.7*\stretto\pgf at circ@res at down}
-	
-	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at right}{.7*\stretto\pgf at circ@res at up}}
-	\pgfpatharc{-90}{90}{.7*\stretto\pgf at circ@res at down}
-	\pgfusepath{draw}
-
-}{}
-
-%% coupler
-% defines a general outer box for couplers
-% TikZ usage: 
-%		\draw (0,0) node[coupler](coup){\SI{-3}{dB}}
-%		(coup.port1) to[short,-o] ++(-1,0)
-%
-
-\long\def\pgfcircdeclarecoupler#1#2{
-	\pgfdeclareshape{#1}{
-		\anchor{center}{
-			\northwest
-			\pgf at x=0pt
-			\pgf at y=0pt
-		}
-		\savedanchor\northwest{%
-			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/height}\pgf at y
-			\pgf at y=.5\pgf at y
-			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\pgf at x=.5\pgf at x
-			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/coupler/width}\pgf at x
-			}
-		\anchor{north}{
-			\northwest
-			\pgf at x=0pt
-		}
-		\anchor{south}{
-			\northwest
-			\pgf at x=0pt
-			\pgf at y=-\pgf at y
-		}
-		\anchor{west}{
-			\northwest
-			\pgf at y=0pt
-		}
-		\anchor{east}{
-			\northwest
-			\pgf at y=0pt
-			\pgf at x=-\pgf at x
-		}
-		\anchor{south west}{
-			\northwest
-			\pgf at y=-\pgf at y
-		}
-		\anchor{north east}{
-			\northwest
-			\pgf at x=-\pgf at x
-		}
-			\anchor{north west}{
-			\northwest
-		}
-		\anchor{south east}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=-\pgf at y
-		}
-		\anchor{port1}{
-			\northwest
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{port2}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{port3}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{port4}{
-			\northwest
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{1}{
-			\northwest
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{2}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=-0.5\pgf at y
-		}
-		\anchor{3}{
-			\northwest
-			\pgf at x=-\pgf at x
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{4}{
-			\northwest
-			\pgf at y=0.5\pgf at y
-		}
-		\anchor{text}{
-			\northwest
-			\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
-			\pgf at x=-.5\wd\pgfnodeparttextbox
-		}
-		\backgroundpath{			
-				\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
-			
-				\northwest
-				\pgf at circ@res at up = \pgf at y 
-				\pgf at circ@res at down = -\pgf at y
-				\pgf at circ@res at right = -\pgf at x
-				\pgf at circ@res at left = \pgf at x
-			
-				\pgfstartlinewidth=\pgflinewidth
-
-				% draw outer box
-				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-				\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-				\pgfusepath{draw}
-				
-				% draw inner stuff
-				#2
-
-		}
-	}
-}
-
-% straight coupler
-\pgfcircdeclarecoupler{coupler}{
-	\pgfsetlinewidth{\pgfstartlinewidth}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
-	\pgfusepath{draw}
-	
-	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-	\pgfsetarrows{latex-latex}
-	\pgfusepath{draw}
-	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
-	\pgfsetarrows{latex-latex}
-	\pgfusepath{draw}
-}
-
-% "bended" coupler
-\pgfcircdeclarecoupler{coupler2}{
-	\pgfsetlinewidth{\pgfstartlinewidth}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
-	\pgfusepath{draw}
-	
-	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
-	\pgfpatharc{0}{90} {0.4\pgf at circ@res at up}
-	\pgfsetarrowsend{latex}
-	\pgfusepath{draw}
-	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
-	\pgfpatharc{0}{-90} {0.4\pgf at circ@res at up}
-	\pgfsetarrowsend{latex}
-	\pgfusepath{draw}
-	
-	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
-	\pgfpatharc{180}{90} {0.4\pgf at circ@res at up}
-	\pgfsetarrowsend{latex}
-	\pgfusepath{draw}
-	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
-	\pgfpatharc{-180}{-90} {0.4\pgf at circ@res at up}
-	\pgfsetarrowsend{latex}
-	\pgfusepath{draw}
-	
-	
-}
-
-%%%---------- close: pgfcircnpoles
-
-%%%%%%%%%%% Springe nach pgfcirclabel
-%%%---------- open: pgfcirclabel.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Bipole label positioning
-
-%% Options
-\ctikzset{label/.style = { l=#1 } }
-\ctikzset{l/.code = { 
-	\pgfkeys{/tikz/circuitikz/bipole/label/name=#1}
-	\ctikzsetvalof{bipole/label/unit}{}
-	\ifpgf at circ@siunitx 
-		\pgf at circ@handleSI{#1}
-		\ifpgf at circ@siunitx at res 
-			\edef\pgf at temp{\pgf at circ@handleSI at val}
-			\pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf at temp}
-			\edef\pgf at temp{\pgf at circ@handleSI at unit}
-			\pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf at temp}
-		\else
-		\fi
-	\else
-	\fi
-}}
-
-\ctikzset{label above/.code = { 
-	l=#1, 
-	\circuitikzbasekey/bipole/label/position=90 }
-}
-\ctikzset{l^/.style = { 
-	l=#1,
-	\circuitikzbasekey/bipole/label/position=90 } 
-}
-
-\ctikzset{label below/.code = { 
-	l=#1,
-	\circuitikzbasekey/bipole/label/position=-90 } 
-}
-\ctikzset{l_/.style = { 
-	l=#1,
-	\circuitikzbasekey/bipole/label/position=-90 } 
-}
-
-
-
-\def\pgf at circ@drawlabel{
-		\pgfextra{
-			\edef\pgf at temp{\ctikzvalof{label/align}}
-			\def\pgf at circ@temp{straight}
-		}
-		\ifx\pgf at temp\pgf at circ@temp %straight
-			\pgf at circ@drawreglabel
-		\else
-			\pgfextra{\def\pgf at circ@temp{rotate}}
-			\ifx\pgf at temp\pgf at circ@temp %rotate
-				\pgf at circ@drawrotlabel
-			\else % smart
-				\pgf at circ@drawsmartlabel				
-			\fi
-		\fi
-}
-
-\def\pgf at circ@drawsmartlabel{
-	\pgfextra{
-		%\pgfmathadd{\pgf at circ@direction}{360}
-		\pgfmathmod{\pgf at circ@direction}{90}
-		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
-	}
-	\ifnum \pgfcircmathresult > 20 
-		\ifnum \pgfcircmathresult < 70 % NON quasi retto
-			\pgf at circ@drawrotlabel
-		\else
-			\pgf at circ@drawreglabel
-		\fi
-	\else 
-		\pgf at circ@drawreglabel
-	\fi
-}
-
-%% Output routing
-%% #1 - node name
-
-\def\pgf at circ@drawrotlabel{
-	\pgfextra{
-		% calcolo rotazione label
-		\def\pgf at circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
-		\edef\pgfcirclabrot{\pgf at circ@direction} % primo e quarto quadrante
-		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-		\ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % terzo e secondo
-			\pgfmathsubtract{\pgf at circ@direction}{180}
-			\edef\pgfcirclabrot{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
-			\pgfmathadd{\pgf at circ@temp}{180} %%%
-			\edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil} %%%
-		\fi\fi
-		
-		\ifnum \ctikzvalof{mirror value} = -1
-			\pgfmathadd{\pgf at circ@temp}{180}
-			\edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
-		\fi
-	}
-	coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.north)$)
-	(labelcoor) node [rotate=\pgfcirclabrot] {\pgf at circ@finallabel{}} % c'era un transform shape
-}
-
-\def\pgf at circ@drawreglabel{
-	\pgfextra{
-		\pgfmathsubtract{\pgf at circ@direction}{90}
-		\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
-		
-		\edef\pgf at circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
-		\ifnum \pgf at circ@temp < 0
-			\pgfmathadd{\pgf at circ@labanc}{180}
-			\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
-		\fi
-		
-		\ifnum \ctikzvalof{mirror value} = -1
-			\pgfmathadd{\pgf at circ@labanc}{180}
-			\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
-		\fi
-	}
-	node [ anchor = \pgf at circ@labanc] 
-	  at (\ctikzvalof{bipole/name}.\pgf at circ@temp) {\pgf at circ@finallabel{}}
-}
-
-
-\ctikzset{text/.style = { t=#1 } }
-\ctikzset{t/.code = { 
-	\ctikzsetvalof{bipoles/twoport/text}{#1}
-}}
-
-%%%---------- close: pgfcirclabel
-%%%%%%%%%%% Springe nach pgfcircvoltage
-%%%---------- open: pgfcircvoltage.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%  Voltage management
-
-
-\ctikzset{v^>/.style = {
-		v = #1,
-		\circuitikzbasekey/bipole/voltage/direction = forward,
-		\circuitikzbasekey/bipole/voltage/position = above
-	}
-}
-
-\ctikzset{v^</.style = {
-		v = #1,
-		\circuitikzbasekey/bipole/voltage/direction = backward,
-		\circuitikzbasekey/bipole/voltage/position = above
-	}
-}
-
-\ctikzset{v_>/.style = {
-		v = #1,
-		\circuitikzbasekey/bipole/voltage/direction = forward,
-		\circuitikzbasekey/bipole/voltage/position = below
-	} 
-}
-
-\ctikzset{v_</.style = {
-		v = #1,
-		\circuitikzbasekey/bipole/voltage/direction = backward,
-		\circuitikzbasekey/bipole/voltage/position = below
-	} 
-}
-
-
-% Default position varies whether the component is a voltage source
-% or not
-\ctikzset{v/.code = {
-			\ifpgf at circuit@bipole at isvoltage
-				\pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
-					\circuitikzbasekey/bipole/voltage/direction=forward}
-			\else
-				\pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
-					\circuitikzbasekey/bipole/voltage/direction=backward}
-			\fi
-	\pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1}
-	\ctikzsetvalof{bipole/voltage/label/unit}{}
-	\ifpgf at circ@siunitx 
-		\pgf at circ@handleSI{#1}
-		\ifpgf at circ@siunitx at res 
-			\edef\pgf at temp{\pgf at circ@handleSI at val}
-			\pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf at temp}
-			\edef\pgf at temp{\pgf at circ@handleSI at unit}
-			\pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/unit}{\pgf at temp}
-		\else
-		\fi
-	\else
-	\fi
-	} 
-}
-
-\ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
-\ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position  = above} }
-\ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
-\ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
-
-
-%% Output routine for generic bipoles
-
-\def\pgf at circ@drawvoltagegeneric{
-	\pgfextra{
-		\ifnum \ctikzvalof{mirror value}=-1
-						\ifpgf at circuit@bipole at voltage@below\pgf at circuit@bipole at voltage@belowfalse\else\pgf at circuit@bipole at voltage@belowtrue\fi
-		\fi
-		
-		\ifpgf at circuit@bipole at voltage@below
-			\def\pgf at circ@voltage at angle{90}
-		\else
-			\def\pgf at circ@voltage at angle{-90} 
-		\fi	
-		
-		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
-		\pgfkeysifdefined{\pgf at temp}
-			{ \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
-			{ \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} }
-		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}
-		\pgfkeysifdefined{\pgf at temp}
-			{ \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
-			{ \edef\bumpb{\ctikzvalof{voltage/bump b}} }
-	}
-
-	coordinate (pgfcirc at mid) at ($(\tikztostart) ! \distacefromnode ! (\ctikzvalof{bipole/name}.left)$)
-	coordinate (pgfcirc at Vfrom) at ($(pgfcirc at mid) ! -\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen ! \pgf at circ@voltage at angle:(\ctikzvalof{bipole/name}.left)$) 
-   
-	coordinate (pgfcirc at mid) at ($(\tikztotarget) ! \distacefromnode ! (\ctikzvalof{bipole/name}.right)$)
-	coordinate (pgfcirc at Vto) at ($(pgfcirc at mid) ! \ctikzvalof{voltage/distance from line}\pgf at circ@Rlen ! \pgf at circ@voltage at angle : (\ctikzvalof{bipole/name}.right)$)
-
-	\ifpgf at circuit@bipole at voltage@below
-		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
-		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
-	\else
-		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$)
-		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$)
-	\fi
-
-	\ifpgf at circuit@europeanvoltage
-		\ifpgf at circuit@bipole at voltage@backward
-			(pgfcirc at Vto) .. controls (pgfcirc at Vcont2)  and (pgfcirc at Vcont1) .. 
-				node[currarrow, sloped,  allow upside down, pos=1] {} 
-			(pgfcirc at Vfrom) 
-		\else
-			(pgfcirc at Vfrom) .. controls (pgfcirc at Vcont1)  and (pgfcirc at Vcont2) ..
-				node[currarrow, sloped,  allow upside down, pos=1] {}
-			(pgfcirc at Vto) 	
-		\fi	
-	\else
-		\ifpgf at circuit@bipole at voltage@backward
-			(pgfcirc at Vfrom) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{\scriptsize$+$}   
-			(pgfcirc at Vto) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{$-$}
-		\else
-			(pgfcirc at Vfrom) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{\scriptsize$-$}   
-			(pgfcirc at Vto) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{$+$}
-		\fi	
-	\fi
-}
-
-%% Output routine for voltage sources
-
-\def\pgf at circ@drawvoltagegenerator{
-	\ifpgf at circuit@bipole at voltage@below
-		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
-		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
-	\else
-		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
-		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
-	\fi
-
-	\ifpgf at circuit@europeanvoltage
-		\ifpgf at circuit@bipole at voltage@backward
-			(pgfcirc at Vcont2)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vcont1)
-		\else
-			(pgfcirc at Vcont1)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vcont2)
-		\fi
-	
-	\else % american voltage
-		
-		\pgfextra{
-			\def\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}}
-			\def\pgf at circ@temp{battery}
-			\ifx\pgf at temp\pgf at circ@temp
-				\edef\pgf at circ@batteria{battery}
-			\else
-				\def\pgf at circ@temp{battery1}
-				\ifx\pgf at temp\pgf at circ@temp
-					\edef\pgf at circ@batteria{battery}
-				\else
-					\edef\pgf at circ@batteria{false}
-				\fi
-			\fi
-			\edef\pgf at circ@temp{battery}
-		}
-		
-		\ifx\pgf at circ@batteria\pgf at circ@temp % if it is a battery, must put + and -
-			\ifpgf at circuit@bipole at voltage@backward
-				(pgfcirc at Vcont2)  node {$-$}  (pgfcirc at Vcont1) node {$+$}
-			\else
-				(pgfcirc at Vcont1)  node {$-$}  (pgfcirc at Vcont2) node {$+$}
-			\fi
-		\fi
-		
-	\fi
-}
-
-%% Output routine
-
-\def\pgf at circ@drawvoltage{   % node name 
-	\pgfextra{
-		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-
-		\ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
-			\ifpgf at circuit@bipole at voltage@below
-				\def\pgf at circ@bipole at voltage@label at anchor{north west} 
-			\else \def\pgf at circ@bipole at voltage@label at anchor{south east}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
-			\ifpgf at circuit@bipole at voltage@below
-				\def\pgf at circ@bipole at voltage@label at anchor{west} 
-			\else \def\pgf at circ@bipole at voltage@label at anchor{east} 
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
-			\ifpgf at circuit@bipole at voltage@below
-				 \def\pgf at circ@bipole at voltage@label at anchor{south west}
-			\else \def\pgf at circ@bipole at voltage@label at anchor{north east}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
-			\ifpgf at circuit@bipole at voltage@below
-				  \def\pgf at circ@bipole at voltage@label at anchor{south}
-			\else\def\pgf at circ@bipole at voltage@label at anchor{north}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
-			\ifpgf at circuit@bipole at voltage@below
-				 \def\pgf at circ@bipole at voltage@label at anchor{south east}
-			\else\def\pgf at circ@bipole at voltage@label at anchor{north west}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
-			\ifpgf at circuit@bipole at voltage@below
-				 \def\pgf at circ@bipole at voltage@label at anchor{east}
-			\else \def\pgf at circ@bipole at voltage@label at anchor{west}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
-			\ifpgf at circuit@bipole at voltage@below
-				  \def\pgf at circ@bipole at voltage@label at anchor{north east}
-			\else\def\pgf at circ@bipole at voltage@label at anchor{south west}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
-			\ifpgf at circuit@bipole at voltage@below
-				 \def\pgf at circ@bipole at voltage@label at anchor{north}
-			\else\def\pgf at circ@bipole at voltage@label at anchor{south} 
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
-			\ifpgf at circuit@bipole at voltage@below
-				  \def\pgf at circ@bipole at voltage@label at anchor{north}
-			\else\def\pgf at circ@bipole at voltage@label at anchor{south}
-			\fi
-		\fi\fi
-
-		\ifpgf at circuit@bipole at voltage@below
-			\def\pgf at circ@bipole at voltage@label at where{-90}
-		\else
-			\def\pgf at circ@bipole at voltage@label at where{90}
-		\fi
-		
-		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
-		\pgfkeysifdefined{\pgf at temp}
-			{ \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
-			{ \edef\eudist{\ctikzvalof{voltage/european label distance}} }
-	}
-
-		\ifpgf at circuit@bipole at isvoltage
-			\pgf at circ@drawvoltagegenerator 
-		\else
-			\pgf at circ@drawvoltagegeneric 
-		\fi
-		(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)
-		coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
-			\ifpgf at circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi !
-			(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)$)
-		node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=0] 
-			  at (Vlab) { \pgf at circ@finallabel{voltage/} }
-}
-
-
-
-
-
-%		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! 
-%			\ctikzvalof{voltage/bump b} !
-%			(\ctikzvalof{bipole/name}.-110) $)
-%		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! 
-%			\ctikzvalof{voltage/bump b} ! 
-%			(\ctikzvalof{bipole/name}.-70) $)
-%	\else
-%		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! 
-%			\ctikzvalof{voltage/bump b} !
-%			(\ctikzvalof{bipole/name}.110) $)
-%		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! 
-%			\ctikzvalof{voltage/bump b} ! 
-%			(\ctikzvalof{bipole/name}.70) $)
-%	\fi
-%%%---------- close: pgfcircvoltage
-%%%%%%%%%%% Springe nach pgfcirccurrent
-%%%---------- open: pgfcirccurrent.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Current handling
-
-%% Options
-
-
-\ctikzset{i^>/.style = {
-		i = #1,
-		\circuitikzbasekey/bipole/current/direction = forward,
-		\circuitikzbasekey/bipole/current/x position = after,
-		\circuitikzbasekey/bipole/current/y position = above
-	}
-}
-
-\ctikzset{i_>/.style = {
-		i = #1,
-		\circuitikzbasekey/bipole/current/direction = forward,
-		\circuitikzbasekey/bipole/current/x position = after,
-		\circuitikzbasekey/bipole/current/y position = below
-	}
-}
-
-\ctikzset{i>^/.style = {
-		i = #1,
-		\circuitikzbasekey/bipole/current/direction = forward,
-		\circuitikzbasekey/bipole/current/x position = before,
-		\circuitikzbasekey/bipole/current/y position = above
-	}
-}
-
-\ctikzset{i>_/.style = {
-		i = #1,
-		\circuitikzbasekey/bipole/current/direction = forward,
-		\circuitikzbasekey/bipole/current/x position = before,
-		\circuitikzbasekey/bipole/current/y position = below
-	}
-}
-
-\ctikzset{i^</.style = {
-		i = #1,
-		\circuitikzbasekey/bipole/current/direction = backward,
-		\circuitikzbasekey/bipole/current/x position = after,
-		\circuitikzbasekey/bipole/current/y position = above
-	}
-}
-
-\ctikzset{i_</.style = {
-		i = #1,
-		\circuitikzbasekey/bipole/current/direction = backward,
-		\circuitikzbasekey/bipole/current/x position = after,
-		\circuitikzbasekey/bipole/current/y position = below
-	}
-}
-
-\ctikzset{i<^/.style = {
-		i = #1,
-		\circuitikzbasekey/bipole/current/direction = backward,
-		\circuitikzbasekey/bipole/current/x position = before,
-		\circuitikzbasekey/bipole/current/y position = above
-	}
-}
-
-\ctikzset{i<_/.style = {
-		i = #1,
-		\circuitikzbasekey/bipole/current/direction = backward,
-		\circuitikzbasekey/bipole/current/x position = before,
-		\circuitikzbasekey/bipole/current/y position = below
-	}
-}
-
-\ctikzset{i/.code = {
-%			\ifpgf at circuit@bipole at iscurrent
-%				\pgfkeys{\circuitikzbasekey/bipole/current/position=above}
-%			\else
-%				\pgfkeys{\circuitikzbasekey/bipole/current/position=below}
-%			\fi
-			\pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
-					\circuitikzbasekey/bipole/current/x position = after,
-					\circuitikzbasekey/bipole/current/y position = above }
-	\pgfkeys{/tikz/circuitikz/bipole/current/label/name=#1}
-	\ctikzsetvalof{bipole/current/label/unit}{}
-	\ifpgf at circ@siunitx 
-		\pgf at circ@handleSI{#1}
-		\ifpgf at circ@siunitx at res 
-			\edef\pgf at temp{\pgf at circ@handleSI at val}
-			\pgfkeyslet{/tikz/circuitikz/bipole/current/label/name}{\pgf at temp}
-			\edef\pgf at temp{\pgf at circ@handleSI at unit}
-			\pgfkeyslet{/tikz/circuitikz/bipole/current/label/unit}{\pgf at temp}
-		\else
-		\fi
-	\else
-	\fi
-}
-}
-
-\ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward } }
-\ctikzset{i_/.style = { i = #1, \circuitikzbasekey/bipole/current/y position = below } }
-\ctikzset{i>/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } }
-\ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } }
-
-
-\def\pgf at circ@drawnormalcurrent{
-			\ifpgf at circuit@bipole at current@before
-				\ifpgf at circuit@bipole at current@backward
-					{  (\ctikzvalof{bipole/name}.left) -- 
-							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
-						(\tikztostart)  
-					}
-				\else
-					{  (\tikztostart) -- 
-							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
-						(\ctikzvalof{bipole/name}.left)  
-					}
-				\fi
-			\else
-				\ifpgf at circuit@bipole at current@backward
-					{ 	(\tikztotarget) -- 
-							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
-						(\ctikzvalof{bipole/name}.right)  
-					}
-				\else
-					{ 	(\ctikzvalof{bipole/name}.right) -- 
-							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {}
-						(\tikztotarget)  
-					}
-				\fi
-			\fi
-}
-
-%% Output routine 
-%% #1 - node name
-
-\def\pgf at circ@drawcurrent{
-	\pgfextra{
-		\edef\pgf at circ@ffffff{\pgf at circ@direction}
-		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@ffffff\pgf at nil}
-
-		\ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
-			\ifpgf at circuit@bipole at current@below
-				\def\pgf at circ@dir{north west} \else \def\pgf at circ@dir{south east}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
-			\ifpgf at circuit@bipole at current@below
-				\def\pgf at circ@dir{west} \else \def\pgf at circ@dir{east} 
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
-			\ifpgf at circuit@bipole at current@below
-				 \def\pgf at circ@dir{south west}\else \def\pgf at circ@dir{north east}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
-			\ifpgf at circuit@bipole at current@below
-				  \def\pgf at circ@dir{south}\else\def\pgf at circ@dir{north}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
-			\ifpgf at circuit@bipole at current@below
-				 \def\pgf at circ@dir{south east}\else\def\pgf at circ@dir{north west}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
-			\ifpgf at circuit@bipole at current@below
-				 \def\pgf at circ@dir{east}\else \def\pgf at circ@dir{west}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
-			\ifpgf at circuit@bipole at current@below
-				  \def\pgf at circ@dir{north east}\else\def\pgf at circ@dir{south west}
-			\fi
-		\fi\fi
-		\ifnum\pgfcircmathresult <5
-			\ifpgf at circuit@bipole at current@below
-				 \def\pgf at circ@dir{north}\else\def\pgf at circ@dir{south} 
-			\fi
-		\fi
-		\ifnum\pgfcircmathresult >355
-			\ifpgf at circuit@bipole at current@below
-				 \def\pgf at circ@dir{north}\else\def\pgf at circ@dir{south} 
-			\fi
-		\fi
-		
-		\ifpgf at circuit@bipole at current@below
-			\def\pgf at circ@bipole at current@label at where{-90}
-		\else
-			\def\pgf at circ@bipole at current@label at where{+90}
-		\fi
-	}
-
-	
-		\pgfextra{	\def\pgf at temp{short} \edef\pgf at circ@temp{\ctikzvalof{bipole/kind}} }
-		
-		\ifx\pgf at circ@temp\pgf at temp % caso di corrente (centrata) su un corto
-			\ifpgf at circuit@bipole at current@backward
-				{ (\tikztotarget) -- 
-					node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
-				  (\tikztostart)  }
-			\else
-				{ (\tikztostart) -- 
-					node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
-				  (\tikztotarget)  }
-			\fi
-			
-		\else % altri bipoli - e quindi tra nodo e target
-
-			\ifpgf at circuit@bipole at iscurrent
-				\ifpgf at circuit@europeancurrent
-					\pgf at circ@drawnormalcurrent
-				\else 
-				\fi
-			\else
-				\pgf at circ@drawnormalcurrent
-			\fi
-		\fi
-
-	\ifpgf at circuit@bipole at iscurrent
-		 node [anchor=\pgf at circ@dir] at (\ctikzvalof{bipole/name}.\pgf at circ@bipole at current@label at where) 
-		 	{ \pgf at circ@finallabel{current/} }
-	\else
-		(Iarrow.\pgf at circ@bipole at current@label at where) node [anchor=\pgf at circ@dir] 	
-			{ \pgf at circ@finallabel{current/} } 
-	\fi
-
-}
-
-
-
-
-%%%---------- close: pgfcirccurrent
-%%%%%%%%%%% Springe nach pgfcircinputarrows
-%%%---------- open: pgfcircinputarrows.tex
-% Copyright 2013 by Stefan Erhardt
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Show input arrows for selected parts
-
-
-\ctikzset{>/.style = {
-		\circuitikzbasekey/inputarrow = true
-	}
-}
-
-
-
-
-
-%%%---------- close: pgfcircinputarrows
-
-
-
-
-%%%---------- close: circuitikz.code
-
-\ExecuteOptions{europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
-
-\ProcessOptions\relax
-
-\ifpgf at circ@siunitx
-    \RequirePackage{xstring}[2009/03/13]
-	%\expandafter\let\csname angstrom\endcsname\relax
-	\RequirePackage{siunitx}
-\fi
-
-%%%%%%%%%%% Springe nach circuitikz1.code
-%%%---------- open: circuitikz1.code.tex
-%%%%%%%%%%%%
-%% Dimensions
-
-% coordinate bipoli
-\newdimen\pgf at circ@res at up \newdimen\pgf at circ@res at down \newdimen\pgf at circ@res at zero
-\newdimen\pgf at circ@res at left \newdimen\pgf at circ@res at right
-\newdimen\pgf at circ@res at other
-\newdimen\pgf at circ@res at step
-
-% thickness iniziale
-\newdimen \pgfstartlinewidth
-
-\pgf at circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-
-
-
-% Names
-\ctikzset{name/.style = { n=#1 } }
-\ctikzset{n/.code = { 
-	\pgfkeys{/tikz/circuitikz/bipole/name=#1}
-}}
-
-% Reflect the node along
-\ctikzset{mirrored/.is choice}
-\ctikzset{mirror value/.initial=1}
-\ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} }
-\ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
-\ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
-
-% Initialize paths
-\def\pgfcircresetpath{
-	\ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90, 
-		bipole/reversed=false, bipole/kind=,
-	  	bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
-	  	bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,
-		bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
-		bipole/current/y position=above, bipole/current/direction=forward, 
-		mirrored=false
-   }
-}
-
-
-%% Generic bipole path
-\def\pgf at circ@bipole at path#1#2{
-	\pgfextra{
-		\ctikzset{bipole/kind = #1}
-		
-		\edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
-		\def\pgf at circ@temp{}
-		\ifx\pgf at temp\pgf at circ@temp % if it has not a name
-			\pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
-			\ctikzset{bipole/name = #2\pgf at circ@rand} % create it
-		\fi
-
-		\def\pgf at temp{open}
-		\def\pgf at circ@temp{#1}
-	}
-	\ifpgf at circuit@bipole at reversed
-		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
-		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {} 	
-	\else
-		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
-		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {} 
-	\fi
-	\pgfextra{
-		\pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
-					   {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
-		\edef\pgf at circ@direction{\pgfmathresult}		
-	}
-	($(\tikztostart) ! .5 ! (\tikztotarget)$) 
-		node[#1shape, rotate=\pgf at circ@direction, yscale=\ctikzvalof{mirror value}] 
-			(\ctikzvalof{bipole/name}) {}
-	\ifx\pgf at temp\pgf at circ@temp  % if it is an open
-	\else
-		(\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.left) 
-		(\ctikzvalof{bipole/name}.right)  -- (\ctikzvalof{bipole/name}end.center) 
-	\fi
-	\pgf at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabel\fi
-	\drawpoles
-	\pgf at circ@ifkeyempty{bipole/voltage/label/name}\else\pgf at circ@drawvoltage\fi
-	\pgf at circ@ifkeyempty{bipole/current/label/name}\else\pgf at circ@drawcurrent\fi
-	% reset
-	\pgfextra{
-		\pgfcircresetpath
-	}  
-	(\tikztotarget) 	\tikztonodes  % e si continua
-}
-
-
-%% Path definitions
-
-\def\pgf at circ@resistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{generic}{#1}\else\pgf at circ@bipole at path{resistor}{#1}\fi}
-\def\pgf at circ@vresistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{tgeneric}{#1}\else\pgf at circ@bipole at path{vresistor}{#1}\fi}
-\def\pgf at circ@potentiometer at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{genericpotentiometer}{#1}\else\pgf at circ@bipole at path{potentiometer}{#1}\fi}
-\def\pgf at circ@thermistor at path#1{\pgf at circ@bipole at path{thermistor}{#1}}
-\def\pgf at circ@thermistorptc at path#1{\pgf at circ@bipole at path{thermistorptc}{#1}}
-\def\pgf at circ@thermistorntc at path#1{\pgf at circ@bipole at path{thermistorntc}{#1}}
-\def\pgf at circ@varistor at path#1{\pgf at circ@bipole at path{varistor}{#1}}
-\def\pgf at circ@capacitor at path#1{\pgf at circ@bipole at path{capacitor}{#1}}
-\def\pgf at circ@polarcapacitor at path#1{\pgf at circ@bipole at path{polarcapacitor}{#1}}
-\def\pgf at circ@vcapacitor at path#1{\pgf at circ@bipole at path{vcapacitor}{#1}}
-\def\pgf at circ@battery at path#1{\pgf at circ@bipole at path{battery}{#1}}
-\def\pgf at circ@battery1 at path#1{\pgf at circ@bipole at path{battery1}{#1}}
-\def\pgf at circ@europeaninductor at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
-\def\pgf at circ@americaninductor at path#1{\pgf at circ@bipole at path{americaninductor}{#1}}
-\def\pgf at circ@cuteinductor at path#1{\pgf at circ@bipole at path{cuteinductor}{#1}}
-\def\pgf at circ@inductor at path#1{%
-	\pgfextra{
-		\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
-		\def\pgf at temp{european}%
-	}
-	\ifx\pgf at temp\pgf at circ@temp%
-		\pgf at circ@europeaninductor at path{#1}%
-	\else%
-		\pgfextra{	\def\pgf at temp{cute} }%
-		\ifx\pgf at temp\pgf at circ@temp%
-			\pgf at circ@cuteinductor at path{#1}%
-		\else%
-			\pgf at circ@americaninductor at path{#1}%
-		\fi%
-	\fi%
-}
-\def\pgf at circ@vinductor at path#1{
-	\pgfextra{
-		\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
-		\def\pgf at temp{european}%
-	}
-	\ifx\pgf at temp\pgf at circ@temp%
-		\pgf at circ@veuropeaninductor at path{#1}%
-	\else%
-		\pgfextra{	\def\pgf at temp{cute} }%
-		\ifx\pgf at temp\pgf at circ@temp%
-			\pgf at circ@vcuteinductor at path{#1}%
-		\else%
-			\pgf at circ@vamericaninductor at path{#1}%
-		\fi%
-	\fi%
-}
-\def\pgf at circ@veuropeaninductor at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
-\def\pgf at circ@vamericaninductor at path#1{\pgf at circ@bipole at path{vamericaninductor}{#1}}
-\def\pgf at circ@vcuteinductor at path#1{\pgf at circ@bipole at path{vcuteinductor}{#1}}
-\def\pgf at circ@lamp at path#1{\pgf at circ@bipole at path{lamp}{#1}}
-\def\pgf at circ@vsource at path#1{\pgf at circ@bipole at path{vsource}{#1}}
-\def\pgf at circ@vsourceam at path#1{\pgf at circ@bipole at path{vsourceAM}{#1}}
-\def\pgf at circ@vsourcesin at path#1{\pgf at circ@bipole at path{vsourcesin}{#1}}
-\def\pgf at circ@isource at path#1{\pgf at circ@bipole at path{isource}{#1}}
-\def\pgf at circ@isourcesin at path#1{\pgf at circ@bipole at path{isourcesin}{#1}}
-\def\pgf at circ@vsourcesquare at path#1{\pgf at circ@bipole at path{vsourcesquare}{#1}}
-\def\pgf at circ@isourceam at path#1{\pgf at circ@bipole at path{isourceAM}{#1}}
-\def\pgf at circ@cvsource at path#1{\pgf at circ@bipole at path{cvsource}{#1}}
-\def\pgf at circ@cvsourceam at path#1{\pgf at circ@bipole at path{cvsourceAM}{#1}}
-\def\pgf at circ@cvsourcesin at path#1{\pgf at circ@bipole at path{cvsourcesin}{#1}}
-\def\pgf at circ@cisource at path#1{\pgf at circ@bipole at path{cisource}{#1}}
-\def\pgf at circ@cisourceam at path#1{\pgf at circ@bipole at path{cisourceAM}{#1}}
-\def\pgf at circ@cisourcesin at path#1{\pgf at circ@bipole at path{cisourcesin}{#1}}
-\def\pgf at circ@fulldiode at path#1{\pgf at circ@bipole at path{fulldiode}{#1}}
-\def\pgf at circ@fullzdiode at path#1{\pgf at circ@bipole at path{fullzdiode}{#1}}
-\def\pgf at circ@fullsdiode at path#1{\pgf at circ@bipole at path{fullsdiode}{#1}}
-\def\pgf at circ@fulltdiode at path#1{\pgf at circ@bipole at path{fulltdiode}{#1}}
-\def\pgf at circ@fulllediode at path#1{\pgf at circ@bipole at path{fulllediode}{#1}}
-\def\pgf at circ@fullpdiode at path#1{\pgf at circ@bipole at path{fullpdiode}{#1}}
-\def\pgf at circ@fullvarcap at path#1{\pgf at circ@bipole at path{fullvarcap}{#1}}
-\def\pgf at circ@emptydiode at path#1{\pgf at circ@bipole at path{emptydiode}{#1}}
-\def\pgf at circ@emptyzdiode at path#1{\pgf at circ@bipole at path{emptyzdiode}{#1}}
-\def\pgf at circ@emptysdiode at path#1{\pgf at circ@bipole at path{emptysdiode}{#1}}
-\def\pgf at circ@emptytdiode at path#1{\pgf at circ@bipole at path{emptytdiode}{#1}}
-\def\pgf at circ@emptylediode at path#1{\pgf at circ@bipole at path{emptylediode}{#1}}
-\def\pgf at circ@emptypdiode at path#1{\pgf at circ@bipole at path{emptypdiode}{#1}}
-\def\pgf at circ@emptyvarcap at path#1{\pgf at circ@bipole at path{emptyvarcap}{#1}}
-\def\pgf at circ@short at path#1{\pgf at circ@bipole at path{short}{#1}}
-\def\pgf at circ@cspst at path#1{\pgf at circ@bipole at path{cspst}{#1}}
-\def\pgf at circ@ospst at path#1{\pgf at circ@bipole at path{ospst}{#1}}
-\def\pgf at circ@pushbutton at path#1{\pgf at circ@bipole at path{pushbutton}{#1}}
-\def\pgf at circ@open at path#1{\pgf at circ@bipole at path{open}{#1}}
-\def\pgf at circ@generic at path#1{\pgf at circ@bipole at path{generic}{#1}}
-\def\pgf at circ@ageneric at path#1{\pgf at circ@bipole at path{ageneric}{#1}}
-\def\pgf at circ@tgeneric at path#1{\pgf at circ@bipole at path{tgeneric}{#1}}
-\def\pgf at circ@fullgeneric at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
-\def\pgf at circ@tfullgeneric at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
-\def\pgf at circ@ammeter at path#1{\pgf at circ@bipole at path{ammeter}{#1}}
-\def\pgf at circ@voltmeter at path#1{\pgf at circ@bipole at path{voltmeter}{#1}}
-\def\pgf at circ@empty at path#1{}
-\def\pgf at circ@photoresistor at path#1{\pgf at circ@bipole at path{photoresistor}{#1}}
-\def\pgf at circ@thyristor at path#1{\pgf at circ@bipole at path{thyristor}{#1}}
-\def\pgf at circ@toggleswitch at path#1{\pgf at circ@bipole at path{toggleswitch}{#1}}
-\def\pgf at circ@memristor at path#1{\pgf at circ@bipole at path{memristor}{#1}}
-\def\pgf at circ@triac at path#1{\pgf at circ@bipole at path{triac}{#1}}
-\def\pgf at circ@tline at path#1{\pgf at circ@bipole at path{tline}{#1}}
-\def\pgf at circ@squid at path#1{\pgf at circ@bipole at path{squid}{#1}}
-\def\pgf at circ@barrier at path#1{\pgf at circ@bipole at path{barrier}{#1}}
-\def\pgf at circ@thermocouple at path#1{\pgf at circ@bipole at path{thermocouple}{#1}}
-\def\pgf at circ@fuse at path#1{\pgf at circ@bipole at path{fuse}{#1}}
-\def\pgf at circ@afuse at path#1{\pgf at circ@bipole at path{afuse}{#1}}
-
-\def\pgf at circ@twoport at path#1{\pgf at circ@bipole at path{twoport}{#1}}
-\def\pgf at circ@vco at path#1{\pgf at circ@bipole at path{vco}{#1}}
-\def\pgf at circ@bandpass at path#1{\pgf at circ@bipole at path{bandpass}{#1}}
-\def\pgf at circ@highpass at path#1{\pgf at circ@bipole at path{highpass}{#1}}
-\def\pgf at circ@lowpass at path#1{\pgf at circ@bipole at path{lowpass}{#1}}
-\def\pgf at circ@adc at path#1{\pgf at circ@bipole at path{adc}{#1}}
-\def\pgf at circ@dac at path#1{\pgf at circ@bipole at path{dac}{#1}}
-\def\pgf at circ@dsp at path#1{\pgf at circ@bipole at path{dsp}{#1}}
-\def\pgf at circ@fft at path#1{\pgf at circ@bipole at path{fft}{#1}}
-\def\pgf at circ@amp at path#1{\pgf at circ@bipole at path{amp}{#1}}
-\def\pgf at circ@vamp at path#1{\pgf at circ@bipole at path{vamp}{#1}}
-\def\pgf at circ@piattenuator at path#1{\pgf at circ@bipole at path{piattenuator}{#1}}
-\def\pgf at circ@vpiattenuator at path#1{\pgf at circ@bipole at path{vpiattenuator}{#1}}
-\def\pgf at circ@tattenuator at path#1{\pgf at circ@bipole at path{tattenuator}{#1}}
-\def\pgf at circ@vtattenuator at path#1{\pgf at circ@bipole at path{vtattenuator}{#1}}
-\def\pgf at circ@phaseshifter at path#1{\pgf at circ@bipole at path{phaseshifter}{#1}}
-\def\pgf at circ@vphaseshifter at path#1{\pgf at circ@bipole at path{vphaseshifter}{#1}}
-\def\pgf at circ@detector at path#1{\pgf at circ@bipole at path{detector}{#1}}
-
-
-%% Styles
-
-%% Aggiungere per thyristor e tripoli semplici
-
-%\def\ctikzsetbipole#1#2{%
-%	\tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
-%}
-%\ctikzsetbipole{resistor}{\pgf at circ@resistor at path}
-
-\tikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@resistor at path, l=#1}}
-\tikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{resistor}{#1}, l=#1}}
-\tikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{generic}{#1}, l=#1}}
-\tikzset{ammeter/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@ammeter at path, l=#1}}
-\tikzset{voltmeter/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@voltmeter at path, l=#1}}
-\tikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@potentiometer at path, l=#1}}
-\tikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@varistor at path, l=#1}}
-\tikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@photoresistor at path, l=#1}}
-\tikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistor at path, l=#1}}
-\tikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorptc at path, l=#1}}
-\tikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorntc at path, l=#1}}
-\tikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{potentiometer}{#1}, l=#1}}
-\tikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{genericpotentiometer}{#1}, l=#1}}
-\tikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vresistor at path, l=#1}}
-\tikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{vresistor}{#1}, l=#1}}
-\tikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{tgeneric}{#1}, l=#1}}
-\tikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@capacitor at path, l=#1}}
-\tikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@polarcapacitor at path, l=#1}}
-\tikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcapacitor at path, l=#1}}
-\tikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery1 at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@inductor at path, l=#1}}
-\tikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americaninductor at path, l=#1}}
-\tikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cuteinductor at path, l=#1}}
-\tikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@europeaninductor at path, l=#1}}
-\tikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vinductor at path, l=#1}}
-\tikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@veuropeaninductor at path, l=#1}}
-\tikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamericaninductor at path, l=#1}}
-\tikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcuteinductor at path, l=#1}}
-\tikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tline at path, l=#1}}
-\tikzset{transmission line/.style = {tline = #1}}
-\tikzset{TL/.style = {tline = #1}}
-\tikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\tikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\tikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\tikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\tikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
-\tikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesquare at path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
-\tikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\tikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-
-\tikzset{voltage source/.style = {\ifpgf at circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{current source/.style = {\ifpgf at circuit@europeancurrent european \else american \fi current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\tikzset{controlled voltage source/.style = {\ifpgf at circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\tikzset{controlled current source/.style = {\ifpgf at circuit@europeancurrent european \else american \fi controlled current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
-
-
-\tikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@generic at path, l=#1}}
-\tikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ageneric at path, l=#1}}
-\tikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tgeneric at path, l=#1}}
-\tikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullgeneric at path, l=#1}}
-\tikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tfullgeneric at path, l=#1}}
-\tikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@short at path}}
-\tikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@open at path}}
-
-\tikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lamp at path}}
-
-\tikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@squid at path}}
-\tikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@barrier at path}}
-\tikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermocouple at path}}
-\tikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fuse at path}}
-\tikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@afuse at path}}
-
-\tikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@twoport at path}}
-\tikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vco at path}}
-\tikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bandpass at path}}
-\tikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@highpass at path}}
-\tikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lowpass at path}}
-\tikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@adc at path}}
-\tikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dac at path}}
-\tikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dsp at path}}
-\tikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fft at path}}
-\tikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@amp at path}}
-\tikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamp at path}}
-\tikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piattenuator at path}}
-\tikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vpiattenuator at path}}
-\tikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tattenuator at path}}
-\tikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vtattenuator at path}}
-\tikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@phaseshifter at path}}
-\tikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vphaseshifter at path}}
-\tikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@detector at path}}
-
-
-
-\tikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulldiode at path}}
-\tikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullsdiode at path}}
-\tikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullzdiode at path}}
-\tikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulltdiode at path}}
-\tikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullpdiode at path}}
-\tikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulllediode at path}}
-\tikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullvarcap at path}}
-
-\tikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptydiode at path}}
-\tikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptysdiode at path}}
-\tikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyzdiode at path}}
-\tikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptytdiode at path}}
-\tikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptypdiode at path}}
-\tikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptylediode at path}}
-\tikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyvarcap at path}}
-
-	\tikzset{Schottky diode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi Schottky diode}}
-	\tikzset{Zener diode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi Zener diode}}
-	\tikzset{tunnel diode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi tunnel diode}}
-	\tikzset{photodiode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi photodiode}}
-	\tikzset{led/.style = {\ifpgf at circuit@fulldiode full \else empty \fi led}}
-	\tikzset{varcap/.style = {\ifpgf at circuit@fulldiode full \else empty \fi varcap}}
-	\tikzset{diode/.style = {\ifpgf at circuit@fulldiode full \else empty \fi diode}}
-	
-\tikzset{thyristor/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@thyristor at path}}
-\tikzset{memristor/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@memristor at path}}
-\tikzset{triac/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@triac at path}}
-
-\tikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cspst at path, l=#1}}
-\tikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ospst at path, l=#1}}
-\tikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pushbutton at path, l=#1}}
-\tikzset{toggle switch/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@toggleswitch at path}}
-
-\tikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ammeter at path}}
-\tikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@voltmeter at path}}
-
-% short forms
-\tikzset{vsource/.style = {voltage source = #1}}
-\tikzset{isource/.style = {current source = #1}}
-\tikzset{cisource/.style = {controlled current source = #1}}
-\tikzset{cvsource/.style = {controlled voltage source = #1}}
-\tikzset{vsourcesin/.style = {sinusoidal voltage source = #1}}
-\tikzset{vsourcesquare/.style = {square voltage source = #1}}
-\tikzset{isourcesin/.style = {sinusoidal current source = #1}}
-\tikzset{cisourcesin/.style = {controlled sinusoidal current source = #1}}
-\tikzset{cvsourcesin/.style = {controlled sinusoidal  voltage source = #1}}
-
-\tikzset{controlled vsource/.style = {controlled voltage source = #1}}
-\tikzset{controlled isource/.style = {controlled current source = #1}}
-\tikzset{controlled vsourcesin/.style = {controlled sinusoidal  voltage source = #1}}
-\tikzset{controlled isourcesin/.style = {controlled sinusoidal current source = #1}}
-
-\tikzset{R/.style= {resistor = #1}}
-\tikzset{vR/.style= {variable resistor = #1}}
-\tikzset{phR/.style= {photoresistor = #1}}
-\tikzset{thR/.style= {thermistor = #1}}
-\tikzset{thRp/.style= {thermistor ptc= #1}}
-\tikzset{thRn/.style= {thermistor ntc= #1}}
-\tikzset{pR/.style= {potentiometer = #1}}
-\tikzset{C/.style = {capacitor = #1}}
-\tikzset{pC/.style = {polar capacitor = #1}}
-\tikzset{vC/.style = {variable capacitor = #1}}
-\tikzset{L/.style = {inductor = #1}}
-\tikzset{vL/.style = {variable inductor = #1}}
-\tikzset{V/.style = {voltage source = #1}}
-\tikzset{cV/.style = {controlled voltage source = #1}}
-\tikzset{sV/.style = {sinusoidal voltage source = #1}}
-\tikzset{sqV/.style = {square voltage source = #1}}
-\tikzset{csV/.style = {controlled sinusoidal voltage source = #1}}
-\def\pgf at temp#1{ 
-	\tikzset{V#1/.style = {voltage source, v#1=##1} } 
-	\tikzset{cV#1/.style = {controlled  voltage source, v#1=##1} } 
-	\tikzset{sV#1/.style = {sinusoidal  voltage source, v#1=##1} } 
-	\tikzset{csV#1/.style = {controlled sinusoidal voltage source, v#1=##1} } 
-}
-\pgf at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<} 
-\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_} 
-\tikzset{I/.style = {current source = #1}}
-\tikzset{cI/.style = {controlled current source = #1}}
-\tikzset{sI/.style = {sinusoidal current source = #1}}
-\tikzset{csI/.style = {controlled sinusoidal current source = #1}}
-\def\pgf at temp#1{ 
-	\tikzset{I#1/.style = {current source, i#1=##1} } 
-	\tikzset{cI#1/.style = {controlled current source, i#1=##1} } 
-	\tikzset{sI#1/.style = {sinusoidal current source, i#1=##1} } 
-	\tikzset{csI#1/.style = {controlled sinusoidal current source, i#1=##1} } 
-}
-\pgf at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<} 
-\pgf at temp{>_} \pgf at temp{<_} \pgf at temp{>^} \pgf at temp{<^} 
-\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_} 
-\tikzset{Do/.style = {empty diode}}
-\tikzset{tDo/.style = {empty tunnel diode}}
-\tikzset{zDo/.style = {empty Zener diode}}
-\tikzset{sDo/.style = {empty Schottky diode}}
-\tikzset{pDo/.style = {empty photodiode}}
-\tikzset{leDo/.style = {empty led}}
-\tikzset{VCo/.style = {empty varcap}}
-\tikzset{D*/.style = {full diode}}
-\tikzset{tD*/.style = {full tunnel diode}}
-\tikzset{zD*/.style = {full Zener diode}}
-\tikzset{sD*/.style = {full Schottky diode}}
-\tikzset{pD*/.style = {full photodiode}}
-\tikzset{leD*/.style = {full led}}
-\tikzset{VC*/.style = {full varcap}}
-\tikzset{D/.style = {diode}}
-\tikzset{tD/.style = {tunnel diode}}
-\tikzset{zD/.style = {Zener diode}}
-\tikzset{sD/.style = {Schottky diode}}
-\tikzset{pD/.style = {photodiode}}
-\tikzset{leD/.style = {led}}
-\tikzset{VC/.style = {varcap}}
-
-\tikzset{Tr/.style = {triac}}
-\tikzset{Mr/.style = {memristor}}
-\tikzset{Ty/.style = {thyristor}}
-
-\tikzset{cspst/.style = {closing switch = #1}}
-\tikzset{ospst/.style = {opening switch = #1}}
-
-\tikzset{afuse/.style = {asymmetric fuse=#1}}
-
-
-\def\inheritlogicport#1#2{
-	\pgfdeclareshape{#2 port}{
-		\inheritsavedanchors[from=#1 #2 port]
-		\inheritbackgroundpath[from=#1 #2 port]
-		\inheritanchor[from=#1 #2 port]{in}
-		\inheritanchor[from=#1 #2 port]{in 1}
-		\inheritanchor[from=#1 #2 port]{in 2}
-		\inheritanchor[from=#1 #2 port]{out}
-		\inheritanchor[from=#1 #2 port]{center}
-		\inheritanchor[from=#1 #2 port]{left}
-	}
-}
-
-\ifpgf at circuit@europeanlogicport
-	\inheritlogicport{european}{and}
-	\inheritlogicport{european}{or}
-	\inheritlogicport{european}{xor}
-	\inheritlogicport{european}{not}
-	\inheritlogicport{european}{nand}
-	\inheritlogicport{european}{nor}
-	\inheritlogicport{european}{xnor}
-\else
-	\inheritlogicport{american}{and}
-	\inheritlogicport{american}{or}
-	\inheritlogicport{american}{xor}
-	\inheritlogicport{american}{not}
-	\inheritlogicport{american}{nand}
-	\inheritlogicport{american}{nor}
-	\inheritlogicport{american}{xnor}
-\fi
-
-% Transistor like bipoles
-
-\def\pgf at circ@trans at path#1#2{
-	\pgfextra{
-		\edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
-		\def\pgf at circ@temp{#2}
-		\ifx\pgf at temp\pgf at circ@temp % if it has not a name
-			\pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
-			\ctikzset{bipole/name = trans\pgf at circ@rand} % create it
-		\fi
-	}
-	\ifpgf at circuit@bipole at reversed
-		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
-		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {} 	
-	\else
-		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
-		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {} 
-	\fi
-	\pgfextra{
-		\pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
-					   {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
-		\pgfmathadd{\pgfmathresult}{-90}
-		\edef\pgf at circ@direction{\pgfmathresult}
-	}
-	($(\tikztostart) ! .5 ! (\tikztotarget)$) 
-		node[#1, /tikz/rotate=\pgf at circ@direction, xscale=\ctikzvalof{mirror value}] 
-			(\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
-	(\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.left) 
-	(\ctikzvalof{bipole/name}.right)  -- (\ctikzvalof{bipole/name}end.center) 
-	\pgfextra{
-		\pgfcircresetpath
-	}  
-	(\tikztotarget) 	\tikztonodes  % e si continua
-}
-
-
-\def\pgf at circ@definetranspath#1{
-	\tikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@trans at path{#1}{}, l=##1}}
-}
-
-\pgf at circ@definetranspath{nmos}
-\pgf at circ@definetranspath{pmos}
-\pgf at circ@definetranspath{npn}
-\pgf at circ@definetranspath{pnp}
-\pgf at circ@definetranspath{nfet}
-\pgf at circ@definetranspath{nigfete}
-\pgf at circ@definetranspath{nigfetd}
-\pgf at circ@definetranspath{pfet}
-\pgf at circ@definetranspath{pigfete}
-\pgf at circ@definetranspath{pigfetd}
-\pgf at circ@definetranspath{njfet}
-\pgf at circ@definetranspath{pjfet}
-\pgf at circ@definetranspath{pigbt}
-\pgf at circ@definetranspath{nigbt}
-%%%---------- close: circuitikz1.code
-
-\newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
-
-
-\endinput
-

Added: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6-body.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6-body.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6-body.tex	2021-07-06 20:31:34 UTC (rev 59856)
@@ -0,0 +1,10290 @@
+% Copyright 2018-2021 by Romano Giannetti
+% Copyright 2015-2021 by Stefan Lindner
+% Copyright 2013-2021 by Stefan Erhardt
+% Copyright 2007-2021 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
+
+
+%%%%%
+%%%%%
+%%%%%
+%%%%% Se c'è l'opzione symbol, fallback to siunitx with warning
+%%%%%
+%%%%%
+
+\NeedsTeXFormat{LaTeX2e}
+
+\def\pgfcircversion{0.6}
+\def\pgfcircversiondate{2016/06/06}
+
+%% Version 2.0 of pgf/TikZ is required
+\RequirePackage{tikz}
+\usetikzlibrary{calc}
+\usepgflibrary{arrows}
+
+
+% The options are listed in the manual in this order
+
+\DeclareOption{europeanvoltage}{
+	\ctikzset{voltage=european}
+}
+
+\DeclareOption{americanvoltage}{
+	\ctikzset{voltage=american}
+}
+
+\DeclareOption{europeancurrent}{
+	\ctikzset{current = european}
+}
+
+\DeclareOption{americancurrent}{
+	\ctikzset{current = american}
+}
+
+\DeclareOption{europeanvoltage}{
+	\ctikzset{voltage = european}
+}
+
+\DeclareOption{americanresistor}{
+	\ctikzset{resistor = american}
+}
+
+\DeclareOption{europeanresistor}{
+	\ctikzset{resistor = european}
+}
+
+\DeclareOption{americaninductor}{
+	\ctikzset{inductor = american}
+}
+
+\DeclareOption{europeaninductor}{
+	\ctikzset{inductor = european}
+}
+
+\DeclareOption{cuteinductor}{
+	\ctikzset{inductor = cute}
+}
+
+\DeclareOption{americanport}{
+	\ctikzset{logic ports = american}
+}
+
+\DeclareOption{europeanport}{
+	\ctikzset{logic ports = european}
+}
+
+\DeclareOption{europeanport}{
+	\ctikzset{logic ports = european}
+}
+
+\DeclareOption{european}{
+	\ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
+	 \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester = european} 
+}
+
+\DeclareOption{american}{
+	\ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester = american}
+	\ctikzset{logic ports = american}
+}
+
+\DeclareOption{fulldiodes}{
+	\ctikzset{diode = full}
+}
+
+\DeclareOption{emptydiodes}{
+	\ctikzset{diode = empty}
+}
+
+\DeclareOption{europeanvoltages}{
+	\ctikzset{voltage=european}
+}
+
+\DeclareOption{americanvoltages}{
+	\ctikzset{voltage=american}
+}
+
+\DeclareOption{europeancurrents}{
+	\ctikzset{current = european}
+}
+
+\DeclareOption{americancurrents}{
+	\ctikzset{current = american}
+}
+
+\DeclareOption{europeanvoltages}{
+	\ctikzset{voltage = european}
+}
+
+\DeclareOption{americanresistors}{
+	\ctikzset{resistor = american}
+}
+
+\DeclareOption{europeanresistors}{
+	\ctikzset{resistor = european}
+}
+
+\DeclareOption{americaninductors}{
+	\ctikzset{inductor = american}
+}
+
+\DeclareOption{europeaninductors}{
+	\ctikzset{inductor = european}
+}
+
+\DeclareOption{cuteinductors}{
+	\ctikzset{inductor = cute}
+}
+
+\DeclareOption{americanports}{
+	\ctikzset{logic ports = american}
+}
+
+\DeclareOption{europeanports}{
+	\ctikzset{logic ports = european}
+}
+
+\DeclareOption{americangfsurgearrester}{
+	\ctikzset{gas filled surge arrester = american}
+}
+
+\DeclareOption{europeangfsurgearrester}{
+	\ctikzset{gas filled surge arrester = european}
+}
+
+\DeclareOption{siunitx}{
+	\pgf at circ@siunitxtrue
+}
+
+\DeclareOption{nosiunitx}{
+	\pgf at circ@siunitxfalse
+}
+
+\DeclareOption{fulldiode}{
+	\ctikzset{diode = full}
+}
+
+\DeclareOption{emptydiode}{
+	\ctikzset{diode = empty}
+}
+
+\DeclareOption{strokediode}{
+	\ctikzset{diode = stroke}
+}
+
+\DeclareOption{arrowmos}{
+	\pgf at circuit@mos at arrowstrue
+}
+
+\DeclareOption{noarrowmos}{
+	\pgf at circuit@mos at arrowsfalse
+}
+
+\DeclareOption{fetbodydiode}{
+	\pgf at circuit@fet at bodydiodetrue
+}
+
+\DeclareOption{nofetbodydiode}{
+	\pgf at circuit@fet at bodydiodefalse
+}
+
+\DeclareOption{fetsolderdot}{
+	\pgf at circuit@fet at solderdottrue
+}
+
+\DeclareOption{nofetsolderdot}{
+	\pgf at circuit@fet at solderdotfalse
+}
+
+\DeclareOption{emptypmoscircle}{
+	\pgf at circuit@pmos at emptycircletrue
+}
+
+
+\DeclareOption{lazymos}{
+	\ctikzset{tripoles/nmos/width=.5}
+	\ctikzset{tripoles/nmos/gate height=.35}
+	\ctikzset{tripoles/nmos/base height=.35}
+	\ctikzset{tripoles/nmos/height/.initial=1.2}
+	\ctikzset{tripoles/nmos/base width=.5}
+	\ctikzset{tripoles/nmos/gate width=.65}
+	
+	\ctikzset{tripoles/pmos/width=.5}
+	\ctikzset{tripoles/pmos/gate height=.35}
+	\ctikzset{tripoles/pmos/base height=.35}
+	\ctikzset{tripoles/pmos/height/.initial=1.2}
+	\ctikzset{tripoles/pmos/base width=.5}
+	\ctikzset{tripoles/pmos/gate width=.65}
+	
+	\pgf at circuit@pmos at emptycircletrue
+}
+
+\DeclareOption{straightlabels}{
+	\ctikzset{label/align = straight}
+}
+
+\DeclareOption{rotatelabels}{
+	\ctikzset{label/align = rotate}
+}
+
+\DeclareOption{smartlabels}{
+	\ctikzset{label/align = smart}
+}
+
+\DeclareOption{compatibility}{
+	\pgf at circuit@compattrue
+}
+
+\DeclareOption{oldvoltagedirection}{
+	\pgf at circ@oldvoltagedirectiontrue
+}
+\DeclareOption{nooldvoltagedirection}{
+	\pgf at circ@oldvoltagedirectionfalse
+}
+
+\DeclareOption{betterproportions}{
+	\ctikzset{monopoles/ground/width/.initial=.15}
+
+	\ctikzset{bipoles/resistor/height/.initial=.23}
+	\ctikzset{bipoles/resistor/width/.initial=.6}
+	\ctikzset{bipoles/capacitor/height/.initial=.4}
+	\ctikzset{bipoles/capacitor/width/.initial=.1}
+	\ctikzset{bipoles/potentiometer/height/.initial=.6}
+	\ctikzset{bipoles/potentiometer/height 2/.initial=.23}
+	\ctikzset{bipoles/potentiometer/width/.initial=.6}
+	\ctikzset{bipoles/photoresistor/height/.initial=.6}
+	\ctikzset{bipoles/photoresistor/height 2/.initial=.23}
+	\ctikzset{bipoles/photoresistor/width/.initial=.6}
+	\ctikzset{bipoles/thermistor/main/.initial=.7}
+	\ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7
+	\ctikzset{bipoles/thermistor/width/.initial=.6}
+	\ctikzset{bipoles/thermistorntc/width/.initial=.6}
+	\ctikzset{bipoles/thermistorntc/main/.initial=.7}
+	\ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7
+	\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7
+	\ctikzset{bipoles/thermistorptc/width/.initial=.6}
+	\ctikzset{bipoles/thermistorptc/main/.initial=.7}
+	\ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7
+	\ctikzset{bipoles/varistor/main/.initial=.7}
+	\ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7
+	\ctikzset{bipoles/varistor/width/.initial=.6}
+	\ctikzset{bipoles/vresistor/height/.initial=.45}
+	\ctikzset{bipoles/vresistor/width/.initial=.6}
+	\ctikzset{bipoles/generic/height/.initial=.23}
+	\ctikzset{bipoles/generic/width/.initial=.6}
+	\ctikzset{bipoles/generic potentiometer/height/.initial=.6}
+	\ctikzset{bipoles/generic potentiometer/height 2/.initial=.23}
+	\ctikzset{bipoles/generic potentiometer/width/.initial=.6}
+	\ctikzset{bipoles/ageneric/height/.initial=.23}
+	\ctikzset{bipoles/ageneric/width/.initial=.6}
+	\ctikzset{bipoles/memristor/height/.initial=.23}
+	\ctikzset{bipoles/memristor/wave height/.initial=.375}
+	\ctikzset{bipoles/memristor/width/.initial=.60}
+	\ctikzset{bipoles/tgeneric/height/.initial=.525}
+	\ctikzset{bipoles/tgeneric/width/.initial=.6}
+	\ctikzset{bipoles/tfullgeneric/height/.initial=.525}
+	\ctikzset{bipoles/tfullgeneric/width/.initial=.60}
+	\ctikzset{bipoles/fullgeneric/height/.initial=.23}
+	\ctikzset{bipoles/fullgeneric/width/.initial=.6}
+	\ctikzset{bipoles/diode/height/.initial=.3}
+	\ctikzset{bipoles/diode/width/.initial=.25}
+	
+	\ctikzset{tripoles/thyristor/height/.initial=.66}
+	\ctikzset{tripoles/thyristor/height 2/.initial=.3}
+	\ctikzset{tripoles/thyristor/width/.initial=.6}
+	\ctikzset{tripoles/thyristor/diode height/.initial=.3}
+	\ctikzset{tripoles/thyristor/diode width left/.initial=.4}
+	\ctikzset{tripoles/thyristor/diode width right/.initial=.3}
+
+	\ctikzset{tripoles/triac/height/.initial=.66}
+	\ctikzset{tripoles/triac/width/.initial=.6}
+	\ctikzset{tripoles/triac/diode width left/.initial=.3}
+	\ctikzset{tripoles/triac/diode width right/.initial=.3}
+}
+
+%%%%%%%%%
+%%%%%%%%%%% Springe nach tex/pgfcirc.defines
+%%%---------- open: tex/pgfcirc.defines.tex
+
+%% Options
+
+%%%%%%%%%%%%
+%% Dimensions
+
+% coordinates
+\newdimen\pgf at circ@res at up
+\newdimen\pgf at circ@res at down
+\newdimen\pgf at circ@res at zero
+\newdimen\pgf at circ@res at left
+\newdimen\pgf at circ@res at right
+\newdimen\pgf at circ@res at other
+\newdimen\pgf at circ@res at step
+\newdimen\pgf at circ@res at temp
+% inital thickness
+\newdimen \pgfstartlinewidth
+%% Keys
+
+\long\def\pgf at circ@comment#1{}
+
+\def\circuitikzbasekey{/tikz/circuitikz}
+
+\pgfkeys{\circuitikzbasekey/.is family}
+
+\def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
+\let\ctikzset\circuitikzset
+\def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
+\def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
+
+\newif\ifpgf at circ@siunitx
+\newif\ifpgf at circuit@compat
+\newif\ifpgf at circ@oldvoltagedirection
+
+% Option ">" for twoports
+\newif\ifpgf at circuit@inputarrow
+\ctikzset{>/.add code={}{\pgf at circuit@inputarrowtrue}}
+\ctikzset{inputarrow/.is choice}
+\ctikzset{inputarrow/true/.code={\pgf at circuit@inputarrowtrue}}
+\ctikzset{inputarrow/false/.code={\pgf at circuit@inputarrowfalse}}
+
+% Option "boxed" for nodes and twoports
+\newif\ifpgf at circuit@boxed
+\pgfkeys{/tikz/boxed/.add code={}{\pgf at circuit@boxedtrue}}
+\ctikzset{boxed/.add code={}{\pgf at circuit@boxedtrue}}
+\pgfkeys{/tikz/box/.add code={}{\pgf at circuit@boxedtrue}}
+\ctikzset{box/.add code={}{\pgf at circuit@boxedtrue}}
+
+% Option "dashed" for nodes and twoports
+\newif\ifpgf at circuit@dashed
+\pgfkeys{/tikz/dashed/.add code={}{\pgf at circuit@dashedtrue}}
+\ctikzset{dashed/.add code={}{\pgf at circuit@dashedtrue}}
+
+% Option "t=*" for nodes
+\pgfkeys{/tikz/t/.add code={}{\ctikzset{text=#1}}}
+
+
+
+\ctikzset{bipoles/.is family}
+\ctikzset{bipoles/border margin/.initial=1.1}
+\ctikzset{bipoles/thickness/.initial=2} 
+\ctikzset{bipoles/length/.initial=1.4cm} 
+\ctikzset{nodes width/.initial=.04}
+\newdimen\pgf at circ@Rlen 
+\ctikzset{bipoles/length/.code={\pgf at circ@Rlen = #1}} 
+
+\ctikzset{monopoles/.is family}
+\ctikzset{monopoles/ground/width/.initial=.25}
+\ctikzset{monopoles/tground/thickness/.initial=3}
+\ctikzset{monopoles/vcc/width/.initial=.2}
+\ctikzset{monopoles/match/width/.initial=.4}
+\ctikzset{monopoles/chassis/width/.initial=.25}
+\ctikzset{monopoles/alternative chassis/width/.initial=.25}
+\ctikzset{monopoles/equipotentiality/width/.initial=.25}
+\ctikzset{monopoles/tlinestub/width/.initial=.25}          
+\ctikzset{monopoles/antenna/width/.initial=.25}            
+\ctikzset{monopoles/antenna/label/xanchor/.initial=.4}            
+\ctikzset{monopoles/antenna/label/yanchor/.initial=.75}            
+\ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}            
+\ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}            
+\ctikzset{monopoles/txantenna/width/.initial=.25}
+\ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}            
+\ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}            
+\ctikzset{monopoles/rxantenna/width/.initial=.25}
+
+\ctikzset{bipoles/resistor/height/.initial=.3}
+\ctikzset{bipoles/resistor/width/.initial=.8}
+\ctikzset{bipoles/potentiometer/height/.initial=.8}
+\ctikzset{bipoles/potentiometer/height 2/.initial=.3}
+\ctikzset{bipoles/potentiometer/width/.initial=.8}
+\ctikzset{bipoles/photoresistor/height/.initial=.6}
+\ctikzset{bipoles/photoresistor/height 2/.initial=.3}
+\ctikzset{bipoles/photoresistor/width/.initial=.8}
+\ctikzset{bipoles/thermistor/main/.initial=.7}
+\ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
+\ctikzset{bipoles/thermistorntc/width/.initial=.8}
+\ctikzset{bipoles/thermistorntc/main/.initial=.7}
+\ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
+\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
+\ctikzset{bipoles/thermistorptc/width/.initial=.8}
+\ctikzset{bipoles/thermistorptc/main/.initial=.7}
+\ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
+\ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
+\ctikzset{bipoles/thermistor/width/.initial=.8}
+\ctikzset{bipoles/varistor/main/.initial=.7}
+\ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
+\ctikzset{bipoles/varistor/width/.initial=.8}
+\ctikzset{bipoles/vresistor/height/.initial=.6}
+\ctikzset{bipoles/vresistor/width/.initial=.8}
+\ctikzset{bipoles/cuteinductor/height/.initial=.3}
+\ctikzset{bipoles/cuteinductor/lower coil height/.initial=.15}	
+\ctikzset{bipoles/cuteinductor/width/.initial=.6}
+\ctikzset{bipoles/cuteinductor/coils/.initial=5}
+\ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
+\ctikzset{bipoles/americaninductor/height/.initial=.3}
+\ctikzset{bipoles/americaninductor/height 2/.initial=.1}
+\ctikzset{bipoles/americaninductor/width/.initial=.8}
+\ctikzset{bipoles/americaninductor/coils/.initial=4}
+\ctikzset{bipoles/americaninductor/coil height/.initial=.15}
+\ctikzset{bipoles/vcuteinductor/height/.initial=.6}
+\ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.3}	
+\ctikzset{bipoles/vcuteinductor/width/.initial=.6}
+\ctikzset{bipoles/vcuteinductor/coils/.initial=5}
+\ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
+\ctikzset{bipoles/vamericaninductor/height/.initial=.6}
+\ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
+\ctikzset{bipoles/vamericaninductor/width/.initial=.8}
+\ctikzset{bipoles/vamericaninductor/coils/.initial=4}
+\ctikzset{bipoles/vamericaninductor/coil height/.initial=.15}
+\ctikzset{bipoles/esource/height/.initial=.60}
+\ctikzset{bipoles/esource/width/.initial=.60}
+\ctikzset{bipoles/pvsource/height/.initial=.60}
+\ctikzset{bipoles/pvsource/width/.initial=.60}
+\ctikzset{bipoles/isource/height/.initial=.60}
+\ctikzset{bipoles/isource/width/.initial=.60}
+\ctikzset{bipoles/oosource/height/.initial=.60}
+\ctikzset{bipoles/oosource/width/.initial=.60}
+\ctikzset{bipoles/oosource/circlesize/.initial=.65}%circlesize+circleoffset should be =1
+\ctikzset{bipoles/oosource/circleoffset/.initial=.35}%circlesize+circleoffset should be =1
+\ctikzset{bipoles/dcisource/height/.initial=.60}
+\ctikzset{bipoles/dcisource/width/.initial=.60}
+\ctikzset{bipoles/dcvsource/height/.initial=.60}
+\ctikzset{bipoles/dcvsource/width/.initial=.60}
+\ctikzset{bipoles/vsourcetri/height/.initial=.60}
+\ctikzset{bipoles/vsourcetri/width/.initial=.60}
+\ctikzset{bipoles/isourceam/height/.initial=.60}
+\ctikzset{bipoles/isourceam/width/.initial=.60}
+\ctikzset{bipoles/vsource/height/.initial=.60}
+\ctikzset{bipoles/vsource/width/.initial=.60}
+\ctikzset{bipoles/vsourceam/height/.initial=.60}
+\ctikzset{bipoles/vsourceam/width/.initial=.60}
+\ctikzset{bipoles/vsourceam/margin/.initial=.7}
+\ctikzset{bipoles/isourcesin/height/.initial=.60}
+\ctikzset{bipoles/isourcesin/width/.initial=.60}
+\ctikzset{bipoles/vsourcesin/height/.initial=.60}
+\ctikzset{bipoles/vsourcesin/width/.initial=.60}
+\ctikzset{bipoles/vsourcesquare/height/.initial=.60}
+\ctikzset{bipoles/vsourcesquare/width/.initial=.60}
+\ctikzset{bipoles/cisource/height/.initial=.7}
+\ctikzset{bipoles/cisource/width/.initial=.7}
+\ctikzset{bipoles/cisourceam/height/.initial=.7}
+\ctikzset{bipoles/cisourceam/width/.initial=.7}
+\ctikzset{bipoles/cvsource/height/.initial=.7}
+\ctikzset{bipoles/cvsource/width/.initial=.7}
+\ctikzset{bipoles/cvsourceam/height/.initial=.7}
+\ctikzset{bipoles/cvsourceam/width/.initial=.7}
+\ctikzset{bipoles/cvsourceam/margin/.initial=.7}
+\ctikzset{bipoles/cvsourceam/text scale/.initial=1}
+\ctikzset{bipoles/cisourcesin/width/.initial=.7}
+\ctikzset{bipoles/cvsourcesin/height/.initial=.7}
+\ctikzset{bipoles/cvsourcesin/width/.initial=.7}
+\ctikzset{bipoles/capacitor/height/.initial=.6}
+\ctikzset{bipoles/capacitor/width/.initial=.2}
+\ctikzset{bipoles/ecapacitor/height/.initial=.5}
+\ctikzset{bipoles/ecapacitor/width/.initial=.2}
+\ctikzset{bipoles/ecapacitor/font/.initial= \fontsize{6}{0}\selectfont\boldmath}
+\ctikzset{bipoles/pcapacitor/height/.initial=.6}
+\ctikzset{bipoles/pcapacitor/width/.initial=.2}
+\ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
+\ctikzset{bipoles/vcapacitor/height/.initial=.6}
+\ctikzset{bipoles/vcapacitor/width/.initial=.5}
+\ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
+\ctikzset{bipoles/piezoelectric/height/.initial=.7}
+\ctikzset{bipoles/piezoelectric/width/.initial=.5}
+\ctikzset{bipoles/battery/height/.initial=.6}
+\ctikzset{bipoles/battery/width/.initial=.3}
+\ctikzset{bipoles/battery1/height/.initial=.6}
+\ctikzset{bipoles/battery1/width/.initial=.3}
+\ctikzset{bipoles/diode/height/.initial=.50}
+\ctikzset{bipoles/diode/width/.initial=.40}
+\ctikzset{bipoles/varcap/height/.initial=.50}
+\ctikzset{bipoles/varcap/width/.initial=.45}
+\ctikzset{bipoles/interr/height/.initial=.35}
+\ctikzset{bipoles/interr/width/.initial=.35}
+\ctikzset{bipoles/interr/height 2/.initial=.1}
+\ctikzset{bipoles/generic/height/.initial=.30}
+\ctikzset{bipoles/generic/width/.initial=.80}
+\ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
+\ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
+\ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
+\ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
+\ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
+\ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
+\ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
+\ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
+\ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
+\ctikzset{bipoles/fuse/height/.initial=.20}
+\ctikzset{bipoles/fuse/width/.initial=.50}
+\ctikzset{bipoles/afuse/height/.initial=.20}
+\ctikzset{bipoles/afuse/width/.initial=.50}
+\ctikzset{bipoles/generic potentiometer/height/.initial=.80}
+\ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
+\ctikzset{bipoles/generic potentiometer/width/.initial=.80}
+\ctikzset{bipoles/ageneric/height/.initial=.30}
+\ctikzset{bipoles/ageneric/width/.initial=.80}
+\ctikzset{bipoles/memristor/height/.initial=.30}
+\ctikzset{bipoles/memristor/wave height/.initial=.5}
+\ctikzset{bipoles/memristor/width/.initial=.80}
+\ctikzset{bipoles/tgeneric/height/.initial=.70}
+\ctikzset{bipoles/tgeneric/width/.initial=.80}
+\ctikzset{bipoles/tfullgeneric/height/.initial=.70}
+\ctikzset{bipoles/tfullgeneric/width/.initial=.80}
+\ctikzset{bipoles/fullgeneric/height/.initial=.30}
+\ctikzset{bipoles/fullgeneric/width/.initial=.80}
+\ctikzset{bipoles/open/height/.initial=.25}
+\ctikzset{bipoles/open/width/.initial=.8}
+\ctikzset{bipoles/ammeter/height/.initial=.60}
+\ctikzset{bipoles/ammeter/width/.initial=.60}
+\ctikzset{bipoles/ohmmeter/height/.initial=.60}
+\ctikzset{bipoles/ohmmeter/width/.initial=.60}
+\ctikzset{bipoles/voltmeter/height/.initial=.60}
+\ctikzset{bipoles/voltmeter/width/.initial=.60}
+\ctikzset{bipoles/buffer/height/.initial=1}
+\ctikzset{bipoles/buffer/width/.initial=1}
+\ctikzset{bipoles/not port/width/.initial=1}
+\ctikzset{bipoles/not port/height/.initial=.8}
+\ctikzset{bipoles/not port/circle width/.initial=.15}
+\ctikzset{bipoles/lamp/height/.initial=.60}
+\ctikzset{bipoles/lamp/width/.initial=.60}
+\ctikzset{bipoles/tline/height/.initial=.3}
+\ctikzset{bipoles/tline/width/.initial=.8}
+\ctikzset{bipoles/squid/height/.initial=.60}
+\ctikzset{bipoles/squid/width/.initial=.60}
+\ctikzset{bipoles/barrier/height/.initial=.60}
+\ctikzset{bipoles/barrier/width/.initial=.60}
+\ctikzset{bipoles/thermocouple/height/.initial=.250}
+\ctikzset{bipoles/thermocouple/height 2/.initial=.60}
+\ctikzset{bipoles/thermocouple/width/.initial=.140}
+\ctikzset{bipoles/pushbutton/height/.initial=.5}
+\ctikzset{bipoles/pushbutton/height 2/.initial=.0}
+\ctikzset{bipoles/pushbutton/width/.initial=.50}
+
+\ctikzset{bipoles/twoport/width/.initial=.7}
+\ctikzset{bipoles/twoport/height/.initial=.7}
+\ctikzset{bipoles/twoport/text/.initial=}
+\ctikzset{bipoles/vco/width/.initial=.7}
+\ctikzset{bipoles/bandpass/width/.initial=.7}
+\ctikzset{bipoles/highpass/width/.initial=.7}
+\ctikzset{bipoles/lowpass/width/.initial=.7}
+\ctikzset{bipoles/adc/width/.initial=.7}
+\ctikzset{bipoles/dac/width/.initial=.7}
+\ctikzset{bipoles/dsp/width/.initial=.7}
+\ctikzset{bipoles/fft/width/.initial=.7}
+\ctikzset{bipoles/amp/width/.initial=.7}
+\ctikzset{bipoles/vamp/width/.initial=.7}
+\ctikzset{bipoles/piattenuator/width/.initial=.7}
+\ctikzset{bipoles/vpiattenuator/width/.initial=.7}
+\ctikzset{bipoles/tattenuator/width/.initial=.7}
+\ctikzset{bipoles/vtattenuator/width/.initial=.7}
+\ctikzset{bipoles/phaseshifter/width/.initial=.7}
+\ctikzset{bipoles/vphaseshifter/width/.initial=.7}
+\ctikzset{bipoles/detector/width/.initial=.7}
+
+
+\newif\ifpgf at circuit@trans at depletiontype
+\pgf at circuit@trans at depletiontypefalse
+
+\newif\ifpgf at circuit@mos at arrows
+\ctikzset{tripoles/mos style/.is choice}
+\ctikzset{tripoles/mos style/no arrows/.code={\pgf at circuit@mos at arrowsfalse}}
+\ctikzset{tripoles/mos style/arrows/.code={\pgf at circuit@mos at arrowstrue}}
+
+% Option solderdot for fet 
+\newif\ifpgf at circuit@fet at solderdot
+\pgfkeys{/tikz/solderdot/.add code={}{\pgf at circuit@fet at solderdottrue}}
+\ctikzset{solderdot/.add code={}{\pgf at circuit@fet at solderdottrue}}
+\pgfkeys{/tikz/nosolderdot/.add code={}{\pgf at circuit@fet at solderdotfalse}}
+\ctikzset{nosolderdot/.add code={}{\pgf at circuit@fet at solderdotfalse}}
+
+% Option bodydiode for fet 
+\newif\ifpgf at circuit@fet at bodydiode
+\pgfkeys{/tikz/bodydiode/.add code={}{\pgf at circuit@fet at bodydiodetrue}}
+\ctikzset{bodydiode/.add code={}{\pgf at circuit@fet at bodydiodetrue}}
+\pgfkeys{/tikz/nobodydiode/.add code={}{\pgf at circuit@fet at bodydiodefalse}}
+\ctikzset{nobodydiode/.add code={}{\pgf at circuit@fet at bodydiodefalse}}
+
+% Option draw fet without gate connection
+\newif\ifpgf at circuit@bpt at drawgate
+\pgf at circuit@bpt at drawgatetrue
+\pgfkeys{/tikz/nogate/.add code={}{\pgf at circuit@bpt at drawgatefalse}}
+\ctikzset{nogate/.add code={}{\pgf at circuit@bpt at drawgatefalse}}
+\pgfkeys{/tikz/nobase/.add code={}{\pgf at circuit@bpt at drawgatefalse}}
+\ctikzset{nobase/.add code={}{\pgf at circuit@bpt at drawgatefalse}}
+
+% Option draw bpt without base connection
+\newif\ifpgf at circuit@bpt at drawbase
+\pgf at circuit@bpt at drawbasetrue
+\pgfkeys{/tikz/nobase/.add code={}{\pgf at circuit@bpt at drawbasefalse}}
+\ctikzset{nobase/.add code={}{\pgf at circuit@bpt at drawbasefalse}}
+\pgfkeys{/tikz/nogate/.add code={}{\pgf at circuit@bpt at drawbasefalse}}
+\ctikzset{nogate/.add code={}{\pgf at circuit@bpt at drawbasefalse}}
+
+% Option draw bpt with optical input
+\newif\ifpgf at circuit@bpt at drawphoto
+\pgf at circuit@bpt at drawphotofalse
+\pgfkeys{/tikz/photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
+\ctikzset{photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
+\pgfkeys{/tikz/photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
+\ctikzset{photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
+
+% Option draw pmos with empty circle
+\newif\ifpgf at circuit@pmos at emptycircle
+\newif\ifpgf at circuit@pmos at emptycircle
+\pgf at circuit@pmos at emptycirclefalse
+\pgfkeys{/tikz/emptycircle/.add code={}{\pgf at circuit@pmos at emptycircletrue}}
+\ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf at circuit@pmos at emptycircletrue}}
+
+
+\newif\ifpgf at circuit@trans at ntype
+\pgf at circuit@trans at ntypetrue %default true
+%\newif\ifpgf at circuit@trans at ptype
+%\ctikzset{tripoles/nmos/.add code={\pgf at circuit@trans at ntypetrue}}
+\ctikzset{tripoles/nmos/width/.initial=.7}
+\ctikzset{tripoles/nmos/gate height/.initial=.35}
+\ctikzset{tripoles/nmos/base height/.initial=.5}
+\ctikzset{tripoles/nmos/conn height/.initial=0}
+\ctikzset{tripoles/nmos/height/.initial=1.1}
+\ctikzset{tripoles/nmos/base width/.initial=.5}
+\ctikzset{tripoles/nmos/gate width/.initial=.62}
+\ctikzset{tripoles/nmos/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nmos/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nmos/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nmos/curr direction/.initial=1}
+
+\ctikzset{tripoles/pmos/width/.initial=.7}
+\ctikzset{tripoles/pmos/gate height/.initial=.35}
+\ctikzset{tripoles/pmos/base height/.initial=.5}
+\ctikzset{tripoles/pmos/conn height/.initial=0}
+\ctikzset{tripoles/pmos/height/.initial=1.1}
+\ctikzset{tripoles/pmos/base width/.initial=.5}
+\ctikzset{tripoles/pmos/gate width/.initial=.62}
+\ctikzset{tripoles/pmos/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pmos/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pmos/curr direction/.initial=-1}
+
+\ctikzset{tripoles/nfet/width/.initial=.7}
+\ctikzset{tripoles/nfet/gate height/.initial=.35}
+\ctikzset{tripoles/nfet/base height/.initial=.5}
+\ctikzset{tripoles/nfet/conn height/.initial=0}
+\ctikzset{tripoles/nfet/height/.initial=1.1}
+\ctikzset{tripoles/nfet/base width/.initial=.5}
+\ctikzset{tripoles/nfet/gate width/.initial=.62}
+\ctikzset{tripoles/nfet/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nfet/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nfet/curr direction/.initial=1}
+
+\ctikzset{tripoles/pfet/width/.initial=.7}
+\ctikzset{tripoles/pfet/gate height/.initial=.35}
+\ctikzset{tripoles/pfet/base height/.initial=.5}
+\ctikzset{tripoles/pfet/conn height/.initial=0}
+\ctikzset{tripoles/pfet/height/.initial=1.1}
+\ctikzset{tripoles/pfet/base width/.initial=.5}
+\ctikzset{tripoles/pfet/gate width/.initial=.62}
+\ctikzset{tripoles/pfet/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pfet/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pfet/curr direction/.initial=-1}
+
+\ctikzset{tripoles/nigfete/width/.initial=.7}
+\ctikzset{tripoles/nigfete/gate height/.initial=.35}
+\ctikzset{tripoles/nigfete/base height/.initial=.5}
+\ctikzset{tripoles/nigfete/conn height/.initial=.35}
+\ctikzset{tripoles/nigfete/height/.initial=1.1}
+\ctikzset{tripoles/nigfete/base width/.initial=.5}
+\ctikzset{tripoles/nigfete/gate width/.initial=.62}
+\ctikzset{tripoles/nigfete/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nigfete/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nigfete/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nigfete/curr direction/.initial=1}
+
+\ctikzset{tripoles/nigfetd/width/.initial=.7}
+\ctikzset{tripoles/nigfetd/gate height/.initial=.35}
+\ctikzset{tripoles/nigfetd/base height/.initial=.5}
+\ctikzset{tripoles/nigfetd/conn height/.initial=.35}
+\ctikzset{tripoles/nigfetd/height/.initial=1.1}
+\ctikzset{tripoles/nigfetd/base width/.initial=.5}
+\ctikzset{tripoles/nigfetd/gate width/.initial=.62}
+\ctikzset{tripoles/nigfetd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nigfetd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nigfetd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nigfetd/curr direction/.initial=1}
+
+\ctikzset{tripoles/nigfetebulk/width/.initial=.7}
+\ctikzset{tripoles/nigfetebulk/gate height/.initial=.35}
+\ctikzset{tripoles/nigfetebulk/base height/.initial=.5}
+\ctikzset{tripoles/nigfetebulk/conn height/.initial=.35}
+\ctikzset{tripoles/nigfetebulk/height/.initial=1.1}
+\ctikzset{tripoles/nigfetebulk/base width/.initial=.5}
+\ctikzset{tripoles/nigfetebulk/gate width/.initial=.62}
+\ctikzset{tripoles/nigfetebulk/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nigfetebulk/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nigfetebulk/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nigfetebulk/curr direction/.initial=1}
+
+\ctikzset{tripoles/pigfete/width/.initial=.7}
+\ctikzset{tripoles/pigfete/gate height/.initial=.35}
+\ctikzset{tripoles/pigfete/base height/.initial=.5}
+\ctikzset{tripoles/pigfete/conn height/.initial=.35}
+\ctikzset{tripoles/pigfete/height/.initial=1.1}
+\ctikzset{tripoles/pigfete/base width/.initial=.5}
+\ctikzset{tripoles/pigfete/gate width/.initial=.62}
+\ctikzset{tripoles/pigfete/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pigfete/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pigfete/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pigfete/curr direction/.initial=-1}
+
+\ctikzset{tripoles/pigfetd/width/.initial=.7}
+\ctikzset{tripoles/pigfetd/gate height/.initial=.35}
+\ctikzset{tripoles/pigfetd/base height/.initial=.5}
+\ctikzset{tripoles/pigfetd/conn height/.initial=.35}
+\ctikzset{tripoles/pigfetd/height/.initial=1.1}
+\ctikzset{tripoles/pigfetd/base width/.initial=.5}
+\ctikzset{tripoles/pigfetd/gate width/.initial=.62}
+\ctikzset{tripoles/pigfetd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pigfetd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pigfetd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pigfetd/curr direction/.initial=-1}
+
+\ctikzset{tripoles/pigfetebulk/width/.initial=.7}
+\ctikzset{tripoles/pigfetebulk/gate height/.initial=.35}
+\ctikzset{tripoles/pigfetebulk/conn height/.initial=.35}
+\ctikzset{tripoles/pigfetebulk/base height/.initial=.5}
+\ctikzset{tripoles/pigfetebulk/height/.initial=1.1}
+\ctikzset{tripoles/pigfetebulk/base width/.initial=.5}
+\ctikzset{tripoles/pigfetebulk/gate width/.initial=.62}
+\ctikzset{tripoles/pigfetebulk/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pigfetebulk/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pigfetebulk/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pigfetebulk/curr direction/.initial=-1}
+
+\ctikzset{tripoles/npn/width/.initial=.6}
+\ctikzset{tripoles/npn/base height/.initial=.45}
+\ctikzset{tripoles/npn/base height 2/.initial=.15}
+\ctikzset{tripoles/npn/base height/.initial=.4}
+\ctikzset{tripoles/npn/conn height/.initial=0}
+\ctikzset{tripoles/npn/height/.initial=1.1}
+\ctikzset{tripoles/npn/base width/.initial=.5}
+\ctikzset{tripoles/npn/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/npn/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/npn/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/npn/curr direction/.initial=1}
+
+\ctikzset{tripoles/pnp/width/.initial=.6}
+\ctikzset{tripoles/pnp/base height/.initial=.45}
+\ctikzset{tripoles/pnp/base height 2/.initial=.15}
+\ctikzset{tripoles/pnp/base height/.initial=.4}
+\ctikzset{tripoles/pnp/conn height/.initial=0}
+\ctikzset{tripoles/pnp/height/.initial=1.1}
+\ctikzset{tripoles/pnp/base width/.initial=.5}
+\ctikzset{tripoles/pnp/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pnp/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pnp/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pnp/curr direction/.initial=-1}
+
+\ctikzset{tripoles/pigbt/width/.initial=.6}
+\ctikzset{tripoles/pigbt/gate height/.initial=.45}
+\ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
+\ctikzset{tripoles/pigbt/base height/.initial=.4}
+\ctikzset{tripoles/pigbt/conn height/.initial=0}
+\ctikzset{tripoles/pigbt/height/.initial=1.1}
+\ctikzset{tripoles/pigbt/gate width/.initial=.62}
+\ctikzset{tripoles/pigbt/base width/.initial=.5}
+\ctikzset{tripoles/pigbt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pigbt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pigbt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pigbt/curr direction/.initial=-1}
+
+\ctikzset{tripoles/nigbt/width/.initial=.6}
+\ctikzset{tripoles/nigbt/gate height/.initial=.45}
+\ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
+\ctikzset{tripoles/nigbt/base height/.initial=.4}
+\ctikzset{tripoles/nigbt/conn height/.initial=0}
+\ctikzset{tripoles/nigbt/height/.initial=1.1}
+\ctikzset{tripoles/nigbt/gate width/.initial=.62}
+\ctikzset{tripoles/nigbt/base width/.initial=.5}
+\ctikzset{tripoles/nigbt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nigbt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nigbt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nigbt/curr direction/.initial=1}
+
+\ctikzset{tripoles/Lpigbt/width/.initial=.6}
+\ctikzset{tripoles/Lpigbt/gate height/.initial=.45}
+\ctikzset{tripoles/Lpigbt/gate height 2/.initial=.15}
+\ctikzset{tripoles/Lpigbt/base height/.initial=.4}
+\ctikzset{tripoles/Lpigbt/conn height/.initial=.4}
+\ctikzset{tripoles/Lpigbt/height/.initial=1.1}
+\ctikzset{tripoles/Lpigbt/gate width/.initial=.62}
+\ctikzset{tripoles/Lpigbt/base width/.initial=.5}
+\ctikzset{tripoles/Lpigbt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/Lpigbt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/Lpigbt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/Lpigbt/curr direction/.initial=-1}
+
+\ctikzset{tripoles/Lnigbt/width/.initial=.6}
+\ctikzset{tripoles/Lnigbt/gate height/.initial=.45}
+\ctikzset{tripoles/Lnigbt/gate height 2/.initial=.15}
+\ctikzset{tripoles/Lnigbt/base height/.initial=.4}
+\ctikzset{tripoles/Lnigbt/conn height/.initial=.4}
+\ctikzset{tripoles/Lnigbt/height/.initial=1.1}
+\ctikzset{tripoles/Lnigbt/gate width/.initial=.62}
+\ctikzset{tripoles/Lnigbt/base width/.initial=.5}
+\ctikzset{tripoles/Lnigbt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/Lnigbt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/Lnigbt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/Lnigbt/curr direction/.initial=1}
+
+\ctikzset{tripoles/njfet/width/.initial=.7}
+\ctikzset{tripoles/njfet/gate height/.initial=.5}
+\ctikzset{tripoles/njfet/gate height 2/.initial=.35}
+\ctikzset{tripoles/njfet/gate width/.initial=.5}
+\ctikzset{tripoles/njfet/conn height/.initial=.35}
+\ctikzset{tripoles/njfet/height/.initial=1.1}
+\ctikzset{tripoles/njfet/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/njfet/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/njfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/njfet/curr direction/.initial=1}
+
+\ctikzset{tripoles/pjfet/width/.initial=.7}
+\ctikzset{tripoles/pjfet/gate height/.initial=.5}
+\ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
+\ctikzset{tripoles/pjfet/gate width/.initial=.5}
+\ctikzset{tripoles/pjfet/conn height/.initial=.35}
+\ctikzset{tripoles/pjfet/height/.initial=1.1}
+\ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pjfet/curr direction/.initial=-1}
+
+\ctikzset{tripoles/isfet/width/.initial=1}
+\ctikzset{tripoles/isfet/gate height/.initial=.35}
+\ctikzset{tripoles/isfet/base height/.initial=.5}
+\ctikzset{tripoles/isfet/height/.initial=1.1}
+\ctikzset{tripoles/isfet/base width/.initial=.3}
+\ctikzset{tripoles/isfet/gate width/.initial=.5}
+\ctikzset{tripoles/isfet/conn height/.initial=0}
+\ctikzset{tripoles/isfet/wave width/.initial=.16}
+\ctikzset{tripoles/isfet/wave amp/.initial=.06}
+\ctikzset{tripoles/isfet/waves y sep/.initial=.22}
+\ctikzset{tripoles/isfet/waves x sep/.initial=.8}
+\ctikzset{tripoles/isfet/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/isfet/curr direction/.initial=1}
+
+\newif\ifpgf at circuit@europeanlogicport
+\ctikzset{logic ports/.is choice}
+\ctikzset{logic ports/european/.code= {\pgf at circuit@europeanlogicporttrue } }
+\ctikzset{logic ports/american/.code= {\pgf at circuit@europeanlogicportfalse } } 
+
+\newif\ifpgf at circuit@bipole at voltage@backward
+\ctikzset{bipole/voltage/direction/.is choice}
+\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
+\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at voltage@backwardtrue}}
+
+\ctikzset{tripoles/american and port/width/.initial=1.1}
+\ctikzset{tripoles/american and port/height/.initial=.8}
+\ctikzset{tripoles/american and port/port width/.initial=.7}
+\ctikzset{tripoles/american and port/input height/.initial=.5}
+\ctikzset{tripoles/american nand port/width/.initial=1.1}
+\ctikzset{tripoles/american nand port/height/.initial=.8}
+\ctikzset{tripoles/american nand port/port width/.initial=.7}
+\ctikzset{tripoles/american nand port/circle width/.initial=.15}
+\ctikzset{tripoles/american nand port/input height/.initial=.5}
+\ctikzset{tripoles/american or port/width/.initial=1.1}
+\ctikzset{tripoles/american or port/height/.initial=.8}
+\ctikzset{tripoles/american or port/port width/.initial=.7}
+\ctikzset{tripoles/american or port/input height/.initial=.5}
+\ctikzset{tripoles/american or port/input skip/.initial=.25}
+\ctikzset{tripoles/american or port/aaa/.initial=.6}
+\ctikzset{tripoles/american or port/bbb/.initial=.4} 
+\ctikzset{tripoles/american or port/ccc/.initial=.5} 
+\ctikzset{tripoles/american or port/ddd/.initial=.0}
+\ctikzset{tripoles/american nor port/width/.initial=1.1}
+\ctikzset{tripoles/american nor port/height/.initial=.8}
+\ctikzset{tripoles/american nor port/port width/.initial=.7}
+\ctikzset{tripoles/american nor port/input height/.initial=.5}
+\ctikzset{tripoles/american nor port/input skip/.initial=.25}
+\ctikzset{tripoles/american nor port/circle width/.initial=.15}
+\ctikzset{tripoles/american nor port/aaa/.initial=.6}
+\ctikzset{tripoles/american nor port/bbb/.initial=.4} 
+\ctikzset{tripoles/american nor port/ccc/.initial=.5} 
+\ctikzset{tripoles/american nor port/ddd/.initial=.0}
+\ctikzset{tripoles/american xor port/width/.initial=1.1}
+\ctikzset{tripoles/american xor port/height/.initial=.8}
+\ctikzset{tripoles/american xor port/port width/.initial=.7}
+\ctikzset{tripoles/american xor port/input height/.initial=.5}
+\ctikzset{tripoles/american xor port/input skip/.initial=.15}
+\ctikzset{tripoles/american xor port/distance/.initial=.1} 
+\ctikzset{tripoles/american xor port/aaa/.initial=.6}
+\ctikzset{tripoles/american xor port/bbb/.initial=.4} 
+\ctikzset{tripoles/american xor port/ccc/.initial=.5} 
+\ctikzset{tripoles/american xor port/ddd/.initial=.0}
+\ctikzset{tripoles/american xnor port/width/.initial=1.1}
+\ctikzset{tripoles/american xnor port/height/.initial=.8}
+\ctikzset{tripoles/american xnor port/port width/.initial=.7}
+\ctikzset{tripoles/american xnor port/input height/.initial=.5}
+\ctikzset{tripoles/american xnor port/input skip/.initial=.15}
+\ctikzset{tripoles/american xnor port/distance/.initial=.1} 
+\ctikzset{tripoles/american xnor port/aaa/.initial=.6}
+\ctikzset{tripoles/american xnor port/bbb/.initial=.4} 
+\ctikzset{tripoles/american xnor port/ccc/.initial=.5} 
+\ctikzset{tripoles/american xnor port/ddd/.initial=.0}
+\ctikzset{tripoles/american xnor port/circle width/.initial=.15}
+\ctikzset{tripoles/european and port/width/.initial=1.4}
+\ctikzset{tripoles/european and port/height/.initial=.65}
+\ctikzset{tripoles/european and port/reserved/.initial=.6}
+\ctikzset{tripoles/european and port/input height/.initial=.6}
+\ctikzset{tripoles/european or port/width/.initial=1.4}
+\ctikzset{tripoles/european or port/height/.initial=.65}
+\ctikzset{tripoles/european or port/reserved/.initial=.6}
+\ctikzset{tripoles/european or port/input height/.initial=.6}
+\ctikzset{tripoles/european xor port/width/.initial=1.4}
+\ctikzset{tripoles/european xor port/height/.initial=.65}
+\ctikzset{tripoles/european xor port/reserved/.initial=.6}
+\ctikzset{tripoles/european xor port/input height/.initial=.6}
+\ctikzset{tripoles/european nand port/width/.initial=1.4}
+\ctikzset{tripoles/european nand port/not height/.initial=.3}
+\ctikzset{tripoles/european nand port/not width/.initial=.8}
+\ctikzset{tripoles/european nand port/height/.initial=.65}
+\ctikzset{tripoles/european nand port/reserved/.initial=.6}
+\ctikzset{tripoles/european nand port/input height/.initial=.6}
+\ctikzset{tripoles/european not port/width/.initial=1.4}
+\ctikzset{tripoles/european not port/not height/.initial=.3}
+\ctikzset{tripoles/european not port/not width/.initial=.8}
+\ctikzset{tripoles/european not port/height/.initial=.65}
+\ctikzset{tripoles/european not port/reserved/.initial=.6}
+\ctikzset{tripoles/european not port/input height/.initial=0}
+\ctikzset{tripoles/european xnor port/width/.initial=1.4}
+\ctikzset{tripoles/european xnor port/not height/.initial=.3}
+\ctikzset{tripoles/european xnor port/not width/.initial=.8}
+\ctikzset{tripoles/european xnor port/height/.initial=.65}
+\ctikzset{tripoles/european xnor port/reserved/.initial=.6}
+\ctikzset{tripoles/european xnor port/input height/.initial=.6}
+\ctikzset{tripoles/european nor port/width/.initial=1.4}
+\ctikzset{tripoles/european nor port/not height/.initial=.3}
+\ctikzset{tripoles/european nor port/not width/.initial=.8}
+\ctikzset{tripoles/european nor port/height/.initial=.65}
+\ctikzset{tripoles/european nor port/reserved/.initial=.6}
+\ctikzset{tripoles/european nor port/input height/.initial=.6}
+\ctikzset{tripoles/op amp/width/.initial=1.7}
+\ctikzset{tripoles/op amp/port width/.initial=.7}
+\ctikzset{tripoles/op amp/height/.initial=1.4}
+\ctikzset{tripoles/op amp/input height/.initial=.5}
+\ctikzset{tripoles/op amp/up pos/.initial=.45}
+\ctikzset{tripoles/op amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolut font size needed!
+\ctikzset{tripoles/gm amp/width/.initial=1.7}
+\ctikzset{tripoles/gm amp/port width/.initial=.7}
+\ctikzset{tripoles/gm amp/height/.initial=1.4}
+\ctikzset{tripoles/gm amp/input height/.initial=.5}
+\ctikzset{tripoles/gm amp/up pos/.initial=.45}
+\ctikzset{tripoles/plain amp/width/.initial=1.7}
+\ctikzset{tripoles/plain amp/port width/.initial=.7}
+\ctikzset{tripoles/plain amp/height/.initial=1.4}
+\ctikzset{tripoles/plain amp/input height/.initial=.5}
+\ctikzset{tripoles/plain amp/up pos/.initial=.45}
+
+\ctikzset{tripoles/thyristor/height/.initial=1.10}
+\ctikzset{tripoles/thyristor/height 2/.initial=.5}
+\ctikzset{tripoles/thyristor/width/.initial=1.0}
+\ctikzset{tripoles/thyristor/diode height/.initial=.5}
+\ctikzset{tripoles/thyristor/diode width left/.initial=.4}
+\ctikzset{tripoles/thyristor/diode width right/.initial=.3}
+
+\ctikzset{tripoles/triac/height/.initial=1.1}
+\ctikzset{tripoles/triac/width/.initial=1}
+\ctikzset{tripoles/triac/diode width left/.initial=.3}
+\ctikzset{tripoles/triac/diode width right/.initial=.3}
+
+\ctikzset{tripoles/spdt/width/.initial=.85}
+\ctikzset{tripoles/spdt/height/.initial=.45}
+\ctikzset{tripoles/spdt/margin/.initial=.45}
+
+\ctikzset{tripoles/toggleswitch/height/.initial=.8}
+\ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
+\ctikzset{tripoles/toggleswitch/width/.initial=.80}
+
+\ctikzset{tripoles/mixer/width/.initial=0.7}
+\ctikzset{tripoles/adder/width/.initial=0.7}
+\ctikzset{tripoles/circulator/width/.initial=.7}
+\ctikzset{tripoles/oscillator/width/.initial=.7}
+
+
+\ctikzset{tripoles/wilkinson/height/.initial=1.3}
+\ctikzset{tripoles/wilkinson/width/.initial=1.3}
+
+\ctikzset{quadpoles/transformer/width/.initial=1.5}
+\ctikzset{quadpoles/transformer/width1/.initial=.4}
+\ctikzset{quadpoles/transformer/height/.initial=1.5}
+\ctikzset{quadpoles/transformer/height1/.initial=.8}
+\ctikzset{quadpoles/transformer core/width/.initial=1.5}
+\ctikzset{quadpoles/transformer core/height/.initial=1.5}
+\ctikzset{quadpoles/transformer core/core height/.initial=.5}
+\ctikzset{quadpoles/transformer core/core width/.initial=.05}
+\ctikzset{quadpoles/gyrator/width/.initial=1.5}
+\ctikzset{quadpoles/gyrator/height/.initial=1.5}
+\ctikzset{quadpoles/fourport/width/.initial=1.3}
+\ctikzset{quadpoles/fourport/height/.initial=1.3}
+\ctikzset{quadpoles/coupler/width/.initial=1.3}
+\ctikzset{quadpoles/coupler/height/.initial=1.3}
+\ctikzset{quadpoles/coupler2/width/.initial=1.3}
+\ctikzset{quadpoles/coupler2/height/.initial=1.3}
+
+% %Mechanical section
+\ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8}
+\ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6}
+\ctikzset{bipoles/spring/height/.initial=.5}
+\ctikzset{bipoles/spring/width/.initial=.5}
+\ctikzset{bipoles/mass/height/.initial=.55}
+\ctikzset{bipoles/mass/box height/.initial=.4}
+\ctikzset{bipoles/mass/width/.initial=.5}
+
+\ctikzset{bipoles/damper/height/.initial=.35}
+\ctikzset{bipoles/damper/length/.initial=.3}
+\ctikzset{bipoles/damper/width/.initial=.4}
+
+
+\ctikzset{bipole/.is family}
+\ctikzset{bipole/kind/.initial = }
+\ctikzset{bipole/name/.initial = }
+\newif\ifpgf at circuit@bipole at reversed
+\ctikzset{bipole/reversed/.is if=pgf at circuit@bipole at reversed}
+\newif\ifpgf at circuit@bipole at isvoltage
+\ctikzset{bipole/is voltage/.is if=pgf at circuit@bipole at isvoltage}
+\newif\ifpgf at circuit@bipole at voltageoutsideofsymbol
+\ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf at circuit@bipole at voltageoutsideofsymbol}
+\newif\ifpgf at circuit@bipole at strokedsymbol
+\ctikzset{bipole/is strokedsymbol/.is if=pgf at circuit@bipole at strokedsymbol}
+\newif\ifpgf at circuit@bipole at iscurrent
+\ctikzset{bipole/is current/.is if=pgf at circuit@bipole at iscurrent}
+
+\ctikzset{bipole/voltage/.is family}
+\newif\ifpgf at circuit@bipole at voltage@backward
+\ctikzset{bipole/voltage/direction/.is choice}
+\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
+\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at voltage@backwardtrue}}
+\newif\ifpgf at circuit@bipole at voltage@below
+\ctikzset{bipole/voltage/position/.is choice}
+\ctikzset{bipole/voltage/position/above/.code={\pgf at circuit@bipole at voltage@belowfalse}}
+\ctikzset{bipole/voltage/position/below/.code={\pgf at circuit@bipole at voltage@belowtrue}}
+
+\ctikzset{bipole/voltage/label/unit/.initial=}
+\ctikzset{bipole/voltage/label/name/.initial=}
+
+\ctikzset{bipole/current/.is family}
+\newif\ifpgf at circuit@bipole at current@backward
+\ctikzset{bipole/current/direction/.is choice}
+\ctikzset{bipole/current/direction/forward/.code={\pgf at circuit@bipole at current@backwardfalse}}
+\ctikzset{bipole/current/direction/backward/.code={\pgf at circuit@bipole at current@backwardtrue}}
+\newif\ifpgf at circuit@bipole at current@before
+\ctikzset{bipole/current/x position/.is choice}
+\ctikzset{bipole/current/x position/after/.code={\pgf at circuit@bipole at current@beforefalse}}
+\ctikzset{bipole/current/x position/before/.code={\pgf at circuit@bipole at current@beforetrue}}
+\newif\ifpgf at circuit@bipole at current@below
+\ctikzset{bipole/current/y position/.is choice}
+\ctikzset{bipole/current/y position/above/.code={\pgf at circuit@bipole at current@belowfalse}}
+\ctikzset{bipole/current/y position/below/.code={\pgf at circuit@bipole at current@belowtrue}}
+
+\ctikzset{bipole/current/label/unit/.initial=}
+\ctikzset{bipole/current/label/name/.initial=}
+
+\ctikzset{bipole/label/.is family}
+\ctikzset{bipole/label/position/.initial=90}
+\ctikzset{bipole/label/unit/.initial=}
+\ctikzset{bipole/label/name/.initial=}
+\ctikzset{bipole/nodes/.is family}
+\ctikzset{bipole/nodes/left/.is choice}
+\ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
+\ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
+\ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
+\ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
+\ctikzset{bipole/nodes/right/.is choice}
+\ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
+\ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
+\ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
+\ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
+
+
+
+
+\newif\ifpgf at circuit@europeanresistor
+\ctikzset{resistor/.is choice}
+\ctikzset{resistor/american/.code = \pgf at circuit@europeanresistorfalse }
+\ctikzset{resistor/european/.code = \pgf at circuit@europeanresistortrue }
+
+\ctikzset{inductor/.is choice}
+\ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
+\ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
+\ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
+
+\newif\ifpgf at circuit@strokediode
+\newif\ifpgf at circuit@fulldiode
+\pgf at circuit@strokediodefalse
+\pgf at circuit@fulldiodefalse
+
+\ctikzset{diode/.is choice}
+\ctikzset{diode/empty/.code = \pgf at circuit@fulldiodefalse\pgf at circuit@strokediodefalse}%default
+\ctikzset{diode/full/.code = \pgf at circuit@fulldiodetrue }
+\ctikzset{diode/stroke/.code = \pgf at circuit@strokediodetrue}
+
+\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full }}
+\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty }}
+\tikzset{stroke diodes/.style = { \circuitikzbasekey/diode = stroke }}
+
+\ctikzset{thickness/.initial=2}
+\ctikzset{color/.initial=black}
+\pgfkeys{/tikz/color/.add code={}{\ctikzset{color=#1}}}
+
+
+\newif\ifpgf at circ@siunitx
+\newif\ifpgf at circ@siunitx at res
+
+\ctikzset{voltage/.is family}
+\ctikzset{voltage/distance from node/.initial=.5} %\pgf at circ@Rlen units
+\ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
+\ctikzset{voltage/bump a/.initial=1.2}
+\ctikzset{voltage/bump b/.initial=1.5}
+\ctikzset{voltage/european label distance/.initial=1.4}
+\ctikzset{voltage/american label distance/.initial=1.1}
+% special cases
+\ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
+\ctikzset{bipoles/generic/voltage/bump b/.initial=2}
+\ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
+%\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
+\ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
+\ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
+\ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
+\ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
+\ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
+\ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
+\ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
+\ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
+\ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
+\ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
+\ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
+%\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
+\ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
+%\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
+\ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
+%\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
+\ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
+%\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
+\ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
+%\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
+%\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
+
+\ctikzset{current/.is family}
+\ctikzset{current/distance/.initial = .5}
+
+\tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
+\tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
+\tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
+\tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
+\tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
+\tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
+
+\newif\ifpgf at circuit@europeangfsurgearrester
+\ctikzset{gas filled surge arrester/.is choice}
+\ctikzset{gas filled surge arrester/european/.code= {\pgf at circuit@europeangfsurgearrestertrue } }
+\ctikzset{gas filled surge arrester/american/.code= {\pgf at circuit@europeangfsurgearresterfalse } } 
+
+\tikzset{american gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = american } }
+\tikzset{european gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = european } }
+\tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
+\tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
+\tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
+\tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
+\tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
+\tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
+\tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester } }
+\tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
+
+% I should try to make the tree clearer (this voltaege conflicts with the options above)
+
+\newif\ifpgf at circuit@europeanvoltage
+\ctikzset{voltage/.is choice}
+\ctikzset{voltage/american/.code = {\pgf at circuit@europeanvoltagefalse } }
+\ctikzset{voltage/european/.code = {\pgf at circuit@europeanvoltagetrue } }
+
+\newif\ifpgf at circuit@europeancurrent
+\ctikzset{current/.is choice}
+\ctikzset{current/american/.code = \pgf at circuit@europeancurrentfalse }
+\ctikzset{current/european/.code = \pgf at circuit@europeancurrenttrue }
+
+\ctikzset{label/align/.is choice}
+\ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
+\ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
+\ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
+
+%%%%%%%%%% new
+\pgfkeys{\circuitikzbasekey/.search also={/tikz}}
+%%%---------- close: tex/pgfcirc.defines
+%%%%%%%%%%% Springe nach tex/pgfcircutils
+%%%---------- open: tex/pgfcircutils.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%\def\pgf at circ@handleSI#1{%
+ % \pgf at circ@siunitx at resfalse
+%  
+ % \edef\len{\stringlength[e]{#1}}
+  %\testmatchingchar[e]{#1}{\len}{>}%
+  %\ifmatchingchar%
+  %  \ifnum\findchars{#1}{<}=0
+	%  \def\pgf at circ@handleSI at val{\substring{#1}{1}{\findchars{#1}{<}-1}}
+	  %\def\pgf at circ@handleSI at unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
+	  %\pgf at circ@siunitx at restrue
+%	\else
+%	\fi
+  %\else 
+  %\fi
+%}
+
+\def\pgf at circ@handleSI#1{
+	\noexpandarg
+        	\def\pgf at temp{}
+	\StrBetween{#1}{<}{>}[\pgf at circ@handleSI at unit]
+	\StrLen{\pgf at circ@handleSI at unit}[\pgf at circ@handleSI at unit@len]
+
+	\ifnum\pgf at circ@handleSI at unit@len=0  
+	  \pgf at circ@siunitx at resfalse  
+	\else  
+	  \IfEndWith{#1}{>}{
+	  	\pgf at circ@siunitx at restrue 
+		\noexpandarg
+	  	\StrBefore{#1}{<}[\pgf at circ@handleSI at val]		
+                %\typeout{si |#1|}
+	  }{
+	  	\pgf at circ@siunitx at resfalse 
+                %\typeout{no si |#1|}
+	  }
+	\fi
+}
+
+\def\pgf at circ@finallabel#1{%
+		\edef\pgf at temp{}%
+		\edef\pgf at circ@temp{\ctikzvalof{bipole/#1label/unit}}%
+		\ifx\pgf at temp\pgf at circ@temp%
+			\ctikzvalof{bipole/#1label/name}%
+		\else%
+			$\SI{\ctikzvalof{bipole/#1label/name}}{\ctikzvalof{bipole/#1label/unit}}$%
+		\fi%
+}
+
+\def\pgf at circ@ifkeyempty#1{
+	\pgfextra{
+		\ctikzset{#1/.get=\pgf at circ@temp}
+		\edef\pgf at temp{}
+	}
+	\ifx\pgf at circ@temp\pgf at temp
+}
+
+%%%---------- close: tex/pgfcircutils
+%%%%%%%%%%% Springe nach tex/pgfcircmath
+%%%---------- open: tex/pgfcircmath.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%    Math routines
+
+\def\pgf at circ@stripdecimals#1.#2\pgf at nil{#1}
+
+% angle between 0 and 360
+\def\pgf at circ@slope#1#2{%
+ \pgf at process{#1}%
+ \pgf at xa=\pgf at x%
+ \pgf at ya=\pgf at y%
+ \pgf at process{#2}%
+ \advance\pgf at x by-\pgf at xa%
+ \advance\pgf at y by-\pgf at ya%
+ \ifdim\pgf at x<0.1pt 
+ 	\ifdim\pgf at x>-0.1pt % vertical
+		\ifdim\pgf at y<0pt
+			\def\pgfmathresult{-90.0}
+		\else
+			\def\pgfmathresult{+90.0}
+		\fi 	
+ 	\else % oblique with dx < 0
+		\pgfmathdivide{\pgf at y}{\pgf at x}
+		\pgfmathatan{\pgfmathresult}
+		\ifdim\pgf at x<0pt
+			\pgfmathsubtract{\pgfmathresult}{+180}
+		\fi
+ 	\fi
+ \else % oblique with dx > 0
+	\pgfmathdivide{\pgf at y}{\pgf at x}
+	\pgfmathatan{\pgfmathresult}
+	\ifdim\pgf at x<0pt
+		\pgfmathsubtract{\pgfmathresult}{+180}
+	\fi
+ \fi
+ \pgf at x=\pgfmathresult pt
+ \ifdim\pgf at x<0pt
+	\pgfmathadd{\pgfmathresult}{+360} 
+ \fi
+ }
+
+  	
+%%%---------- close: tex/pgfcircmath
+
+%%%%%%%%%%% Springe nach tex/pgfcircshapes
+%%%---------- open: tex/pgfcircshapes.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%  Other shapes
+
+
+%% Nothing
+
+\pgfdeclareshape{emptyshape}{
+	\savedanchor{\northeast}{%
+		\pgf at x=.5\wd\pgfnodeparttextbox%
+		\pgf at y=.5\ht\pgfnodeparttextbox%
+   }
+	\anchor{north}{
+		\northeast
+		\pgf at x=0cm
+	}
+	\anchor{east}{%
+		\northeast
+		\pgf at y=0cm
+   }
+	\anchor{south}{%
+		\northeast
+		\pgf at y=-\pgf at y
+		\pgf at x=0cm
+   }
+	\anchor{west}{
+		\northeast
+		\pgf at y=0cm
+		\pgf at x=-\pgf at x
+	}
+	\anchor{text}{%
+		\pgfpointorigin
+   }
+	\anchor{center}{
+		\pgfpointorigin
+	}
+}
+
+%% Full terminal
+
+\pgfdeclareshape{circ}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchorborder{
+		\pgf at circ@res at left=\pgf at x
+		\pgf at circ@res at up=\pgf at y
+		\pgfpointborderellipse{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}
+}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}		
+	}
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{draw,fill}		
+		\endpgfscope
+
+		}
+}
+
+%% Empty terminal
+
+\pgfdeclareshape{ocirc}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchorborder{
+		\pgf at circ@res at left=\pgf at x
+		\pgf at circ@res at up=\pgf at y
+		\pgfpointborderellipse{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}
+}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}		
+	}
+
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfsetfillcolor{white}
+			\pgfusepath{draw,fill}		
+		\endpgfscope
+
+		}
+}
+
+%% Diamond terminal
+
+\pgfdeclareshape{diamond}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchorborder{
+		\pgf at circ@res at left=\pgf at x
+		\pgf at circ@res at up=\pgf at y
+	}
+	\behindforegroundpath{		
+		\pgfscope
+			\pgfmathsetlength{\pgf at circ@res at temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+			\pgftransformrotate{45}
+			\pgfpathrectanglecorners
+			{\pgfpoint{\pgf at circ@res at left-\pgf at circ@res at temp}{\pgf at circ@res at up+\pgf at circ@res at temp}}
+			{\pgfpoint{\pgf at circ@res at left+\pgf at circ@res at temp}{\pgf at circ@res at up-\pgf at circ@res at temp}}
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{draw,fill}		
+		\endpgfscope
+		}
+}
+
+%% Current arrow
+
+\pgfdeclareshape{currarrow}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\divide \pgf at circ@res at step by 16
+
+			\pgfpathmoveto{\pgfpoint{-.7\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{0pt}}			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{draw,fill}
+
+		\endpgfscope
+	}
+
+}
+
+%% Current arrow
+
+\pgfdeclareshape{inputarrow}{
+	\savedanchor{\tip}{
+		\pgfpointorigin
+	}
+	\anchor{center}{
+		\tip
+	}
+	\anchor{tip}{
+		\tip
+	}
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\divide \pgf at circ@res at step by 16
+
+			\pgfpathmoveto{\pgfpoint{-1.7\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{0pt}{0pt}}
+			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{.8\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{0pt}}			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{fill}
+
+		\endpgfscope
+	}
+
+}
+
+
+%% box
+
+\pgfdeclareshape{box}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		
+		\pgfscope
+			\pgf at circ@res at step = \ctikzvalof{bipoles/twoport/width}\pgf at circ@Rlen
+			\pgf at circ@res at step = 0.5\pgf at circ@res at step
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\pgfpathrectanglecorners{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at step}}{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+		\endpgfscope
+	}
+
+}
+
+%%%---------- close: tex/pgfcircshapes
+%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
+%%%---------- open: tex/pgfcircmonopoles.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Monopoles
+
+%% Ground symbol
+
+\pgfdeclareshape{ground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{draw}
+		
+			
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+
+}
+
+
+
+\pgfdeclareshape{rground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+						
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+}
+
+\pgfdeclareshape{tground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			%\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+			\pgfusepath{draw}
+						
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+}
+
+\pgfdeclareshape{sground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{0}{-1.8\pgf at circ@res at step}}
+			\pgfpathclose
+			\pgfusepath{draw}
+						
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+
+}
+
+% noiseless ground
+\pgfdeclareshape{nground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfusepath{draw}
+			
+			\pgfpathmoveto{\pgfpoint{1.3\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfpatharc{0}{180}{1.3\pgf at circ@res at step}
+			\pgfusepath{draw}
+					
+			\pgfsetlinewidth{\pgfstartlinewidth}
+		\endpgfscope
+	}
+}
+
+% protective ground
+\pgfdeclareshape{pground}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+			\pgfusepath{draw}
+
+			\pgfstartlinewidth=\pgflinewidth
+			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+			\pgfpathcircle{\pgfpoint{0pt}{-\pgf at circ@res at step}} {1.2\pgf at circ@res at step}
+			\pgfusepath{draw}
+						
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
+			\pgfusepath{draw}
+					
+			\pgfsetlinewidth{\pgfstartlinewidth}
+		\endpgfscope
+	}
+}
+
+% chassis ground 
+\pgfdeclareshape{cground}{ 
+\anchor{center}{ 
+    \pgfpointorigin 
+} 
+\behindforegroundpath{       
+    \pgf at circ@res at step=\ctikzvalof{monopoles/chassis/width}\pgf at circ@Rlen 
+ 
+    \pgfscope        
+        \pgfpathmoveto{\pgfpointorigin} 
+        \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}} 
+        \pgfusepath{draw}
+
+        \pgfpathmoveto{\pgfpoint{-1.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
+        \pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
+        \pgfpathmoveto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
+        \pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
+        \pgfusepath{draw}                        
+    \endpgfscope 
+    } 
+}
+
+% Contributed by Leonardo Azzinnari
+\pgfdeclareshape{tlinestub}{
+	\anchor{center}{\pgfpointorigin}
+	\behindforegroundpath{
+		\pgfstartlinewidth=\pgflinewidth
+		
+		\pgf at circ@res at step=\ctikzvalof{bipoles/tline/width} \pgf at circ@Rlen
+        \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+        
+            \pgfpathmoveto{\pgfpointorigin}
+            \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0pt}}
+            \pgfusepath{draw}
+         \pgfscope
+            \pgfpathellipse{\pgfpoint{0.5\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0.125\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+            \pgfpathlineto{\pgfpoint{1.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+            \pgfpatharc{90}{-90}{0.125\pgf at circ@res at step and 0.25\pgf at circ@res at step}
+            \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-0.25\pgf at circ@res at step}}
+            \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+            \pgfusepath{draw}
+         \endpgfscope
+      }
+}
+                            
+
+
+
+\pgfdeclareshape{antenna}{
+\anchor{center}{\pgfpointorigin}
+	\savedanchor{\northeast}{
+		\pgf at circ@res at step=\ctikzvalof{monopoles/antenna/width}\pgf at circ@Rlen
+		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
+		\pgf at y=6\pgf at circ@res at step
+	}
+	\anchor{text}{
+		\northeast
+		\pgf at x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf at x
+		\pgf at y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf at y
+	}
+   \behindforegroundpath{
+     \pgfstartlinewidth=\pgflinewidth
+     \pgf at circ@res at step=\ctikzvalof{monopoles/antenna/width}\pgf at circ@Rlen
+                           
+        % \pgfpathmoveto{\pgfpointorigin}
+        % \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
+        % \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
+        %     \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+        
+        \pgftransformxshift{ -4\pgf at circ@res at step }
+
+        \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
+        \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             
+         \pgfusepath{draw}
+             
+          \pgfscope   
+          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+             \pgfusepath{draw}
+           \endpgfscope
+                           \pgfsetlinewidth{\pgfstartlinewidth}
+                        
+                           }
+     }
+
+
+\pgfdeclareshape{txantenna}{
+	\anchor{center}{\pgfpointorigin}
+	\savedanchor{\northeast}{
+		\pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
+		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
+		\pgf at y=6\pgf at circ@res at step
+	}
+	\anchor{text}{
+		\northeast
+		\pgf at x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf at x
+		\pgf at y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf at y
+	}
+       \behindforegroundpath{
+       \pgfstartlinewidth=\pgflinewidth
+       \pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
+        
+         \pgfpathmoveto{\pgfpointorigin}
+         \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
+         \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             
+         \pgfusepath{draw}
+             
+          \pgfscope   
+          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+             \pgfusepath{draw}
+           \endpgfscope
+          \pgfpathmoveto{\pgfpoint{5.5\pgf at circ@res at step}{6\pgf at circ@res at step}}
+%        \pgfpatharc{60}{-60}{\pgf at circ@res at step and \pgf at circ@res at step}
+        \pgfpatharc{30}{-30}{2\pgf at circ@res at step}         \pgfpathmoveto{\pgfpoint{6\pgf at circ@res at step}{6.25\pgf at circ@res at step}}
+        \pgfpatharc{30}{-30}{2.5\pgf at circ@res at step}
+        \pgfpathmoveto{\pgfpoint{6.5\pgf at circ@res at step}{6.5\pgf at circ@res at step}}
+        \pgfpatharc{30}{-30}{3\pgf at circ@res at step}
+        \pgfpathmoveto{\pgfpoint{7\pgf at circ@res at step}{6.75\pgf at circ@res at step}}
+        \pgfpatharc{30}{-30}{3.5\pgf at circ@res at step}
+        \pgfpathmoveto{\pgfpoint{7.5\pgf at circ@res at step}{7\pgf at circ@res at step}}
+        \pgfpatharc{30}{-30}{4\pgf at circ@res at step}
+        \pgfusepath{draw}
+        \pgfsetlinewidth{\pgfstartlinewidth}
+        
+        }
+     }
+
+
+\pgfdeclareshape{rxantenna}{
+	\anchor{center}{\pgfpointorigin}
+	\savedanchor{\northeast}{
+		\pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
+		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
+		\pgf at y=6\pgf at circ@res at step
+	}
+	\anchor{text}{
+		\northeast
+		\pgf at x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf at x
+		\pgf at y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf at y
+	}
+    \behindforegroundpath{
+        \pgfstartlinewidth=\pgflinewidth
+        \pgf at circ@res at step=\ctikzvalof{monopoles/rxantenna/width}\pgf at circ@Rlen
+             
+         \pgfpathmoveto{\pgfpointorigin}
+         \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
+         \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             
+         \pgfusepath{draw}
+             
+          \pgfscope   
+          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
+             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+             \pgfusepath{draw}
+           \endpgfscope
+           
+           \pgfpathmoveto{\pgfpoint{6\pgf at circ@res at step}{7\pgf at circ@res at step}}
+%             \pgfpatharc{60}{-60}{\pgf at circ@res at step and \pgf at circ@res at step}
+             \pgfpatharc{150}{210}{4\pgf at circ@res at step}              \pgfpathmoveto{\pgfpoint{6.5\pgf at circ@res at step}{6.75\pgf at circ@res at step}}
+             \pgfpatharc{150}{210}{3.5\pgf at circ@res at step}
+             \pgfpathmoveto{\pgfpoint{7\pgf at circ@res at step}{6.5\pgf at circ@res at step}}
+             \pgfpatharc{150}{210}{3\pgf at circ@res at step}
+             \pgfpathmoveto{\pgfpoint{7.5\pgf at circ@res at step}{6.25\pgf at circ@res at step}}
+             \pgfpatharc{150}{210}{2.5\pgf at circ@res at step}
+             \pgfpathmoveto{\pgfpoint{8\pgf at circ@res at step}{6\pgf at circ@res at step}}
+             \pgfpatharc{150}{210}{2\pgf at circ@res at step}
+             \pgfusepath{draw}
+             \pgfsetlinewidth{\pgfstartlinewidth}
+             
+             }
+}
+
+% Vcc
+\pgfdeclareshape{vcc}{
+\anchor{center}{\pgfpointorigin}
+\anchor{text}{
+	\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
+	\pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf at circ@res at step+2\ht\pgfnodeparttextbox}}                          
+	\pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf at circ@res at step+2\ht\pgfnodeparttextbox}}                
+	\pgf at x=0pt
+	\pgf at y=2\pgf at circ@res at step
+	\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
+	\pgf at x=-.5\wd\pgfnodeparttextbox
+	}
+\behindforegroundpath{                             
+	\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen           
+	\pgfscope           
+		\pgfpathmoveto{\pgfpointorigin}
+		\pgfpathlineto{\pgfpoint{0pt}{1.5\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfstartlinewidth=\pgflinewidth
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{.8\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0}{1.5\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{.8\pgf at circ@res at step}}
+		\pgfusepath{draw}
+																						
+		\pgfsetlinewidth{\pgfstartlinewidth}
+
+	\endpgfscope
+}
+
+}
+
+% Vee
+\pgfdeclareshape{vee}{
+\anchor{center}{\pgfpointorigin}
+\anchor{text}{
+	\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
+	\pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf at circ@res at step-2\ht\pgfnodeparttextbox}}                        
+	\pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf at circ@res at step-2\ht\pgfnodeparttextbox}}        
+	\pgf at x=0pt
+	\pgf at y=-2\pgf at circ@res at step
+	\advance \pgf at y by -1.5\ht\pgfnodeparttextbox
+	\pgf at x=-.5\wd\pgfnodeparttextbox
+	}
+
+\behindforegroundpath{                             
+	\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
+	
+	\pgfscope                           
+		\pgfpathmoveto{\pgfpointorigin}
+		\pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfstartlinewidth=\pgflinewidth
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0}{-1.5\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfsetlinewidth{\pgfstartlinewidth}
+
+	\endpgfscope
+}
+
+}
+
+
+% match
+\pgfdeclareshape{match}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{text}{
+		\pgf at x=\ctikzvalof{monopoles/match/width}\pgf at circ@Rlen
+		\pgf at x=1.5\pgf at x
+		\advance \pgf at x by -.5\wd\pgfnodeparttextbox
+		\pgf at y=-1.5\ht\pgfnodeparttextbox
+	}
+	\behindforegroundpath{		
+		\pgf at circ@res at step=\ctikzvalof{monopoles/match/width}\pgf at circ@Rlen
+		
+		\pgfscope		
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0pt}}
+			\pgfusepath{draw}
+
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0}}
+			\pgfusepath{fill}
+									
+			\pgfsetlinewidth{\pgfstartlinewidth}
+	
+		\endpgfscope
+	}
+
+}
+
+
+%%%---------- close: tex/pgfcircmonopoles
+%%%%%%%%%%% Springe nach tex/pgfcircbipoles
+%%%---------- open: tex/pgfcircbipoles.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%% Generic macro for defining a bipole shape
+% #1 - additional anchors
+% #2 - lower y-size of the bipole (from the center).
+% #3 - #shape is the name of the shape
+% #4 - upper y-size of the bipole (from the center)
+% #5 - width of the bipole
+% #6 - macros drawing the bipole
+
+
+\long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
+	\pgfdeclareshape{#3shape}{
+	
+	\savedanchor{\northeast}{
+		\pgf at y=#4\pgf at circ@Rlen
+		\pgf at y=.5\pgf at y
+		\pgf at x=#5\pgf at circ@Rlen
+		\pgf at x=.5\pgf at x
+	}
+	\savedanchor{\northeastborder}{
+		\pgf at y=#4\pgf at circ@Rlen
+		\pgf at y=.5\pgf at y
+		\pgf at y=\ctikzvalof{bipoles/border margin}\pgf at y
+		\pgf at x=#5\pgf at circ@Rlen
+		\pgf at x=.5\pgf at x
+		\pgf at x=\ctikzvalof{bipoles/border margin}\pgf at x
+	}
+	\savedanchor{\southwestborder}{
+		\pgf at y=-#2\pgf at circ@Rlen
+		\pgf at y=.5\pgf at y
+		\pgf at y=\ctikzvalof{bipoles/border margin}\pgf at y
+		\pgf at x=-#5\pgf at circ@Rlen
+		\pgf at x=.5\pgf at x
+		\pgf at x=\ctikzvalof{bipoles/border margin}\pgf at x
+	}
+	\savedanchor{\southwest}{
+		\pgf at y=-#2\pgf at circ@Rlen
+		\pgf at y=.5\pgf at y
+		\pgf at x=-#5\pgf at circ@Rlen
+		\pgf at x=.5\pgf at x
+	}
+	\savedanchor{\centerpoint}{
+		\pgf at circ@res at down=-#2\pgf at circ@Rlen
+		\pgf at circ@res at up=#4\pgf at circ@Rlen
+		\pgfpointorigin
+		\pgf at y=\pgf at circ@res at up
+		\advance\pgf at y by\pgf at circ@res at down
+		\pgf at y=.5\pgf at y
+	}
+	\anchor{center}{\pgfpointorigin}
+	\anchor{n}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at x=0cm
+	}
+	\anchor{ne}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+	}
+	\anchor{nw}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at x=-\pgf at x
+	}
+	\anchor{e}{%
+		\ifpgf at circuit@bipole at reversed\else\southwest\northeast\fi
+		\pgf at y=0cm
+   }
+	\anchor{s}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at x=0cm
+   }
+	\anchor{se}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at x=-\pgf at x
+   }
+	\anchor{sw}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+   }
+	\anchor{w}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{north}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at x=0cm
+	}
+	\anchor{east}{%
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+   }
+	\anchor{south}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at x=0cm
+   }
+	\anchor{west}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{right}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+	\anchor{above}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at x=0cm
+	}
+	\anchor{left}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+   }
+	\anchor{below}{%
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at x=0cm                    
+   }
+	\anchor{a}{%
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+   }
+	\anchor{b} {
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\savedanchor{\textanchor}{%
+		\pgf at y=\ht\pgfnodeparttextbox
+		\pgf at x=-.5\wd\pgfnodeparttextbox
+   }
+	\anchor{text}{%
+		\textanchor
+   }
+	\anchorborder{%
+		\def\pgf at temp{false}
+		\ifpgf at circuit@bipole at reversed\pgf at temp
+			\pgf at circ@res at left=-\pgf at x
+			\pgf at circ@res at right=-\pgf at y
+		\else
+			\pgf at circ@res at left=\pgf at x
+			\pgf at circ@res at right=\pgf at y
+		\fi
+		\ifdim\pgf at circ@res at right>0cm
+			\pgfpointborderrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at right}}{\northeastborder}
+		\else
+	  		\southwestborder	
+	  	\pgfpointborderrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at right}}{\pgfpoint{-\pgf at x}{-\pgf at y}}
+		\fi
+	}
+	
+	#1
+	
+	\backgroundpath{	
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+		
+		\northeast
+		\pgf at circ@res at up = \pgf at y 
+		\pgf at circ@res at zero = 0cm
+		\pgf at circ@res at left = -\pgf at x
+		\pgf at circ@res at right = \pgf at x
+		\southwest
+		\pgf at circ@res at down = \pgf at y
+
+ 		\pgfstartlinewidth=\pgflinewidth
+		
+		#6
+			
+		\pgfsetlinewidth{\pgfstartlinewidth}
+	}
+	}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Standard bipole shapes declarations
+
+%% Resistor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgftransformationadjustments
+	\pgfmathsetlength{\pgf at circ@res at step}{\ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+	\divide \pgf at circ@res at step by 12
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
+	\pgf at circ@res at other = \pgf at circ@res at left
+	\advance\pgf at circ@res at other by \pgf at circ@res at step 
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by \pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfsetbeveljoin
+	\pgfusepath{draw}
+}
+
+
+
+%% Variable resistor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgftransformationadjustments
+	\pgfmathsetlength{\pgf at circ@res at step}{\ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+	\divide \pgf at circ@res at step by 12
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
+	
+	\pgf at circ@res at other = \pgf at circ@res at left
+	\advance\pgf at circ@res at other by \pgf at circ@res at step 
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by \pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfsetbeveljoin
+	\pgfusepath{draw}
+	
+	\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at other}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at other}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+
+
+%% Capacitor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/capacitor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 5
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+}
+
+
+%% Polar Capacitor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/pcapacitor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 5
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+				
+		\pgfscope
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}{\pgf at circ@res at up}}
+			\pgftransformrotate{-90}
+			\pgfpathsine{\pgfpoint{\pgf at circ@res at up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}}
+			\pgfpathcosine{\pgfpoint{\pgf at circ@res at up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}}
+			\pgfusepath{draw}
+		\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+}
+
+%% Electrolytic Capacitor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ecapacitor/height}}{ecapacitor}{\ctikzvalof{bipoles/ecapacitor/height}}{\ctikzvalof{bipoles/ecapacitor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/ecapacitor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 5
+		\pgfsetrectcap
+		% % % Draw plus pole
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfsetfillcolor{white} 
+		\pgfusepath{draw,fill}
+		% % Draw minus pole
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+				 \pgfsetfillcolor{black} 
+				\pgfusepath{draw,fill}
+		\pgfsetfillcolor{black} 
+		% % plus pole annotation
+		\pgftext[right,at=\pgfpoint{1.2\pgf at circ@res at left}{.6\pgf at circ@res at up}]
+		{\pgfkeysvalueof{/tikz/circuitikz/bipoles/ecapacitor/font} $+$}	
+}
+
+%% Battery
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/battery/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 6
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+
+		\pgfusepath{draw}
+}
+
+
+%% Battery 1
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfusepath{draw}
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at down}}
+		
+
+
+
+		\pgfusepath{draw}
+}
+
+
+
+%% cute inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgftransformationadjustments
+
+	\pgfmathsetlength{\pgf at circ@res at other}%width of small coil
+	{0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf at circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)}
+
+
+	\pgfmathsetlength{\pgf at circ@res at step}
+		{(\ctikzvalof{bipoles/cuteinductor/width}*\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf at circ@res at other)/\ctikzvalof{bipoles/cuteinductor/coils}/2}
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
+	\foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}}
+	{
+		\pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at up}
+		\pgfpatharc{0}{-180}{\pgf at circ@res at other and -\pgf at circ@res at down}
+	}
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at up}
+	\pgfsetbuttcap
+	\pgfsetbeveljoin
+	\pgfusepath{stroke}
+}
+
+%% variable cute inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/lower coil height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgftransformationadjustments	
+	
+	\pgfmathsetlength{\pgf at circ@res at other}%width of small coil
+	{0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf at circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)}
+
+
+	\pgfmathsetlength{\pgf at circ@res at step}
+		{(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf at circ@res at other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2}
+
+	\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
+	\foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
+	{
+		\pgfpatharc{180}{0}{\pgf at circ@res at step and .5\pgf at circ@res at up}
+		\pgfpatharc{0}{-180}{\pgf at circ@res at other and -.5\pgf at circ@res at down}
+	}
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and .5\pgf at circ@res at up}
+	\pgfsetbuttcap
+	\pgfsetbeveljoin
+	\pgfusepath{stroke}
+}
+
+%% american inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
+	\pgf at circ@res at step=\ctikzvalof{bipoles/americaninductor/width}\pgf at circ@Rlen
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}	
+	\pgftransformationadjustments
+	\advance \pgf at circ@res at step by \pgfhorizontaltransformationadjustment\pgflinewidth
+	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/americaninductor/coils}
+	\divide \pgf at circ@res at step by 2
+	\pgf at circ@res at other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf at circ@Rlen
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	\pgfsetbuttcap
+	\pgfsetbeveljoin
+	\pgfusepath{stroke}
+}
+
+%% variable american inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
+	\pgf at circ@res at step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf at circ@Rlen
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgftransformationadjustments
+	\advance \pgf at circ@res at step by \pgfhorizontaltransformationadjustment\pgflinewidth
+	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/vamericaninductor/coils}
+	\divide \pgf at circ@res at step by 2
+	\pgf at circ@res at other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf at circ@Rlen
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	\pgfsetbuttcap
+	\pgfsetbeveljoin
+	\pgfusepath{stroke}
+
+	\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+
+%% Independent voltage source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+}
+
+
+%% Independent voltage source - American style
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourceam/height}}{vsourceAM}{\ctikzvalof{bipoles/vsourceam/height}}{\ctikzvalof{bipoles/vsourceam/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+
+	\ifpgf at circ@oldvoltagedirection
+		\pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at down]{$+$}
+		\pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at up]{$-$}
+	\else
+		\ifpgf at circuit@bipole at voltage@backward
+				\pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at down]{$+$}
+				\pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at up]{$-$}
+		\else
+				\pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at down]{$-$}
+				\pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf at circ@res at up]{$+$}
+		\fi
+	\fi
+	\pgfusepath{draw}
+}
+
+
+
+%% Independent sinusoidal voltage source
+ 
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesin/height}}{vsourcesin}{\ctikzvalof{bipoles/vsourcesin/height}}{\ctikzvalof{bipoles/vsourcesin/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}		
+		
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+% Triangle Voltage source - contributed by Ralf Farkas
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}		
+		
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-1\pgf at circ@res at up}{0cm}}
+			\pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at up}{0.75\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at up}{-0.75\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at up}{0\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+% contributed by Alistair Kwan
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcesquare/height}}{vsourcesquare}{\ctikzvalof{bipoles/vsourcesquare/height}}{\ctikzvalof{bipoles/vsourcesquare/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}		
+		
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-1\pgf at circ@res at up}{0cm}}
+			\pgfpathlineto{\pgfpoint{-1\pgf at circ@res at up}{1\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0\pgf at circ@res at up}{1\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0\pgf at circ@res at up}{-1\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at up}{-1\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at up}{0\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+% Triangle Voltage source - contributed by Ralf Farkas
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}		
+		
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-1\pgf at circ@res at up}{0cm}}
+			\pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at up}{0.75\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at up}{-0.75\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at up}{0\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+%% Empty Source
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+	\pgfusepath{draw}
+}
+
+%% PV Source
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pvsource/height}}{pvsource}{\ctikzvalof{bipoles/pvsource/height}}{\ctikzvalof{bipoles/pvsource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+	\pgfusepath{draw}
+
+	%Adapted from battery1
+	\pgfpathmoveto{\pgfpoint{.15\pgf at circ@res at right}{0}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+	\pgfpathmoveto{\pgfpoint{.15\pgf at circ@res at left}{0}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpoint{.15\pgf at circ@res at left}{.4\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.15\pgf at circ@res at left}{.4\pgf at circ@res at down}}
+
+	\pgfpathmoveto{\pgfpoint{.15\pgf at circ@res at right}{.6\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.15\pgf at circ@res at right}{.6\pgf at circ@res at down}}
+	\pgfusepath{draw}
+
+	%Arrow Part
+	\pgfscope
+	\pgfsetarrowsend{latex}
+	\pgfpathmoveto{\pgfpointadd{\pgfpoint{.3\pgf at circ@res at left}{0}}{\pgfpointpolar{-45}{2.2\pgf at circ@res at up}}}
+	\pgfpathlineto{\pgfpointadd{\pgfpoint{.3\pgf at circ@res at left}{0}}{\pgfpointpolar{-45}{1.3\pgf at circ@res at up}}}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpointadd{\pgfpoint{0}{0.3\pgf at circ@res at up}}{\pgfpointpolar{-45}{2.2\pgf at circ@res at up}}}
+	\pgfpathlineto{\pgfpointadd{\pgfpoint{0}{0.3\pgf at circ@res at up}}{\pgfpointpolar{-45}{1.3\pgf at circ@res at up}}}
+	\pgfusepath{draw}
+	\endpgfscope
+
+}
+
+%% Empty Source
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+	\pgfusepath{draw}
+}
+
+%% DC Current Source with open shape
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcisource/height}}{dcisource}{\ctikzvalof{bipoles/dcisource/height}}{\ctikzvalof{bipoles/dcisource/width}}{
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpointorigin}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0}}\pgfpatharc{0}{90}{0.85\pgf at circ@res at right and \pgf at circ@res at up}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0}}\pgfpatharc{0}{-90}{0.85\pgf at circ@res at right and \pgf at circ@res at up}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}\pgfpatharc{180}{270}{0.85\pgf at circ@res at right and \pgf at circ@res at up}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}\pgfpatharc{180}{90}{0.85\pgf at circ@res at right and \pgf at circ@res at up}	
+	\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfusepath{draw}
+		\pgfscope
+		\ifpgf at circ@oldvoltagedirection
+			\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\else
+			\ifpgf at circuit@bipole at current@backward
+				\pgftransformshift{\pgfpoint{-.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+				\pgftransformrotate{180}
+			\else
+				\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\fi\fi
+				\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+		\endpgfscope
+}
+
+%% DC-Voltage source
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcvsource/height}}{dcvsource}{\ctikzvalof{bipoles/dcvsource/height}}{\ctikzvalof{bipoles/dcvsource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at up}{.5\pgf at circ@res at left}}
+	\pgfpathlineto{\pgfpoint{.2\pgf at circ@res at up}{.5\pgf at circ@res at right}}
+	\pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at down}{.5\pgf at circ@res at left}}
+	\pgfpathlineto{\pgfpoint{.2\pgf at circ@res at down}{.5\pgf at circ@res at right}}
+	\pgfusepath{draw}	
+}
+
+
+%% Independent current source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isource}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+	\pgfusepath{draw}
+}
+
+%% Independent double oo source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/oosource/height}}{oosource}{\ctikzvalof{bipoles/oosource/height}}{\ctikzvalof{bipoles/oosource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf at circ@res at left}{0}}
+		{\ctikzvalof{bipoles/oosource/circlesize}\pgf at circ@res at left}
+	\pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf at circ@res at right}{0}}
+		{\ctikzvalof{bipoles/oosource/circlesize}\pgf at circ@res at right}	
+	\pgfusepath{draw}
+}
+
+
+%% Independent current source - American
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isourceam/height}}{isourceAM}{\ctikzvalof{bipoles/isourceam/height}}{\ctikzvalof{bipoles/isourceam/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}
+
+	\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at left}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+	\pgfscope
+		\ifpgf at circ@oldvoltagedirection
+			\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\else
+			\ifpgf at circuit@bipole at current@backward
+				\pgftransformshift{\pgfpoint{-.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+				\pgftransformrotate{180}
+			\else
+				\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\fi\fi
+		\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+	\endpgfscope
+}
+
+
+
+
+%% Independent sinusoidal current source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/isource/height}}{isourcesin}{\ctikzvalof{bipoles/isource/height}}{\ctikzvalof{bipoles/isource/width}}{
+	\pgfpointorigin
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfusepath{draw}
+	
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+
+}
+
+
+%% Controlled voltage source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsource/height}}{cvsource}{\ctikzvalof{bipoles/cvsource/height}}{\ctikzvalof{bipoles/cvsource/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfusepath{draw}		
+}
+
+
+
+
+%% Controlled voltage source - American
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourceam/height}}{cvsourceAM}{\ctikzvalof{bipoles/cvsourceam/height}}{\ctikzvalof{bipoles/cvsourceam/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf at circ@res at left]{$+$}
+			\pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf at circ@res at right]{$-$}
+			\pgfusepath{draw}		
+}
+
+
+%% Controlled sinusoidal voltage source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cvsourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfscope
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfusepath{draw}		
+		\endpgfscope	
+
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+%% Controlled sinusoidal current source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cvsourcesin/height}}{cisourcesin}{\ctikzvalof{bipoles/cvsourcesin/height}}{\ctikzvalof{bipoles/cvsourcesin/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfscope
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfusepath{draw}		
+		\endpgfscope	
+
+		\pgf at circ@res at up = .5\pgf at circ@res at up
+		\pgfscope
+			\pgftransformrotate{90}
+			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{.5\pgf at circ@res at up}{-.5\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+
+%% Controlled current source
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisource/height}}{cisource}{\ctikzvalof{bipoles/cisource/height}}{\ctikzvalof{bipoles/cisource/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfusepath{draw}		
+}
+
+
+
+
+%% Controlled current source - American
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cisourceam/height}}{cisourceAM}{\ctikzvalof{bipoles/cisourceam/height}}{\ctikzvalof{bipoles/cisourceam/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+			\pgfusepath{draw}		
+
+	\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at left}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+	\pgfscope
+		\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfnode{currarrow}{center}{}{}{\pgfusepath{draw}}
+	\endpgfscope
+}
+
+%% Black generic diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulldiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% Black Zener diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+%% Black alternative zigzag Zener diode
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+    \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+    \pgfscope
+        \pgftransformxshift{\pgf at circ@res at left}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+        \pgfusepath{draw,fill}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-1.8\pgf at circ@res at left}{\pgf at circ@res at down-0.5\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-0.2\pgf at circ@res at left}{\pgf at circ@res at up-0.5\pgf at circ@res at down}}
+        \pgfusepath{draw}
+    \endpgfscope
+}
+
+%% Black Schottky diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{.6\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.4\pgf at circ@res at left}{.6\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+
+}
+
+%% Black tunnel diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulltdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+%% Black light emitting diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fulllediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsend{latex'}
+			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+}
+
+%% Black photodiode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullpdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsstart{latex'}
+			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
+			\pgfusepath{draw}
+}
+
+%% Black varcap
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw,fill}
+	
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+	\endpgfscope
+}
+
+%% Empty generic diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptydiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% Empty Zener diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-0.6\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+%% Empty alternative zigzag Zener diode
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+    \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+    \pgfscope
+        \pgftransformxshift{\pgf at circ@res at left}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+        \pgfusepath{draw}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-1.8\pgf at circ@res at left}{\pgf at circ@res at down-0.5\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-0.2\pgf at circ@res at left}{\pgf at circ@res at up-0.5\pgf at circ@res at down}}
+        \pgfusepath{draw}
+    \endpgfscope
+}
+%% Empty Schottky diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{.6\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.4\pgf at circ@res at left}{.6\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+
+}
+
+%% Empty tunnel diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptytdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+
+%% Empty light emitting diode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptylediode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+		
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsend{latex'}
+			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
+			\pgfusepath{draw}
+}
+
+%% Empty photodiode
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptypdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetarrowsstart{latex'}
+			\pgfpathmoveto{\pgfpoint{-0.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{2\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			\pgfpathmoveto{\pgfpoint{0.2\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{1.2\pgf at circ@res at right}{1.8\pgf at circ@res at up}}
+			\pgfusepath{draw}
+}
+
+%% Empty varcap
+
+\pgfcircdeclarebipole{
+	\anchor{strokepathstart}{
+			\northeast
+				\pgf at y=0cm
+				\pgf at x=.8\pgf at x
+		}
+	\anchor{strokepathend}{
+		\northeast
+		\pgf at y=0cm
+	}	
+	}{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at left}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
+		\pgfusepath{draw}
+	
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+	\endpgfscope
+}
+
+%% SPST
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{spst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
+
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathmoveto{\pgfpoint{.9\pgf at circ@res at left}{.9\pgf at circ@res at up}}
+            \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf at circ@Rlen}
+			%\pgfsetarrowsend{latex'}
+			\pgfusepath{draw}
+			
+			\pgfpathmoveto{\pgfpoint{.1\pgf at circ@res at right}{-.25\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{.14\pgf at circ@res at right}{-.35\pgf at circ@res at up}}
+            \pgfsetarrowsend{latex'}
+			\pgfusepath{draw}	
+
+}
+
+%% Closing SPST
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{cspst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
+
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathmoveto{\pgfpoint{.9\pgf at circ@res at left}{.9\pgf at circ@res at up}}
+            \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf at circ@Rlen}
+			%\pgfsetarrowsend{latex'}
+			\pgfusepath{draw}
+
+}
+
+%% Opening SPST
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{ospst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{
+
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfpathmoveto{\pgfpoint{.3\pgf at circ@res at right}{.1\pgf at circ@res at down}}
+            \pgfpatharc{15}{50}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf at circ@Rlen}
+            %\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at right}{\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			
+			\pgfpathmoveto{\pgfpoint{.85\pgf at circ@res at left}{1.25\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{.87\pgf at circ@res at left}{1.26\pgf at circ@res at up}}
+            \pgfsetarrowsend{latex'}
+			\pgfusepath{draw}
+            
+
+}
+
+
+%% Push Button
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pushbutton/height 2}}{pushbutton}{\ctikzvalof{bipoles/pushbutton/height}}{\ctikzvalof{bipoles/pushbutton/width}}{
+
+			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at up}}
+			\pgfpathmoveto{\pgfpoint{0}{.5\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{0}{\pgf at circ@res at up}}
+			\pgfusepath{draw}
+			
+			\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+			\pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
+			\pgftransformshift{\pgfpoint{2\pgf at circ@res at right}{0pt}}
+			\pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
+}
+
+%METERINGSHAPE
+\long\def\drawmeteringcircle{
+	\def\pgf at circ@temp{right}
+	\ifx\tikz at res@label at pos\pgf at circ@temp
+		\pgf at circ@res at step=-1.2\pgf at circ@res at up
+	\else
+		\def\pgf at circ@temp{below}
+		\ifx\tikz at res@label at pos\pgf at circ@temp
+			\pgf at circ@res at step=-1.2\pgf at circ@res at up
+		\else
+			\pgf at circ@res at step=1.2\pgf at circ@res at up
+		\fi
+	\fi
+	%draw connections to circle
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}		
+	\pgfpathlineto{\pgfpoint{.9\pgf at circ@res at left}{\pgf at circ@res at zero}}
+	\pgfpathmoveto{\pgfpoint{.9\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+	%draw circle
+	\pgfscope
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
+		\pgfusepath{draw}
+	\endpgfscope
+	%draw arrow
+	\pgfscope
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+}
+%AMPEREMETER
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
+	\drawmeteringcircle
+	\pgfnode{circle}{center}{\textbf{A}}{}{}
+}
+%OHMMETER
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ohmmeter/height}}{ohmmeter}{\ctikzvalof{bipoles/ohmmeter/height}}{\ctikzvalof{bipoles/ohmmeter/width}}{
+	\drawmeteringcircle
+	\pgfnode{circle}{center}{\boldmath$\Omega$}{}{}
+}
+%VOLTMETER
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
+	\drawmeteringcircle
+	\pgfnode{circle}{center}{\textbf{V}}{}{}
+		
+}
+
+%% Short circuit
+
+\pgfcircdeclarebipole{}{0}{short}{0}{0}{ }
+
+%% Open circuit
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/open/height}}{open}{\ctikzvalof{bipoles/open/height}}{\ctikzvalof{bipoles/open/width}}{
+
+}
+
+%% Generic bipole - used as resistor by some (bleah)
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
+
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		%\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+}
+
+
+%% fuse
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfusepath{draw}
+		
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+}
+
+
+
+%% Generic bipole, filled - used as inductor by some (bleah)
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fullgeneric/height}}{fullgeneric}{\ctikzvalof{bipoles/fullgeneric/height}}{\ctikzvalof{bipoles/fullgeneric/width}}{
+
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		%\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw,fill} 
+}
+
+
+%% Generic asymmetric bipole 
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ageneric/height}}{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		%\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+
+			\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+			\pgfusepath{stroke,fill}		
+}
+
+
+%% asymmetric fuse
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfusepath{draw}
+		
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw}
+		
+		\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+			\pgfusepath{stroke,fill}		 
+}
+
+
+
+
+%% Memristor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/memristor/height}}{memristor}{\ctikzvalof{bipoles/memristor/height}}{\ctikzvalof{bipoles/memristor/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.72*\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.72*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.35*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.35*\pgf at circ@res at left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.05*\pgf at circ@res at left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.05*\pgf at circ@res at left}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.42*\pgf at circ@res at right}{\ctikzvalof{bipoles/memristor/wave height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.42*\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{.8*\pgf at circ@res at right}{0pt}}
+					
+		\pgfusepath{draw} 
+
+			\pgfpathrectanglecorners{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+			\pgfusepath{stroke,fill}		
+}
+
+
+
+
+%% Generic empty tunable
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{.4\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{.4\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.5\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.5\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+%% Photoresistor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}{\pgfpoint{\pgf at circ@res at right}{-\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.3\pgf at circ@res at right}{-1.2\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.05\pgf at circ@res at right}{-1.2\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+
+%% Thermistor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf at circ@res at up}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		%\pgfscope
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{-\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		%\endpgfscope
+}
+
+
+%% Thermistor PTC
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf at circ@res at up}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{-\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\tiny$\vartheta$}
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.62\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.62\pgf at circ@res at left}{.7\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.45\pgf at circ@res at left}{.7\pgf at circ@res at down}}
+		\pgfusepath{draw}
+}
+
+%% Thermistor NTC
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf at circ@res at up}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{-\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\tiny$\vartheta$}
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.62\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.62\pgf at circ@res at left}{.7\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{.45\pgf at circ@res at left}{.7\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.45\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+}
+
+%% thermocouple
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathlineto{\pgfpoint{0}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfusepath{draw}
+}
+
+%% Varistor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf at circ@res at up}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw}
+		
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at left}{-\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\pgftext[top,x=.65\pgf at circ@res at left,y=1.2\pgf at circ@res at down]{{\tiny\textsf{U}}}
+}
+
+
+
+%% Generic full tunable
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{.4\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{.4\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfusepath{draw,fill}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{.5\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-.5\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+
+
+
+
+
+%% Variable Capacitor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/vcapacitor/width}\pgf at circ@Rlen
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf at circ@res at right
+
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{0pt}}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfusepath{draw}
+}
+
+
+%% Piezoelectric Element
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piezoelectric/height}}{piezoelectric}{\ctikzvalof{bipoles/piezoelectric/height}}{\ctikzvalof{bipoles/piezoelectric/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/piezoelectric/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 5
+
+		%% Outer markings
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+
+		%% Inner Box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left+4}{\pgf at circ@res at up-1}}{\pgfpoint{\pgf at circ@res at right-4}{\pgf at circ@res at down+1}}
+		\pgfusepath{draw}
+
+}
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Handling of terminals
+
+
+%% Easily usable styles
+
+\ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{d-o/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-d/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{d-/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{-d/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{d-*/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
+
+\tikzset{reversed/.style = {\circuitikzbasekey/bipole/reversed=true}}
+
+
+%% The output routine
+
+\def\drawpoles{
+	\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{diamond}  }
+	\ifx\pgf at temp\pgf at circ@temp 
+		{ (\tikztostart) node[diamond] {} }
+	\else 
+		\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{empty}  }
+		\ifx\pgf at temp\pgf at circ@temp 
+			{ (\tikztostart) node[ocirc] {} }
+		\else 
+			\pgfextra{ \def\pgf at temp{full}  }
+			\ifx\pgf at temp\pgf at circ@temp
+				{ (\tikztostart) node[circ] {} }
+			\fi
+		\fi
+	\fi
+	\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{diamond}  }
+	\ifx\pgf at temp\pgf at circ@temp 
+		{ (\tikztotarget) node[diamond] {} }
+	\else 
+		\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{empty}  }
+		\ifx\pgf at temp\pgf at circ@temp 
+			{ (\tikztotarget) node[ocirc] {} }
+		\else 
+			\pgfextra{ \def\pgf at temp{full}  }
+			\ifx\pgf at temp\pgf at circ@temp
+				{ (\tikztotarget) node[circ] {} }
+			\fi
+		\fi
+	\fi
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%% Lamp
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{.7071*\pgf at circ@res at left}{.7071*\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.7071*\pgf at circ@res at right}{.7071*\pgf at circ@res at down}}
+	\pgfpathmoveto{\pgfpoint{.7071*\pgf at circ@res at left}{.7071*\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{.7071*\pgf at circ@res at right}{.7071*\pgf at circ@res at up}}
+	\pgfusepath{draw}
+}
+
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height}
+                        }{tline}{\ctikzvalof{bipoles/tline/height}
+                                 }{\ctikzvalof{bipoles/tline/width}
+                                   }    
+          {
+          \pgf at circ@res at step=.2\pgf at circ@res at right % half x axis
+          \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+          \pgfpathellipse{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{0}}
+                         {\pgfpoint{\pgf at circ@res at step}{0}}
+                         {\pgfpoint{0}{-\pgf at circ@res at up}}
+          \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{\pgf at circ@res at up}}
+          \pgfpathlineto{\pgfpoint{\pgf at circ@res at left+\pgf at circ@res at step}{\pgf at circ@res at up}}
+          \pgfpatharc{-90}{90}{-\pgf at circ@res at step and -\pgf at circ@res at up}
+          \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{\pgf at circ@res at down}}
+          \pgfusepath{draw}
+}
+
+
+
+
+%% SQUID added by Cor Molenaar 5 March 2010
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid/height}}{squid}{\ctikzvalof{bipoles/squid/height}}{\ctikzvalof{bipoles/squid/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{1.35*\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.65*\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.65*\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{1.35*\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{1.35*\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.65*\pgf at circ@res at down}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.65*\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{1.35*\pgf at circ@res at down}}
+
+	\pgfusepath{draw}
+}
+
+
+
+% Generic barrier added by Cor Molenaar 5 March 2010
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/barrier/height}}{barrier}{\ctikzvalof{bipoles/barrier/height}}{\ctikzvalof{bipoles/barrier/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at step}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at step}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.35*\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.35*\pgf at circ@res at down}}
+	\pgfpathmoveto{\pgfpoint{0.35*\pgf at circ@res at left}{0.35*\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.35*\pgf at circ@res at right}{0.35*\pgf at circ@res at up}}
+
+	\pgfusepath{draw}
+}
+
+
+% Contributed by Danilo Piazzalunga
+ 
+\pgfdeclareshape{buffer}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at left}{0pt}}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	
+		\pgfusepath{draw}
+	  
+	  }
+	}
+
+
+
+
+
+\pgfdeclareshape{plain amp}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{-}{
+		\inOne
+	  }
+	  \anchor{+}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\up{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+	    \pgfpointlineattime{
+			\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{
+			\pgfpoint{
+				\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
+				{\pgf at circ@res at up}}
+			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	  }
+	  \anchor{up}{
+		\up
+	  }
+	  \anchor{down}{
+		\up
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at up}}
+	
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf at circ@res at down}}
+		
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+
+						
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		
+	  
+	  }
+	}
+	
+%% Generic two port box
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/twoport/height}}{twoport}{\ctikzvalof{bipoles/twoport/height}}{\ctikzvalof{bipoles/twoport/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/twoport/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% draw inner symbol
+		\pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
+		
+}
+
+%% voltage controled oscillator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vco/width}}{vco}{\ctikzvalof{bipoles/twoport/width}}{\ctikzvalof{bipoles/vco/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vco/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		% draw circle
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathcircle{\pgfpoint{0}{0}} {\pgf at circ@res at step}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% draw inner sine waves
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-.5\pgf at circ@res at step}{0\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		
+}
+
+%% bandpass filter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandpass/width}}{bandpass}{\ctikzvalof{bipoles/bandpass/width}}{\ctikzvalof{bipoles/bandpass/width}}{
+		
+		\pgf at circ@res at step = \ctikzvalof{bipoles/bandpass/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+		
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{0.35\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.65\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.65\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{-0.35\pgf at circ@res at step}}
+		\pgfusepath{draw}
+}
+
+%% highpass filter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/highpass/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.65\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{-0.35\pgf at circ@res at step}}
+		\pgfusepath{draw}
+}
+
+%% lowpass filter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lowpass/width}}{lowpass}{\ctikzvalof{bipoles/lowpass/width}}{\ctikzvalof{bipoles/lowpass/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/lowpass/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{0.35\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.65\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
+		\pgfusepath{draw}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+		\pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+		\pgfusepath{draw}
+}
+
+%% ADC
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/adc/width}}{adc}{\ctikzvalof{bipoles/adc/width}}{\ctikzvalof{bipoles/adc/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/adc/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\texti{A}
+		\def\textii{D}
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\def\texti{D}
+			\def\textii{A}
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\def\texti{D}
+			\def\textii{A}
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+			\def\texti{A}
+			\def\textii{D}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows				
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\textsf{\texti}}
+		\pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textsf{\textii}}
+}
+
+%% DAC
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dac/width}}{dac}{\ctikzvalof{bipoles/dac/width}}{\ctikzvalof{bipoles/dac/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/dac/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\texti{D}
+		\def\textii{A}
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\def\texti{A}
+			\def\textii{D}
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+			\def\texti{A}
+			\def\textii{D}
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+			\def\texti{D}
+			\def\textii{A}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows				
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\textsf{\texti}}
+		\pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textsf{\textii}}
+}
+
+%% DSP
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dsp/width}}{dsp}{\ctikzvalof{bipoles/dsp/width}}{\ctikzvalof{bipoles/dsp/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/dsp/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgftext[center,x=0,y=0]{\textsf{DSP}}
+}
+
+%% FFT
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fft/width}}{fft}{\ctikzvalof{bipoles/fft/width}}{\ctikzvalof{bipoles/fft/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/fft/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgftext[center,x=0,y=0]{\textsf{FFT}}
+}
+
+%% Amplifier
+\pgfcircdeclarebipole{}{
+		\ifpgf at circuit@boxed
+			\ctikzvalof{bipoles/twoport/width}
+		\else
+			\ctikzvalof{bipoles/amp/width}
+		\fi
+	}{amp}{
+		\ifpgf at circuit@boxed
+			\ctikzvalof{bipoles/twoport/width}
+		\else
+			\ctikzvalof{bipoles/amp/width}
+		\fi
+	}{
+		\ifpgf at circuit@boxed
+			\ctikzvalof{bipoles/twoport/width}
+		\else
+			\ctikzvalof{bipoles/amp/width}
+		\fi
+	}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/amp/width}\pgf at circ@Rlen
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi		
+
+		% draw outer box
+		\ifpgf at circuit@boxed
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}	
+			\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+		\fi
+		
+		% draw input arrow
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+
+		\ifpgf at circuit@boxed
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetdash{}{0pt}	% draw solid line for inner symbol if no box is drawn
+			\pgf at circ@res at step=.7\pgf at circ@res at step % scale amp symbol when inside a box
+		\else
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}	
+		\fi
+		
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.55\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0}}
+		\pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.55\pgf at circ@res at step}}
+
+		\pgfpathclose
+		\pgfusepath{draw}
+		
+		% draw inner text
+		\pgftext[center,x=-0.12\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+}
+
+
+%% variable amplifier
+\pgfcircdeclarebipole{}{
+		\ifpgf at circuit@boxed
+			\ctikzvalof{bipoles/twoport/width}
+		\else
+			\ctikzvalof{bipoles/amp/width}
+		\fi
+	}{vamp}{
+		\ifpgf at circuit@boxed
+			\ctikzvalof{bipoles/twoport/width}
+		\else
+			\ctikzvalof{bipoles/amp/width}
+		\fi
+	}{
+		\ifpgf at circuit@boxed
+			\ctikzvalof{bipoles/twoport/width}
+		\else
+			\ctikzvalof{bipoles/amp/width}
+		\fi
+	}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/amp/width}\pgf at circ@Rlen
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\ifpgf at circuit@boxed
+			\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+		\fi
+
+		% draw input arrow
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+
+		\ifpgf at circuit@boxed
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfsetdash{}{0pt}	% draw solid line for inner symbol if no box is drawn
+			\pgf at circ@res at step=.7\pgf at circ@res at step % scale amp symbol when inside a box
+		\else
+			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}	
+		\fi
+		
+
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+
+		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.55\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0}}
+		\pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.55\pgf at circ@res at step}}
+
+		\pgfpathclose
+		\pgfusepath{draw}
+		
+		% draw inner text
+		\pgftext[center,x=-0.12\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+		
+		% draw arrow
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{-0.8\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at step}{0.6\pgf at circ@res at step}}
+		\pgfusepath{draw}
+}
+
+%% pi attenuator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piattenuator/width}}{piattenuator}{\ctikzvalof{bipoles/piattenuator/width}}{\ctikzvalof{bipoles/piattenuator/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/piattenuator/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% variable pi attenuator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vpiattenuator/width}}{vpiattenuator}{\ctikzvalof{bipoles/vpiattenuator/width}}{\ctikzvalof{bipoles/vpiattenuator/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% T attenuator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tattenuator/width}}{tattenuator}{\ctikzvalof{bipoles/tattenuator/width}}{\ctikzvalof{bipoles/tattenuator/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/tattenuator/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% variable T attenuator
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vtattenuator/width}}{vtattenuator}{\ctikzvalof{bipoles/vtattenuator/width}}{\ctikzvalof{bipoles/vtattenuator/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vtattenuator/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+
+		% draw inner symbol
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% phase shifter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{phaseshifter}{\ctikzvalof{bipoles/phaseshifter/width}}{\ctikzvalof{bipoles/phaseshifter/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/phaseshifter/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% inner symbol
+		\pgftext[center,x=0,y=0]{\Large$\varphi$}
+}
+
+%% variable phase shifter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/phaseshifter/width}}{vphaseshifter}{\ctikzvalof{bipoles/vphaseshifter/width}}{\ctikzvalof{bipoles/vphaseshifter/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% rotate inner symbol
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+			\pgftransformrotate{270}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
+			\pgftransformrotate{180}
+		\fi\fi
+		\ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+			\pgftransformrotate{90}
+		\fi\fi
+		
+		% inner symbol
+		\pgftext[center,x=0,y=0]{\Large$\varphi$}
+		
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfsetarrowsend{latex}
+		\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0.65\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.65\pgf at circ@res at up}}
+		\pgfusepath{draw}
+}
+
+%% detector
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/detector/width}}{detector}{\ctikzvalof{bipoles/detector/width}}{\ctikzvalof{bipoles/detector/width}}{
+		\pgf at circ@res at step = \ctikzvalof{bipoles/detector/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 2
+
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgf at circ@res at other = \pgf at circ@res at left
+		\advance\pgf at circ@res at other by \pgf at circ@res at step 
+		
+		\ifpgf at circuit@dashed
+			\pgfsetdash{{0.1cm}{0.1cm}}{0cm} 
+		\fi	
+		
+		% draw outer box
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@inputarrow
+			{
+				\advance \pgf at circ@res at left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+				\pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+			}
+		\fi
+		
+		% draw inner stuff
+		\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+		\pgfsetarrows{-} %never draw arrows
+		\pgfsetlinewidth{0.8\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{0.75\pgf at circ@res at right}{0}}
+		\pgfusepath{draw}
+		
+		\ifpgf at circuit@fulldiode
+			\pgfmathparse{2\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/generic/width}}
+			\pgftransformscale{\pgfmathresult}
+			\pgfnode{fulldiodeshape}{center}{}{pgf at fulldiode}{\pgfusepath{fill}}
+		\else
+			\pgfmathparse{2\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/resistor/width}}
+			\pgftransformscale{\pgfmathresult}
+			\pgfnode{emptydiodeshape}{center}{}{pgf at emptydiode}{\pgfusepath{fill}}
+		\fi
+		
+}
+
+
+
+
+%% european gas filled surge arrester
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/european gas filled surge arrester/height}}{european gas filled surge arrester}{\ctikzvalof{bipoles/european gas filled surge arrester/height}}{\ctikzvalof{bipoles/european gas filled surge arrester/width}}{
+
+		%\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		%\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+		
+		\pgfscope
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf at circ@res at left}{0pt}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}	
+				\pgfusepath{draw} 
+	
+		\endpgfscope
+}
+
+
+
+
+%% american gas filled surge arrester
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/american gas filled surge arrester/height}}{american gas filled surge arrester}{\ctikzvalof{bipoles/american gas filled surge arrester/height}}{\ctikzvalof{bipoles/american gas filled surge arrester/width}}{
+	%\def\pgf at circ@temp{right}
+	%\ifx\tikz at res@label at pos\pgf at circ@temp
+	%	\pgf at circ@res at step=-1.2\pgf at circ@res at up
+	%\else
+%		\def\pgf at circ@temp{below}
+%		\ifx\tikz at res@label at pos\pgf at circ@temp
+%			\pgf at circ@res at step=-1.2\pgf at circ@res at up
+%		\else
+%			\pgf at circ@res at step=1.2\pgf at circ@res at up
+%		\fi
+%	\fi
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}		
+	\pgfpointorigin	\pgf at circ@res at other =  \pgf at x  \advance \pgf at circ@res at other by -\pgf at circ@res at up
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+		\pgfscope
+			\pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
+			\pgfusepath{draw}		
+		\endpgfscope	
+
+	\pgfsetlinewidth{\pgfstartlinewidth}
+
+
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+	\pgfusepath{draw}
+
+	\pgfnode{circle}{center}{}{}{}
+	
+	\pgfscope
+		\pgfsetarrowsend{latex}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\pgfusepath{draw}	
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf at circ@res at left}{\pgf at circ@res at zero}}
+		\pgfusepath{draw}	
+	\endpgfscope{}
+	
+	%\pgftransformshift{\pgfpoint{.25\pgf at circ@res at left}{.45\pgf at circ@res at down}}
+	%\pgfnode{circ}{center}{}{}{}
+	%\pgftransformshift{}
+	\pgfcircle{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot x}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot y}\pgf at circ@res at down}}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/size}\pgf at circ@res at down}
+	\pgfusepath{fill}
+}
+
+% % MECHANICAL SYMBOLS
+
+%% mechanical capacitance - stiffness/spring
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spring/height}}{spring}{\ctikzvalof{bipoles/spring/height}}{\ctikzvalof{bipoles/spring/width}}{
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgftransformationadjustments
+
+	\pgfmathsetlength{\pgf at circ@res at step}
+	{(\ctikzvalof{bipoles/spring/width}*\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth)/16}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
+	\pgfsetcornersarced{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+	\pgf at circ@res at other = \pgf at circ@res at left
+	\advance\pgf at circ@res at other by \pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\advance\pgf at circ@res at other by \pgf at circ@res at step
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+	\pgfsetbuttcap
+	\pgfsetbeveljoin
+	\pgfusepath{stroke}
+}
+
+%% mechanical inductance - mass
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/mass/box height}}{mass}{\ctikzvalof{bipoles/mass/height}}{\ctikzvalof{bipoles/mass/width}}{
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgftransformationadjustments
+	\pgfpathrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-2\pgf at circ@res at down}{-2\pgf at circ@res at down}}
+
+\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfsetrectcap
+	\pgfsetmiterjoin
+	\pgfusepath{stroke}
+}
+
+%% mechanical resistor - damper
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/damper/height}}{damper}{\ctikzvalof{bipoles/damper/height}}{\ctikzvalof{bipoles/damper/width}}{
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+	\pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf at circ@res at right}
+					{\pgf at circ@res at zero}}
+	\pgfusepath{stroke}
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+
+	\pgfsetrectcap
+	\pgfsetmiterjoin
+	\pgfusepath{stroke}
+	
+	\pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf at circ@res at right}
+						{.8\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf at circ@res at right}
+						{.8\pgf at circ@res at up}}
+	\pgfsetbuttcap
+	\pgfusepath{stroke}
+	
+}
+
+
+%%%---------- close: tex/pgfcircbipoles
+%%%%%%%%%%% Springe nach tex/pgfcirctripoles
+%%%---------- open: tex/pgfcirctripoles.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Tripoles
+
+
+
+\pgfdeclareshape{spdt}
+	{
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{left}{%
+	  	\northwest
+	  	\pgf at y=0pt
+	  }
+	  \anchor{in}{
+	  	\northwest
+	  	\pgf at y=0pt
+	  }	  
+	  \anchor{out 1}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{out 2}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }
+  	  \anchor{center}{
+		\pgf at y=0pt
+		\pgf at x=0pt
+	  }
+	  \anchor{east}{
+	  	\northwest
+		\pgf at y=0pt
+	  	\pgf at x=-\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x  
+			\pgf at circ@res at left = \pgf at x  
+			\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf at circ@res at left
+			
+		
+	  	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	  	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+		
+		\pgfusepath{draw}
+		
+		\pgfscope
+			\pgftransformshift{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+			\pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
+		\endpgfscope
+		\pgfscope
+			\pgftransformshift{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
+			\pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}}
+		\endpgfscope
+		\pgfscope
+			\pgftransformshift{\pgfpoint{\pgf at circ@res at other}{0pt}}
+			\pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
+		\endpgfscope
+		
+		
+		\pgfscope
+			\pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
+			\pgfpathlineto{
+				\pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf at circ@res at other}{-100pt}}}
+				{\pgfpoint{-.05\pgf at circ@res at up}{-.05\pgf at circ@res at up}}
+			}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+		\endpgfscope
+	  }
+	}
+	
+	
+	
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%%       Logic ports
+%%
+
+
+
+
+
+
+\long\def\pgfcircdeclarelogicport#1#2{
+	\pgfdeclareshape{american #1 port}
+	{
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{in 1}{
+		\inOne
+	  }
+	  \anchor{in}{
+		\inOne
+	  }	  
+	  \anchor{in 2}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+  	  \anchor{center}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{east}{
+	  	\left
+	  	\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\left
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+			#2
+	  
+	  }
+	}
+}
+
+
+\pgfcircdeclarelogicport{and}{
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
+		{0pt}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+		{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+		{\pgf at circ@res at down}}
+	\pgfpathcurveto
+		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
+			{.5\pgf at circ@res at down}}
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
+			{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at right}
+			{.5\pgf at circ@res at up}}
+		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf at circ@res at left}
+			{\pgf at circ@res at up}}	
+	\pgfusepath{draw}
+}
+
+
+
+\pgfcircdeclarelogicport{nand}{
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at right}
+		{0pt}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{2\pgflinewidth}
+
+	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf at circ@res at right
+	\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at right
+	
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}
+	\pgfpathcurveto
+		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{.5\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{.5\pgf at circ@res at up}}
+		{\pgfpoint{.0\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf at circ@res at left}
+			{\pgf at circ@res at up}}	
+	\pgfpathellipse
+		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
+
+	\pgfusepath{draw}
+}
+
+
+\pgfcircdeclarelogicport{nor}{
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf at circ@res at right}
+		{0pt}}	
+	
+	\pgfusepath{draw}
+	
+	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf at circ@res at right
+	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf at circ@res at right
+		
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
+
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
+		
+	\pgfpathellipse
+		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
+		
+	\pgfusepath{draw}
+}
+
+
+
+
+\pgfcircdeclarelogicport{or}{
+
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf at circ@res at right}
+		{0pt}}	
+	
+	\pgfusepath{draw}
+	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf at circ@res at right
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
+
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
+	\pgfusepath{draw}
+}
+
+
+\pgfcircdeclarelogicport{xor}{
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf at circ@res at right}
+		{0pt}}	
+	
+	\pgfusepath{draw}
+	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf at circ@res at right
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
+
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
+		
+	\def\pgf at circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf at circ@res at right+}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at up}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{.95*\pgf at circ@res at down}}	
+				
+	\pgfusepath{draw}
+}
+
+
+
+\pgfcircdeclarelogicport{xnor}{
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at up}}
+	
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input skip})*\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/input height}\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf at circ@res at right}
+		{0pt}}	
+	
+	\pgfusepath{draw}
+	\pgf at circ@res at other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf at circ@res at right
+	\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf at circ@res at right
+
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at down}}	
+
+	\pgfpathcurveto
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@res at other-\pgf at circ@res at step}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ddd}\pgf at circ@res at left}{\pgf at circ@res at up}}
+		{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}	
+		
+	\def\pgf at circ@temp{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/distance}\pgf at circ@res at right+}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{\pgf at circ@res at up}}
+	
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at up}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at up}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{0pt}}
+	\pgfpathcurveto
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/bbb}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/ccc}\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@temp\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/aaa}\pgf at circ@res at left}{.95*\pgf at circ@res at down}}
+		{\pgfpoint{\pgf at circ@temp-\pgf at circ@res at other}{.95*\pgf at circ@res at down}}	
+		
+		
+	\pgfpathellipse
+		{\pgfpoint{\pgf at circ@res at other-.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{.5\pgf at circ@res at step}{0pt}}
+		{\pgfpoint{0pt}{.5\pgf at circ@res at step}}
+				
+	\pgfusepath{draw}
+}
+
+
+\pgfdeclareshape{american not port}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{center}{
+	  	\pgfpointorigin
+	  }
+	  \anchor{east}{
+	  	\left
+	  	\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\left
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+		\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf at circ@res at right
+						
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfusepath{draw}
+		\pgfpathellipse
+			{\pgfpoint{\pgf at circ@res at step-.5\pgf at circ@res at other}{0pt}}
+			{\pgfpoint{.5\pgf at circ@res at other}{0pt}}
+			{\pgfpoint{0pt}{.5\pgf at circ@res at other}}
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at left}{0pt}}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	
+		\pgfusepath{draw}
+	  
+	  }
+	}
+
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% #1 - name
+% #2 - text inside
+% #3 - number of inputs
+% #4 - is it a not
+
+\long\def\pgfcircdeclareeurologicport#1#2#3#4{
+	\pgfdeclareshape{european #1 port}
+	{
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{in}{
+		\inOne
+	  }
+	  \anchor{in 1}{
+		\inOne
+	  }
+	  \anchor{in 2}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+  	  \anchor{center}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{east}{
+	  	\left
+	  	\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\left
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			\def\pgf at temp{1}
+			\def\pgf at circ@temp{#3}
+			\ifx\pgftemp\pgf at circ@temp % one input
+				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfpathlineto{
+					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}{0pt}}
+			\else % two inputs
+				\pgfpathmoveto{
+					\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at up}}
+				\pgfpathlineto{
+					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at up}}
+					%
+				\pgfpathmoveto{
+					\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at down}}
+				\pgfpathlineto{
+					\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf at circ@res at down}}
+			\fi%
+			%
+			%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+			\pgfpathlineto{
+				\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{0pt}}
+			%
+			\edef\pgf at temp{not}
+			\edef\pgf at circ@temp{#4}
+			\ifx\pgf at temp\pgf at circ@temp % is a not
+				\pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf at circ@res at right}{0pt}}
+				\pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not height}\pgf at circ@res at up}}
+			\fi
+			%
+			\pgfusepath{draw}
+			%
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgftext{#2}
+			%
+			%
+			%
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfpathrectanglecorners
+				{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at left}{\pgf at circ@res at up}}
+				{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf at circ@res at right}{\pgf at circ@res at down}}
+			\pgfusepath{draw}
+%
+%
+	  }
+	}
+}
+
+
+
+\pgfcircdeclareeurologicport{and}{$\&$}{2}{}
+\pgfcircdeclareeurologicport{or}{$\ge 1$}{2}{}
+\pgfcircdeclareeurologicport{xor}{$=1$}{2}{}
+\pgfcircdeclareeurologicport{not}{$1$}{1}{not}
+\pgfcircdeclareeurologicport{nand}{$\&$}{2}{not}
+\pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
+\pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
+
+\long\def\pgfcircdeclaretransistor#1#2#3{
+	\pgfdeclareshape{#1}
+	{
+	\anchor{center}{
+		 \pgfpointorigin
+	 }
+	\savedanchor\northeast{% upper right
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x=0pt
+	}
+	\savedanchor\left{%center left
+	  	\pgf at y=0pt
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf at x
+	}
+	\anchor{text}{
+	 \northeast
+	 \pgf at y=.7\pgf at y
+	 \pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+	 \pgf at x=0.1\pgf at x
+	}
+	\anchor{pathstart}{ % south
+		  	\northeast
+			\pgf at y=-\pgf at y
+	}
+	\anchor{pathend}{
+		  	\northeast
+	}  
+	\anchor{north}{
+			\northeast
+			\pgf at circ@res at step=\pgf at y
+			\left
+			\pgf at y=\pgf at circ@res at step
+			\pgf at x=.5\pgf at x
+		}  
+	 \anchor{west}{
+			\left
+	 }
+	 \anchor{east}{
+		  	\northeast
+			\pgf at y=0pt
+	 }  
+	\anchor{south}{
+			\northeast
+			\pgf at circ@res at step=\pgf at y
+			\left
+			\pgf at y=-\pgf at circ@res at step
+			\pgf at x=.5\pgf at x
+	}
+	\anchor{south west}{
+			\northeast
+			\pgf at circ@res at step=\pgf at y
+			\left
+			\pgf at y=-\pgf at circ@res at step
+	}
+	\anchor{north east}{
+		\northeast
+	}
+	\anchor{north west}{
+			\northeast
+			\pgf at circ@res at step=\pgf at y
+			\left
+			\pgf at y=\pgf at circ@res at step
+	}
+	\anchor{south east}{
+		\northeast
+		\pgf at y=-\pgf at y
+	}
+	\anchor{B}{
+			 \northeast
+	         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at y
+	         \left
+	         \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at circ@res at step
+	}
+	\anchor{base}{
+			 \northeast
+	         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at y
+	         \left
+	         \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at circ@res at step
+	}
+		\anchor{G}{
+	         \northeast
+	         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at y
+	         \left
+	         \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at circ@res at step
+		}
+		\anchor{gate}{
+	         \northeast
+	         \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at y
+	         \left
+	         \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at circ@res at step
+		}	
+	 \anchor{nobase}{
+	 		 	\left
+	 		 	\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at x
+	 }
+	 	\anchor{nogate}{
+	 		\left
+	 		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at x
+	 	}	
+	 	\anchor{E}{
+	 		\northeast
+	 		\pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+	 	}
+	 	\anchor{emitter}{
+	 		\northeast
+	 		\pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+	 	}
+	 	\anchor{C}{
+	 		\northeast
+	 		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+	 	}
+	 	\anchor{collector}{
+	 		\northeast
+	 		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+	 	}
+	 	\anchor{S}{
+	 		\northeast
+	 		\pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+	 	}
+	 	\anchor{source}{
+	 		\northeast
+	 		\pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+	 	}
+	 	\anchor{D}{
+	 		\northeast
+	 		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+	 	}
+	 	\anchor{drain}{
+	 		\northeast
+	 		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+	 	}	
+	  #2
+	  \backgroundpath{
+	  	\pgftransformationadjustments		
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			%
+			\ifnum \pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction} > 0
+				\pgf at circuit@trans at ntypetrue
+			\else
+				\pgf at circuit@trans at ntypefalse
+			\fi
+			\northeast
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = \pgf at x
+			\left
+			\pgf at circ@res at left = \pgf at x
+			%
+			#3
+			% BODY DIODE
+			\ifpgf at circuit@fet at bodydiode
+			\drawbodydiode{#1}
+			\fi
+	  %
+	  }
+	}
+}
+
+\long\def\drawbodydiode#1{
+        \pgfscope
+	         \pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+	        \pgftransformrotate{90}
+			\pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}}
+			\ifpgf at circuit@fulldiode
+				\pgfnode{fulldiodeshape}{center}{}{pgf at bodydiode}{\pgfusepath{fill}}
+			\else
+				\pgfnode{emptydiodeshape}{center}{}{pgf at bodydiode}{\pgfusepath{fill}}
+			\fi
+		\endpgfscope
+		%Draw upper connection to body diode
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}
+						{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf at circ@res at left}
+						{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at up}}
+			 	\pgfpathlineto{\pgfpointanchor{pgf at bodydiode}{east}}
+		\pgfusepath{draw}
+		\pgfscope
+	        \pgftransformshift{\pgfpoint{\pgf at circ@res at right}
+        	       {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at up}}
+   	       	\pgftransformscale{0.5}
+        \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
+      \endpgfscope{}
+   		%Draw lower connection to body diode
+	   \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}
+	        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
+			 	\pgfpathlineto{\pgfpointanchor{pgf at bodydiode}{west}}
+		\pgfusepath{draw}
+		\pgfscope
+      \pgftransformshift{\pgfpoint{\pgf at circ@res at right}		        	       {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
+  	       		\pgftransformscale{0.5}
+      \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
+    \endpgfscope
+}
+
+\long\def\declarebpt#1{
+	\pgfcircdeclaretransistor{#1}{}{
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	
+		\pgfscope
+		\pgfpathmoveto{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}}
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgfusepath{draw}
+		\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}		
+		\pgfusepath{draw}
+		%draw arrow depending on type of transiytor
+	 	\pgfscope
+	 	\pgfslopedattimetrue
+	 	\pgfallowupsidedownattimetrue
+	 	\pgfresetnontranslationattimefalse
+		\ifpgf at circuit@trans at ntype
+		 	\pgftransformlineattime{.5}{%
+		 		\pgfpoint%
+		 			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+		 			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf at circ@res at down}%
+		 	}{%
+		 		\pgfpoint{\pgf at circ@res at right}%
+		 			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}%
+		 	}
+		\else
+		 	\pgftransformlineattime{.5}{%
+		 		\pgfpoint{\pgf at circ@res at right}%
+		 				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up}%
+		 		}{%
+		 		\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+		 				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf at circ@res at up}%
+		 		}
+		\fi
+		\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+		\endpgfscope
+	
+		\ifpgf at circuit@bpt at drawphoto
+					\pgfscope
+					\pgfsetarrowsstart{latex'}
+					\pgfpathmoveto{\pgfpointadd{\pgfpoint
+										{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+										{\pgf at circ@res at up+\pgf at circ@res at down}}
+										{\pgfpoint{0.05\pgf at circ@res at left}{0.1\pgf at circ@res at up}}}
+					\pgfpathlineto{\pgfpointadd{\pgfpoint
+										{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+										{\pgf at circ@res at up+\pgf at circ@res at down}}
+										{\pgfpoint{0.5\pgf at circ@res at left}{0.3\pgf at circ@res at up}}}
+					\pgfusepath{draw}
+					\pgfpathmoveto{\pgfpointadd{\pgfpoint
+										{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+										{\pgf at circ@res at up+\pgf at circ@res at down}}
+										{\pgfpoint{0.05\pgf at circ@res at left}{-0.1\pgf at circ@res at up}}}
+					\pgfpathlineto{\pgfpointadd{\pgfpoint
+										{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+										{\pgf at circ@res at up+\pgf at circ@res at down}}
+										{\pgfpoint{0.5\pgf at circ@res at left}{0.1\pgf at circ@res at up}}}
+					\pgfusepath{draw}
+					\endpgfscope
+		\else
+		\ifpgf at circuit@bpt at drawbase
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfusepath{draw}
+		\fi
+		\fi
+	}
+}
+
+\declarebpt{npn}
+\declarebpt{pnp}
+
+\long\def\declareigbt#1{
+\pgfcircdeclaretransistor{#1}{}
+{
+	%draw upper connection
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf at circ@res at up}}
+	\pgfusepath{draw}
+
+	%draw thicker gate lines
+	\pgfscope
+	\pgfpathmoveto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+	\pgfpathmoveto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfusepath{draw}
+	\endpgfscope
+	%draw lower connection		
+	\pgfpathmoveto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}		
+	\pgfusepath{draw}
+	%draw arrow depending on type of transiytor
+ 	\pgfscope
+ 	\pgfslopedattimetrue
+ 	\pgfallowupsidedownattimetrue
+ 	\pgfresetnontranslationattimefalse
+	\ifpgf at circuit@trans at ntype
+	 	\pgftransformlineattime{.5}{%
+	 		\pgfpoint%
+	 			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+	 			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf at circ@res at down}%
+	 	}{%
+	 		\pgfpoint{\pgf at circ@res at right}%
+	 			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down}%
+	 	}
+	\else
+	 	\pgftransformlineattime{.5}{%
+	 		\pgfpoint{\pgf at circ@res at right}%
+	 				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up}%
+	 		}{%
+	 		\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+	 				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf at circ@res at up}%
+	 		}
+	\fi
+	\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+	\endpgfscope
+	%draw gate
+	\ifpgf at circuit@trans at ntype	
+		\pgfpathmoveto{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}				
+	\else
+		\pgfpathmoveto{\pgfpoint
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+			{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at up}}			
+	\fi
+	\pgfusepath{draw}
+}
+}
+
+\declareigbt{pigbt}
+\declareigbt{nigbt}
+\declareigbt{Lnigbt}
+\declareigbt{Lpigbt}
+
+
+\pgfcircdeclaretransistor{nmos}{}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
+
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+			\pgfusepath{draw}
+			
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at down}}
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+		\ifpgf at circuit@mos at arrows
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.6}{%
+				\pgfpoint%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}%
+			}{%
+				\pgfpoint
+					{\pgf at circ@res at right}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+		\fi
+
+		\ifpgf at circuit@bpt at drawgate			
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf at circ@res at up+\pgf at circ@res at down}}
+			\pgfusepath{draw}
+		\fi
+}
+
+
+\pgfcircdeclaretransistor{pmos}{}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+		\ifpgf at circuit@mos at arrows
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.4}{%
+				\pgfpoint%
+					{\pgf at circ@res at right}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}%
+			}{%
+				\pgfpoint
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+		\fi
+
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf at circ@res at down}}
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}		
+
+
+			\pgfusepath{draw}		
+			\ifpgf at circuit@bpt at drawgate
+				\pgfpathmoveto{\pgfpoint
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
+					{\pgf at circ@res at up+\pgf at circ@res at down}}
+				\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf at circ@res at up+\pgf at circ@res at down}}
+				\pgfusepath{draw}
+			\fi
+			\pgfpathcircle{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+				{\pgf at circ@res at up+\pgf at circ@res at down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+			\ifpgf at circuit@pmos at emptycircle
+				\pgfsetfillcolor{white}
+			\fi
+			\pgfusepath{draw,fill}		
+}
+
+\long\def\drawfetcore#1{
+	\pgftransformationadjustments
+		%top connection
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up}}
+		\pgfusepath{draw}
+		\pgfscope
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up}}
+		\ifpgf at circuit@trans at depletiontype
+		      \pgfpathlineto{\pgfpoint
+		        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+		        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}}
+		\else
+
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up*0.45}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up*0.25}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down*0.25}}
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down*0.45}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}}
+        \fi
+      \pgfsetlinewidth{2\pgflinewidth}
+		\pgfusepath{draw}
+		\endpgfscope
+		%Bulk connection line
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+      
+      %bottom connection
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+       {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}    
+      \pgfusepath{draw}
+     
+     %draw thick gate line 
+    \pgfscope
+    \pgfpathmoveto{\pgfpoint
+      {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+      {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+    \pgfpathlineto{\pgfpoint
+      {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+      {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+    \pgfsetlinewidth{2\pgflinewidth}
+    \pgfusepath{draw}
+    \endpgfscope
+    
+      \pgfscope
+          \pgfslopedattimetrue 
+          \pgfallowupsidedownattimetrue
+          \pgfresetnontranslationattimefalse
+          
+          \pgftransformlineattime{.6}{%
+            \pgfpoint
+              {\pgf at circ@res at right}%
+              {\pgf at circ@res at up+\pgf at circ@res at down}%
+          }{%
+            \pgfpoint%
+              {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+              {\pgf at circ@res at up+\pgf at circ@res at down}%
+          }
+          	  \ifpgf at circuit@trans at ntype
+          	  \else
+          	  \pgftransformrotate{180}
+          	  \fi
+          \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+          \endpgfscope
+      
+      	% GATE CONNECTION
+      	\ifpgf at circuit@bpt at drawgate
+			\ifpgf at circuit@trans at ntype
+		      	\pgfpathmoveto{\pgfpoint
+		      		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+		      		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+		      	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+	      	\else
+		      	\pgfpathmoveto{\pgfpoint
+		      		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+		      		{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+		      	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}      	
+	      	\fi
+      	\pgfusepath{draw}
+      	\fi
+
+}
+
+\long\def\pgfdeclaretransistorwrapperaddbulk#1#2#3
+{\pgfcircdeclaretransistor{#1}{
+	\anchor{bulk}{\left\pgf at x=0pt}
+ 	\anchor{B}{\left\pgf at x=0pt}%override Base anchor from npn&igbt
+	 #2
+	 }
+	 {#3}
+}
+
+
+\pgfdeclaretransistorwrapperaddbulk{nfet}{}{%
+	\pgf at circuit@trans at depletiontypefalse
+	\drawfetcore{nfet}
+}
+
+
+\pgfdeclaretransistorwrapperaddbulk{pfet}{}{%
+	\pgf at circuit@trans at depletiontypefalse
+	\drawfetcore{pfet}
+}
+
+% N-CHANNEL IGFET ENHANCEMENT TYPE
+\pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%	
+	\pgf at circuit@trans at depletiontypefalse
+	\drawfetcore{nigfete}
+	     
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+      
+      % SOLDER DOT at source-bulk connection
+      \ifpgf at circuit@fet at solderdot
+      \pgfscope
+        \pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
+          \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+        \pgfnode{circ}{center}{}{}{}
+      \endpgfscope{}
+      \fi
+}
+
+
+
+
+% N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector
+\pgfdeclaretransistorwrapperaddbulk{nigfetebulk}{}{%
+	\pgf at circuit@trans at depletiontypefalse
+	\drawfetcore{nigfetebulk}
+    % SOLDER DOT at source-bulk connection
+      \ifpgf at circuit@fet at solderdot
+      \pgfscope
+        \pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
+          \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at down}}
+        \pgfnode{circ}{center}{}{}{}
+      \endpgfscope{}
+      \fi
+}
+
+
+
+% N-CHANNEL IGFET DEPLETION TYPE
+\pgfdeclaretransistorwrapperaddbulk{nigfetd}{}{%
+	\pgf at circuit@trans at depletiontypetrue
+	\drawfetcore{nigfetd}
+
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}    
+      \pgfusepath{draw}
+             
+      % SOLDER DOT at source-bulk connection
+      \ifpgf at circuit@fet at solderdot
+      \pgfscope
+        \pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
+          \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+        \pgfnode{circ}{center}{}{}{}
+      \endpgfscope{}
+      \fi
+}
+
+% P-CHANNEL IGFET ENHANCEMENT TYPE
+\pgfdeclaretransistorwrapperaddbulk{pigfete}{}{%
+	\pgf at circuit@trans at depletiontypefalse
+	\drawfetcore{pigfete}
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+    
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}    
+      \pgfusepath{draw}
+      
+      
+      % SOLDER DOT at source-bulk connection
+      \ifpgf at circuit@fet at solderdot
+      \pgfscope
+        \pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
+          \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
+        \pgfnode{circ}{center}{}{}{}
+      \endpgfscope
+      \fi
+}
+
+% P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector
+\pgfdeclaretransistorwrapperaddbulk{pigfetebulk}{}{%
+	\pgf at circuit@trans at depletiontypefalse
+	\drawfetcore{pigfetebulk}
+}
+
+
+% P-CHANNEL IGFET DEPLETION TYPE
+\pgfdeclaretransistorwrapperaddbulk{pigfetd}{}{%
+	\pgf at circuit@trans at depletiontypetrue
+	\drawfetcore{pigfetd}
+  
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}    
+      \pgfusepath{draw}
+      
+            
+      % SOLDER DOT at source-bulk connection
+      \ifpgf at circuit@fet at solderdot
+      \pgfscope
+        \pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
+          \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
+        \pgfnode{circ}{center}{}{}{}
+      \endpgfscope{}
+      \fi
+}
+
+\pgfcircdeclaretransistor{njfet}{}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at up}}
+
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}		
+			\pgfusepath{draw}
+			
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.6}{%
+				\pgfpoint{\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}%
+			}{%
+				\pgfpoint
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+	
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
+			\pgfusepath{draw}
+}
+
+
+\pgfcircdeclaretransistor{pjfet}{}{%
+			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}		
+			\pgfusepath{draw}
+			
+			\pgfscope
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf at circ@res at down}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			\endpgfscope
+			
+			\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgfresetnontranslationattimefalse
+			\pgftransformlineattime{.4}{%
+				\pgfpoint%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
+			}{%
+				\pgfpoint{\pgf at circ@res at left}%
+					{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
+			}
+			\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+			\endpgfscope
+
+					
+			\pgfpathmoveto{\pgfpoint
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+			\pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+				{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+}
+
+
+\pgfdeclaretransistorwrapperaddbulk{isfet}{}{%
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+      % DRAIN CONNECTION 
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
+      % DRAIN
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
+      \pgfusepath{draw}
+      
+      % GATE, DEPLETION TYPE
+      \pgfscope %% added
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf at circ@res at down}}
+      \pgfsetlinewidth{2\pgflinewidth} %% added
+      \pgfusepath{draw} %% added
+      \endpgfscope %% added
+      
+      % BULK
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgf at circ@res at up+\pgf at circ@res at down}}
+       \pgfpathlineto{\pgfpoint{\pgf at circ@res at right+.5\pgflinewidth}
+         {\pgf at circ@res at up+\pgf at circ@res at down}}
+
+      % SOURCE
+      \pgfpathmoveto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+         {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
+      % SOURCE CONNECTION
+      \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+      \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}    
+      \pgfusepath{draw}
+      
+      % GATE
+      %\pgfscope
+      %\pgfpathmoveto{\pgfpoint
+       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf at circ@res at left}
+       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
+      %\pgfpathlineto{\pgfpoint
+       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf at circ@res at left}
+       % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
+      %\pgfsetlinewidth{2\pgflinewidth}
+      %\pgfusepath{draw}
+      %\endpgfscope
+      
+            
+      % SOLDER DOT at source-bulk connection
+      \ifpgf at circuit@fet at solderdot
+	      \pgfscope
+	        \pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
+	          \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+	        \pgfnode{circ}{center}{}{}{}
+	      \endpgfscope{}
+      \fi
+      % ARROW
+      \pgfscope
+      \pgfslopedattimetrue 
+      \pgfallowupsidedownattimetrue
+      \pgfresetnontranslationattimefalse
+      \pgftransformlineattime{.6}{%
+        \pgfpoint
+          {\pgf at circ@res at right}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }{%
+        \pgfpoint%
+          {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}%
+          {\pgf at circ@res at up+\pgf at circ@res at down}%
+      }
+      \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+      \endpgfscope
+      \pgfusepath{draw}
+      
+      % Wavy lines
+      	\pgfscope
+			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{0cm}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+
+			\pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf at circ@res at up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf at circ@res at up}}
+			\pgfusepath{draw}
+		\endpgfscope
+
+}
+
+
+%% Black thyristor
+
+\pgfcircdeclarebipole{
+	\anchor{gate}{
+		\northeast
+	}
+	\anchor{anode}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{G}{
+		\northeast
+	}
+	\anchor{cathode}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+}{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgf at circ@res at other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf at circ@res at left
+	\pgf at circ@res at step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf at circ@res at right
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at other}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+				
+		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}} 
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfusepath{draw,fill}
+		
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+	
+}
+
+%% Empty thyristor
+
+\pgfcircdeclarebipole{
+	\anchor{gate}{
+		\northeast
+	}
+	\anchor{anode}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{G}{
+		\northeast
+	}
+	\anchor{cathode}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+}{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgf at circ@res at other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf at circ@res at left
+	\pgf at circ@res at step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf at circ@res at right
+
+	\pgfscope
+		\pgftransformxshift{\pgf at circ@res at other}
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+				
+		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}} 
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfusepath{draw}
+		
+		\pgfsetlinewidth{\pgfstartlinewidth}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	\endpgfscope
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+	
+}
+
+%% Empty triac
+
+\pgfcircdeclarebipole{
+	\anchor{gate}{
+		\northeast
+	}
+	\anchor{G}{
+		\northeast
+	}
+	\anchor{anode}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{cathode}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+}{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgf at circ@res at other = \ctikzvalof{tripoles/triac/diode width left}\pgf at circ@res at left
+	\pgf at circ@res at step = \ctikzvalof{tripoles/triac/diode width right}\pgf at circ@res at right
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at step}{0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at other}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}} % sqrt(1/2)
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+	
+}
+
+%% Empty triac
+
+\pgfcircdeclarebipole{
+	\anchor{gate}{
+		\northeast
+	}
+	\anchor{G}{
+		\northeast
+	}
+	\anchor{anode}{
+		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+		\pgf at y=0cm
+	}
+	\anchor{cathode}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+}{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
+
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+	\pgf at circ@res at other = \ctikzvalof{tripoles/triac/diode width left}\pgf at circ@res at left
+	\pgf at circ@res at step = \ctikzvalof{tripoles/triac/diode width right}\pgf at circ@res at right
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at step}{0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at other}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+	
+	\pgfusepath{draw,fill}
+	
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}} % sqrt(1/2)
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+	
+}
+
+
+
+
+
+
+
+\pgfcircdeclarebipole{
+	\anchor{out 1}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=0cm
+	}
+	\anchor{out 2}{
+		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+		\pgf at y=.8\pgf at y
+	}
+}{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
+
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+	\pgfpathlineto{\pgfpoint{.3\pgf at circ@res at left}{0pt}}
+	\pgfusepath{draw}
+	\pgfscope
+	\pgfpathmoveto{\pgfpoint{.3\pgf at circ@res at left}{0pt}}
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{.5\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	\endpgfscope
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{0}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{.8\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{.8\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.5\pgf at circ@res at right}{.15\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	
+	
+	\pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.2\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	
+	\pgfsetdash{{.08\pgf at circ@res at up}{.04\pgf at circ@res at up}{.7\pgf at circ@res at up}{.04\pgf at circ@res at up}{.8\pgf at circ@res at up}}{0cm}
+	\pgfpathmoveto{\pgfpoint{0}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0}{.8\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{.2\pgf at circ@res at left}{.6\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0}{.4\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0}{.2\pgf at circ@res at up}}
+	\pgfusepath{draw}
+	\pgfsetdash{}{0cm}
+}
+
+
+
+
+
+
+
+
+
+
+\pgfdeclareshape{op amp}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{-}{
+		\inOne
+	  }
+	  \anchor{+}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\up{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+	    \pgfpointlineattime{
+			\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
+			\pgfpoint{
+				\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+				{\pgf at circ@res at up}}
+			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	  }
+	  \anchor{up}{
+		\up
+	  }
+	  \anchor{down}{
+		\up
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  	\anchor{west}{
+		  	\left
+    	  }
+		  \anchor{east}{
+		  	\left
+		  	\pgf at x=-\pgf at x
+		  }  
+	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+	\pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
+	
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+	\pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
+		
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	
+	\pgfusepath{draw}
+
+						
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		
+	  
+	  }
+	}
+
+%%Transkonduktanzverstärker
+\pgfdeclareshape{gm amp}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }	  
+	  \anchor{-}{
+		\inOne
+	  }
+	  \anchor{+}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\up{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+	    \pgfpointlineattime{
+			\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/up pos}}{
+			\pgfpoint{
+				\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf at circ@res at left}
+				{\pgf at circ@res at up}}
+			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	  }
+	  \anchor{up}{
+		\up
+	  }
+	  \anchor{down}{
+		\up
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  	\anchor{west}{
+		  	\left
+    	  }
+		  \anchor{east}{
+		  	\left
+		  	\pgf at x=-\pgf at x
+		  }  
+	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+						
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf at circ@res at up}}
+	\pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf at circ@res at up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
+	
+
+	\pgfpathmoveto{\pgfpoint
+		{\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf at circ@res at left}
+		{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf at circ@res at down}}
+	\pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf at circ@res at down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
+		
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+	\pgfpathlineto{\pgfpoint{.3\pgf at circ@res at right}{0pt}} %
+	
+	\pgfusepath{draw}
+
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		%Umrandung:
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0}} %geändert startpunkt neu am ausgangsstrich
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{15pt}}%vom Ausgang nach oben
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}} %neu ecke links oben nach rechts oben
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}} %bei deneigängen runter 
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-15pt}}%ecke links unten nach rechts unten
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}} %rechts unten zum ausgang
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		
+	  
+	  }
+	}	
+
+
+
+%% Potentiometer
+\pgfcircdeclarebipole{
+	\anchor{wiper}{
+		\northeast
+		\pgfpoint{0pt}{\pgf at y}
+	}
+	\anchor{W}{
+		\northeast
+		\pgfpoint{0pt}{\pgf at y}
+	}	
+}{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
+\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+\pgftransformationadjustments
+\pgfmathsetlength{\pgf at circ@res at step}{\ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+\divide \pgf at circ@res at step by 12
+
+\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
+
+\pgf at circ@res at other = \pgf at circ@res at left
+\advance\pgf at circ@res at other by \pgf at circ@res at step 
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by \pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+\pgfsetbeveljoin
+\pgfusepath{draw}
+
+\pgfscope
+	%\pgfsetlinewidth{\pgfstartlinewidth}
+	\pgfsetarrowsend{latex'}
+	\pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+	\pgfusepath{draw}
+\endpgfscope
+}
+
+
+
+
+
+%% Generic tunable 
+
+\pgfcircdeclarebipole{
+	\anchor{wiper}{
+		\northeast
+		\pgfpoint{0pt}{\pgf at y}
+	}
+}{\ctikzvalof{bipoles/generic potentiometer/height 2}}{genericpotentiometer}{\ctikzvalof{bipoles/generic potentiometer/height}}{\ctikzvalof{bipoles/generic potentiometer/width}}{
+
+		\pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
+		\divide \pgf at circ@res at step by 14
+
+		\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{-\pgf at circ@res at down}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+					
+		\pgfusepath{draw} 
+		
+		\pgfscope
+		%\pgfsetlinewidth{\pgfstartlinewidth}
+		\pgfsetarrowsend{latex'}
+		\pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+		\pgfusepath{draw}
+		\endpgfscope
+}
+
+
+\pgfdeclareshape{mixer}
+{
+	\savedanchor\northwest{
+		\ifpgf at circuit@boxed
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at x
+			\pgf at x=.5\pgf at x
+		\else	
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf at x
+			\pgf at x=.5\pgf at x
+		\fi
+	}
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{left}{%
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{3}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{4}{
+		\northwest
+		\pgf at y=\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{in 1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	}	  
+	\anchor{in 2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{in2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{center}{
+		\pgf at y=0pt
+		\pgf at x=0pt
+	}
+	\anchor{east}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x  
+	}
+	\anchor{west}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	}
+	\anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	}
+	\anchor{north west}{
+		\northwest
+	}
+	\anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	}
+	\backgroundpath{
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+		\pgf at circ@res at step=\ctikzvalof{tripoles/mixer/width}\pgf at circ@Rlen
+			
+		\pgfscope
+			\pgfstartlinewidth=\pgflinewidth
+			
+			% draw outer box
+			\ifpgf at circuit@boxed
+				\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+			\fi
+			
+			% draw outer circle
+			\ifpgf at circuit@boxed
+				\pgf at circ@res at step=.7\pgf at circ@res at step
+				\pgfsetdash{}{0pt}	% draw solid circle if boxed
+			\else
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\fi
+			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
+			\pgfusepath{draw}
+			
+			% draw inner stuff
+			\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf at circ@res at step}}
+			\pgfusepath{draw}
+			
+		\endpgfscope
+	}
+}
+
+\pgfdeclareshape{adder}
+{
+	\savedanchor\northwest{
+		\ifpgf at circuit@boxed
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at x
+			\pgf at x=.5\pgf at x
+		\else	
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf at x
+			\pgf at x=.5\pgf at x
+		\fi
+	}
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{left}{%
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{3}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{4}{
+		\northwest
+		\pgf at y=\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{in 1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	}	  
+	\anchor{in 2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{in2}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{center}{
+		\pgf at y=0pt
+		\pgf at x=0pt
+	}
+	\anchor{east}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x  
+	}
+	\anchor{west}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	}
+	\anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	}
+	\anchor{north west}{
+		\northwest
+	}
+	\anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	}
+	\backgroundpath{
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+		\pgf at circ@res at step=\ctikzvalof{tripoles/adder/width}\pgf at circ@Rlen
+			
+		\pgfscope
+			\pgfstartlinewidth=\pgflinewidth
+			
+			% draw outer box
+			\ifpgf at circuit@boxed
+				\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+			\fi
+			
+			% draw outer circle
+			\ifpgf at circuit@boxed
+				\pgf at circ@res at step=.7\pgf at circ@res at step{}
+				\pgfsetdash{}{0pt}	% draw solid circle if boxed
+			\else
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\fi
+			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
+			\pgfusepath{draw}
+			
+			% draw inner stuff
+			\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpointpolar{180}{0.3\pgf at circ@res at step}}
+			\pgfpathmoveto{\pgfpointorigin}
+			\pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf at circ@res at step}}
+			\pgfpathlineto{\pgfpointpolar{270}{0.3\pgf at circ@res at step}}
+			\pgfsetlinewidth{2\pgflinewidth}
+			\pgfusepath{draw}
+			
+		\endpgfscope				  
+	}
+}
+
+\pgfdeclareshape{oscillator}
+{
+	\savedanchor\northwest{
+		\ifpgf at circuit@boxed
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at x
+		\else	
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf at x
+		\fi
+	}
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{north}{
+		\northwest
+		\pgf at x=.5\pgf at x
+	}
+	\anchor{south}{
+		\northwest
+		\pgf at x=.5\pgf at x
+		\pgf at y=-\pgf at y
+	}
+	\anchor{east}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=0pt
+	}
+	\anchor{west}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{text}{
+		\pgf at x=-2\pgf at x
+		\advance \pgf at x by -.5\wd\pgfnodeparttextbox
+		\advance \pgf at y by -1.5\ht\pgfnodeparttextbox
+	}
+	\backgroundpath{
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			
+		\pgf at circ@res at step=\ctikzvalof{tripoles/oscillator/width}\pgf at circ@Rlen{}
+			
+		\pgfscope
+			\pgfstartlinewidth=\pgflinewidth
+			
+			\pgftransformxshift{-0.5\pgf at circ@res at step} % The oscillator is shifted to the left, so a connection comes out of the anchor "east"
+			
+			% draw outer box
+			\ifpgf at circuit@boxed{}
+				\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+			\fi
+			
+			% draw outer circle
+			\ifpgf at circuit@boxed
+				\pgf at circ@res at step=.7\pgf at circ@res at step{}
+				\pgfsetdash{}{0pt}	% draw solid circle if boxed
+			\else
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\fi
+			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
+			\pgfusepath{draw}
+			
+			% draw inner sine waves
+			\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+			\pgfsetlinewidth{\pgfstartlinewidth}
+
+			\pgfpathmoveto{\pgfpoint{-0.3\pgf at circ@res at step}{0\pgf at circ@res at step}}
+			\pgfpathsine{\pgfpoint{.15\pgf at circ@res at step}{.15\pgf at circ@res at step}}
+			\pgfpathcosine{\pgfpoint{.15\pgf at circ@res at step}{-.15\pgf at circ@res at step}}
+			\pgfpathsine{\pgfpoint{.15\pgf at circ@res at step}{-.15\pgf at circ@res at step}}
+			\pgfpathcosine{\pgfpoint{.15\pgf at circ@res at step}{.15\pgf at circ@res at step}}
+			\pgfusepath{draw}
+			
+		\endpgfscope				  
+	}
+}
+
+\pgfdeclareshape{circulator}
+{
+	\savedanchor\northwest{
+		\ifpgf at circuit@boxed
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at x
+			\pgf at x=.5\pgf at x
+		\else	
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf at x
+			\pgf at x=.5\pgf at x
+		\fi
+	}
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchor{left}{%
+		\northwest
+	  	\pgf at y=0pt
+	}
+	\anchor{1}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{2}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{3}{
+		\northwest
+		\pgf at y=-\pgf at y
+		\pgf at x=0pt
+	}
+	\anchor{east}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x  
+	}
+	\anchor{west}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	}
+	\anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	}
+	\anchor{north west}{
+		\northwest
+	}
+	\anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	}
+	\backgroundpath{
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+		\pgf at circ@res at step=\ctikzvalof{tripoles/circulator/width}\pgf at circ@Rlen
+			
+		\pgfscope
+			\pgfstartlinewidth=\pgflinewidth
+			
+			% draw outer box
+			\ifpgf at circuit@boxed
+				\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+			\fi
+			
+			% draw outer circle
+			\ifpgf at circuit@boxed{}
+				\pgf at circ@res at step=.7\pgf at circ@res at step{}
+				\pgfsetdash{}{0pt}	% draw solid circle if boxed
+			\else
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			\fi
+			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
+			\pgfusepath{draw}
+			
+			% inner arrow
+			\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+			\pgfsetlinewidth{\pgfstartlinewidth}
+			
+			\pgfsetarrowsend{latex}
+			\pgfpathmoveto{\pgfpoint{-0.25\pgf at circ@res at step}{0}}
+			\pgfpatharc{180}{-90} {0.25\pgf at circ@res at step}
+			\pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf at circ@res at step}}
+			\pgfusepath{draw}
+			
+		\endpgfscope				  
+	}
+}
+
+
+% Wilkinson divider
+\pgfdeclareshape{wilkinson}{
+		\anchor{center}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=0pt
+		}
+		\savedanchor\northwest{%
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=.5\pgf at x
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf at x
+			}
+		\anchor{north}{
+			\northwest
+			\pgf at x=0pt
+		}
+		\anchor{south}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=-\pgf at y
+		}
+		\anchor{west}{
+			\northwest
+			\pgf at y=0pt
+		}
+		\anchor{east}{
+			\northwest
+			\pgf at y=0pt
+			\pgf at x=-\pgf at x
+		}
+		\anchor{south west}{
+			\northwest
+			\pgf at y=-\pgf at y
+		}
+		\anchor{north east}{
+			\northwest
+			\pgf at x=-\pgf at x
+		}
+			\anchor{north west}{
+			\northwest
+		}
+		\anchor{south east}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-\pgf at y
+		}
+		\anchor{in}{
+			\northwest
+			\pgf at y=0pt
+		}
+		\anchor{out1}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{out2}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{text}{
+			\northwest
+			\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
+			\pgf at x=-.5\wd\pgfnodeparttextbox
+		}
+		\backgroundpath{			
+				\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+				\northwest
+				\pgf at circ@res at up = \pgf at y 
+				\pgf at circ@res at down = -\pgf at y
+				\pgf at circ@res at right = -\pgf at x
+				\pgf at circ@res at left = \pgf at x
+			
+				\pgfstartlinewidth=\pgflinewidth
+
+				% draw outer box
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+				\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+				\pgfusepath{draw}
+				
+				% draw inner stuff
+				\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+				\pgfsetarrows{-} %never draw arrows
+				\pgfsetlinewidth{\pgfstartlinewidth}
+				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
+				\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+				\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}				
+				
+				\pgfusepath{draw}
+				
+				\pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+				% draw inner resisitor - european or american style is recognised
+				{
+					\pgftransformshift{\pgfpoint{0.5\pgf at circ@res at right}{0pt}}
+					\pgftransformrotate{90}
+					
+					% calculate size of resistor
+					\ifpgf at circuit@europeanresistor
+						\pgfmathparse{\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
+						\pgftransformscale{\pgfmathresult}
+						\pgfnode{genericshape}{center}{}{pgf at generic}{\pgfusepath{fill}}
+					\else
+						\pgfmathparse{\pgf at circ@res at up / \pgf at circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
+						\pgftransformscale{\pgfmathresult}
+						\pgfnode{resistorshape}{center}{}{pgf at resistor}{\pgfusepath{fill}}
+					\fi
+				}
+				
+				\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at up}}
+				
+				\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at down}}
+				\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+				\pgfusepath{draw}
+
+		}
+}
+
+% electromechanical device (motor/generator)
+\pgfdeclareshape{elmech}
+{
+	\savedanchor\northwest{
+		%\ifpgf at circuit@boxed
+		%	\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		%	\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at y
+		%	\pgf at y=.5\pgf at y
+		%	\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		%	\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at x
+		%	\pgf at x=.5\pgf at x
+		%\else
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf at x
+			\pgf at x=.5\pgf at x
+		%\fi
+	}
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	  \anchor{text}{
+		\pgfpointorigin
+		\advance \pgf at x by -.5\wd\pgfnodeparttextbox
+		\advance \pgf at y by -.5\ht\pgfnodeparttextbox
+	}
+	\anchor{left}{%
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{right}{%
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{top}{
+		\northwest
+		\pgf at x=0pt
+	}
+	\anchor{pathstart}{
+		\northwest
+		\pgf at x=0pt
+	}
+	\anchor{pathend}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{bottom}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{center}{
+		\pgf at y=0pt
+		\pgf at x=0pt
+	}
+	\anchor{east}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	}
+	\anchor{west}{
+		\northwest
+		\pgf at y=0pt
+	}
+	\anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	}
+	\anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	}
+		\backgroundpath{
+		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+		\pgf at circ@res at step=\ctikzvalof{tripoles/elmech/width}\pgf at circ@Rlen
+		\pgf at circ@res at up=\ctikzvalof{tripoles/elmech/height}\pgf at circ@Rlen
+		\pgfscope
+			\pgfstartlinewidth=\pgflinewidth
+			% draw outer box
+		%	\ifpgf at circuit@boxed
+		%		\pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+		%	\fi
+			% draw outer circle
+			%\ifpgf at circuit@boxed
+			%	\pgf at circ@res at step=.7\pgf at circ@res at step
+			%	\pgfsetdash{}{0pt}	% draw solid circle if boxed
+			%\else
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+			%\fi
+			\pgfpathrectangle{\pgfpoint{-.25\pgf at circ@res at step}{-.5\pgf at circ@res at up}}{\pgfpoint{.5\pgf at circ@res at step}{\pgf at circ@res at up}}
+			\pgfsetfillcolor{black}
+			\pgfusepath{draw,fill}
+			\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
+			\pgfsetfillcolor{white}
+			\pgfusepath{draw,fill}
+		\endpgfscope
+	}
+}
+
+%%%---------- close: tex/pgfcirctripoles
+%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
+%%%---------- open: tex/pgfcircquadpoles.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Quadripoles
+
+\long\def\pgfcircdeclarequadpole#1#2#3{
+	\pgfdeclareshape{#1}
+	{
+	  \anchor{center}{
+	  	\northwest
+		\pgf at x=0pt
+	  }
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=.5\pgf at x
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf at x
+	  }
+	  \anchor{A2}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{B1}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{A1}{
+		\northwest
+	  }
+	  \anchor{B2}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+	  	\northwest
+		\pgf at x=0pt
+	  }
+	  \anchor{south}{
+	  	\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{west}{
+	  	\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{east}{
+	  	\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \anchor{base}{
+	  	\northwest
+		\pgf at x=0pt	  	
+	  }
+	  #3
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			\northwest
+			\pgf at circ@res at up = \pgf at y 
+			\pgf at circ@res at down = -\pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+			
+			%\pgf at circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			
+			#2
+	  
+	  }
+	}
+}
+
+
+
+\def\pgf at circ@drawtransformerbasicanchor{
+	\pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
+	 \anchor{AA2}{
+		\northwest
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=-\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{BB1}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{AA1}{
+		\northwest
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+	  \anchor{BB2}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf at x
+		\pgf at x=.7\pgf at x
+		\pgf at y=-\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf at y
+	  }
+}
+
+\def\pgf at circ@drawtransformerbasicbody{
+	\def\stretto{.4}
+	\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\stretto\pgf at circ@res at left}%
+					{\pgf at circ@res at up}%
+			}{%
+				\pgfpoint
+					{\stretto\pgf at circ@res at left}%
+					{\pgf at circ@res at down}%
+			}
+			
+			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+			\def\pgf at temp{european}%
+			\ifx\pgf at temp\pgf at circ@temp%
+				\pgfnode{fullgenericshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+			\else%
+				\def\pgf at temp{cute}
+				\ifx\pgf at temp\pgf at circ@temp%
+					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+				\else%
+					\pgfnode{americaninductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+				\fi%
+			\fi%
+
+			
+	\endpgfscope
+	\pgfscope             
+			\pgfslopedattimetrue 
+			\pgfallowupsidedownattimetrue
+			\pgftransformlineattime{.5}{%
+				\pgfpoint%
+					{\stretto\pgf at circ@res at right}%
+					{\pgf at circ@res at down}%
+			}{%
+				\pgfpoint
+					{\stretto\pgf at circ@res at right}%
+					{\pgf at circ@res at up}%
+			}
+
+			\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+			\def\pgf at temp{european}%
+			\ifx\pgf at temp\pgf at circ@temp%
+				\pgfnode{fullgenericshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+			\else%
+				\def\pgf at temp{cute} 
+				\ifx\pgf at temp\pgf at circ@temp%
+					\pgfnode{cuteinductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+				\else%
+					\pgfnode{americaninductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+				\fi%
+			\fi%
+			
+	\endpgfscope
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpointanchor{pgf at inductor1}{b}}
+	
+	\pgfpathmoveto{\pgfpointanchor{pgf at inductor1}{a}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpointanchor{pgf at inductor2}{a}}
+	
+	\pgfpathmoveto{\pgfpointanchor{pgf at inductor2}{b}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+}
+
+
+	
+	% contrib Kristofer M. Monisit
+	
+	\pgfdeclareshape{fd op amp}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \savedanchor\inOne{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \anchor{-}{
+		\inOne
+	  }
+	  \anchor{+}{
+		\inOne
+		\pgf at y=-\pgf at y
+	  }
+	  \savedanchor\up{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf at x
+		\pgf at x=.5\pgf at x
+			\pgf at circ@res at up = \pgf at y
+			\pgf at circ@res at right = -\pgf at x
+			\pgf at circ@res at left = \pgf at x
+	    \pgfpointlineattime{
+			\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
+			\pgfpoint{
+				\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+				{\pgf at circ@res at up}}
+			{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+	  }
+	  \anchor{up}{
+		\up
+	  }
+	  \anchor{down}{
+		\up
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{out +}{
+		\northwest
+		\pgf at y=.5\pgf at y
+		\pgf at x=-.7\pgf at x
+	  }
+	  \anchor{out -}{
+		\northwest
+		\pgf at y=-.5\pgf at y
+		\pgf at x=-.7\pgf at x
+	  }
+	  \anchor{west}{
+	  	\left
+      }
+		\anchor{east}{
+			\left
+			\pgf at x=-\pgf at x
+		}
+
+	  \backgroundpath{
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+      \northwest
+      \pgf at circ@res at up = \pgf at y
+      \pgf at circ@res at down = -\pgf at y
+      \pgf at circ@res at right = -\pgf at x
+      \pgf at circ@res at left = \pgf at x
+
+      % Negative input terminal
+      \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
+  
+
+      % Positive input terminal
+      \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
+  
+
+      % Negative output terminal
+      \pgfpathmoveto{\pgfpoint
+        {0.7\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at down}}
+      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
+  
+
+      % Positive output terminal
+      \pgfpathmoveto{\pgfpoint
+        {0.7\pgf at circ@res at right}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgfpathlineto{\pgfpoint
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}}
+        {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
+      \pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
+  
+
+      % Draw them all!
+      \pgfusepath{draw}
+
+      % Triangle
+      \pgfscope
+        \pgfsetlinewidth{2\pgflinewidth}
+        \pgftransformxshift{.7\pgf at circ@res at left}
+        \pgf at circ@res at step=\pgf at circ@res at right
+        \advance\pgf at circ@res at step by -\pgf at circ@res at left
+        \pgf at circ@res at step=.7\pgf at circ@res at step
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfusepath{draw}
+      \endpgfscope
+	  }
+	}
+
+
+
+
+\pgfcircdeclarequadpole{transformer}{
+
+	\pgf at circ@drawtransformerbasicbody
+
+}{\pgf at circ@drawtransformerbasicanchor}
+
+\pgfcircdeclarequadpole{transformer core}{
+
+	\pgf at circ@drawtransformerbasicbody
+	
+	\pgfmoveto{\pgfpoint%
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
+					}
+	\pgflineto{
+				\pgfpoint
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at right}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
+					}
+
+	\pgfmoveto{\pgfpoint%
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at down}%
+					}
+	\pgflineto{
+				\pgfpoint
+					{\ctikzvalof{quadpoles/transformer core/core width}\pgf at circ@res at left}%
+					{\ctikzvalof{quadpoles/transformer core/core height}\pgf at circ@res at up}%
+					}					
+	
+	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
+	\pgfusepath{draw}
+}{\pgf at circ@drawtransformerbasicanchor}
+
+
+\pgfcircdeclarequadpole{gyrator}{
+
+	\def\stretto{.4}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+	
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+	
+	\pgfusepath{draw}
+	
+	\pgfsetlinewidth{2\pgflinewidth}
+	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at left}{.7*\stretto\pgf at circ@res at down}}
+	\pgfpatharc{90}{270}{.7*\stretto\pgf at circ@res at down}
+	
+	\pgfpathmoveto{\pgfpoint{\stretto\pgf at circ@res at right}{.7*\stretto\pgf at circ@res at up}}
+	\pgfpatharc{-90}{90}{.7*\stretto\pgf at circ@res at down}
+	\pgfusepath{draw}
+
+}{}
+
+%% four-port
+% defines a general outer box for four-ports
+% TikZ usage: 
+%		\draw (0,0) node[coupler](coup){\SI{-3}{dB}}
+%		(coup.port1) to[short,-o] ++(-1,0)
+%
+
+\long\def\pgfcircdeclarefourport#1#2{
+	\pgfdeclareshape{#1}{
+		\anchor{center}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=0pt
+		}
+		\savedanchor\northwest{%
+			\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf at y
+			\pgf at y=.5\pgf at y
+			\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+			\pgf at x=.5\pgf at x
+			\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf at x
+			}
+		\anchor{north}{
+			\northwest
+			\pgf at x=0pt
+		}
+		\anchor{south}{
+			\northwest
+			\pgf at x=0pt
+			\pgf at y=-\pgf at y
+		}
+		\anchor{west}{
+			\northwest
+			\pgf at y=0pt
+		}
+		\anchor{east}{
+			\northwest
+			\pgf at y=0pt
+			\pgf at x=-\pgf at x
+		}
+		\anchor{south west}{
+			\northwest
+			\pgf at y=-\pgf at y
+		}
+		\anchor{north east}{
+			\northwest
+			\pgf at x=-\pgf at x
+		}
+			\anchor{north west}{
+			\northwest
+		}
+		\anchor{south east}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-\pgf at y
+		}
+		\anchor{port1}{
+			\northwest
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{port2}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{port3}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{port4}{
+			\northwest
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{1}{
+			\northwest
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{2}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=-0.5\pgf at y
+		}
+		\anchor{3}{
+			\northwest
+			\pgf at x=-\pgf at x
+			\pgf at y=0.5\pgf at y
+		}
+		\anchor{4}{
+			\northwest
+			\pgf at y=0.5\pgf at y
+		}
+		
+		\anchor{text}{
+			\northwest
+			\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
+			\pgf at x=-.5\wd\pgfnodeparttextbox
+		}
+		\backgroundpath{			
+				\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+				\northwest
+				\pgf at circ@res at up = \pgf at y 
+				\pgf at circ@res at down = -\pgf at y
+				\pgf at circ@res at right = -\pgf at x
+				\pgf at circ@res at left = \pgf at x
+			
+				\pgfstartlinewidth=\pgflinewidth
+
+				% draw outer box
+				\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+				\pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+				\pgfusepath{draw}
+				
+				% draw inner stuff
+				#2
+				
+				% draw inner text
+				\pgftext[center,x=-0.15\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+		}
+	}
+}
+
+% four-port
+\pgfcircdeclarefourport{fourport}{}
+
+
+% straight coupler
+\pgfcircdeclarefourport{coupler}{
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
+	\pgfsetarrows{latex-latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
+	\pgfsetarrows{latex-latex}
+	\pgfusepath{draw}
+}
+
+% "bended" coupler
+\pgfcircdeclarefourport{coupler2}{
+	\pgfsetlinewidth{\pgfstartlinewidth}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at up}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
+	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
+	\pgfpatharc{0}{90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at left}{0pt}}
+	\pgfpatharc{0}{-90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
+	\pgfpatharc{180}{90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	\pgfpathmoveto{\pgfpoint{0.1\pgf at circ@res at right}{0pt}}
+	\pgfpatharc{-180}{-90} {0.4\pgf at circ@res at up}
+	\pgfsetarrowsend{latex}
+	\pgfusepath{draw}
+	
+	
+}
+%%%---------- close: tex/pgfcircquadpoles
+
+%%%%%%%%%%% Springe nach tex/pgfcirclabel
+%%%---------- open: tex/pgfcirclabel.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bipole label positioning
+
+%% Options
+\ctikzset{label/.style = { l=#1 } }
+\ctikzset{l/.code = { 
+	\pgfkeys{/tikz/circuitikz/bipole/label/name=#1}
+	\ctikzsetvalof{bipole/label/unit}{}
+	\ifpgf at circ@siunitx 
+		\pgf at circ@handleSI{#1}
+		\ifpgf at circ@siunitx at res 
+			\edef\pgf at temp{\pgf at circ@handleSI at val}
+			\pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf at temp}
+			\edef\pgf at temp{\pgf at circ@handleSI at unit}
+			\pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf at temp}
+		\else
+		\fi
+	\else
+	\fi
+}}
+
+\ctikzset{label above/.code = { 
+	l=#1, 
+	\circuitikzbasekey/bipole/label/position=90 }
+}
+\ctikzset{l^/.style = { 
+	l=#1,
+	\circuitikzbasekey/bipole/label/position=90 } 
+}
+
+\ctikzset{label below/.code = { 
+	l=#1,
+	\circuitikzbasekey/bipole/label/position=-90 } 
+}
+\ctikzset{l_/.style = { 
+	l=#1,
+	\circuitikzbasekey/bipole/label/position=-90 } 
+}
+
+
+
+\def\pgf at circ@drawlabel{
+		\pgfextra{
+			\edef\pgf at temp{\ctikzvalof{label/align}}
+			\def\pgf at circ@temp{straight}
+		}
+		\ifx\pgf at temp\pgf at circ@temp %straight
+			\pgf at circ@drawreglabel
+		\else
+			\pgfextra{\def\pgf at circ@temp{rotate}}
+			\ifx\pgf at temp\pgf at circ@temp %rotate
+				\pgf at circ@drawrotlabel
+			\else % smart
+				\pgf at circ@drawsmartlabel				
+			\fi
+		\fi
+}
+
+\def\pgf at circ@drawsmartlabel{
+	\pgfextra{
+		%\pgfmathadd{\pgf at circ@direction}{360}
+		\pgfmathmod{\pgf at circ@direction}{90}
+		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+	}
+	\ifnum \pgfcircmathresult > 20 
+		\ifnum \pgfcircmathresult < 70 % NON quasi retto
+			\pgf at circ@drawrotlabel
+		\else
+			\pgf at circ@drawreglabel
+		\fi
+	\else 
+		\pgf at circ@drawreglabel
+	\fi
+}
+
+%% Output routing
+%% #1 - node name
+
+\def\pgf at circ@drawrotlabel{
+	\pgfextra{
+		% calcolo rotazione label
+		\def\pgf at circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
+		\edef\pgfcirclabrot{\pgf at circ@direction} % primo e quarto quadrante
+		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+		\ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % terzo e secondo
+			\pgfmathsubtract{\pgf at circ@direction}{180}
+			\edef\pgfcirclabrot{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+			\pgfmathadd{\pgf at circ@temp}{180} %%%
+			\edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil} %%%
+		\fi\fi
+		
+		\ifnum \ctikzvalof{mirror value} = -1
+			\pgfmathadd{\pgf at circ@temp}{180}
+			\edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+		\fi
+	}
+	coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.north)$)
+	(labelcoor) node [rotate=\pgfcirclabrot] {\pgf at circ@finallabel{}} % c'era un transform shape
+}
+
+\def\pgf at circ@drawreglabel{
+	\pgfextra{
+		\pgfmathsubtract{\pgf at circ@direction}{90}
+		\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+		
+		\edef\pgf at circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
+		\ifnum \pgf at circ@temp < 0
+			\pgfmathadd{\pgf at circ@labanc}{180}
+			\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+		\fi
+		
+		\ifnum \ctikzvalof{mirror value} = -1
+			\pgfmathadd{\pgf at circ@labanc}{180}
+			\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+		\fi
+	}
+	node [ anchor = \pgf at circ@labanc] 
+	  at (\ctikzvalof{bipole/name}.\pgf at circ@temp) {\pgf at circ@finallabel{}}
+}
+
+
+\ctikzset{text/.style = { t=#1 } }
+\ctikzset{t/.code = { 
+	\ctikzsetvalof{bipoles/twoport/text}{#1}
+}}
+
+%%%---------- close: tex/pgfcirclabel
+%%%%%%%%%%% Springe nach tex/pgfcircvoltage
+%%%---------- open: tex/pgfcircvoltage.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%  Voltage management
+
+
+\ctikzset{v^>/.style = {
+		v = #1,
+		\circuitikzbasekey/bipole/voltage/direction = forward,
+		\circuitikzbasekey/bipole/voltage/position = above
+	}
+}
+
+\ctikzset{v^</.style = {
+		v = #1,
+		\circuitikzbasekey/bipole/voltage/direction = backward,
+		\circuitikzbasekey/bipole/voltage/position = above
+	}
+}
+
+\ctikzset{v_>/.style = {
+		v = #1,
+		\circuitikzbasekey/bipole/voltage/direction = forward,
+		\circuitikzbasekey/bipole/voltage/position = below
+	} 
+}
+
+\ctikzset{v_</.style = {
+		v = #1,
+		\circuitikzbasekey/bipole/voltage/direction = backward,
+		\circuitikzbasekey/bipole/voltage/position = below
+	} 
+}
+
+
+% Default position varies whether the component is a voltage source
+% or not
+\ctikzset{v/.code = {
+			\ifpgf at circuit@bipole at isvoltage
+				\pgfkeys{\circuitikzbasekey/bipole/voltage/position=above,
+					\circuitikzbasekey/bipole/voltage/direction=forward}
+			\else
+				\ifpgf at circ@oldvoltagedirection
+				\pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
+					\circuitikzbasekey/bipole/voltage/direction=backward}
+				\else
+				\pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
+					\circuitikzbasekey/bipole/voltage/direction=forward}
+				\fi
+			\fi
+			\ifpgf at circ@oldvoltagedirection\else
+			\ifpgf at circuit@bipole at iscurrent
+			\ifpgf at circuit@bipole at current@backward
+					\pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
+					\circuitikzbasekey/bipole/voltage/direction=forward}
+			\else
+					\pgfkeys{\circuitikzbasekey/bipole/voltage/position=below,
+					\circuitikzbasekey/bipole/voltage/direction=backward}
+			\fi\fi\fi
+	\pgfkeys{/tikz/circuitikz/bipole/voltage/label/name=#1}
+	\ctikzsetvalof{bipole/voltage/label/unit}{}
+	\ifpgf at circ@siunitx 
+		\pgf at circ@handleSI{#1}
+		\ifpgf at circ@siunitx at res 
+			\edef\pgf at temp{\pgf at circ@handleSI at val}
+			\pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf at temp}
+			\edef\pgf at temp{\pgf at circ@handleSI at unit}
+			\pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/unit}{\pgf at temp}
+		\else
+		\fi
+	\else
+	\fi
+	} 
+}
+
+\ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
+\ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position  = above} }
+\ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
+\ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
+
+
+%% Output routine for generic bipoles
+
+\def\pgf at circ@drawvoltagegeneric{
+	\pgfextra{
+		\ifnum \ctikzvalof{mirror value}=-1
+						\ifpgf at circuit@bipole at voltage@below\pgf at circuit@bipole at voltage@belowfalse\else\pgf at circuit@bipole at voltage@belowtrue\fi
+		\fi
+		
+		\ifpgf at circuit@bipole at voltage@below
+			\def\pgf at circ@voltage at angle{90}
+		\else
+			\def\pgf at circ@voltage at angle{-90} 
+		\fi	
+		
+		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
+		\pgfkeysifdefined{\pgf at temp}
+			{ \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
+			{ \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} }
+		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}
+		\pgfkeysifdefined{\pgf at temp}
+			{ \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
+			{ \edef\bumpb{\ctikzvalof{voltage/bump b}} }
+	}
+
+	coordinate (pgfcirc at mid) at ($(\tikztostart) ! \distacefromnode ! (\ctikzvalof{bipole/name}.left)$)
+	coordinate (pgfcirc at Vfrom) at ($(pgfcirc at mid) ! -\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen ! \pgf at circ@voltage at angle:(\ctikzvalof{bipole/name}.left)$) 
+   
+	coordinate (pgfcirc at mid) at ($(\tikztotarget) ! \distacefromnode ! (\ctikzvalof{bipole/name}.right)$)
+	coordinate (pgfcirc at Vto) at ($(pgfcirc at mid) ! \ctikzvalof{voltage/distance from line}\pgf at circ@Rlen ! \pgf at circ@voltage at angle : (\ctikzvalof{bipole/name}.right)$)
+
+	\ifpgf at circuit@bipole at voltage@below
+		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
+		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
+	\else
+		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$)
+		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$)
+	\fi
+
+	\ifpgf at circuit@europeanvoltage
+		\ifpgf at circuit@bipole at voltage@backward
+			(pgfcirc at Vto) .. controls (pgfcirc at Vcont2)  and (pgfcirc at Vcont1) .. 
+				node[currarrow, sloped,  allow upside down, pos=1] {} 
+			(pgfcirc at Vfrom) 
+		\else
+			(pgfcirc at Vfrom) .. controls (pgfcirc at Vcont1)  and (pgfcirc at Vcont2) ..
+				node[currarrow, sloped,  allow upside down, pos=1] {}
+			(pgfcirc at Vto) 	
+		\fi	
+	\else
+		\ifpgf at circuit@bipole at voltage@backward
+			\ifpgf at circ@oldvoltagedirection
+				(pgfcirc at Vfrom) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{\scriptsize$+$}   
+				(pgfcirc at Vto) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{$-$}
+			\else
+				(pgfcirc at Vfrom) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{\scriptsize$-$}   
+				(pgfcirc at Vto) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{$+$}
+			\fi
+		\else
+			\ifpgf at circ@oldvoltagedirection
+				(pgfcirc at Vfrom) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{\scriptsize$-$}   
+				(pgfcirc at Vto) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{$+$}
+			\else
+				(pgfcirc at Vfrom) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{\scriptsize$+$}   
+				(pgfcirc at Vto) node[inner sep=0, anchor=\pgf at circ@bipole at voltage@label at anchor]{$-$}
+			\fi
+		\fi	
+	\fi
+}
+
+%% Output routine for voltage sources
+
+\def\pgf at circ@drawvoltagegenerator{
+	\ifpgf at circuit@bipole at voltage@below
+		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
+		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
+	\else
+		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
+		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
+	\fi
+
+	\ifpgf at circuit@europeanvoltage
+		\ifpgf at circuit@bipole at voltage@backward
+			(pgfcirc at Vcont2)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vcont1)
+		\else
+			(pgfcirc at Vcont1)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vcont2)
+		\fi
+	
+	\else % american voltage
+		
+	\ifpgf at circuit@bipole at voltageoutsideofsymbol
+		% if it is a battery, must put + and -
+			\ifpgf at circuit@bipole at voltage@backward
+				(pgfcirc at Vcont2)  node {$-$}  (pgfcirc at Vcont1) node {$+$}
+			\else
+				(pgfcirc at Vcont1)  node {$+$}  (pgfcirc at Vcont2) node {$-$}
+			\fi
+		\fi
+		
+	\fi
+}
+
+%% Output routine
+
+\def\pgf at circ@drawvoltage{   % node name 
+	\pgfextra{
+		\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+
+		\ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
+			\ifpgf at circuit@bipole at voltage@below
+				\def\pgf at circ@bipole at voltage@label at anchor{north west} 
+			\else \def\pgf at circ@bipole at voltage@label at anchor{south east}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
+			\ifpgf at circuit@bipole at voltage@below
+				\def\pgf at circ@bipole at voltage@label at anchor{west} 
+			\else \def\pgf at circ@bipole at voltage@label at anchor{east} 
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
+			\ifpgf at circuit@bipole at voltage@below
+				 \def\pgf at circ@bipole at voltage@label at anchor{south west}
+			\else \def\pgf at circ@bipole at voltage@label at anchor{north east}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
+			\ifpgf at circuit@bipole at voltage@below
+				  \def\pgf at circ@bipole at voltage@label at anchor{south}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{north}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
+			\ifpgf at circuit@bipole at voltage@below
+				 \def\pgf at circ@bipole at voltage@label at anchor{south east}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{north west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
+			\ifpgf at circuit@bipole at voltage@below
+				 \def\pgf at circ@bipole at voltage@label at anchor{east}
+			\else \def\pgf at circ@bipole at voltage@label at anchor{west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
+			\ifpgf at circuit@bipole at voltage@below
+				  \def\pgf at circ@bipole at voltage@label at anchor{north east}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{south west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
+			\ifpgf at circuit@bipole at voltage@below
+				 \def\pgf at circ@bipole at voltage@label at anchor{north}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{south} 
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
+			\ifpgf at circuit@bipole at voltage@below
+				  \def\pgf at circ@bipole at voltage@label at anchor{north}
+			\else\def\pgf at circ@bipole at voltage@label at anchor{south}
+			\fi
+		\fi\fi
+
+		\ifpgf at circuit@bipole at voltage@below
+			\def\pgf at circ@bipole at voltage@label at where{-90}
+		\else
+			\def\pgf at circ@bipole at voltage@label at where{90}
+		\fi
+		
+		\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
+		\pgfkeysifdefined{\pgf at temp}
+			{ \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
+			{ \edef\eudist{\ctikzvalof{voltage/european label distance}} }
+	}
+
+		\ifpgf at circuit@bipole at isvoltage
+			\pgf at circ@drawvoltagegenerator 
+		\else
+			\pgf at circ@drawvoltagegeneric 
+		\fi
+		(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)
+		coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
+			\ifpgf at circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi !
+			(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)$)
+		node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=0] 
+			  at (Vlab) { \pgf at circ@finallabel{voltage/} }
+}
+
+
+
+
+
+%		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! 
+%			\ctikzvalof{voltage/bump b} !
+%			(\ctikzvalof{bipole/name}.-110) $)
+%		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! 
+%			\ctikzvalof{voltage/bump b} ! 
+%			(\ctikzvalof{bipole/name}.-70) $)
+%	\else
+%		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! 
+%			\ctikzvalof{voltage/bump b} !
+%			(\ctikzvalof{bipole/name}.110) $)
+%		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! 
+%			\ctikzvalof{voltage/bump b} ! 
+%			(\ctikzvalof{bipole/name}.70) $)
+%	\fi
+%%%---------- close: tex/pgfcircvoltage
+%%%%%%%%%%% Springe nach tex/pgfcirccurrent
+%%%---------- open: tex/pgfcirccurrent.tex
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Current handling
+
+%% Options
+
+
+\ctikzset{i^>/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = forward,
+		\circuitikzbasekey/bipole/current/x position = after,
+		\circuitikzbasekey/bipole/current/y position = above
+	}
+}
+
+\ctikzset{i_>/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = forward,
+		\circuitikzbasekey/bipole/current/x position = after,
+		\circuitikzbasekey/bipole/current/y position = below
+	}
+}
+
+\ctikzset{i>^/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = forward,
+		\circuitikzbasekey/bipole/current/x position = before,
+		\circuitikzbasekey/bipole/current/y position = above
+	}
+}
+
+\ctikzset{i>_/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = forward,
+		\circuitikzbasekey/bipole/current/x position = before,
+		\circuitikzbasekey/bipole/current/y position = below
+	}
+}
+
+\ctikzset{i^</.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = backward,
+		\circuitikzbasekey/bipole/current/x position = after,
+		\circuitikzbasekey/bipole/current/y position = above
+	}
+}
+
+\ctikzset{i_</.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = backward,
+		\circuitikzbasekey/bipole/current/x position = after,
+		\circuitikzbasekey/bipole/current/y position = below
+	}
+}
+
+\ctikzset{i<^/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = backward,
+		\circuitikzbasekey/bipole/current/x position = before,
+		\circuitikzbasekey/bipole/current/y position = above
+	}
+}
+
+\ctikzset{i<_/.style = {
+		i = #1,
+		\circuitikzbasekey/bipole/current/direction = backward,
+		\circuitikzbasekey/bipole/current/x position = before,
+		\circuitikzbasekey/bipole/current/y position = below
+	}
+}
+
+\ctikzset{i/.code = {
+%			\ifpgf at circuit@bipole at iscurrent
+%				\pgfkeys{\circuitikzbasekey/bipole/current/position=above}
+%			\else
+%				\pgfkeys{\circuitikzbasekey/bipole/current/position=below}
+%			\fi
+			\pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
+					\circuitikzbasekey/bipole/current/x position = after,
+					\circuitikzbasekey/bipole/current/y position = above }
+	\pgfkeys{/tikz/circuitikz/bipole/current/label/name=#1}
+	\ctikzsetvalof{bipole/current/label/unit}{}
+	\ifpgf at circ@siunitx 
+		\pgf at circ@handleSI{#1}
+		\ifpgf at circ@siunitx at res 
+			\edef\pgf at temp{\pgf at circ@handleSI at val}
+			\pgfkeyslet{/tikz/circuitikz/bipole/current/label/name}{\pgf at temp}
+			\edef\pgf at temp{\pgf at circ@handleSI at unit}
+			\pgfkeyslet{/tikz/circuitikz/bipole/current/label/unit}{\pgf at temp}
+		\else
+		\fi
+	\else
+	\fi
+%reverse current direction for voltage sources
+	\ifpgf at circ@oldvoltagedirection\else
+		\ifpgf at circuit@bipole at isvoltage
+		\ifpgf at circuit@bipole at voltage@backward
+			\pgfkeys{\circuitikzbasekey/bipole/current/direction = forward,
+					\circuitikzbasekey/bipole/current/x position = after,
+					\circuitikzbasekey/bipole/current/y position = below }
+		\else
+			\pgfkeys{\circuitikzbasekey/bipole/current/direction = backward,
+					\circuitikzbasekey/bipole/current/x position = before,
+					\circuitikzbasekey/bipole/current/y position = above }
+	\fi\fi\fi
+}
+}
+
+
+\ifpgf at circ@oldvoltagedirection
+	\ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward } }
+\else
+	\ctikzset{i</.style = { i = #1, \circuitikzbasekey/bipole/current/direction = backward, \circuitikzbasekey/bipole/current/x position = before } }
+\fi
+\ctikzset{i_/.style = { i = #1, \circuitikzbasekey/bipole/current/y position = below } }
+\ctikzset{i>/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } }
+\ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } }
+
+
+\def\pgf at circ@drawnormalcurrent{
+			\ifpgf at circuit@bipole at current@before
+				\ifpgf at circuit@bipole at current@backward
+					{  (\ctikzvalof{bipole/name}.left) -- 
+							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+						(\tikztostart)  
+					}
+				\else
+					{  (\tikztostart) -- 
+							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+						(\ctikzvalof{bipole/name}.left)  
+					}
+				\fi
+			\else
+				\ifpgf at circuit@bipole at current@backward
+					{ 	(\tikztotarget) -- 
+							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+						(\ctikzvalof{bipole/name}.right)  
+					}
+				\else
+					{ 	(\ctikzvalof{bipole/name}.right) -- 
+							node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {}
+						(\tikztotarget)  
+					}
+				\fi
+			\fi
+}
+
+%% Output routine 
+%% #1 - node name
+
+\def\pgf at circ@drawcurrent{
+	\pgfextra{
+		\edef\pgf at circ@ffffff{\pgf at circ@direction}
+		\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@ffffff\pgf at nil}
+
+		\ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
+			\ifpgf at circuit@bipole at current@below
+				\def\pgf at circ@dir{north west} \else \def\pgf at circ@dir{south east}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
+			\ifpgf at circuit@bipole at current@below
+				\def\pgf at circ@dir{west} \else \def\pgf at circ@dir{east} 
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{south west}\else \def\pgf at circ@dir{north east}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
+			\ifpgf at circuit@bipole at current@below
+				  \def\pgf at circ@dir{south}\else\def\pgf at circ@dir{north}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{south east}\else\def\pgf at circ@dir{north west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{east}\else \def\pgf at circ@dir{west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
+			\ifpgf at circuit@bipole at current@below
+				  \def\pgf at circ@dir{north east}\else\def\pgf at circ@dir{south west}
+			\fi
+		\fi\fi
+		\ifnum\pgfcircmathresult <5
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{north}\else\def\pgf at circ@dir{south} 
+			\fi
+		\fi
+		\ifnum\pgfcircmathresult >355
+			\ifpgf at circuit@bipole at current@below
+				 \def\pgf at circ@dir{north}\else\def\pgf at circ@dir{south} 
+			\fi
+		\fi
+		
+		\ifpgf at circuit@bipole at current@below
+			\def\pgf at circ@bipole at current@label at where{-90}
+		\else
+			\def\pgf at circ@bipole at current@label at where{+90}
+		\fi
+	}
+
+	
+		\pgfextra{	\def\pgf at temp{short} \edef\pgf at circ@temp{\ctikzvalof{bipole/kind}} }
+		
+		\ifx\pgf at circ@temp\pgf at temp % caso di corrente (centrata) su un corto
+			\ifpgf at circuit@bipole at current@backward
+				{ (\tikztotarget) -- 
+					node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+				  (\tikztostart)  }
+			\else
+				{ (\tikztostart) -- 
+					node [currarrow, pos=\ctikzvalof{current/distance}, sloped,  allow upside down] (Iarrow) {} 
+				  (\tikztotarget)  }
+			\fi
+			
+		\else % altri bipoli - e quindi tra nodo e target
+
+			\ifpgf at circuit@bipole at iscurrent
+				\ifpgf at circuit@europeancurrent
+					\pgf at circ@drawnormalcurrent
+				\else 
+				\fi
+			\else
+				\pgf at circ@drawnormalcurrent
+			\fi
+		\fi
+
+	\ifpgf at circuit@bipole at iscurrent
+		 node [anchor=\pgf at circ@dir] at (\ctikzvalof{bipole/name}.\pgf at circ@bipole at current@label at where) 
+		 	{ \pgf at circ@finallabel{current/} }
+	\else
+		(Iarrow.\pgf at circ@bipole at current@label at where) node [anchor=\pgf at circ@dir] 	
+			{ \pgf at circ@finallabel{current/} } 
+	\fi
+
+}
+
+
+
+
+%%%---------- close: tex/pgfcirccurrent
+
+\ExecuteOptions{nofetbodydiode,nofetsolderdot,nooldvoltagedirection,europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
+
+\ProcessOptions\relax
+
+%%%%%%%%%%% Springe nach tex/pgfcircpath
+%%%---------- open: tex/pgfcircpath.tex
+
+\pgf at circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+
+
+% Names
+\ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@
+\ctikzset{n/.code = { 
+	\pgfkeys{/tikz/circuitikz/bipole/name=#1}
+}}
+
+% Reflect the node along
+\ctikzset{mirrored/.is choice}
+\ctikzset{mirror value/.initial=1}
+\ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} }
+\ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
+\ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
+
+% Initialize paths
+\def\pgfcircresetpath{
+	\ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90, 
+		bipole/reversed=false, bipole/kind=,
+	  	bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
+	  	bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,bipole/is voltageoutsideofsymbol=false,bipole/is strokedsymbol=false,
+		bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
+		bipole/current/y position=above, bipole/current/direction=forward, 
+		mirrored=false
+   }
+}
+
+
+%% Generic bipole path
+\def\pgf at circ@bipole at path#1#2{
+	\pgfextra{
+		\ctikzset{bipole/kind = #1}
+		
+		\edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
+		\def\pgf at circ@temp{}
+		\ifx\pgf at temp\pgf at circ@temp % if it has not a name
+			\pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
+			\ctikzset{bipole/name = #2\pgf at circ@rand} % create it
+		\fi
+
+		\def\pgf at temp{open}
+		\def\pgf at circ@temp{#1}
+	}
+	\ifpgf at circuit@bipole at reversed
+		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
+		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
+	\else
+		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
+		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
+	\fi
+	\pgfextra{
+		\pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
+					   {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
+		\edef\pgf at circ@direction{\pgfmathresult}		
+	}
+	($(\tikztostart) ! .5 ! (\tikztotarget)$) 
+		node[#1shape, rotate=\pgf at circ@direction, yscale=\ctikzvalof{mirror value}] 
+			(\ctikzvalof{bipole/name}) {}
+	\ifx\pgf at temp\pgf at circ@temp  % if it is an open
+	\else
+		\ifpgf at circuit@bipole at strokedsymbol%draw line thrue symbol(e.g. diodes)
+			\ifcsname  pgf at anchor@#1shape at strokepathstart\endcsname%if special path-anchors are defined, use them!
+				(\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.strokepathstart)
+				(\ctikzvalof{bipole/name}.strokepathend)  -- (\ctikzvalof{bipole/name}end.center)
+			\else
+				(\ctikzvalof{bipole/name}start.center)--(\ctikzvalof{bipole/name}end.center)
+			\fi
+		\else
+			\ifcsname  pgf at anchor@#1shape at pathstart\endcsname%if special path-anchors are defined, use them!
+				(\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
+				(\ctikzvalof{bipole/name}.pathend)  -- (\ctikzvalof{bipole/name}end.center)
+			\else
+				(\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
+				(\ctikzvalof{bipole/name}.right)  -- (\ctikzvalof{bipole/name}end.center)
+			\fi
+		\fi
+	\fi
+	\pgf at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabel\fi
+	\drawpoles
+	\pgf at circ@ifkeyempty{bipole/voltage/label/name}\else\pgf at circ@drawvoltage\fi
+	\pgf at circ@ifkeyempty{bipole/current/label/name}\else\pgf at circ@drawcurrent\fi
+	% reset
+	\pgfextra{
+		\pgfcircresetpath
+	}  
+	(\tikztotarget) 	\tikztonodes  % e si continua
+}
+
+
+%% Path definitions
+
+\def\pgf at circ@resistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{generic}{#1}\else\pgf at circ@bipole at path{resistor}{#1}\fi}
+\def\pgf at circ@vresistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{tgeneric}{#1}\else\pgf at circ@bipole at path{vresistor}{#1}\fi}
+\def\pgf at circ@potentiometer at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{genericpotentiometer}{#1}\else\pgf at circ@bipole at path{potentiometer}{#1}\fi}
+\def\pgf at circ@thermistor at path#1{\pgf at circ@bipole at path{thermistor}{#1}}
+\def\pgf at circ@thermistorptc at path#1{\pgf at circ@bipole at path{thermistorptc}{#1}}
+\def\pgf at circ@thermistorntc at path#1{\pgf at circ@bipole at path{thermistorntc}{#1}}
+\def\pgf at circ@varistor at path#1{\pgf at circ@bipole at path{varistor}{#1}}
+\def\pgf at circ@capacitor at path#1{\pgf at circ@bipole at path{capacitor}{#1}}
+\def\pgf at circ@ecapacitor at path#1{\pgf at circ@bipole at path{ecapacitor}{#1}}
+\def\pgf at circ@polarcapacitor at path#1{\pgf at circ@bipole at path{polarcapacitor}{#1}}
+\def\pgf at circ@vcapacitor at path#1{\pgf at circ@bipole at path{vcapacitor}{#1}}
+\def\pgf at circ@piezoelectric at path#1{\pgf at circ@bipole at path{piezoelectric}{#1}}
+\def\pgf at circ@battery at path#1{\pgf at circ@bipole at path{battery}{#1}}
+\def\pgf at circ@battery1 at path#1{\pgf at circ@bipole at path{battery1}{#1}}
+\def\pgf at circ@europeaninductor at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
+\def\pgf at circ@americaninductor at path#1{\pgf at circ@bipole at path{americaninductor}{#1}}
+\def\pgf at circ@cuteinductor at path#1{\pgf at circ@bipole at path{cuteinductor}{#1}}
+\def\pgf at circ@inductor at path#1{%
+	\pgfextra{
+		\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+		\def\pgf at temp{european}%
+	}
+	\ifx\pgf at temp\pgf at circ@temp%
+		\pgf at circ@europeaninductor at path{#1}%
+	\else%
+		\pgfextra{	\def\pgf at temp{cute} }%
+		\ifx\pgf at temp\pgf at circ@temp%
+			\pgf at circ@cuteinductor at path{#1}%
+		\else%
+			\pgf at circ@americaninductor at path{#1}%
+		\fi%
+	\fi%
+}
+\def\pgf at circ@vinductor at path#1{
+	\pgfextra{
+		\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+		\def\pgf at temp{european}%
+	}
+	\ifx\pgf at temp\pgf at circ@temp%
+		\pgf at circ@veuropeaninductor at path{#1}%
+	\else%
+		\pgfextra{	\def\pgf at temp{cute} }%
+		\ifx\pgf at temp\pgf at circ@temp%
+			\pgf at circ@vcuteinductor at path{#1}%
+		\else%
+			\pgf at circ@vamericaninductor at path{#1}%
+		\fi%
+	\fi%
+}
+\def\pgf at circ@veuropeaninductor at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
+\def\pgf at circ@vamericaninductor at path#1{\pgf at circ@bipole at path{vamericaninductor}{#1}}
+\def\pgf at circ@vcuteinductor at path#1{\pgf at circ@bipole at path{vcuteinductor}{#1}}
+\def\pgf at circ@lamp at path#1{\pgf at circ@bipole at path{lamp}{#1}}
+\def\pgf at circ@esource at path#1{\pgf at circ@bipole at path{esource}{#1}}
+\def\pgf at circ@pvsource at path#1{\pgf at circ@bipole at path{pvsource}{#1}}
+\def\pgf at circ@vsource at path#1{\pgf at circ@bipole at path{vsource}{#1}}
+\def\pgf at circ@dcvsource at path#1{\pgf at circ@bipole at path{dcvsource}{#1}}
+\def\pgf at circ@vsourceam at path#1{\pgf at circ@bipole at path{vsourceAM}{#1}}
+\def\pgf at circ@vsourcesin at path#1{\pgf at circ@bipole at path{vsourcesin}{#1}}
+\def\pgf at circ@isource at path#1{\pgf at circ@bipole at path{isource}{#1}}
+\def\pgf at circ@oosource at path#1{\pgf at circ@bipole at path{oosource}{#1}}
+\def\pgf at circ@dcisource at path#1{\pgf at circ@bipole at path{dcisource}{#1}}
+\def\pgf at circ@isourcesin at path#1{\pgf at circ@bipole at path{isourcesin}{#1}}
+\def\pgf at circ@vsourcesquare at path#1{\pgf at circ@bipole at path{vsourcesquare}{#1}}
+\def\pgf at circ@vsourcetri at path#1{\pgf at circ@bipole at path{vsourcetri}{#1}}
+\def\pgf at circ@isourceam at path#1{\pgf at circ@bipole at path{isourceAM}{#1}}
+\def\pgf at circ@cvsource at path#1{\pgf at circ@bipole at path{cvsource}{#1}}
+\def\pgf at circ@cvsourceam at path#1{\pgf at circ@bipole at path{cvsourceAM}{#1}}
+\def\pgf at circ@cvsourcesin at path#1{\pgf at circ@bipole at path{cvsourcesin}{#1}}
+\def\pgf at circ@cisource at path#1{\pgf at circ@bipole at path{cisource}{#1}}
+\def\pgf at circ@cisourceam at path#1{\pgf at circ@bipole at path{cisourceAM}{#1}}
+\def\pgf at circ@cisourcesin at path#1{\pgf at circ@bipole at path{cisourcesin}{#1}}
+\def\pgf at circ@short at path#1{\pgf at circ@bipole at path{short}{#1}}
+\def\pgf at circ@cspst at path#1{\pgf at circ@bipole at path{cspst}{#1}}
+\def\pgf at circ@spst at path#1{\pgf at circ@bipole at path{spst}{#1}}
+\def\pgf at circ@ospst at path#1{\pgf at circ@bipole at path{ospst}{#1}}
+\def\pgf at circ@pushbutton at path#1{\pgf at circ@bipole at path{pushbutton}{#1}}
+\def\pgf at circ@open at path#1{\pgf at circ@bipole at path{open}{#1}}
+\def\pgf at circ@generic at path#1{\pgf at circ@bipole at path{generic}{#1}}
+\def\pgf at circ@ageneric at path#1{\pgf at circ@bipole at path{ageneric}{#1}}
+\def\pgf at circ@tgeneric at path#1{\pgf at circ@bipole at path{tgeneric}{#1}}
+\def\pgf at circ@fullgeneric at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
+\def\pgf at circ@tfullgeneric at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
+\def\pgf at circ@ammeter at path#1{\pgf at circ@bipole at path{ammeter}{#1}}
+\def\pgf at circ@ohmmeter at path#1{\pgf at circ@bipole at path{ohmmeter}{#1}}
+\def\pgf at circ@voltmeter at path#1{\pgf at circ@bipole at path{voltmeter}{#1}}
+\def\pgf at circ@empty at path#1{}
+\def\pgf at circ@photoresistor at path#1{\pgf at circ@bipole at path{photoresistor}{#1}}
+\def\pgf at circ@emptythyristor at path#1{\pgf at circ@bipole at path{emptythyristor}{#1}}
+\def\pgf at circ@fullthyristor at path#1{\pgf at circ@bipole at path{fullthyristor}{#1}}
+\def\pgf at circ@toggleswitch at path#1{\pgf at circ@bipole at path{toggleswitch}{#1}}
+\def\pgf at circ@memristor at path#1{\pgf at circ@bipole at path{memristor}{#1}}
+\def\pgf at circ@emptytriac at path#1{\pgf at circ@bipole at path{emptytriac}{#1}}
+\def\pgf at circ@fulltriac at path#1{\pgf at circ@bipole at path{fulltriac}{#1}}
+\def\pgf at circ@tline at path#1{\pgf at circ@bipole at path{tline}{#1}}
+\def\pgf at circ@squid at path#1{\pgf at circ@bipole at path{squid}{#1}}
+\def\pgf at circ@barrier at path#1{\pgf at circ@bipole at path{barrier}{#1}}
+\def\pgf at circ@thermocouple at path#1{\pgf at circ@bipole at path{thermocouple}{#1}}
+\def\pgf at circ@fuse at path#1{\pgf at circ@bipole at path{fuse}{#1}}
+\def\pgf at circ@afuse at path#1{\pgf at circ@bipole at path{afuse}{#1}}
+
+\def\pgf at circ@gfsurgearrester at path#1{\ifpgf at circuit@europeangfsurgearrester\pgf at circ@europeangfsurgearrester at path{#1}\else\pgf at circ@americangfsurgearrester at path{#1}\fi}
+\def\pgf at circ@europeangfsurgearrester at path#1{\pgf at circ@bipole at path{european gas filled surge arrester}{#1}}
+\def\pgf at circ@americangfsurgearrester at path#1{\pgf at circ@bipole at path{american gas filled surge arrester}{#1}}
+
+\def\pgf at circ@twoport at path#1{\pgf at circ@bipole at path{twoport}{#1}}
+\def\pgf at circ@vco at path#1{\pgf at circ@bipole at path{vco}{#1}}
+\def\pgf at circ@bandpass at path#1{\pgf at circ@bipole at path{bandpass}{#1}}
+\def\pgf at circ@highpass at path#1{\pgf at circ@bipole at path{highpass}{#1}}
+\def\pgf at circ@lowpass at path#1{\pgf at circ@bipole at path{lowpass}{#1}}
+\def\pgf at circ@adc at path#1{\pgf at circ@bipole at path{adc}{#1}}
+\def\pgf at circ@dac at path#1{\pgf at circ@bipole at path{dac}{#1}}
+\def\pgf at circ@dsp at path#1{\pgf at circ@bipole at path{dsp}{#1}}
+\def\pgf at circ@fft at path#1{\pgf at circ@bipole at path{fft}{#1}}
+\def\pgf at circ@amp at path#1{\pgf at circ@bipole at path{amp}{#1}}
+\def\pgf at circ@vamp at path#1{\pgf at circ@bipole at path{vamp}{#1}}
+\def\pgf at circ@piattenuator at path#1{\pgf at circ@bipole at path{piattenuator}{#1}}
+\def\pgf at circ@vpiattenuator at path#1{\pgf at circ@bipole at path{vpiattenuator}{#1}}
+\def\pgf at circ@tattenuator at path#1{\pgf at circ@bipole at path{tattenuator}{#1}}
+\def\pgf at circ@vtattenuator at path#1{\pgf at circ@bipole at path{vtattenuator}{#1}}
+\def\pgf at circ@phaseshifter at path#1{\pgf at circ@bipole at path{phaseshifter}{#1}}
+\def\pgf at circ@vphaseshifter at path#1{\pgf at circ@bipole at path{vphaseshifter}{#1}}
+\def\pgf at circ@detector at path#1{\pgf at circ@bipole at path{detector}{#1}}
+
+%%Mechanical
+\def\pgf at circ@spring at path#1{\pgf at circ@bipole at path{spring}{#1}}
+\def\pgf at circ@mass at path#1{\pgf at circ@bipole at path{mass}{#1}}
+\def\pgf at circ@damper at path#1{\pgf at circ@bipole at path{damper}{#1}}
+
+
+
+
+%% Styles
+
+\def\comnpatname{\ifpgf at circuit@compat *\else\fi}
+\def\compattikzset#1{\tikzset{\comnpatname#1}}
+
+%\def\ctikzsetbipole#1#2{%
+%	\tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
+%}
+
+\compattikzset{spring/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@spring at path, l=#1}}
+\compattikzset{mass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@mass at path, l=#1}}
+\compattikzset{damper/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@damper at path, l=#1}}
+\compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@resistor at path, l=#1}}
+\compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{resistor}{#1}, l=#1}}
+\compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{generic}{#1}, l=#1}}
+\compattikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@potentiometer at path, l=#1}}
+\compattikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@varistor at path, l=#1}}
+\compattikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@photoresistor at path, l=#1}}
+\compattikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistor at path, l=#1}}
+\compattikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorptc at path, l=#1}}
+\compattikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorntc at path, l=#1}}
+\compattikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{potentiometer}{#1}, l=#1}}
+\compattikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{genericpotentiometer}{#1}, l=#1}}
+\compattikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vresistor at path, l=#1}}
+\compattikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{vresistor}{#1}, l=#1}}
+\compattikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{tgeneric}{#1}, l=#1}}
+\compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@capacitor at path, l=#1}}
+\compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ecapacitor at path, l=#1}}
+\compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ecapacitor at path, l=#1}}
+\compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@polarcapacitor at path, l=#1}}
+\compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcapacitor at path, l=#1}}
+\compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piezoelectric at path, l=#1}}
+\compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery at path, \circuitikzbasekey/bipole/is voltage=true,  \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery1 at path, \circuitikzbasekey/bipole/is voltage=true,  \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@inductor at path, l=#1}}
+\compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@gfsurgearrester at path, l=#1}}
+\compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americangfsurgearrester at path, l=#1}}
+\compattikzset{european gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@europeangfsurgearrester at path, l=#1}}
+\compattikzset{gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@gfsurgearrester at path, l=#1}}
+\compattikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americaninductor at path, l=#1}}
+\compattikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cuteinductor at path, l=#1}}
+\compattikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@europeaninductor at path, l=#1}}
+\compattikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vinductor at path, l=#1}}
+\compattikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@veuropeaninductor at path, l=#1}}
+\compattikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamericaninductor at path, l=#1}}
+\compattikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcuteinductor at path, l=#1}}
+\compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tline at path, l=#1}}
+\compattikzset{transmission line/.style = {tline = #1}}
+\compattikzset{TL/.style = {tline = #1}}
+\compattikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsource at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsource at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
+\compattikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesquare at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
+\compattikzset{triangle voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcetri at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
+\compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+
+\compattikzset{voltage source/.style = {\comnpatname \ifpgf at circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{current source/.style = {\comnpatname \ifpgf at circuit@europeancurrent european \else american \fi current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{controlled voltage source/.style = {\comnpatname \ifpgf at circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{controlled current source/.style = {\comnpatname \ifpgf at circuit@europeancurrent european \else american \fi controlled current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
+
+
+\compattikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@generic at path, l=#1}}
+\compattikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ageneric at path, l=#1}}
+\compattikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tgeneric at path, l=#1}}
+\compattikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullgeneric at path, l=#1}}
+\compattikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tfullgeneric at path, l=#1}}
+\compattikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@short at path}}
+\compattikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@open at path}}
+
+\compattikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lamp at path}}
+
+\compattikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@squid at path}}
+\compattikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@barrier at path}}
+\compattikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermocouple at path}}
+\compattikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fuse at path}}
+\compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@afuse at path}}
+
+\compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@twoport at path}}
+\compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vco at path}}
+\compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bandpass at path}}
+\compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@highpass at path}}
+\compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lowpass at path}}
+\compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@adc at path}}
+\compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dac at path}}
+\compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dsp at path}}
+\compattikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fft at path}}
+\compattikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@amp at path}}
+\compattikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamp at path}}
+\compattikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piattenuator at path}}
+\compattikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vpiattenuator at path}}
+\compattikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tattenuator at path}}
+\compattikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vtattenuator at path}}
+\compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@phaseshifter at path}}
+\compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vphaseshifter at path}}
+\compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@detector at path}}
+
+% % % % % %
+% % Beginn of Diodes
+% % % % % %
+
+\def\pgf at circ@fulldiode at path#1{\pgf at circ@bipole at path{fulldiode}{#1}}
+\def\pgf at circ@fullzdiode at path#1{\pgf at circ@bipole at path{fullzdiode}{#1}}
+\def\pgf at circ@fullzzdiode at path#1{\pgf at circ@bipole at path{fullzzdiode}{#1}}
+\def\pgf at circ@fullsdiode at path#1{\pgf at circ@bipole at path{fullsdiode}{#1}}
+\def\pgf at circ@fulltdiode at path#1{\pgf at circ@bipole at path{fulltdiode}{#1}}
+\def\pgf at circ@fulllediode at path#1{\pgf at circ@bipole at path{fulllediode}{#1}}
+\def\pgf at circ@fullpdiode at path#1{\pgf at circ@bipole at path{fullpdiode}{#1}}
+\def\pgf at circ@fullvarcap at path#1{\pgf at circ@bipole at path{fullvarcap}{#1}}
+\def\pgf at circ@emptydiode at path#1{\pgf at circ@bipole at path{emptydiode}{#1}}
+\def\pgf at circ@emptyzdiode at path#1{\pgf at circ@bipole at path{emptyzdiode}{#1}}
+\def\pgf at circ@emptyzzdiode at path#1{\pgf at circ@bipole at path{emptyzzdiode}{#1}}
+\def\pgf at circ@emptysdiode at path#1{\pgf at circ@bipole at path{emptysdiode}{#1}}
+\def\pgf at circ@emptytdiode at path#1{\pgf at circ@bipole at path{emptytdiode}{#1}}
+\def\pgf at circ@emptylediode at path#1{\pgf at circ@bipole at path{emptylediode}{#1}}
+\def\pgf at circ@emptypdiode at path#1{\pgf at circ@bipole at path{emptypdiode}{#1}}
+\def\pgf at circ@emptyvarcap at path#1{\pgf at circ@bipole at path{emptyvarcap}{#1}}
+
+\compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulldiode at path}}
+\compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullsdiode at path}}
+\compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullzdiode at path}}
+\compattikzset{full ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullzzdiode at path}}
+\compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulltdiode at path}}
+\compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullpdiode at path}}
+\compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulllediode at path}}
+\compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullvarcap at path}}
+\compattikzset{full thyristor/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullthyristor at path}}
+\compattikzset{full triac/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulltriac at path}}
+
+\compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptydiode at path}}
+\compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptysdiode at path}}
+\compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyzdiode at path}}
+\compattikzset{empty ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyzzdiode at path}}
+\compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptytdiode at path}}
+\compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptypdiode at path}}
+\compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptylediode at path}}
+\compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyvarcap at path}}
+\compattikzset{empty thyristor/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptythyristor at path}}
+\compattikzset{empty triac/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptytriac at path}}
+
+\compattikzset{stroke diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptydiode at path}}
+\compattikzset{stroke Schottky diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptysdiode at path}}
+\compattikzset{stroke Zener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptyzdiode at path}}
+\compattikzset{stroke ZZener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptyzzdiode at path}}
+\compattikzset{stroke tunnel diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptytdiode at path}}
+\compattikzset{stroke photodiode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptypdiode at path}}
+\compattikzset{stroke led/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptylediode at path}}
+\compattikzset{stroke varcap/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptyvarcap at path}}
+\compattikzset{stroke thyristor/.style =  {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptythyristor at path}}
+%\compattikzset{stroke triac/.style =  {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptytriac at path}}
+
+\def\pgfcircdiodestylemacro{\ifpgf at circuit@strokediode stroke \else\ifpgf at circuit@fulldiode full \else empty \fi\fi}
+
+\compattikzset{Schottky diode/.style = {\comnpatname \pgfcircdiodestylemacro Schottky diode}}
+\compattikzset{Zener diode/.style = {\comnpatname \pgfcircdiodestylemacro Zener diode}}
+\compattikzset{ZZener diode/.style = {\comnpatname \pgfcircdiodestylemacro ZZener diode}}
+\compattikzset{tunnel diode/.style = {\comnpatname \pgfcircdiodestylemacro tunnel diode}}
+\compattikzset{photodiode/.style = {\comnpatname \pgfcircdiodestylemacro photodiode}}
+\compattikzset{led/.style = {\comnpatname \pgfcircdiodestylemacro led}}
+\compattikzset{varcap/.style = {\comnpatname \pgfcircdiodestylemacro varcap}}
+\compattikzset{diode/.style = {\comnpatname \pgfcircdiodestylemacro diode}}
+\compattikzset{thyristor/.style =  {\comnpatname \pgfcircdiodestylemacro thyristor}}
+\compattikzset{triac/.style =  {\comnpatname \ifpgf at circuit@fulldiode full \else empty \fi triac}}%no stroke triac!
+
+%% Define Shortcuts
+\compattikzset{Do/.style = {\comnpatname empty diode}}
+\compattikzset{tDo/.style = {\comnpatname empty tunnel diode}}
+\compattikzset{zDo/.style = {\comnpatname empty Zener diode}}
+\compattikzset{zzDo/.style = {\comnpatname empty ZZener diode}}
+\compattikzset{sDo/.style = {\comnpatname empty Schottky diode}}
+\compattikzset{pDo/.style = {\comnpatname empty photodiode}}
+\compattikzset{leDo/.style = {\comnpatname empty led}}
+\compattikzset{VCo/.style = {\comnpatname empty varcap}}
+\compattikzset{Tyo/.style = {\comnpatname empty thyristor}}
+\compattikzset{Tro/.style = {\comnpatname empty triac}}
+
+\compattikzset{D*/.style = {\comnpatname full diode}}
+\compattikzset{tD*/.style = {\comnpatname full tunnel diode}}
+\compattikzset{zD*/.style = {\comnpatname full Zener diode}}
+\compattikzset{zzD*/.style = {\comnpatname full ZZener diode}}
+\compattikzset{sD*/.style = {\comnpatname full Schottky diode}}
+\compattikzset{pD*/.style = {\comnpatname full photodiode}}
+\compattikzset{leD*/.style = {\comnpatname full led}}
+\compattikzset{VC*/.style = {\comnpatname full varcap}}
+\compattikzset{Ty*/.style = {\comnpatname full thyristor}}
+\compattikzset{Tr*/.style = {\comnpatname full triac}}
+
+\compattikzset{D/.style = {\comnpatname diode}}
+\compattikzset{tD/.style = {\comnpatname tunnel diode}}
+\compattikzset{zD/.style = {\comnpatname Zener diode}}
+\compattikzset{zzD/.style = {\comnpatname ZZener diode}}
+\compattikzset{sD/.style = {\comnpatname Schottky diode}}
+\compattikzset{pD/.style = {\comnpatname photodiode}}
+\compattikzset{leD/.style = {\comnpatname led}}
+\compattikzset{VC/.style = {\comnpatname varcap}}
+\compattikzset{Ty/.style = {\comnpatname thyristor}}
+\compattikzset{Tr/.style = {\comnpatname triac}}
+
+\compattikzset{D-/.style = {\comnpatname stroke diode}}
+\compattikzset{tD-/.style = {\comnpatname stroke tunnel diode}}
+\compattikzset{zD-/.style = {\comnpatname stroke Zener diode}}
+\compattikzset{zzD-/.style = {\comnpatname stroke ZZener diode}}
+\compattikzset{sD-/.style = {\comnpatname stroke Schottky diode}}
+\compattikzset{pD-/.style = {\comnpatname stroke photodiode}}
+\compattikzset{leD-/.style = {\comnpatname stroke led}}
+\compattikzset{VC-/.style = {\comnpatname stroke varcap}}
+\compattikzset{Ty-/.style = {\comnpatname stroke thyristor}}
+\compattikzset{Tr-/.style = {\comnpatname empty triac}}%no stroke triac!
+
+% % % % % %
+% % End of Diodes
+% % % % % %
+
+
+\compattikzset{memristor/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@memristor at path}}
+\compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cspst at path, l=#1}}
+\compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ospst at path, l=#1}}
+\compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@spst at path, l=#1}}
+\compattikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pushbutton at path, l=#1}}
+\compattikzset{toggle switch/.style =  {\circuitikzbasekey, /tikz/to path=\pgf at circ@toggleswitch at path}}
+
+\compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ammeter at path}}
+\compattikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@voltmeter at path}}
+\compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ohmmeter at path}}
+
+% short forms
+\compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@esource at path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true,  v=#1}}
+\compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pvsource at path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true,  v=#1}}
+\compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dcvsource at path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dcisource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+
+\compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf at circ@oosource at path}}
+\compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf at circ@oosource at path}}
+
+\compattikzset{vsource/.style = {\comnpatname voltage source = #1}}
+\compattikzset{isource/.style = {\comnpatname current source = #1}}
+\compattikzset{cisource/.style = {\comnpatname controlled current source = #1}}
+\compattikzset{cvsource/.style = {\comnpatname controlled voltage source = #1}}
+\compattikzset{vsourcesin/.style = {\comnpatname sinusoidal voltage source = #1}}
+\compattikzset{vsourcesquare/.style = {\comnpatname square voltage source = #1}}
+\compattikzset{vsourcetri/.style = {triangle voltage source = #1}}
+\compattikzset{isourcesin/.style = {\comnpatname sinusoidal current source = #1}}
+\compattikzset{cisourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
+\compattikzset{cvsourcesin/.style = {\comnpatname controlled sinusoidal  voltage source = #1}}
+
+\compattikzset{controlled vsource/.style = {\comnpatname controlled voltage source = #1}}
+\compattikzset{controlled isource/.style = {\comnpatname controlled current source = #1}}
+\compattikzset{controlled vsourcesin/.style = {\comnpatname controlled sinusoidal  voltage source = #1}}
+\compattikzset{controlled isourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}}
+
+\compattikzset{R/.style= {\comnpatname resistor = #1}}
+%\ifpgf at circuit@compat\else\compattikzset{R/.style= {resistor = #1}}\fi
+\compattikzset{vR/.style= {\comnpatname variable resistor = #1}}
+\compattikzset{phR/.style= {\comnpatname photoresistor = #1}}
+\compattikzset{thR/.style= {\comnpatname thermistor = #1}}
+\compattikzset{thRp/.style= {\comnpatname thermistor ptc= #1}}
+\compattikzset{thRn/.style= {\comnpatname thermistor ntc= #1}}
+\compattikzset{pR/.style= {\comnpatname potentiometer = #1}}
+\compattikzset{C/.style = {\comnpatname capacitor = #1}}
+\compattikzset{eC/.style = {\comnpatname ecapacitor = #1}}
+\compattikzset{pC/.style = {\comnpatname polar capacitor = #1}}
+\compattikzset{vC/.style = {\comnpatname variable capacitor = #1}}
+\compattikzset{PZ/.style = {\comnpatname piezoelectric = #1}}
+\compattikzset{L/.style = {\comnpatname inductor = #1}}
+\compattikzset{vL/.style = {\comnpatname variable inductor = #1}}
+\compattikzset{V/.style = {\comnpatname voltage source = #1}}
+\compattikzset{cV/.style = {\comnpatname controlled voltage source = #1}}
+\compattikzset{sV/.style = {\comnpatname sinusoidal voltage source = #1}}
+\compattikzset{sqV/.style = {\comnpatname square voltage source = #1}}
+\compattikzset{tV/.style = {\comnpatname triangle voltage source = #1}}
+\compattikzset{csV/.style = {\comnpatname controlled sinusoidal voltage source = #1}}
+\def\pgf at temp#1{ 
+	\compattikzset{V#1/.style = {\comnpatname voltage source, v#1=##1} } 
+	\compattikzset{cV#1/.style = {\comnpatname controlled  voltage source, v#1=##1} } 
+	\compattikzset{sV#1/.style = {\comnpatname sinusoidal  voltage source, v#1=##1} } 
+	\compattikzset{csV#1/.style = {\comnpatname controlled sinusoidal voltage source, v#1=##1} } 
+}
+\pgf at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<} 
+\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_} 
+\compattikzset{I/.style = {\comnpatname current source = #1}}
+\compattikzset{cI/.style = {\comnpatname controlled current source = #1}}
+\compattikzset{sI/.style = {\comnpatname sinusoidal current source = #1}}
+\compattikzset{csI/.style = {\comnpatname controlled sinusoidal current source = #1}}
+\def\pgf at temp#1{ 
+	\compattikzset{I#1/.style = {\comnpatname current source, i#1=##1} } 
+	\compattikzset{cI#1/.style = {\comnpatname controlled current source, i#1=##1} } 
+	\compattikzset{sI#1/.style = {\comnpatname sinusoidal current source, i#1=##1} } 
+	\compattikzset{csI#1/.style = {\comnpatname controlled sinusoidal current source, i#1=##1} } 
+}
+\pgf at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<}
+\pgf at temp{>_} \pgf at temp{<_} \pgf at temp{>^} \pgf at temp{<^}
+\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_}
+
+
+
+\compattikzset{Mr/.style = {\comnpatname memristor}}
+
+\compattikzset{cspst/.style = {\comnpatname closing switch = #1}}
+\compattikzset{ospst/.style = {\comnpatname opening switch = #1}}
+\compattikzset{spst/.style = {\comnpatname switch = #1}}
+
+\compattikzset{afuse/.style = {\comnpatname asymmetric fuse=#1}}
+
+\compattikzset{vdd/.style = {\comnpatname vcc = #1}}
+\compattikzset{vss/.style = {\comnpatname vee = #1}}
+
+\def\inheritlogicport#1#2{
+	\pgfdeclareshape{#2 port}{
+		\inheritsavedanchors[from=#1 #2 port]
+		\inheritbackgroundpath[from=#1 #2 port]
+		\inheritanchor[from=#1 #2 port]{in}
+		\inheritanchor[from=#1 #2 port]{in 1}
+		\inheritanchor[from=#1 #2 port]{in 2}
+		\inheritanchor[from=#1 #2 port]{out}
+		\inheritanchor[from=#1 #2 port]{center}
+		\inheritanchor[from=#1 #2 port]{left}
+	}
+}
+
+\ifpgf at circuit@europeanlogicport
+	\inheritlogicport{european}{and}
+	\inheritlogicport{european}{or}
+	\inheritlogicport{european}{xor}
+	\inheritlogicport{european}{not}
+	\inheritlogicport{european}{nand}
+	\inheritlogicport{european}{nor}
+	\inheritlogicport{european}{xnor}
+\else
+	\inheritlogicport{american}{and}
+	\inheritlogicport{american}{or}
+	\inheritlogicport{american}{xor}
+	\inheritlogicport{american}{not}
+	\inheritlogicport{american}{nand}
+	\inheritlogicport{american}{nor}
+	\inheritlogicport{american}{xnor}
+\fi
+
+% Transistor like bipoles
+
+\def\pgf at circ@trans at path#1#2{
+	\pgfextra{
+		\edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
+		\def\pgf at circ@temp{#2}
+		\ifx\pgf at temp\pgf at circ@temp % if it has not a name
+			\pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
+			\ctikzset{bipole/name = trans\pgf at circ@rand} % create it
+		\fi
+	}
+	\ifpgf at circuit@bipole at reversed
+		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
+		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {} 	
+	\else
+		(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
+		(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {} 
+	\fi
+	\pgfextra{
+		\pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
+					   {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
+		\pgfmathadd{\pgfmathresult}{-90}
+		\edef\pgf at circ@direction{\pgfmathresult}
+	}
+	($(\tikztostart) ! .5 ! (\tikztotarget)$) 
+		node[#1, /tikz/rotate=\pgf at circ@direction, xscale=\ctikzvalof{mirror value}]
+			(\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
+		\ifcsname pgf at anchor@#1 at pathstart\endcsname%if special path-anchors are defined, use them!
+			(\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
+			(\ctikzvalof{bipole/name}.pathend)  -- (\ctikzvalof{bipole/name}end.center)
+		\else
+			(\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
+			(\ctikzvalof{bipole/name}.right)  -- (\ctikzvalof{bipole/name}end.center)
+		\fi
+	\pgfextra{
+		\pgfcircresetpath
+	}  
+	(\tikztotarget) 	\tikztonodes  % e si continua
+}
+
+
+\def\pgf at circ@definetranspath#1{
+	\compattikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@trans at path{#1}{}, l=##1}}
+}
+
+\pgf at circ@definetranspath{elmech}
+\pgf at circ@definetranspath{nmos}
+\pgf at circ@definetranspath{pmos}
+\pgf at circ@definetranspath{npn}
+\pgf at circ@definetranspath{pnp}
+\pgf at circ@definetranspath{nfet}
+\pgf at circ@definetranspath{nigfete}
+\pgf at circ@definetranspath{nigfetd}
+\pgf at circ@definetranspath{nigfetebulk}
+\pgf at circ@definetranspath{pfet}
+\pgf at circ@definetranspath{pigfete}
+\pgf at circ@definetranspath{pigfetd}
+\pgf at circ@definetranspath{pigfetebulk}
+\pgf at circ@definetranspath{njfet}
+\pgf at circ@definetranspath{pjfet}
+\pgf at circ@definetranspath{pigbt}
+\pgf at circ@definetranspath{nigbt}
+\pgf at circ@definetranspath{Lpigbt}
+\pgf at circ@definetranspath{Lnigbt}%%%---------- close: tex/pgfcircpath
+
+\ifpgf at circ@siunitx
+    \RequirePackage{xstring}[2009/03/13]
+	%\expandafter\let\csname angstrom\endcsname\relax
+	\RequirePackage{siunitx}
+\fi
+
+
+
+\newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
+%override (unused) circuitikz environment for compability to externalization)
+\let\circuitikz\tikzpicture
+\let\endcircuitikz\endtikzpicture
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6-body.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6.sty	2021-07-06 17:52:36 UTC (rev 59855)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz-0.6.sty	2021-07-06 20:31:34 UTC (rev 59856)
@@ -1,4 +1,7 @@
-% Copyright 2007-2016 by Massimo Redaelli
+% Copyright 2018-2021 by Romano Giannetti
+% Copyright 2015-2021 by Stefan Lindner
+% Copyright 2013-2021 by Stefan Erhardt
+% Copyright 2007-2021 by Massimo Redaelli
 %
 % This file may be distributed and/or modified
 %
@@ -5,16 +8,9 @@
 % 1. under the LaTeX Project Public License and/or
 % 2. under the GNU Public License.
 %
-% See the file doc/LICENSE for more details.
+% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
 
 
-%%%%%
-%%%%%
-%%%%%
-%%%%% Se c'è l'opzione symbol, fallback to siunitx with warning
-%%%%%
-%%%%%
-
 \NeedsTeXFormat{LaTeX2e}
 
 \def\pgfcircversion{0.6}
@@ -23,10268 +19,5 @@
 \ProvidesPackage{circuitikz-0.6}
         [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
 
-%% Version 2.0 of pgf/TikZ is required
-\RequirePackage{tikz}
-\usetikzlibrary{calc}
-\usepgflibrary{arrows}
+\input{circuitikz-0.6-body.tex}
 
-
-% The options are listed in the manual in this order
-
-\DeclareOption{europeanvoltage}{
-	\ctikzset{voltage=european}
-}
-
-\DeclareOption{americanvoltage}{
-	\ctikzset{voltage=american}
-}
-
-\DeclareOption{europeancurrent}{
-	\ctikzset{current = european}
-}
-
-\DeclareOption{americancurrent}{
-	\ctikzset{current = american}
-}
-
-\DeclareOption{europeanvoltage}{
-	\ctikzset{voltage = european}
-}
-
-\DeclareOption{americanresistor}{
-	\ctikzset{resistor = american}
-}
-
-\DeclareOption{europeanresistor}{
-	\ctikzset{resistor = european}
-}
-
-\DeclareOption{americaninductor}{
-	\ctikzset{inductor = american}
-}
-
-\DeclareOption{europeaninductor}{
-	\ctikzset{inductor = european}
-}
-
-\DeclareOption{cuteinductor}{
-	\ctikzset{inductor = cute}
-}
-
-\DeclareOption{americanport}{
-	\ctikzset{logic ports = american}
-}
-
-\DeclareOption{europeanport}{
-	\ctikzset{logic ports = european}
-}
-
-\DeclareOption{europeanport}{
-	\ctikzset{logic ports = european}
-}
-
-\DeclareOption{european}{
-	\ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
-	 \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester = european} 
-}
-
-\DeclareOption{american}{
-	\ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester = american}
-	\ctikzset{logic ports = american}
-}
-
-\DeclareOption{fulldiodes}{
-	\ctikzset{diode = full}
-}
-
-\DeclareOption{emptydiodes}{
-	\ctikzset{diode = empty}
-}
-
-\DeclareOption{europeanvoltages}{
-	\ctikzset{voltage=european}
-}
-
-\DeclareOption{americanvoltages}{
-	\ctikzset{voltage=american}
-}
-
-\DeclareOption{europeancurrents}{
-	\ctikzset{current = european}
-}
-
-\DeclareOption{americancurrents}{
-	\ctikzset{current = american}
-}
-
-\DeclareOption{europeanvoltages}{
-	\ctikzset{voltage = european}
-}
-
-\DeclareOption{americanresistors}{
-	\ctikzset{resistor = american}
-}
-
-\DeclareOption{europeanresistors}{
-	\ctikzset{resistor = european}
-}
-
-\DeclareOption{americaninductors}{
-	\ctikzset{inductor = american}
-}
-
-\DeclareOption{europeaninductors}{
-	\ctikzset{inductor = european}
-}
-
-\DeclareOption{cuteinductors}{
-	\ctikzset{inductor = cute}
-}
-
-\DeclareOption{americanports}{
-	\ctikzset{logic ports = american}
-}
-
-\DeclareOption{europeanports}{
-	\ctikzset{logic ports = european}
-}
-
-\DeclareOption{americangfsurgearrester}{
-	\ctikzset{gas filled surge arrester = american}
-}
-
-\DeclareOption{europeangfsurgearrester}{
-	\ctikzset{gas filled surge arrester = european}
-}
-
-\DeclareOption{siunitx}{
-	\pgf at circ@siunitxtrue
-}
-
-\DeclareOption{nosiunitx}{
-	\pgf at circ@siunitxfalse
-}
-
-\DeclareOption{fulldiode}{
-	\ctikzset{diode = full}
-}
-
-\DeclareOption{emptydiode}{
-	\ctikzset{diode = empty}
-}
-
-\DeclareOption{strokediode}{
-	\ctikzset{diode = stroke}
-}
-
-\DeclareOption{arrowmos}{
-	\pgf at circuit@mos at arrowstrue
-}
-
-\DeclareOption{noarrowmos}{
-	\pgf at circuit@mos at arrowsfalse
-}
-
-\DeclareOption{fetbodydiode}{
-	\pgf at circuit@fet at bodydiodetrue
-}
-
-\DeclareOption{nofetbodydiode}{
-	\pgf at circuit@fet at bodydiodefalse
-}
-
-\DeclareOption{fetsolderdot}{
-	\pgf at circuit@fet at solderdottrue
-}
-
-\DeclareOption{nofetsolderdot}{
-	\pgf at circuit@fet at solderdotfalse
-}
-
-\DeclareOption{emptypmoscircle}{
-	\pgf at circuit@pmos at emptycircletrue
-}
-
-
-\DeclareOption{lazymos}{
-	\ctikzset{tripoles/nmos/width=.5}
-	\ctikzset{tripoles/nmos/gate height=.35}
-	\ctikzset{tripoles/nmos/base height=.35}
-	\ctikzset{tripoles/nmos/height/.initial=1.2}
-	\ctikzset{tripoles/nmos/base width=.5}
-	\ctikzset{tripoles/nmos/gate width=.65}
-	
-	\ctikzset{tripoles/pmos/width=.5}
-	\ctikzset{tripoles/pmos/gate height=.35}
-	\ctikzset{tripoles/pmos/base height=.35}
-	\ctikzset{tripoles/pmos/height/.initial=1.2}
-	\ctikzset{tripoles/pmos/base width=.5}
-	\ctikzset{tripoles/pmos/gate width=.65}
-	
-	\pgf at circuit@pmos at emptycircletrue
-}
-
-\DeclareOption{straightlabels}{
-	\ctikzset{label/align = straight}
-}
-
-\DeclareOption{rotatelabels}{
-	\ctikzset{label/align = rotate}
-}
-
-\DeclareOption{smartlabels}{
-	\ctikzset{label/align = smart}
-}
-
-\DeclareOption{compatibility}{
-	\pgf at circuit@compattrue
-}
-
-\DeclareOption{oldvoltagedirection}{
-	\pgf at circ@oldvoltagedirectiontrue
-}
-\DeclareOption{nooldvoltagedirection}{
-	\pgf at circ@oldvoltagedirectionfalse
-}
-
-\DeclareOption{betterproportions}{
-	\ctikzset{monopoles/ground/width/.initial=.15}
-
-	\ctikzset{bipoles/resistor/height/.initial=.23}
-	\ctikzset{bipoles/resistor/width/.initial=.6}
-	\ctikzset{bipoles/capacitor/height/.initial=.4}
-	\ctikzset{bipoles/capacitor/width/.initial=.1}
-	\ctikzset{bipoles/potentiometer/height/.initial=.6}
-	\ctikzset{bipoles/potentiometer/height 2/.initial=.23}
-	\ctikzset{bipoles/potentiometer/width/.initial=.6}
-	\ctikzset{bipoles/photoresistor/height/.initial=.6}
-	\ctikzset{bipoles/photoresistor/height 2/.initial=.23}
-	\ctikzset{bipoles/photoresistor/width/.initial=.6}
-	\ctikzset{bipoles/thermistor/main/.initial=.7}
-	\ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7
-	\ctikzset{bipoles/thermistor/width/.initial=.6}
-	\ctikzset{bipoles/thermistorntc/width/.initial=.6}
-	\ctikzset{bipoles/thermistorntc/main/.initial=.7}
-	\ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7
-	\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7
-	\ctikzset{bipoles/thermistorptc/width/.initial=.6}
-	\ctikzset{bipoles/thermistorptc/main/.initial=.7}
-	\ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7
-	\ctikzset{bipoles/varistor/main/.initial=.7}
-	\ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7
-	\ctikzset{bipoles/varistor/width/.initial=.6}
-	\ctikzset{bipoles/vresistor/height/.initial=.45}
-	\ctikzset{bipoles/vresistor/width/.initial=.6}
-	\ctikzset{bipoles/generic/height/.initial=.23}
-	\ctikzset{bipoles/generic/width/.initial=.6}
-	\ctikzset{bipoles/generic potentiometer/height/.initial=.6}
-	\ctikzset{bipoles/generic potentiometer/height 2/.initial=.23}
-	\ctikzset{bipoles/generic potentiometer/width/.initial=.6}
-	\ctikzset{bipoles/ageneric/height/.initial=.23}
-	\ctikzset{bipoles/ageneric/width/.initial=.6}
-	\ctikzset{bipoles/memristor/height/.initial=.23}
-	\ctikzset{bipoles/memristor/wave height/.initial=.375}
-	\ctikzset{bipoles/memristor/width/.initial=.60}
-	\ctikzset{bipoles/tgeneric/height/.initial=.525}
-	\ctikzset{bipoles/tgeneric/width/.initial=.6}
-	\ctikzset{bipoles/tfullgeneric/height/.initial=.525}
-	\ctikzset{bipoles/tfullgeneric/width/.initial=.60}
-	\ctikzset{bipoles/fullgeneric/height/.initial=.23}
-	\ctikzset{bipoles/fullgeneric/width/.initial=.6}
-	\ctikzset{bipoles/diode/height/.initial=.3}
-	\ctikzset{bipoles/diode/width/.initial=.25}
-	
-	\ctikzset{tripoles/thyristor/height/.initial=.66}
-	\ctikzset{tripoles/thyristor/height 2/.initial=.3}
-	\ctikzset{tripoles/thyristor/width/.initial=.6}
-	\ctikzset{tripoles/thyristor/diode height/.initial=.3}
-	\ctikzset{tripoles/thyristor/diode width left/.initial=.4}
-	\ctikzset{tripoles/thyristor/diode width right/.initial=.3}
-
-	\ctikzset{tripoles/triac/height/.initial=.66}
-	\ctikzset{tripoles/triac/width/.initial=.6}
-	\ctikzset{tripoles/triac/diode width left/.initial=.3}
-	\ctikzset{tripoles/triac/diode width right/.initial=.3}
-}
-
-%%%%%%%%%
-%%%%%%%%%%% Springe nach tex/pgfcirc.defines
-%%%---------- open: tex/pgfcirc.defines.tex
-
-%% Options
-
-%%%%%%%%%%%%
-%% Dimensions
-
-% coordinates
-\newdimen\pgf at circ@res at up
-\newdimen\pgf at circ@res at down
-\newdimen\pgf at circ@res at zero
-\newdimen\pgf at circ@res at left
-\newdimen\pgf at circ@res at right
-\newdimen\pgf at circ@res at other
-\newdimen\pgf at circ@res at step
-\newdimen\pgf at circ@res at temp
-% inital thickness
-\newdimen \pgfstartlinewidth
-%% Keys
-
-\long\def\pgf at circ@comment#1{}
-
-\def\circuitikzbasekey{/tikz/circuitikz}
-
-\pgfkeys{\circuitikzbasekey/.is family}
-
-\def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}}
-\let\ctikzset\circuitikzset
-\def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}}
-\def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}}
-
-\newif\ifpgf at circ@siunitx
-\newif\ifpgf at circuit@compat
-\newif\ifpgf at circ@oldvoltagedirection
-
-% Option ">" for twoports
-\newif\ifpgf at circuit@inputarrow
-\ctikzset{>/.add code={}{\pgf at circuit@inputarrowtrue}}
-\ctikzset{inputarrow/.is choice}
-\ctikzset{inputarrow/true/.code={\pgf at circuit@inputarrowtrue}}
-\ctikzset{inputarrow/false/.code={\pgf at circuit@inputarrowfalse}}
-
-% Option "boxed" for nodes and twoports
-\newif\ifpgf at circuit@boxed
-\pgfkeys{/tikz/boxed/.add code={}{\pgf at circuit@boxedtrue}}
-\ctikzset{boxed/.add code={}{\pgf at circuit@boxedtrue}}
-\pgfkeys{/tikz/box/.add code={}{\pgf at circuit@boxedtrue}}
-\ctikzset{box/.add code={}{\pgf at circuit@boxedtrue}}
-
-% Option "dashed" for nodes and twoports
-\newif\ifpgf at circuit@dashed
-\pgfkeys{/tikz/dashed/.add code={}{\pgf at circuit@dashedtrue}}
-\ctikzset{dashed/.add code={}{\pgf at circuit@dashedtrue}}
-
-% Option "t=*" for nodes
-\pgfkeys{/tikz/t/.add code={}{\ctikzset{text=#1}}}
-
-
-
-\ctikzset{bipoles/.is family}
-\ctikzset{bipoles/border margin/.initial=1.1}
-\ctikzset{bipoles/thickness/.initial=2} 
-\ctikzset{bipoles/length/.initial=1.4cm} 
-\ctikzset{nodes width/.initial=.04}
-\newdimen\pgf at circ@Rlen 
-\ctikzset{bipoles/length/.code={\pgf at circ@Rlen = #1}} 
-
-\ctikzset{monopoles/.is family}
-\ctikzset{monopoles/ground/width/.initial=.25}
-\ctikzset{monopoles/tground/thickness/.initial=3}
-\ctikzset{monopoles/vcc/width/.initial=.2}
-\ctikzset{monopoles/match/width/.initial=.4}
-\ctikzset{monopoles/chassis/width/.initial=.25}
-\ctikzset{monopoles/alternative chassis/width/.initial=.25}
-\ctikzset{monopoles/equipotentiality/width/.initial=.25}
-\ctikzset{monopoles/tlinestub/width/.initial=.25}          
-\ctikzset{monopoles/antenna/width/.initial=.25}            
-\ctikzset{monopoles/antenna/label/xanchor/.initial=.4}            
-\ctikzset{monopoles/antenna/label/yanchor/.initial=.75}            
-\ctikzset{monopoles/txantenna/label/xanchor/.initial=.4}            
-\ctikzset{monopoles/txantenna/label/yanchor/.initial=.75}            
-\ctikzset{monopoles/txantenna/width/.initial=.25}
-\ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4}            
-\ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75}            
-\ctikzset{monopoles/rxantenna/width/.initial=.25}
-
-\ctikzset{bipoles/resistor/height/.initial=.3}
-\ctikzset{bipoles/resistor/width/.initial=.8}
-\ctikzset{bipoles/potentiometer/height/.initial=.8}
-\ctikzset{bipoles/potentiometer/height 2/.initial=.3}
-\ctikzset{bipoles/potentiometer/width/.initial=.8}
-\ctikzset{bipoles/photoresistor/height/.initial=.6}
-\ctikzset{bipoles/photoresistor/height 2/.initial=.3}
-\ctikzset{bipoles/photoresistor/width/.initial=.8}
-\ctikzset{bipoles/thermistor/main/.initial=.7}
-\ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7
-\ctikzset{bipoles/thermistorntc/width/.initial=.8}
-\ctikzset{bipoles/thermistorntc/main/.initial=.7}
-\ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7
-\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7
-\ctikzset{bipoles/thermistorptc/width/.initial=.8}
-\ctikzset{bipoles/thermistorptc/main/.initial=.7}
-\ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7
-\ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7
-\ctikzset{bipoles/thermistor/width/.initial=.8}
-\ctikzset{bipoles/varistor/main/.initial=.7}
-\ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7
-\ctikzset{bipoles/varistor/width/.initial=.8}
-\ctikzset{bipoles/vresistor/height/.initial=.6}
-\ctikzset{bipoles/vresistor/width/.initial=.8}
-\ctikzset{bipoles/cuteinductor/height/.initial=.3}
-\ctikzset{bipoles/cuteinductor/lower coil height/.initial=.15}	
-\ctikzset{bipoles/cuteinductor/width/.initial=.6}
-\ctikzset{bipoles/cuteinductor/coils/.initial=5}
-\ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
-\ctikzset{bipoles/americaninductor/height/.initial=.3}
-\ctikzset{bipoles/americaninductor/height 2/.initial=.1}
-\ctikzset{bipoles/americaninductor/width/.initial=.8}
-\ctikzset{bipoles/americaninductor/coils/.initial=4}
-\ctikzset{bipoles/americaninductor/coil height/.initial=.15}
-\ctikzset{bipoles/vcuteinductor/height/.initial=.6}
-\ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.3}	
-\ctikzset{bipoles/vcuteinductor/width/.initial=.6}
-\ctikzset{bipoles/vcuteinductor/coils/.initial=5}
-\ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
-\ctikzset{bipoles/vamericaninductor/height/.initial=.6}
-\ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
-\ctikzset{bipoles/vamericaninductor/width/.initial=.8}
-\ctikzset{bipoles/vamericaninductor/coils/.initial=4}
-\ctikzset{bipoles/vamericaninductor/coil height/.initial=.15}
-\ctikzset{bipoles/esource/height/.initial=.60}
-\ctikzset{bipoles/esource/width/.initial=.60}
-\ctikzset{bipoles/pvsource/height/.initial=.60}
-\ctikzset{bipoles/pvsource/width/.initial=.60}
-\ctikzset{bipoles/isource/height/.initial=.60}
-\ctikzset{bipoles/isource/width/.initial=.60}
-\ctikzset{bipoles/oosource/height/.initial=.60}
-\ctikzset{bipoles/oosource/width/.initial=.60}
-\ctikzset{bipoles/oosource/circlesize/.initial=.65}%circlesize+circleoffset should be =1
-\ctikzset{bipoles/oosource/circleoffset/.initial=.35}%circlesize+circleoffset should be =1
-\ctikzset{bipoles/dcisource/height/.initial=.60}
-\ctikzset{bipoles/dcisource/width/.initial=.60}
-\ctikzset{bipoles/dcvsource/height/.initial=.60}
-\ctikzset{bipoles/dcvsource/width/.initial=.60}
-\ctikzset{bipoles/vsourcetri/height/.initial=.60}
-\ctikzset{bipoles/vsourcetri/width/.initial=.60}
-\ctikzset{bipoles/isourceam/height/.initial=.60}
-\ctikzset{bipoles/isourceam/width/.initial=.60}
-\ctikzset{bipoles/vsource/height/.initial=.60}
-\ctikzset{bipoles/vsource/width/.initial=.60}
-\ctikzset{bipoles/vsourceam/height/.initial=.60}
-\ctikzset{bipoles/vsourceam/width/.initial=.60}
-\ctikzset{bipoles/vsourceam/margin/.initial=.7}
-\ctikzset{bipoles/isourcesin/height/.initial=.60}
-\ctikzset{bipoles/isourcesin/width/.initial=.60}
-\ctikzset{bipoles/vsourcesin/height/.initial=.60}
-\ctikzset{bipoles/vsourcesin/width/.initial=.60}
-\ctikzset{bipoles/vsourcesquare/height/.initial=.60}
-\ctikzset{bipoles/vsourcesquare/width/.initial=.60}
-\ctikzset{bipoles/cisource/height/.initial=.7}
-\ctikzset{bipoles/cisource/width/.initial=.7}
-\ctikzset{bipoles/cisourceam/height/.initial=.7}
-\ctikzset{bipoles/cisourceam/width/.initial=.7}
-\ctikzset{bipoles/cvsource/height/.initial=.7}
-\ctikzset{bipoles/cvsource/width/.initial=.7}
-\ctikzset{bipoles/cvsourceam/height/.initial=.7}
-\ctikzset{bipoles/cvsourceam/width/.initial=.7}
-\ctikzset{bipoles/cvsourceam/margin/.initial=.7}
-\ctikzset{bipoles/cvsourceam/text scale/.initial=1}
-\ctikzset{bipoles/cisourcesin/width/.initial=.7}
-\ctikzset{bipoles/cvsourcesin/height/.initial=.7}
-\ctikzset{bipoles/cvsourcesin/width/.initial=.7}
-\ctikzset{bipoles/capacitor/height/.initial=.6}
-\ctikzset{bipoles/capacitor/width/.initial=.2}
-\ctikzset{bipoles/ecapacitor/height/.initial=.5}
-\ctikzset{bipoles/ecapacitor/width/.initial=.2}
-\ctikzset{bipoles/ecapacitor/font/.initial= \fontsize{6}{0}\selectfont\boldmath}
-\ctikzset{bipoles/pcapacitor/height/.initial=.6}
-\ctikzset{bipoles/pcapacitor/width/.initial=.2}
-\ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
-\ctikzset{bipoles/vcapacitor/height/.initial=.6}
-\ctikzset{bipoles/vcapacitor/width/.initial=.5}
-\ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
-\ctikzset{bipoles/piezoelectric/height/.initial=.7}
-\ctikzset{bipoles/piezoelectric/width/.initial=.5}
-\ctikzset{bipoles/battery/height/.initial=.6}
-\ctikzset{bipoles/battery/width/.initial=.3}
-\ctikzset{bipoles/battery1/height/.initial=.6}
-\ctikzset{bipoles/battery1/width/.initial=.3}
-\ctikzset{bipoles/diode/height/.initial=.50}
-\ctikzset{bipoles/diode/width/.initial=.40}
-\ctikzset{bipoles/varcap/height/.initial=.50}
-\ctikzset{bipoles/varcap/width/.initial=.45}
-\ctikzset{bipoles/interr/height/.initial=.35}
-\ctikzset{bipoles/interr/width/.initial=.35}
-\ctikzset{bipoles/interr/height 2/.initial=.1}
-\ctikzset{bipoles/generic/height/.initial=.30}
-\ctikzset{bipoles/generic/width/.initial=.80}
-\ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
-\ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
-\ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30}
-\ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60}
-\ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60}
-\ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15}
-\ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25}
-\ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45}
-\ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1}
-\ctikzset{bipoles/fuse/height/.initial=.20}
-\ctikzset{bipoles/fuse/width/.initial=.50}
-\ctikzset{bipoles/afuse/height/.initial=.20}
-\ctikzset{bipoles/afuse/width/.initial=.50}
-\ctikzset{bipoles/generic potentiometer/height/.initial=.80}
-\ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
-\ctikzset{bipoles/generic potentiometer/width/.initial=.80}
-\ctikzset{bipoles/ageneric/height/.initial=.30}
-\ctikzset{bipoles/ageneric/width/.initial=.80}
-\ctikzset{bipoles/memristor/height/.initial=.30}
-\ctikzset{bipoles/memristor/wave height/.initial=.5}
-\ctikzset{bipoles/memristor/width/.initial=.80}
-\ctikzset{bipoles/tgeneric/height/.initial=.70}
-\ctikzset{bipoles/tgeneric/width/.initial=.80}
-\ctikzset{bipoles/tfullgeneric/height/.initial=.70}
-\ctikzset{bipoles/tfullgeneric/width/.initial=.80}
-\ctikzset{bipoles/fullgeneric/height/.initial=.30}
-\ctikzset{bipoles/fullgeneric/width/.initial=.80}
-\ctikzset{bipoles/open/height/.initial=.25}
-\ctikzset{bipoles/open/width/.initial=.8}
-\ctikzset{bipoles/ammeter/height/.initial=.60}
-\ctikzset{bipoles/ammeter/width/.initial=.60}
-\ctikzset{bipoles/ohmmeter/height/.initial=.60}
-\ctikzset{bipoles/ohmmeter/width/.initial=.60}
-\ctikzset{bipoles/voltmeter/height/.initial=.60}
-\ctikzset{bipoles/voltmeter/width/.initial=.60}
-\ctikzset{bipoles/buffer/height/.initial=1}
-\ctikzset{bipoles/buffer/width/.initial=1}
-\ctikzset{bipoles/not port/width/.initial=1}
-\ctikzset{bipoles/not port/height/.initial=.8}
-\ctikzset{bipoles/not port/circle width/.initial=.15}
-\ctikzset{bipoles/lamp/height/.initial=.60}
-\ctikzset{bipoles/lamp/width/.initial=.60}
-\ctikzset{bipoles/tline/height/.initial=.3}
-\ctikzset{bipoles/tline/width/.initial=.8}
-\ctikzset{bipoles/squid/height/.initial=.60}
-\ctikzset{bipoles/squid/width/.initial=.60}
-\ctikzset{bipoles/barrier/height/.initial=.60}
-\ctikzset{bipoles/barrier/width/.initial=.60}
-\ctikzset{bipoles/thermocouple/height/.initial=.250}
-\ctikzset{bipoles/thermocouple/height 2/.initial=.60}
-\ctikzset{bipoles/thermocouple/width/.initial=.140}
-\ctikzset{bipoles/pushbutton/height/.initial=.5}
-\ctikzset{bipoles/pushbutton/height 2/.initial=.0}
-\ctikzset{bipoles/pushbutton/width/.initial=.50}
-
-\ctikzset{bipoles/twoport/width/.initial=.7}
-\ctikzset{bipoles/twoport/height/.initial=.7}
-\ctikzset{bipoles/twoport/text/.initial=}
-\ctikzset{bipoles/vco/width/.initial=.7}
-\ctikzset{bipoles/bandpass/width/.initial=.7}
-\ctikzset{bipoles/highpass/width/.initial=.7}
-\ctikzset{bipoles/lowpass/width/.initial=.7}
-\ctikzset{bipoles/adc/width/.initial=.7}
-\ctikzset{bipoles/dac/width/.initial=.7}
-\ctikzset{bipoles/dsp/width/.initial=.7}
-\ctikzset{bipoles/fft/width/.initial=.7}
-\ctikzset{bipoles/amp/width/.initial=.7}
-\ctikzset{bipoles/vamp/width/.initial=.7}
-\ctikzset{bipoles/piattenuator/width/.initial=.7}
-\ctikzset{bipoles/vpiattenuator/width/.initial=.7}
-\ctikzset{bipoles/tattenuator/width/.initial=.7}
-\ctikzset{bipoles/vtattenuator/width/.initial=.7}
-\ctikzset{bipoles/phaseshifter/width/.initial=.7}
-\ctikzset{bipoles/vphaseshifter/width/.initial=.7}
-\ctikzset{bipoles/detector/width/.initial=.7}
-
-
-\newif\ifpgf at circuit@trans at depletiontype
-\pgf at circuit@trans at depletiontypefalse
-
-\newif\ifpgf at circuit@mos at arrows
-\ctikzset{tripoles/mos style/.is choice}
-\ctikzset{tripoles/mos style/no arrows/.code={\pgf at circuit@mos at arrowsfalse}}
-\ctikzset{tripoles/mos style/arrows/.code={\pgf at circuit@mos at arrowstrue}}
-
-% Option solderdot for fet 
-\newif\ifpgf at circuit@fet at solderdot
-\pgfkeys{/tikz/solderdot/.add code={}{\pgf at circuit@fet at solderdottrue}}
-\ctikzset{solderdot/.add code={}{\pgf at circuit@fet at solderdottrue}}
-\pgfkeys{/tikz/nosolderdot/.add code={}{\pgf at circuit@fet at solderdotfalse}}
-\ctikzset{nosolderdot/.add code={}{\pgf at circuit@fet at solderdotfalse}}
-
-% Option bodydiode for fet 
-\newif\ifpgf at circuit@fet at bodydiode
-\pgfkeys{/tikz/bodydiode/.add code={}{\pgf at circuit@fet at bodydiodetrue}}
-\ctikzset{bodydiode/.add code={}{\pgf at circuit@fet at bodydiodetrue}}
-\pgfkeys{/tikz/nobodydiode/.add code={}{\pgf at circuit@fet at bodydiodefalse}}
-\ctikzset{nobodydiode/.add code={}{\pgf at circuit@fet at bodydiodefalse}}
-
-% Option draw fet without gate connection
-\newif\ifpgf at circuit@bpt at drawgate
-\pgf at circuit@bpt at drawgatetrue
-\pgfkeys{/tikz/nogate/.add code={}{\pgf at circuit@bpt at drawgatefalse}}
-\ctikzset{nogate/.add code={}{\pgf at circuit@bpt at drawgatefalse}}
-\pgfkeys{/tikz/nobase/.add code={}{\pgf at circuit@bpt at drawgatefalse}}
-\ctikzset{nobase/.add code={}{\pgf at circuit@bpt at drawgatefalse}}
-
-% Option draw bpt without base connection
-\newif\ifpgf at circuit@bpt at drawbase
-\pgf at circuit@bpt at drawbasetrue
-\pgfkeys{/tikz/nobase/.add code={}{\pgf at circuit@bpt at drawbasefalse}}
-\ctikzset{nobase/.add code={}{\pgf at circuit@bpt at drawbasefalse}}
-\pgfkeys{/tikz/nogate/.add code={}{\pgf at circuit@bpt at drawbasefalse}}
-\ctikzset{nogate/.add code={}{\pgf at circuit@bpt at drawbasefalse}}
-
-% Option draw bpt with optical input
-\newif\ifpgf at circuit@bpt at drawphoto
-\pgf at circuit@bpt at drawphotofalse
-\pgfkeys{/tikz/photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
-\ctikzset{photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
-\pgfkeys{/tikz/photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
-\ctikzset{photo/.add code={}{\pgf at circuit@bpt at drawphototrue}}
-
-% Option draw pmos with empty circle
-\newif\ifpgf at circuit@pmos at emptycircle
-\newif\ifpgf at circuit@pmos at emptycircle
-\pgf at circuit@pmos at emptycirclefalse
-\pgfkeys{/tikz/emptycircle/.add code={}{\pgf at circuit@pmos at emptycircletrue}}
-\ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf at circuit@pmos at emptycircletrue}}
-
-
-\newif\ifpgf at circuit@trans at ntype
-\pgf at circuit@trans at ntypetrue %default true
-%\newif\ifpgf at circuit@trans at ptype
-%\ctikzset{tripoles/nmos/.add code={\pgf at circuit@trans at ntypetrue}}
-\ctikzset{tripoles/nmos/width/.initial=.7}
-\ctikzset{tripoles/nmos/gate height/.initial=.35}
-\ctikzset{tripoles/nmos/base height/.initial=.5}
-\ctikzset{tripoles/nmos/conn height/.initial=0}
-\ctikzset{tripoles/nmos/height/.initial=1.1}
-\ctikzset{tripoles/nmos/base width/.initial=.5}
-\ctikzset{tripoles/nmos/gate width/.initial=.62}
-\ctikzset{tripoles/nmos/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/nmos/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/nmos/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/nmos/curr direction/.initial=1}
-
-\ctikzset{tripoles/pmos/width/.initial=.7}
-\ctikzset{tripoles/pmos/gate height/.initial=.35}
-\ctikzset{tripoles/pmos/base height/.initial=.5}
-\ctikzset{tripoles/pmos/conn height/.initial=0}
-\ctikzset{tripoles/pmos/height/.initial=1.1}
-\ctikzset{tripoles/pmos/base width/.initial=.5}
-\ctikzset{tripoles/pmos/gate width/.initial=.62}
-\ctikzset{tripoles/pmos/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/pmos/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/pmos/curr direction/.initial=-1}
-
-\ctikzset{tripoles/nfet/width/.initial=.7}
-\ctikzset{tripoles/nfet/gate height/.initial=.35}
-\ctikzset{tripoles/nfet/base height/.initial=.5}
-\ctikzset{tripoles/nfet/conn height/.initial=0}
-\ctikzset{tripoles/nfet/height/.initial=1.1}
-\ctikzset{tripoles/nfet/base width/.initial=.5}
-\ctikzset{tripoles/nfet/gate width/.initial=.62}
-\ctikzset{tripoles/nfet/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/nfet/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/nfet/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/nfet/curr direction/.initial=1}
-
-\ctikzset{tripoles/pfet/width/.initial=.7}
-\ctikzset{tripoles/pfet/gate height/.initial=.35}
-\ctikzset{tripoles/pfet/base height/.initial=.5}
-\ctikzset{tripoles/pfet/conn height/.initial=0}
-\ctikzset{tripoles/pfet/height/.initial=1.1}
-\ctikzset{tripoles/pfet/base width/.initial=.5}
-\ctikzset{tripoles/pfet/gate width/.initial=.62}
-\ctikzset{tripoles/pfet/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/pfet/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/pfet/curr direction/.initial=-1}
-
-\ctikzset{tripoles/nigfete/width/.initial=.7}
-\ctikzset{tripoles/nigfete/gate height/.initial=.35}
-\ctikzset{tripoles/nigfete/base height/.initial=.5}
-\ctikzset{tripoles/nigfete/conn height/.initial=.35}
-\ctikzset{tripoles/nigfete/height/.initial=1.1}
-\ctikzset{tripoles/nigfete/base width/.initial=.5}
-\ctikzset{tripoles/nigfete/gate width/.initial=.62}
-\ctikzset{tripoles/nigfete/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/nigfete/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/nigfete/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/nigfete/curr direction/.initial=1}
-
-\ctikzset{tripoles/nigfetd/width/.initial=.7}
-\ctikzset{tripoles/nigfetd/gate height/.initial=.35}
-\ctikzset{tripoles/nigfetd/base height/.initial=.5}
-\ctikzset{tripoles/nigfetd/conn height/.initial=.35}
-\ctikzset{tripoles/nigfetd/height/.initial=1.1}
-\ctikzset{tripoles/nigfetd/base width/.initial=.5}
-\ctikzset{tripoles/nigfetd/gate width/.initial=.62}
-\ctikzset{tripoles/nigfetd/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/nigfetd/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/nigfetd/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/nigfetd/curr direction/.initial=1}
-
-\ctikzset{tripoles/nigfetebulk/width/.initial=.7}
-\ctikzset{tripoles/nigfetebulk/gate height/.initial=.35}
-\ctikzset{tripoles/nigfetebulk/base height/.initial=.5}
-\ctikzset{tripoles/nigfetebulk/conn height/.initial=.35}
-\ctikzset{tripoles/nigfetebulk/height/.initial=1.1}
-\ctikzset{tripoles/nigfetebulk/base width/.initial=.5}
-\ctikzset{tripoles/nigfetebulk/gate width/.initial=.62}
-\ctikzset{tripoles/nigfetebulk/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/nigfetebulk/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/nigfetebulk/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/nigfetebulk/curr direction/.initial=1}
-
-\ctikzset{tripoles/pigfete/width/.initial=.7}
-\ctikzset{tripoles/pigfete/gate height/.initial=.35}
-\ctikzset{tripoles/pigfete/base height/.initial=.5}
-\ctikzset{tripoles/pigfete/conn height/.initial=.35}
-\ctikzset{tripoles/pigfete/height/.initial=1.1}
-\ctikzset{tripoles/pigfete/base width/.initial=.5}
-\ctikzset{tripoles/pigfete/gate width/.initial=.62}
-\ctikzset{tripoles/pigfete/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/pigfete/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/pigfete/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/pigfete/curr direction/.initial=-1}
-
-\ctikzset{tripoles/pigfetd/width/.initial=.7}
-\ctikzset{tripoles/pigfetd/gate height/.initial=.35}
-\ctikzset{tripoles/pigfetd/base height/.initial=.5}
-\ctikzset{tripoles/pigfetd/conn height/.initial=.35}
-\ctikzset{tripoles/pigfetd/height/.initial=1.1}
-\ctikzset{tripoles/pigfetd/base width/.initial=.5}
-\ctikzset{tripoles/pigfetd/gate width/.initial=.62}
-\ctikzset{tripoles/pigfetd/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/pigfetd/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/pigfetd/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/pigfetd/curr direction/.initial=-1}
-
-\ctikzset{tripoles/pigfetebulk/width/.initial=.7}
-\ctikzset{tripoles/pigfetebulk/gate height/.initial=.35}
-\ctikzset{tripoles/pigfetebulk/conn height/.initial=.35}
-\ctikzset{tripoles/pigfetebulk/base height/.initial=.5}
-\ctikzset{tripoles/pigfetebulk/height/.initial=1.1}
-\ctikzset{tripoles/pigfetebulk/base width/.initial=.5}
-\ctikzset{tripoles/pigfetebulk/gate width/.initial=.62}
-\ctikzset{tripoles/pigfetebulk/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/pigfetebulk/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/pigfetebulk/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/pigfetebulk/curr direction/.initial=-1}
-
-\ctikzset{tripoles/npn/width/.initial=.6}
-\ctikzset{tripoles/npn/base height/.initial=.45}
-\ctikzset{tripoles/npn/base height 2/.initial=.15}
-\ctikzset{tripoles/npn/base height/.initial=.4}
-\ctikzset{tripoles/npn/conn height/.initial=0}
-\ctikzset{tripoles/npn/height/.initial=1.1}
-\ctikzset{tripoles/npn/base width/.initial=.5}
-\ctikzset{tripoles/npn/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/npn/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/npn/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/npn/curr direction/.initial=1}
-
-\ctikzset{tripoles/pnp/width/.initial=.6}
-\ctikzset{tripoles/pnp/base height/.initial=.45}
-\ctikzset{tripoles/pnp/base height 2/.initial=.15}
-\ctikzset{tripoles/pnp/base height/.initial=.4}
-\ctikzset{tripoles/pnp/conn height/.initial=0}
-\ctikzset{tripoles/pnp/height/.initial=1.1}
-\ctikzset{tripoles/pnp/base width/.initial=.5}
-\ctikzset{tripoles/pnp/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/pnp/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/pnp/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/pnp/curr direction/.initial=-1}
-
-\ctikzset{tripoles/pigbt/width/.initial=.6}
-\ctikzset{tripoles/pigbt/gate height/.initial=.45}
-\ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
-\ctikzset{tripoles/pigbt/base height/.initial=.4}
-\ctikzset{tripoles/pigbt/conn height/.initial=0}
-\ctikzset{tripoles/pigbt/height/.initial=1.1}
-\ctikzset{tripoles/pigbt/gate width/.initial=.62}
-\ctikzset{tripoles/pigbt/base width/.initial=.5}
-\ctikzset{tripoles/pigbt/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/pigbt/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/pigbt/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/pigbt/curr direction/.initial=-1}
-
-\ctikzset{tripoles/nigbt/width/.initial=.6}
-\ctikzset{tripoles/nigbt/gate height/.initial=.45}
-\ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
-\ctikzset{tripoles/nigbt/base height/.initial=.4}
-\ctikzset{tripoles/nigbt/conn height/.initial=0}
-\ctikzset{tripoles/nigbt/height/.initial=1.1}
-\ctikzset{tripoles/nigbt/gate width/.initial=.62}
-\ctikzset{tripoles/nigbt/base width/.initial=.5}
-\ctikzset{tripoles/nigbt/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/nigbt/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/nigbt/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/nigbt/curr direction/.initial=1}
-
-\ctikzset{tripoles/Lpigbt/width/.initial=.6}
-\ctikzset{tripoles/Lpigbt/gate height/.initial=.45}
-\ctikzset{tripoles/Lpigbt/gate height 2/.initial=.15}
-\ctikzset{tripoles/Lpigbt/base height/.initial=.4}
-\ctikzset{tripoles/Lpigbt/conn height/.initial=.4}
-\ctikzset{tripoles/Lpigbt/height/.initial=1.1}
-\ctikzset{tripoles/Lpigbt/gate width/.initial=.62}
-\ctikzset{tripoles/Lpigbt/base width/.initial=.5}
-\ctikzset{tripoles/Lpigbt/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/Lpigbt/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/Lpigbt/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/Lpigbt/curr direction/.initial=-1}
-
-\ctikzset{tripoles/Lnigbt/width/.initial=.6}
-\ctikzset{tripoles/Lnigbt/gate height/.initial=.45}
-\ctikzset{tripoles/Lnigbt/gate height 2/.initial=.15}
-\ctikzset{tripoles/Lnigbt/base height/.initial=.4}
-\ctikzset{tripoles/Lnigbt/conn height/.initial=.4}
-\ctikzset{tripoles/Lnigbt/height/.initial=1.1}
-\ctikzset{tripoles/Lnigbt/gate width/.initial=.62}
-\ctikzset{tripoles/Lnigbt/base width/.initial=.5}
-\ctikzset{tripoles/Lnigbt/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/Lnigbt/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/Lnigbt/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/Lnigbt/curr direction/.initial=1}
-
-\ctikzset{tripoles/njfet/width/.initial=.7}
-\ctikzset{tripoles/njfet/gate height/.initial=.5}
-\ctikzset{tripoles/njfet/gate height 2/.initial=.35}
-\ctikzset{tripoles/njfet/gate width/.initial=.5}
-\ctikzset{tripoles/njfet/conn height/.initial=.35}
-\ctikzset{tripoles/njfet/height/.initial=1.1}
-\ctikzset{tripoles/njfet/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/njfet/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/njfet/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/njfet/curr direction/.initial=1}
-
-\ctikzset{tripoles/pjfet/width/.initial=.7}
-\ctikzset{tripoles/pjfet/gate height/.initial=.5}
-\ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
-\ctikzset{tripoles/pjfet/gate width/.initial=.5}
-\ctikzset{tripoles/pjfet/conn height/.initial=.35}
-\ctikzset{tripoles/pjfet/height/.initial=1.1}
-\ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/pjfet/curr direction/.initial=-1}
-
-\ctikzset{tripoles/isfet/width/.initial=1}
-\ctikzset{tripoles/isfet/gate height/.initial=.35}
-\ctikzset{tripoles/isfet/base height/.initial=.5}
-\ctikzset{tripoles/isfet/height/.initial=1.1}
-\ctikzset{tripoles/isfet/base width/.initial=.3}
-\ctikzset{tripoles/isfet/gate width/.initial=.5}
-\ctikzset{tripoles/isfet/conn height/.initial=0}
-\ctikzset{tripoles/isfet/wave width/.initial=.16}
-\ctikzset{tripoles/isfet/wave amp/.initial=.06}
-\ctikzset{tripoles/isfet/waves y sep/.initial=.22}
-\ctikzset{tripoles/isfet/waves x sep/.initial=.8}
-\ctikzset{tripoles/isfet/bodydiode scale/.initial=.3}
-\ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
-\ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
-\ctikzset{tripoles/isfet/curr direction/.initial=1}
-
-\newif\ifpgf at circuit@europeanlogicport
-\ctikzset{logic ports/.is choice}
-\ctikzset{logic ports/european/.code= {\pgf at circuit@europeanlogicporttrue } }
-\ctikzset{logic ports/american/.code= {\pgf at circuit@europeanlogicportfalse } } 
-
-\newif\ifpgf at circuit@bipole at voltage@backward
-\ctikzset{bipole/voltage/direction/.is choice}
-\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
-\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at voltage@backwardtrue}}
-
-\ctikzset{tripoles/american and port/width/.initial=1.1}
-\ctikzset{tripoles/american and port/height/.initial=.8}
-\ctikzset{tripoles/american and port/port width/.initial=.7}
-\ctikzset{tripoles/american and port/input height/.initial=.5}
-\ctikzset{tripoles/american nand port/width/.initial=1.1}
-\ctikzset{tripoles/american nand port/height/.initial=.8}
-\ctikzset{tripoles/american nand port/port width/.initial=.7}
-\ctikzset{tripoles/american nand port/circle width/.initial=.15}
-\ctikzset{tripoles/american nand port/input height/.initial=.5}
-\ctikzset{tripoles/american or port/width/.initial=1.1}
-\ctikzset{tripoles/american or port/height/.initial=.8}
-\ctikzset{tripoles/american or port/port width/.initial=.7}
-\ctikzset{tripoles/american or port/input height/.initial=.5}
-\ctikzset{tripoles/american or port/input skip/.initial=.25}
-\ctikzset{tripoles/american or port/aaa/.initial=.6}
-\ctikzset{tripoles/american or port/bbb/.initial=.4} 
-\ctikzset{tripoles/american or port/ccc/.initial=.5} 
-\ctikzset{tripoles/american or port/ddd/.initial=.0}
-\ctikzset{tripoles/american nor port/width/.initial=1.1}
-\ctikzset{tripoles/american nor port/height/.initial=.8}
-\ctikzset{tripoles/american nor port/port width/.initial=.7}
-\ctikzset{tripoles/american nor port/input height/.initial=.5}
-\ctikzset{tripoles/american nor port/input skip/.initial=.25}
-\ctikzset{tripoles/american nor port/circle width/.initial=.15}
-\ctikzset{tripoles/american nor port/aaa/.initial=.6}
-\ctikzset{tripoles/american nor port/bbb/.initial=.4} 
-\ctikzset{tripoles/american nor port/ccc/.initial=.5} 
-\ctikzset{tripoles/american nor port/ddd/.initial=.0}
-\ctikzset{tripoles/american xor port/width/.initial=1.1}
-\ctikzset{tripoles/american xor port/height/.initial=.8}
-\ctikzset{tripoles/american xor port/port width/.initial=.7}
-\ctikzset{tripoles/american xor port/input height/.initial=.5}
-\ctikzset{tripoles/american xor port/input skip/.initial=.15}
-\ctikzset{tripoles/american xor port/distance/.initial=.1} 
-\ctikzset{tripoles/american xor port/aaa/.initial=.6}
-\ctikzset{tripoles/american xor port/bbb/.initial=.4} 
-\ctikzset{tripoles/american xor port/ccc/.initial=.5} 
-\ctikzset{tripoles/american xor port/ddd/.initial=.0}
-\ctikzset{tripoles/american xnor port/width/.initial=1.1}
-\ctikzset{tripoles/american xnor port/height/.initial=.8}
-\ctikzset{tripoles/american xnor port/port width/.initial=.7}
-\ctikzset{tripoles/american xnor port/input height/.initial=.5}
-\ctikzset{tripoles/american xnor port/input skip/.initial=.15}
-\ctikzset{tripoles/american xnor port/distance/.initial=.1} 
-\ctikzset{tripoles/american xnor port/aaa/.initial=.6}
-\ctikzset{tripoles/american xnor port/bbb/.initial=.4} 
-\ctikzset{tripoles/american xnor port/ccc/.initial=.5} 
-\ctikzset{tripoles/american xnor port/ddd/.initial=.0}
-\ctikzset{tripoles/american xnor port/circle width/.initial=.15}
-\ctikzset{tripoles/european and port/width/.initial=1.4}
-\ctikzset{tripoles/european and port/height/.initial=.65}
-\ctikzset{tripoles/european and port/reserved/.initial=.6}
-\ctikzset{tripoles/european and port/input height/.initial=.6}
-\ctikzset{tripoles/european or port/width/.initial=1.4}
-\ctikzset{tripoles/european or port/height/.initial=.65}
-\ctikzset{tripoles/european or port/reserved/.initial=.6}
-\ctikzset{tripoles/european or port/input height/.initial=.6}
-\ctikzset{tripoles/european xor port/width/.initial=1.4}
-\ctikzset{tripoles/european xor port/height/.initial=.65}
-\ctikzset{tripoles/european xor port/reserved/.initial=.6}
-\ctikzset{tripoles/european xor port/input height/.initial=.6}
-\ctikzset{tripoles/european nand port/width/.initial=1.4}
-\ctikzset{tripoles/european nand port/not height/.initial=.3}
-\ctikzset{tripoles/european nand port/not width/.initial=.8}
-\ctikzset{tripoles/european nand port/height/.initial=.65}
-\ctikzset{tripoles/european nand port/reserved/.initial=.6}
-\ctikzset{tripoles/european nand port/input height/.initial=.6}
-\ctikzset{tripoles/european not port/width/.initial=1.4}
-\ctikzset{tripoles/european not port/not height/.initial=.3}
-\ctikzset{tripoles/european not port/not width/.initial=.8}
-\ctikzset{tripoles/european not port/height/.initial=.65}
-\ctikzset{tripoles/european not port/reserved/.initial=.6}
-\ctikzset{tripoles/european not port/input height/.initial=0}
-\ctikzset{tripoles/european xnor port/width/.initial=1.4}
-\ctikzset{tripoles/european xnor port/not height/.initial=.3}
-\ctikzset{tripoles/european xnor port/not width/.initial=.8}
-\ctikzset{tripoles/european xnor port/height/.initial=.65}
-\ctikzset{tripoles/european xnor port/reserved/.initial=.6}
-\ctikzset{tripoles/european xnor port/input height/.initial=.6}
-\ctikzset{tripoles/european nor port/width/.initial=1.4}
-\ctikzset{tripoles/european nor port/not height/.initial=.3}
-\ctikzset{tripoles/european nor port/not width/.initial=.8}
-\ctikzset{tripoles/european nor port/height/.initial=.65}
-\ctikzset{tripoles/european nor port/reserved/.initial=.6}
-\ctikzset{tripoles/european nor port/input height/.initial=.6}
-\ctikzset{tripoles/op amp/width/.initial=1.7}
-\ctikzset{tripoles/op amp/port width/.initial=.7}
-\ctikzset{tripoles/op amp/height/.initial=1.4}
-\ctikzset{tripoles/op amp/input height/.initial=.5}
-\ctikzset{tripoles/op amp/up pos/.initial=.45}
-\ctikzset{tripoles/op amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolut font size needed!
-\ctikzset{tripoles/gm amp/width/.initial=1.7}
-\ctikzset{tripoles/gm amp/port width/.initial=.7}
-\ctikzset{tripoles/gm amp/height/.initial=1.4}
-\ctikzset{tripoles/gm amp/input height/.initial=.5}
-\ctikzset{tripoles/gm amp/up pos/.initial=.45}
-\ctikzset{tripoles/plain amp/width/.initial=1.7}
-\ctikzset{tripoles/plain amp/port width/.initial=.7}
-\ctikzset{tripoles/plain amp/height/.initial=1.4}
-\ctikzset{tripoles/plain amp/input height/.initial=.5}
-\ctikzset{tripoles/plain amp/up pos/.initial=.45}
-
-\ctikzset{tripoles/thyristor/height/.initial=1.10}
-\ctikzset{tripoles/thyristor/height 2/.initial=.5}
-\ctikzset{tripoles/thyristor/width/.initial=1.0}
-\ctikzset{tripoles/thyristor/diode height/.initial=.5}
-\ctikzset{tripoles/thyristor/diode width left/.initial=.4}
-\ctikzset{tripoles/thyristor/diode width right/.initial=.3}
-
-\ctikzset{tripoles/triac/height/.initial=1.1}
-\ctikzset{tripoles/triac/width/.initial=1}
-\ctikzset{tripoles/triac/diode width left/.initial=.3}
-\ctikzset{tripoles/triac/diode width right/.initial=.3}
-
-\ctikzset{tripoles/spdt/width/.initial=.85}
-\ctikzset{tripoles/spdt/height/.initial=.45}
-\ctikzset{tripoles/spdt/margin/.initial=.45}
-
-\ctikzset{tripoles/toggleswitch/height/.initial=.8}
-\ctikzset{tripoles/toggleswitch/height 2/.initial=.0}
-\ctikzset{tripoles/toggleswitch/width/.initial=.80}
-
-\ctikzset{tripoles/mixer/width/.initial=0.7}
-\ctikzset{tripoles/adder/width/.initial=0.7}
-\ctikzset{tripoles/circulator/width/.initial=.7}
-\ctikzset{tripoles/oscillator/width/.initial=.7}
-
-
-\ctikzset{tripoles/wilkinson/height/.initial=1.3}
-\ctikzset{tripoles/wilkinson/width/.initial=1.3}
-
-\ctikzset{quadpoles/transformer/width/.initial=1.5}
-\ctikzset{quadpoles/transformer/width1/.initial=.4}
-\ctikzset{quadpoles/transformer/height/.initial=1.5}
-\ctikzset{quadpoles/transformer/height1/.initial=.8}
-\ctikzset{quadpoles/transformer core/width/.initial=1.5}
-\ctikzset{quadpoles/transformer core/height/.initial=1.5}
-\ctikzset{quadpoles/transformer core/core height/.initial=.5}
-\ctikzset{quadpoles/transformer core/core width/.initial=.05}
-\ctikzset{quadpoles/gyrator/width/.initial=1.5}
-\ctikzset{quadpoles/gyrator/height/.initial=1.5}
-\ctikzset{quadpoles/fourport/width/.initial=1.3}
-\ctikzset{quadpoles/fourport/height/.initial=1.3}
-\ctikzset{quadpoles/coupler/width/.initial=1.3}
-\ctikzset{quadpoles/coupler/height/.initial=1.3}
-\ctikzset{quadpoles/coupler2/width/.initial=1.3}
-\ctikzset{quadpoles/coupler2/height/.initial=1.3}
-
-% %Mechanical section
-\ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8}
-\ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6}
-\ctikzset{bipoles/spring/height/.initial=.5}
-\ctikzset{bipoles/spring/width/.initial=.5}
-\ctikzset{bipoles/mass/height/.initial=.55}
-\ctikzset{bipoles/mass/box height/.initial=.4}
-\ctikzset{bipoles/mass/width/.initial=.5}
-
-\ctikzset{bipoles/damper/height/.initial=.35}
-\ctikzset{bipoles/damper/length/.initial=.3}
-\ctikzset{bipoles/damper/width/.initial=.4}
-
-
-\ctikzset{bipole/.is family}
-\ctikzset{bipole/kind/.initial = }
-\ctikzset{bipole/name/.initial = }
-\newif\ifpgf at circuit@bipole at reversed
-\ctikzset{bipole/reversed/.is if=pgf at circuit@bipole at reversed}
-\newif\ifpgf at circuit@bipole at isvoltage
-\ctikzset{bipole/is voltage/.is if=pgf at circuit@bipole at isvoltage}
-\newif\ifpgf at circuit@bipole at voltageoutsideofsymbol
-\ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf at circuit@bipole at voltageoutsideofsymbol}
-\newif\ifpgf at circuit@bipole at strokedsymbol
-\ctikzset{bipole/is strokedsymbol/.is if=pgf at circuit@bipole at strokedsymbol}
-\newif\ifpgf at circuit@bipole at iscurrent
-\ctikzset{bipole/is current/.is if=pgf at circuit@bipole at iscurrent}
-
-\ctikzset{bipole/voltage/.is family}
-\newif\ifpgf at circuit@bipole at voltage@backward
-\ctikzset{bipole/voltage/direction/.is choice}
-\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
-\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at voltage@backwardtrue}}
-\newif\ifpgf at circuit@bipole at voltage@below
-\ctikzset{bipole/voltage/position/.is choice}
-\ctikzset{bipole/voltage/position/above/.code={\pgf at circuit@bipole at voltage@belowfalse}}
-\ctikzset{bipole/voltage/position/below/.code={\pgf at circuit@bipole at voltage@belowtrue}}
-
-\ctikzset{bipole/voltage/label/unit/.initial=}
-\ctikzset{bipole/voltage/label/name/.initial=}
-
-\ctikzset{bipole/current/.is family}
-\newif\ifpgf at circuit@bipole at current@backward
-\ctikzset{bipole/current/direction/.is choice}
-\ctikzset{bipole/current/direction/forward/.code={\pgf at circuit@bipole at current@backwardfalse}}
-\ctikzset{bipole/current/direction/backward/.code={\pgf at circuit@bipole at current@backwardtrue}}
-\newif\ifpgf at circuit@bipole at current@before
-\ctikzset{bipole/current/x position/.is choice}
-\ctikzset{bipole/current/x position/after/.code={\pgf at circuit@bipole at current@beforefalse}}
-\ctikzset{bipole/current/x position/before/.code={\pgf at circuit@bipole at current@beforetrue}}
-\newif\ifpgf at circuit@bipole at current@below
-\ctikzset{bipole/current/y position/.is choice}
-\ctikzset{bipole/current/y position/above/.code={\pgf at circuit@bipole at current@belowfalse}}
-\ctikzset{bipole/current/y position/below/.code={\pgf at circuit@bipole at current@belowtrue}}
-
-\ctikzset{bipole/current/label/unit/.initial=}
-\ctikzset{bipole/current/label/name/.initial=}
-
-\ctikzset{bipole/label/.is family}
-\ctikzset{bipole/label/position/.initial=90}
-\ctikzset{bipole/label/unit/.initial=}
-\ctikzset{bipole/label/name/.initial=}
-\ctikzset{bipole/nodes/.is family}
-\ctikzset{bipole/nodes/left/.is choice}
-\ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
-\ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
-\ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
-\ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
-\ctikzset{bipole/nodes/right/.is choice}
-\ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
-\ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
-\ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
-\ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
-
-
-
-
-\newif\ifpgf at circuit@europeanresistor
-\ctikzset{resistor/.is choice}
-\ctikzset{resistor/american/.code = \pgf at circuit@europeanresistorfalse }
-\ctikzset{resistor/european/.code = \pgf at circuit@europeanresistortrue }
-
-\ctikzset{inductor/.is choice}
-\ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}}
-\ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
-\ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
-
-\newif\ifpgf at circuit@strokediode
-\newif\ifpgf at circuit@fulldiode
-\pgf at circuit@strokediodefalse
-\pgf at circuit@fulldiodefalse
-
-\ctikzset{diode/.is choice}
-\ctikzset{diode/empty/.code = \pgf at circuit@fulldiodefalse\pgf at circuit@strokediodefalse}%default
-\ctikzset{diode/full/.code = \pgf at circuit@fulldiodetrue }
-\ctikzset{diode/stroke/.code = \pgf at circuit@strokediodetrue}
-
-\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full }}
-\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty }}
-\tikzset{stroke diodes/.style = { \circuitikzbasekey/diode = stroke }}
-
-\ctikzset{thickness/.initial=2}
-\ctikzset{color/.initial=black}
-\pgfkeys{/tikz/color/.add code={}{\ctikzset{color=#1}}}
-
-
-\newif\ifpgf at circ@siunitx
-\newif\ifpgf at circ@siunitx at res
-
-\ctikzset{voltage/.is family}
-\ctikzset{voltage/distance from node/.initial=.5} %\pgf at circ@Rlen units
-\ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
-\ctikzset{voltage/bump a/.initial=1.2}
-\ctikzset{voltage/bump b/.initial=1.5}
-\ctikzset{voltage/european label distance/.initial=1.4}
-\ctikzset{voltage/american label distance/.initial=1.1}
-% special cases
-\ctikzset{bipoles/generic/voltage/distance from node/.initial=.4}
-\ctikzset{bipoles/generic/voltage/bump b/.initial=2}
-\ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8}
-%\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3}
-\ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2}
-\ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5}
-\ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4}
-\ctikzset{bipoles/ageneric/voltage/bump b/.initial=2}
-\ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8}
-\ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4}
-\ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2}
-\ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8}
-\ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4}
-\ctikzset{bipoles/memristor/voltage/bump b/.initial=2}
-\ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8}
-%\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/tline/voltage/bump b/.initial=2.4}
-\ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1}
-%\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4}
-\ctikzset{bipoles/varistor/voltage/european label distance/.initial=2}
-%\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2}
-\ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8}
-%\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4}
-\ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2}
-%\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6}
-%\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2}
-\ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6}
-
-\ctikzset{current/.is family}
-\ctikzset{current/distance/.initial = .5}
-
-\tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
-\tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
-\tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
-\tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } }
-\tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } }
-\tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
-
-\newif\ifpgf at circuit@europeangfsurgearrester
-\ctikzset{gas filled surge arrester/.is choice}
-\ctikzset{gas filled surge arrester/european/.code= {\pgf at circuit@europeangfsurgearrestertrue } }
-\ctikzset{gas filled surge arrester/american/.code= {\pgf at circuit@europeangfsurgearresterfalse } } 
-
-\tikzset{american gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = american } }
-\tikzset{european gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = european } }
-\tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
-\tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
-\tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
-\tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
-\tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
-\tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
-\tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester } }
-\tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } }
-
-% I should try to make the tree clearer (this voltaege conflicts with the options above)
-
-\newif\ifpgf at circuit@europeanvoltage
-\ctikzset{voltage/.is choice}
-\ctikzset{voltage/american/.code = {\pgf at circuit@europeanvoltagefalse } }
-\ctikzset{voltage/european/.code = {\pgf at circuit@europeanvoltagetrue } }
-
-\newif\ifpgf at circuit@europeancurrent
-\ctikzset{current/.is choice}
-\ctikzset{current/american/.code = \pgf at circuit@europeancurrentfalse }
-\ctikzset{current/european/.code = \pgf at circuit@europeancurrenttrue }
-
-\ctikzset{label/align/.is choice}
-\ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}}
-\ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}}
-\ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}}
-
-%%%%%%%%%% new
-\pgfkeys{\circuitikzbasekey/.search also={/tikz}}
-%%%---------- close: tex/pgfcirc.defines
-%%%%%%%%%%% Springe nach tex/pgfcircutils
-%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%\def\pgf at circ@handleSI#1{%
- % \pgf at circ@siunitx at resfalse
-%  
- % \edef\len{\stringlength[e]{#1}}
-  %\testmatchingchar[e]{#1}{\len}{>}%
-  %\ifmatchingchar%
-  %  \ifnum\findchars{#1}{<}=0
-	%  \def\pgf at circ@handleSI at val{\substring{#1}{1}{\findchars{#1}{<}-1}}
-	  %\def\pgf at circ@handleSI at unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}}
-	  %\pgf at circ@siunitx at restrue
-%	\else
-%	\fi
-  %\else 
-  %\fi
-%}
-
-\def\pgf at circ@handleSI#1{
-	\noexpandarg
-        	\def\pgf at temp{}
-	\StrBetween{#1}{<}{>}[\pgf at circ@handleSI at unit]
-	\StrLen{\pgf at circ@handleSI at unit}[\pgf at circ@handleSI at unit@len]
-
-	\ifnum\pgf at circ@handleSI at unit@len=0  
-	  \pgf at circ@siunitx at resfalse  
-	\else  
-	  \IfEndWith{#1}{>}{
-	  	\pgf at circ@siunitx at restrue 
-		\noexpandarg
-	  	\StrBefore{#1}{<}[\pgf at circ@handleSI at val]		
-                %\typeout{si |#1|}
-	  }{
-	  	\pgf at circ@siunitx at resfalse 
-                %\typeout{no si |#1|}
-	  }
-	\fi
-}
-
-\def\pgf at circ@finallabel#1{%
-		\edef\pgf at temp{}%
-		\edef\pgf at circ@temp{\ctikzvalof{bipole/#1label/unit}}%
-		\ifx\pgf at temp\pgf at circ@temp%
-			\ctikzvalof{bipole/#1label/name}%
-		\else%
-			$\SI{\ctikzvalof{bipole/#1label/name}}{\ctikzvalof{bipole/#1label/unit}}$%
-		\fi%
-}
-
-\def\pgf at circ@ifkeyempty#1{
-	\pgfextra{
-		\ctikzset{#1/.get=\pgf at circ@temp}
-		\edef\pgf at temp{}
-	}
-	\ifx\pgf at circ@temp\pgf at temp
-}
-
-%%%---------- close: tex/pgfcircutils
-%%%%%%%%%%% Springe nach tex/pgfcircmath
-%%%---------- open: tex/pgfcircmath.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%    Math routines
-
-\def\pgf at circ@stripdecimals#1.#2\pgf at nil{#1}
-
-% angle between 0 and 360
-\def\pgf at circ@slope#1#2{%
- \pgf at process{#1}%
- \pgf at xa=\pgf at x%
- \pgf at ya=\pgf at y%
- \pgf at process{#2}%
- \advance\pgf at x by-\pgf at xa%
- \advance\pgf at y by-\pgf at ya%
- \ifdim\pgf at x<0.1pt 
- 	\ifdim\pgf at x>-0.1pt % vertical
-		\ifdim\pgf at y<0pt
-			\def\pgfmathresult{-90.0}
-		\else
-			\def\pgfmathresult{+90.0}
-		\fi 	
- 	\else % oblique with dx < 0
-		\pgfmathdivide{\pgf at y}{\pgf at x}
-		\pgfmathatan{\pgfmathresult}
-		\ifdim\pgf at x<0pt
-			\pgfmathsubtract{\pgfmathresult}{+180}
-		\fi
- 	\fi
- \else % oblique with dx > 0
-	\pgfmathdivide{\pgf at y}{\pgf at x}
-	\pgfmathatan{\pgfmathresult}
-	\ifdim\pgf at x<0pt
-		\pgfmathsubtract{\pgfmathresult}{+180}
-	\fi
- \fi
- \pgf at x=\pgfmathresult pt
- \ifdim\pgf at x<0pt
-	\pgfmathadd{\pgfmathresult}{+360} 
- \fi
- }
-
-  	
-%%%---------- close: tex/pgfcircmath
-
-%%%%%%%%%%% Springe nach tex/pgfcircshapes
-%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%  Other shapes
-
-
-%% Nothing
-
-\pgfdeclareshape{emptyshape}{
-	\savedanchor{\northeast}{%
-		\pgf at x=.5\wd\pgfnodeparttextbox%
-		\pgf at y=.5\ht\pgfnodeparttextbox%
-   }
-	\anchor{north}{
-		\northeast
-		\pgf at x=0cm
-	}
-	\anchor{east}{%
-		\northeast
-		\pgf at y=0cm
-   }
-	\anchor{south}{%
-		\northeast
-		\pgf at y=-\pgf at y
-		\pgf at x=0cm
-   }
-	\anchor{west}{
-		\northeast
-		\pgf at y=0cm
-		\pgf at x=-\pgf at x
-	}
-	\anchor{text}{%
-		\pgfpointorigin
-   }
-	\anchor{center}{
-		\pgfpointorigin
-	}
-}
-
-%% Full terminal
-
-\pgfdeclareshape{circ}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchorborder{
-		\pgf at circ@res at left=\pgf at x
-		\pgf at circ@res at up=\pgf at y
-		\pgfpointborderellipse{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}
-}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}		
-	}
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{draw,fill}		
-		\endpgfscope
-
-		}
-}
-
-%% Empty terminal
-
-\pgfdeclareshape{ocirc}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchorborder{
-		\pgf at circ@res at left=\pgf at x
-		\pgf at circ@res at up=\pgf at y
-		\pgfpointborderellipse{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}
-}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}		
-	}
-
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfsetfillcolor{white}
-			\pgfusepath{draw,fill}		
-		\endpgfscope
-
-		}
-}
-
-%% Diamond terminal
-
-\pgfdeclareshape{diamond}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchorborder{
-		\pgf at circ@res at left=\pgf at x
-		\pgf at circ@res at up=\pgf at y
-	}
-	\behindforegroundpath{		
-		\pgfscope
-			\pgfmathsetlength{\pgf at circ@res at temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
-			\pgftransformrotate{45}
-			\pgfpathrectanglecorners
-			{\pgfpoint{\pgf at circ@res at left-\pgf at circ@res at temp}{\pgf at circ@res at up+\pgf at circ@res at temp}}
-			{\pgfpoint{\pgf at circ@res at left+\pgf at circ@res at temp}{\pgf at circ@res at up-\pgf at circ@res at temp}}
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{draw,fill}		
-		\endpgfscope
-		}
-}
-
-%% Current arrow
-
-\pgfdeclareshape{currarrow}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\divide \pgf at circ@res at step by 16
-
-			\pgfpathmoveto{\pgfpoint{-.7\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{1\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{-.7\pgf at circ@res at step}{0pt}}			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{draw,fill}
-
-		\endpgfscope
-	}
-
-}
-
-%% Current arrow
-
-\pgfdeclareshape{inputarrow}{
-	\savedanchor{\tip}{
-		\pgfpointorigin
-	}
-	\anchor{center}{
-		\tip
-	}
-	\anchor{tip}{
-		\tip
-	}
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-			\divide \pgf at circ@res at step by 16
-
-			\pgfpathmoveto{\pgfpoint{-1.7\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{0pt}{0pt}}
-			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{.8\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{-1.7\pgf at circ@res at step}{0pt}}			
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{fill}
-
-		\endpgfscope
-	}
-
-}
-
-
-%% box
-
-\pgfdeclareshape{box}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		
-		\pgfscope
-			\pgf at circ@res at step = \ctikzvalof{bipoles/twoport/width}\pgf at circ@Rlen
-			\pgf at circ@res at step = 0.5\pgf at circ@res at step
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-			\pgfpathrectanglecorners{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at step}}{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-		\endpgfscope
-	}
-
-}
-
-%%%---------- close: tex/pgfcircshapes
-%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
-%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Monopoles
-
-%% Ground symbol
-
-\pgfdeclareshape{ground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-			\pgfusepath{draw}
-		
-			
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-
-}
-
-
-
-\pgfdeclareshape{rground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-						
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-}
-
-\pgfdeclareshape{tground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			%\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-			\pgfusepath{draw}
-						
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-}
-
-\pgfdeclareshape{sground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{0}{-1.8\pgf at circ@res at step}}
-			\pgfpathclose
-			\pgfusepath{draw}
-						
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-
-}
-
-% noiseless ground
-\pgfdeclareshape{nground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfusepath{draw}
-			
-			\pgfpathmoveto{\pgfpoint{1.3\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfpatharc{0}{180}{1.3\pgf at circ@res at step}
-			\pgfusepath{draw}
-					
-			\pgfsetlinewidth{\pgfstartlinewidth}
-		\endpgfscope
-	}
-}
-
-% protective ground
-\pgfdeclareshape{pground}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/ground/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-			\pgfusepath{draw}
-
-			\pgfstartlinewidth=\pgflinewidth
-			%\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-			\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-			\pgfpathcircle{\pgfpoint{0pt}{-\pgf at circ@res at step}} {1.2\pgf at circ@res at step}
-			\pgfusepath{draw}
-						
-			\pgfsetlinewidth{\pgfstartlinewidth}
-			\pgfpathmoveto{\pgfpoint{-.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.8\pgf at circ@res at step}{-1.2\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.6\pgf at circ@res at step}{-1.4\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at step}{-1.6\pgf at circ@res at step}}
-			\pgfusepath{draw}
-					
-			\pgfsetlinewidth{\pgfstartlinewidth}
-		\endpgfscope
-	}
-}
-
-% chassis ground 
-\pgfdeclareshape{cground}{ 
-\anchor{center}{ 
-    \pgfpointorigin 
-} 
-\behindforegroundpath{       
-    \pgf at circ@res at step=\ctikzvalof{monopoles/chassis/width}\pgf at circ@Rlen 
- 
-    \pgfscope        
-        \pgfpathmoveto{\pgfpointorigin} 
-        \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at step}} 
-        \pgfusepath{draw}
-
-        \pgfpathmoveto{\pgfpoint{-1.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
-        \pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{-\pgf at circ@res at step}}
-        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at step}}
-        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
-        \pgfpathmoveto{\pgfpoint{0pt}{-\pgf at circ@res at step}}
-        \pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-2\pgf at circ@res at step}}
-        \pgfusepath{draw}                        
-    \endpgfscope 
-    } 
-}
-
-% Contributed by Leonardo Azzinnari
-\pgfdeclareshape{tlinestub}{
-	\anchor{center}{\pgfpointorigin}
-	\behindforegroundpath{
-		\pgfstartlinewidth=\pgflinewidth
-		
-		\pgf at circ@res at step=\ctikzvalof{bipoles/tline/width} \pgf at circ@Rlen
-        \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-        
-            \pgfpathmoveto{\pgfpointorigin}
-            \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0pt}}
-            \pgfusepath{draw}
-         \pgfscope
-            \pgfpathellipse{\pgfpoint{0.5\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0.125\pgf at circ@res at step}{0\pgf at circ@res at step}}{\pgfpoint{0\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-			\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-            \pgfpathlineto{\pgfpoint{1.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-            \pgfpatharc{90}{-90}{0.125\pgf at circ@res at step and 0.25\pgf at circ@res at step}
-            \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-0.25\pgf at circ@res at step}}
-            \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-            \pgfusepath{draw}
-         \endpgfscope
-      }
-}
-                            
-
-
-
-\pgfdeclareshape{antenna}{
-\anchor{center}{\pgfpointorigin}
-	\savedanchor{\northeast}{
-		\pgf at circ@res at step=\ctikzvalof{monopoles/antenna/width}\pgf at circ@Rlen
-		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
-		\pgf at y=6\pgf at circ@res at step
-	}
-	\anchor{text}{
-		\northeast
-		\pgf at x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf at x
-		\pgf at y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf at y
-	}
-   \behindforegroundpath{
-     \pgfstartlinewidth=\pgflinewidth
-     \pgf at circ@res at step=\ctikzvalof{monopoles/antenna/width}\pgf at circ@Rlen
-                           
-        % \pgfpathmoveto{\pgfpointorigin}
-        % \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
-        % \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
-        %     \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-        
-        \pgftransformxshift{ -4\pgf at circ@res at step }
-
-        \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
-        \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             
-         \pgfusepath{draw}
-             
-          \pgfscope   
-          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-             \pgfusepath{draw}
-           \endpgfscope
-                           \pgfsetlinewidth{\pgfstartlinewidth}
-                        
-                           }
-     }
-
-
-\pgfdeclareshape{txantenna}{
-	\anchor{center}{\pgfpointorigin}
-	\savedanchor{\northeast}{
-		\pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
-		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
-		\pgf at y=6\pgf at circ@res at step
-	}
-	\anchor{text}{
-		\northeast
-		\pgf at x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf at x
-		\pgf at y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf at y
-	}
-       \behindforegroundpath{
-       \pgfstartlinewidth=\pgflinewidth
-       \pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
-        
-         \pgfpathmoveto{\pgfpointorigin}
-         \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
-         \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             
-         \pgfusepath{draw}
-             
-          \pgfscope   
-          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-             \pgfusepath{draw}
-           \endpgfscope
-          \pgfpathmoveto{\pgfpoint{5.5\pgf at circ@res at step}{6\pgf at circ@res at step}}
-%        \pgfpatharc{60}{-60}{\pgf at circ@res at step and \pgf at circ@res at step}
-        \pgfpatharc{30}{-30}{2\pgf at circ@res at step}         \pgfpathmoveto{\pgfpoint{6\pgf at circ@res at step}{6.25\pgf at circ@res at step}}
-        \pgfpatharc{30}{-30}{2.5\pgf at circ@res at step}
-        \pgfpathmoveto{\pgfpoint{6.5\pgf at circ@res at step}{6.5\pgf at circ@res at step}}
-        \pgfpatharc{30}{-30}{3\pgf at circ@res at step}
-        \pgfpathmoveto{\pgfpoint{7\pgf at circ@res at step}{6.75\pgf at circ@res at step}}
-        \pgfpatharc{30}{-30}{3.5\pgf at circ@res at step}
-        \pgfpathmoveto{\pgfpoint{7.5\pgf at circ@res at step}{7\pgf at circ@res at step}}
-        \pgfpatharc{30}{-30}{4\pgf at circ@res at step}
-        \pgfusepath{draw}
-        \pgfsetlinewidth{\pgfstartlinewidth}
-        
-        }
-     }
-
-
-\pgfdeclareshape{rxantenna}{
-	\anchor{center}{\pgfpointorigin}
-	\savedanchor{\northeast}{
-		\pgf at circ@res at step=\ctikzvalof{monopoles/txantenna/width}\pgf at circ@Rlen
-		\pgf at x=5\pgf at circ@res at step%-0.5\pgflinewidth
-		\pgf at y=6\pgf at circ@res at step
-	}
-	\anchor{text}{
-		\northeast
-		\pgf at x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf at x
-		\pgf at y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf at y
-	}
-    \behindforegroundpath{
-        \pgfstartlinewidth=\pgflinewidth
-        \pgf at circ@res at step=\ctikzvalof{monopoles/rxantenna/width}\pgf at circ@Rlen
-             
-         \pgfpathmoveto{\pgfpointorigin}
-         \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step}{0pt}}
-         \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{0pt}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             
-         \pgfusepath{draw}
-             
-          \pgfscope   
-          \pgfpathmoveto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{5\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{4\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{3\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfpathlineto{\pgfpoint{4\pgf at circ@res at step-0.5\pgflinewidth}{6\pgf at circ@res at step}}
-             \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-             \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-             \pgfusepath{draw}
-           \endpgfscope
-           
-           \pgfpathmoveto{\pgfpoint{6\pgf at circ@res at step}{7\pgf at circ@res at step}}
-%             \pgfpatharc{60}{-60}{\pgf at circ@res at step and \pgf at circ@res at step}
-             \pgfpatharc{150}{210}{4\pgf at circ@res at step}              \pgfpathmoveto{\pgfpoint{6.5\pgf at circ@res at step}{6.75\pgf at circ@res at step}}
-             \pgfpatharc{150}{210}{3.5\pgf at circ@res at step}
-             \pgfpathmoveto{\pgfpoint{7\pgf at circ@res at step}{6.5\pgf at circ@res at step}}
-             \pgfpatharc{150}{210}{3\pgf at circ@res at step}
-             \pgfpathmoveto{\pgfpoint{7.5\pgf at circ@res at step}{6.25\pgf at circ@res at step}}
-             \pgfpatharc{150}{210}{2.5\pgf at circ@res at step}
-             \pgfpathmoveto{\pgfpoint{8\pgf at circ@res at step}{6\pgf at circ@res at step}}
-             \pgfpatharc{150}{210}{2\pgf at circ@res at step}
-             \pgfusepath{draw}
-             \pgfsetlinewidth{\pgfstartlinewidth}
-             
-             }
-}
-
-% Vcc
-\pgfdeclareshape{vcc}{
-\anchor{center}{\pgfpointorigin}
-\anchor{text}{
-	\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
-	\pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf at circ@res at step+2\ht\pgfnodeparttextbox}}                          
-	\pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf at circ@res at step+2\ht\pgfnodeparttextbox}}                
-	\pgf at x=0pt
-	\pgf at y=2\pgf at circ@res at step
-	\advance \pgf at y by 0.5\ht\pgfnodeparttextbox
-	\pgf at x=-.5\wd\pgfnodeparttextbox
-	}
-\behindforegroundpath{                             
-	\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen           
-	\pgfscope           
-		\pgfpathmoveto{\pgfpointorigin}
-		\pgfpathlineto{\pgfpoint{0pt}{1.5\pgf at circ@res at step}}
-		\pgfusepath{draw}
-
-		\pgfstartlinewidth=\pgflinewidth
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{.8\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0}{1.5\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{.8\pgf at circ@res at step}}
-		\pgfusepath{draw}
-																						
-		\pgfsetlinewidth{\pgfstartlinewidth}
-
-	\endpgfscope
-}
-
-}
-
-% Vee
-\pgfdeclareshape{vee}{
-\anchor{center}{\pgfpointorigin}
-\anchor{text}{
-	\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
-	\pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf at circ@res at step-2\ht\pgfnodeparttextbox}}                        
-	\pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf at circ@res at step-2\ht\pgfnodeparttextbox}}        
-	\pgf at x=0pt
-	\pgf at y=-2\pgf at circ@res at step
-	\advance \pgf at y by -1.5\ht\pgfnodeparttextbox
-	\pgf at x=-.5\wd\pgfnodeparttextbox
-	}
-
-\behindforegroundpath{                             
-	\pgf at circ@res at step=\ctikzvalof{monopoles/vcc/width}\pgf at circ@Rlen
-	
-	\pgfscope                           
-		\pgfpathmoveto{\pgfpointorigin}
-		\pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf at circ@res at step}}
-		\pgfusepath{draw}
-
-		\pgfstartlinewidth=\pgflinewidth
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
-		\pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0}{-1.5\pgf at circ@res at step}}
-		\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{-.8\pgf at circ@res at step}}
-		\pgfusepath{draw}
-		\pgfsetlinewidth{\pgfstartlinewidth}
-
-	\endpgfscope
-}
-
-}
-
-
-% match
-\pgfdeclareshape{match}{
-	\anchor{center}{
-		\pgfpointorigin
-	}
-	\anchor{text}{
-		\pgf at x=\ctikzvalof{monopoles/match/width}\pgf at circ@Rlen
-		\pgf at x=1.5\pgf at x
-		\advance \pgf at x by -.5\wd\pgfnodeparttextbox
-		\pgf at y=-1.5\ht\pgfnodeparttextbox
-	}
-	\behindforegroundpath{		
-		\pgf at circ@res at step=\ctikzvalof{monopoles/match/width}\pgf at circ@Rlen
-		
-		\pgfscope		
-			\pgfpathmoveto{\pgfpointorigin}
-			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0pt}}
-			\pgfusepath{draw}
-
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-			\pgfpathlineto{\pgfpoint{2\pgf at circ@res at step}{0}}
-			\pgfusepath{fill}
-									
-			\pgfsetlinewidth{\pgfstartlinewidth}
-	
-		\endpgfscope
-	}
-
-}
-
-
-%%%---------- close: tex/pgfcircmonopoles
-%%%%%%%%%%% Springe nach tex/pgfcircbipoles
-%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2007-2009 by Massimo Redaelli
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-%
-% See the file doc/LICENSE for more details.
-
-%% Generic macro for defining a bipole shape
-% #1 - additional anchors
-% #2 - lower y-size of the bipole (from the center).
-% #3 - #shape is the name of the shape
-% #4 - upper y-size of the bipole (from the center)
-% #5 - width of the bipole
-% #6 - macros drawing the bipole
-
-
-\long\def\pgfcircdeclarebipole#1#2#3#4#5#6{
-	\pgfdeclareshape{#3shape}{
-	
-	\savedanchor{\northeast}{
-		\pgf at y=#4\pgf at circ@Rlen
-		\pgf at y=.5\pgf at y
-		\pgf at x=#5\pgf at circ@Rlen
-		\pgf at x=.5\pgf at x
-	}
-	\savedanchor{\northeastborder}{
-		\pgf at y=#4\pgf at circ@Rlen
-		\pgf at y=.5\pgf at y
-		\pgf at y=\ctikzvalof{bipoles/border margin}\pgf at y
-		\pgf at x=#5\pgf at circ@Rlen
-		\pgf at x=.5\pgf at x
-		\pgf at x=\ctikzvalof{bipoles/border margin}\pgf at x
-	}
-	\savedanchor{\southwestborder}{
-		\pgf at y=-#2\pgf at circ@Rlen
-		\pgf at y=.5\pgf at y
-		\pgf at y=\ctikzvalof{bipoles/border margin}\pgf at y
-		\pgf at x=-#5\pgf at circ@Rlen
-		\pgf at x=.5\pgf at x
-		\pgf at x=\ctikzvalof{bipoles/border margin}\pgf at x
-	}
-	\savedanchor{\southwest}{
-		\pgf at y=-#2\pgf at circ@Rlen
-		\pgf at y=.5\pgf at y
-		\pgf at x=-#5\pgf at circ@Rlen
-		\pgf at x=.5\pgf at x
-	}
-	\savedanchor{\centerpoint}{
-		\pgf at circ@res at down=-#2\pgf at circ@Rlen
-		\pgf at circ@res at up=#4\pgf at circ@Rlen
-		\pgfpointorigin
-		\pgf at y=\pgf at circ@res at up
-		\advance\pgf at y by\pgf at circ@res at down
-		\pgf at y=.5\pgf at y
-	}
-	\anchor{center}{\pgfpointorigin}
-	\anchor{n}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at x=0cm
-	}
-	\anchor{ne}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-	}
-	\anchor{nw}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at x=-\pgf at x
-	}
-	\anchor{e}{%
-		\ifpgf at circuit@bipole at reversed\else\southwest\northeast\fi
-		\pgf at y=0cm
-   }
-	\anchor{s}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at x=0cm
-   }
-	\anchor{se}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at x=-\pgf at x
-   }
-	\anchor{sw}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-   }
-	\anchor{w}{
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-	}
-	\anchor{north}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at x=0cm
-	}
-	\anchor{east}{%
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-   }
-	\anchor{south}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at x=0cm
-   }
-	\anchor{west}{
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-	}
-	\anchor{right}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-	}
-	\anchor{above}{
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at x=0cm
-	}
-	\anchor{left}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-   }
-	\anchor{below}{%
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at x=0cm                    
-   }
-	\anchor{a}{%
-		\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
-		\pgf at y=0cm
-   }
-	\anchor{b} {
-		\ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
-		\pgf at y=0cm
-	}
-	\savedanchor{\textanchor}{%
-		\pgf at y=\ht\pgfnodeparttextbox
-		\pgf at x=-.5\wd\pgfnodeparttextbox
-   }
-	\anchor{text}{%
-		\textanchor
-   }
-	\anchorborder{%
-		\def\pgf at temp{false}
-		\ifpgf at circuit@bipole at reversed\pgf at temp
-			\pgf at circ@res at left=-\pgf at x
-			\pgf at circ@res at right=-\pgf at y
-		\else
-			\pgf at circ@res at left=\pgf at x
-			\pgf at circ@res at right=\pgf at y
-		\fi
-		\ifdim\pgf at circ@res at right>0cm
-			\pgfpointborderrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at right}}{\northeastborder}
-		\else
-	  		\southwestborder	
-	  	\pgfpointborderrectangle{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at right}}{\pgfpoint{-\pgf at x}{-\pgf at y}}
-		\fi
-	}
-	
-	#1
-	
-	\backgroundpath{	
-		\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-		
-		\northeast
-		\pgf at circ@res at up = \pgf at y 
-		\pgf at circ@res at zero = 0cm
-		\pgf at circ@res at left = -\pgf at x
-		\pgf at circ@res at right = \pgf at x
-		\southwest
-		\pgf at circ@res at down = \pgf at y
-
- 		\pgfstartlinewidth=\pgflinewidth
-		
-		#6
-			
-		\pgfsetlinewidth{\pgfstartlinewidth}
-	}
-	}
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Standard bipole shapes declarations
-
-%% Resistor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgftransformationadjustments
-	\pgfmathsetlength{\pgf at circ@res at step}{\ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
-	\divide \pgf at circ@res at step by 12
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
-	\pgf at circ@res at other = \pgf at circ@res at left
-	\advance\pgf at circ@res at other by \pgf at circ@res at step 
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
-	\advance\pgf at circ@res at other by \pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
-	\pgfsetbeveljoin
-	\pgfusepath{draw}
-}
-
-
-
-%% Variable resistor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgftransformationadjustments
-	\pgfmathsetlength{\pgf at circ@res at step}{\ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
-	\divide \pgf at circ@res at step by 12
-	
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
-	
-	\pgf at circ@res at other = \pgf at circ@res at left
-	\advance\pgf at circ@res at other by \pgf at circ@res at step 
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step 
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
-	\advance\pgf at circ@res at other by 2\pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
-	\advance\pgf at circ@res at other by \pgf at circ@res at step
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
-	\pgfsetbeveljoin
-	\pgfusepath{draw}
-	
-	\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at other}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at other}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-	\endpgfscope
-}
-
-
-
-%% Capacitor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/capacitor/height}}{capacitor}{\ctikzvalof{bipoles/capacitor/height}}{\ctikzvalof{bipoles/capacitor/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/capacitor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 5
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-}
-
-
-%% Polar Capacitor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pcapacitor/height}}{polarcapacitor}{\ctikzvalof{bipoles/pcapacitor/height}}{\ctikzvalof{bipoles/pcapacitor/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/pcapacitor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 5
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-				
-		\pgfscope
-			\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}{\pgf at circ@res at up}}
-			\pgftransformrotate{-90}
-			\pgfpathsine{\pgfpoint{\pgf at circ@res at up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}}
-			\pgfpathcosine{\pgfpoint{\pgf at circ@res at up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf at circ@res at left}}
-			\pgfusepath{draw}
-		\endpgfscope
-		
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfusepath{draw}
-		
-}
-
-%% Electrolytic Capacitor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ecapacitor/height}}{ecapacitor}{\ctikzvalof{bipoles/ecapacitor/height}}{\ctikzvalof{bipoles/ecapacitor/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/ecapacitor/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 5
-		\pgfsetrectcap
-		% % % Draw plus pole
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfsetfillcolor{white} 
-		\pgfusepath{draw,fill}
-		% % Draw minus pole
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-				 \pgfsetfillcolor{black} 
-				\pgfusepath{draw,fill}
-		\pgfsetfillcolor{black} 
-		% % plus pole annotation
-		\pgftext[right,at=\pgfpoint{1.2\pgf at circ@res at left}{.6\pgf at circ@res at up}]
-		{\pgfkeysvalueof{/tikz/circuitikz/bipoles/ecapacitor/font} $+$}	
-}
-
-%% Battery
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
-		\pgf at circ@res at step = \ctikzvalof{bipoles/battery/width}\pgf at circ@Rlen
-		\divide \pgf at circ@res at step by 6
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
-
-		\pgfusepath{draw}
-}
-
-
-%% Battery 1
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
-		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{0}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
-		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{0}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0}}
-		\pgfusepath{draw}
-
-		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at down}}
-
-		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at down}}
-		
-
-
-
-		\pgfusepath{draw}
-}
-
-
-
-%% cute inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgftransformationadjustments
-
-	\pgfmathsetlength{\pgf at circ@res at other}%width of small coil
-	{0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf at circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)}
-
-
-	\pgfmathsetlength{\pgf at circ@res at step}
-		{(\ctikzvalof{bipoles/cuteinductor/width}*\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf at circ@res at other)/\ctikzvalof{bipoles/cuteinductor/coils}/2}
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
-	\foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}}
-	{
-		\pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at up}
-		\pgfpatharc{0}{-180}{\pgf at circ@res at other and -\pgf at circ@res at down}
-	}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at up}
-	\pgfsetbuttcap
-	\pgfsetbeveljoin
-	\pgfusepath{stroke}
-}
-
-%% variable cute inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/lower coil height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgftransformationadjustments	
-	
-	\pgfmathsetlength{\pgf at circ@res at other}%width of small coil
-	{0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf at circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)}
-
-
-	\pgfmathsetlength{\pgf at circ@res at step}
-		{(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf at circ@res at other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2}
-
-	\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
-	\foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
-	{
-		\pgfpatharc{180}{0}{\pgf at circ@res at step and .5\pgf at circ@res at up}
-		\pgfpatharc{0}{-180}{\pgf at circ@res at other and -.5\pgf at circ@res at down}
-	}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and .5\pgf at circ@res at up}
-	\pgfsetbuttcap
-	\pgfsetbeveljoin
-	\pgfusepath{stroke}
-}
-
-%% american inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
-	\pgf at circ@res at step=\ctikzvalof{bipoles/americaninductor/width}\pgf at circ@Rlen
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}	
-	\pgftransformationadjustments
-	\advance \pgf at circ@res at step by \pgfhorizontaltransformationadjustment\pgflinewidth
-	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/americaninductor/coils}
-	\divide \pgf at circ@res at step by 2
-	\pgf at circ@res at other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf at circ@Rlen
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfsetbuttcap
-	\pgfsetbeveljoin
-	\pgfusepath{stroke}
-}
-
-%% variable american inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
-	\pgf at circ@res at step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf at circ@Rlen
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-	\pgftransformationadjustments
-	\advance \pgf at circ@res at step by \pgfhorizontaltransformationadjustment\pgflinewidth
-	\divide \pgf at circ@res at step by \ctikzvalof{bipoles/vamericaninductor/coils}
-	\divide \pgf at circ@res at step by 2
-	\pgf at circ@res at other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf at circ@Rlen
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfsetbuttcap
-	\pgfsetbeveljoin
-	\pgfusepath{stroke}
-
-	\pgfscope
-		\pgfsetarrowsend{latex'}
-		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at left}{\pgf at circ@res at up}}
-		\pgfusepath{draw}
-	\endpgfscope
-}
-
-
-%% Independent voltage source
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
-
-	\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-

@@ Diff output truncated at 1234567 characters. @@


More information about the tex-live-commits mailing list.