summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty')
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty55
1 files changed, 44 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index 1ff69513393..ba41b39100d 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
@@ -52,12 +52,28 @@
\ctikzset{european voltage=true}
}
+\DeclareOption{americanresistor}{
+ \ctikzset{european resistor=false}
+}
+
+\DeclareOption{europeanresistor}{
+ \ctikzset{european resistor=true}
+}
+
+\DeclareOption{americaninductor}{
+ \ctikzset{european inductor=false}
+}
+
+\DeclareOption{europeaninductor}{
+ \ctikzset{european inductor=true}
+}
+
\DeclareOption{european}{
- \ctikzset{european voltage=true} \ctikzset{european current=true}
+ \ctikzset{european voltage=true} \ctikzset{european current=true} \ctikzset{european inductor=true} \ctikzset{european resistor=true}
}
\DeclareOption{american}{
- \ctikzset{european voltage=false} \ctikzset{european current=false}
+ \ctikzset{european voltage=false} \ctikzset{european current=false} \ctikzset{european resistor=false} \ctikzset{european inductor=false}
}
\DeclareOption{siunitx}{
@@ -140,19 +156,23 @@
\ctikzset{bipoles/interr/height/.initial=.35}
\ctikzset{bipoles/interr/width/.initial=.35}
\ctikzset{bipoles/interr/height 2/.initial=.08}
-\ctikzset{bipoles/generic/height/.initial=.15}
-\ctikzset{bipoles/generic/width/.initial=1}
+\ctikzset{bipoles/generic/height/.initial=.30}
+\ctikzset{bipoles/generic/width/.initial=.80}
+\ctikzset{bipoles/ageneric/height/.initial=.30}
+\ctikzset{bipoles/ageneric/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/generic/height/.initial=.30}
-\ctikzset{bipoles/generic/width/.initial=.80}
\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}
\newif\ifpgf@circuit@mos@arrows
\ctikzset{tripoles/mos style/.is choice}
@@ -308,6 +328,10 @@
\ctikzset{european voltage/.is if=pgf@circuit@europeanvoltage}
\newif\ifpgf@circuit@europeancurrent
\ctikzset{european current/.is if=pgf@circuit@europeancurrent}
+\newif\ifpgf@circuit@europeanresistor
+\ctikzset{european resistor/.is if=pgf@circuit@europeanresistor}
+\newif\ifpgf@circuit@europeaninductor
+\ctikzset{european inductor/.is if=pgf@circuit@europeaninductor}
\newif\ifpgf@circuit@fulldiode
\ctikzset{full diode/.is if=pgf@circuit@fulldiode}
\ctikzset{thickness/.initial=2}
@@ -318,8 +342,12 @@
\tikzset{european current/.code= {\ctikzset{european current=true} } }
\tikzset{american voltage/.code= {\ctikzset{european voltage=false} } }
\tikzset{american current/.code= {\ctikzset{european current=false} } }
-\tikzset{american/.code= {\ctikzset{european current=false} \ctikzset{european voltage=false}} }
-\tikzset{european/.code= {\ctikzset{european current=true} \ctikzset{european voltage=true}} }
+\tikzset{european inductor/.code= {\ctikzset{european inductor=true} } }
+\tikzset{european resistor/.code= {\ctikzset{european resistor=true} } }
+\tikzset{american inductor/.code= {\ctikzset{european inductor=false} } }
+\tikzset{american resistor/.code= {\ctikzset{european resistor=false} } }
+\tikzset{american/.code= {\ctikzset{european current=false} \ctikzset{european voltage=false} \ctikzset{european resistor=false} \ctikzset{european inductor=false}} }
+\tikzset{european/.code= {\ctikzset{european current=true} \ctikzset{european voltage=true} \ctikzset{european resistor=true} \ctikzset{european inductor=true}} }
\tikzset{full diode/.code= {\ctikzset{full diode=true} } }
\tikzset{empty diode/.code= {\ctikzset{full diode=false} } }
@@ -357,7 +385,7 @@
-\ExecuteOptions{european, nosiunitx, noarrowmos}
+\ExecuteOptions{european current, european voltage, american resistor, american inductor, nosiunitx, noarrowmos}
\ProcessOptions
@@ -438,11 +466,12 @@
%% Path definitions
-\def\pgf@circ@resistor@path#1{\pgf@circ@bipole@path{resistor}{#1}}
+\def\pgf@circ@resistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{generic}{#1}\else\pgf@circ@bipole@path{resistor}{#1}\fi}
\def\pgf@circ@potentiometer@path#1{\pgf@circ@bipole@path{potentiometer}{#1}}
\def\pgf@circ@capacitor@path#1{\pgf@circ@bipole@path{capacitor}{#1}}
\def\pgf@circ@battery@path#1{\pgf@circ@bipole@path{battery}{#1}}
-\def\pgf@circ@inductor@path#1{\pgf@circ@bipole@path{inductor}{#1}}
+\def\pgf@circ@inductor@path#1{\ifpgf@circuit@europeaninductor\pgf@circ@bipole@path{fullgeneric}{#1}\else\pgf@circ@bipole@path{inductor}{#1}\fi}
+\def\pgf@circ@lamp@path#1{\pgf@circ@bipole@path{lamp}{#1}}
\def\pgf@circ@vsource@path#1{\pgf@circ@bipole@path{vsource}{#1}}
\def\pgf@circ@vsourceam@path#1{\pgf@circ@bipole@path{vsourceAM}{#1}}
\def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}}
@@ -475,6 +504,7 @@
\def\pgf@circ@open@path#1{\pgf@circ@bipole@path{open}{#1}}
\def\pgf@circ@generic@path#1{\pgf@circ@bipole@path{generic}{#1}}
\def\pgf@circ@ageneric@path#1{\pgf@circ@bipole@path{ageneric}{#1}}
+\def\pgf@circ@fullgeneric@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
\def\pgf@circ@ammeter@path#1{\pgf@circ@bipole@path{ammeter}{#1}}
\def\pgf@circ@voltmeter@path#1{\pgf@circ@bipole@path{voltmeter}{#1}}
\def\pgf@circ@empty@path#1{}
@@ -510,9 +540,12 @@
\tikzset{generic/.style = {to path=\pgf@circ@generic@path, l=#1}}
\tikzset{ageneric/.style = {to path=\pgf@circ@ageneric@path, l=#1}}
+\tikzset{fullgeneric/.style = {to path=\pgf@circ@fullgeneric@path, l=#1}}
\tikzset{short/.style = {to path=\pgf@circ@short@path}}
\tikzset{open/.style = {to path=\pgf@circ@open@path}}
+\tikzset{lamp/.style = {to path=\pgf@circ@lamp@path}}
+
\tikzset{full diode/.style = {to path=\pgf@circ@fulldiode@path}}
\tikzset{full Schottky diode/.style = {to path=\pgf@circ@fullsdiode@path}}
\tikzset{full Zener diode/.style = {to path=\pgf@circ@fullzdiode@path}}