summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/circuitikz
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-22 23:38:38 +0000
committerKarl Berry <karl@freefriends.org>2009-05-22 23:38:38 +0000
commitffb491abf8a482d1a6ba3ec359cda6cc63e4ec4f (patch)
treec51e8d49073f0f5fdcc420e10494a368be5ef759 /Master/texmf-dist/tex/latex/circuitikz
parentdff4dbf8de3762428b08cd3164f27a2e6bd7ab4c (diff)
circuitikz 0.2.2 (20may09)
git-svn-id: svn://tug.org/texlive/trunk@13393 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/circuitikz')
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty55
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty36
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty4
3 files changed, 83 insertions, 12 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}}
diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty
index 9568064834e..1e5a363a743 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty
@@ -292,6 +292,9 @@
\pgfusepath{stroke}
}
+
+
+
%% Independent voltage source
\pgfcircdeclarebipole[\ctikzvalof{bipoles/vsource/height}]{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
@@ -1011,9 +1014,24 @@
\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@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
+ \divide \pgf@circ@res@step by 14
+
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+ \pgfusepath{fill}
+}
+
+
%% Generic asymmetric bipole
-\pgfcircdeclarebipole[\ctikzvalof{bipoles/generic/height}]{ageneric}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{
+\pgfcircdeclarebipole[\ctikzvalof{bipoles/ageneric/height}]{ageneric}{\ctikzvalof{bipoles/ageneric/height}}{\ctikzvalof{bipoles/ageneric/width}}{
\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
\divide \pgf@circ@res@step by 14
@@ -1157,4 +1175,20 @@
+%% 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@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@up}}
+ \pgfusepath{draw}
+}
+
+
+
\endinput
diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty
index cc32b915ad1..f41034e0a6d 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty
@@ -529,6 +529,7 @@
\pgfscope
\pgfslopedattimetrue
\pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
\pgftransformlineattime{.6}{%
\pgfpoint%
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
@@ -579,6 +580,7 @@
\pgfscope
\pgfslopedattimetrue
\pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
\pgftransformlineattime{.4}{%
\pgfpoint%
{\pgf@circ@res@right}%
@@ -682,6 +684,7 @@
\pgfscope
\pgfslopedattimetrue
\pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
\pgftransformlineattime{.5}{%
\pgfpoint%
{\pgf@circ@res@right}%
@@ -760,6 +763,7 @@
\pgfscope
\pgfslopedattimetrue
\pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
\pgftransformlineattime{.5}{%
\pgfpoint%
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}%