% 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.


%%%%%
%%%%%
%%%%%
%%%%% Se c'è l'opzione symbol, fallback to siunitx con warning
%%%%%
%%%%%

\NeedsTeXFormat{LaTeX2e}

\def\pgfcircversion{0.2.3}

\ProvidesPackage{circuitikz}%
        [2009/11/18 The CircuiTikz circuit drawing package version \pgfcircversion]

%% Version 2.0 of pgf/TikZ is required
\RequirePackage{tikz}
\usetikzlibrary{calc}
\usepgflibrary{decorations.pathmorphing}

\DeclareOption{european}{
	\ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
	 \ctikzset{resistor=european} \ctikzset{logic ports=european}
}

\DeclareOption{american}{
	\ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=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{siunitx}{
	\pgf@circ@siunitxtrue
}

\DeclareOption{nosiunitx}{
	\pgf@circ@siunitxfalse
}

\DeclareOption{arrowmos}{
	\pgf@circuit@mos@arrowstrue
}

\DeclareOption{noarrowmos}{
	\pgf@circuit@mos@arrowsfalse
}

%%%%%%%%% Compatibility


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



%%%%%%%%%



\input circuitikz.code.tex

\ExecuteOptions{europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,nosiunitx,noarrowmos}

\ProcessOptions\relax

\ifpgf@circ@siunitx
    \RequirePackage{xstring}[2009/03/13]
	%\expandafter\let\csname angstrom\endcsname\relax
	\RequirePackage{siunitx}
\fi

\input circuitikz1.code.tex

\newenvironment{circuitikz}{
\begin{tikzpicture}}{\end{tikzpicture}}

\endinput

* Da fare

Uniformare il path dei bipoli e dei transistor
Perché non ribalda gli induttori?
Uniformare i casi dell'induttore tra il path del bipolo e la scelta del nodo nel trasformatore
