summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/circuitikz/circuitikz1.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/circuitikz/circuitikz1.code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz1.code.tex35
1 files changed, 31 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz1.code.tex b/Master/texmf-dist/tex/latex/circuitikz/circuitikz1.code.tex
index 746d83ebe3b..4118b2bd9de 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz1.code.tex
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz1.code.tex
@@ -29,7 +29,7 @@
% Initialize paths
\def\pgfcircresetpath{
- \ctikzset{bipole/name=, bipole/direction=, bipole/label/name=, bipole/label/position=90,
+ \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,
@@ -65,8 +65,7 @@
\pgfextra{
\pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
{\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
- \edef\pgf@circ@direction{\pgfmathresult}
- \ctikzset{bipole/direction = \pgfmathresult}
+ \edef\pgf@circ@direction{\pgfmathresult}
}
($(\tikztostart) ! .5 ! (\tikztotarget)$)
node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}]
@@ -93,10 +92,15 @@
\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@vresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistor}{#1}\fi}
\def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi}
+\def\pgf@circ@thermistor@path#1{\pgf@circ@bipole@path{thermistor}{#1}}
+\def\pgf@circ@thermistorptc@path#1{\pgf@circ@bipole@path{thermistorptc}{#1}}
+\def\pgf@circ@thermistorntc@path#1{\pgf@circ@bipole@path{thermistorntc}{#1}}
+\def\pgf@circ@varistor@path#1{\pgf@circ@bipole@path{varistor}{#1}}
\def\pgf@circ@capacitor@path#1{\pgf@circ@bipole@path{capacitor}{#1}}
\def\pgf@circ@polarcapacitor@path#1{\pgf@circ@bipole@path{polarcapacitor}{#1}}
\def\pgf@circ@vcapacitor@path#1{\pgf@circ@bipole@path{vcapacitor}{#1}}
\def\pgf@circ@battery@path#1{\pgf@circ@bipole@path{battery}{#1}}
+\def\pgf@circ@battery1@path#1{\pgf@circ@bipole@path{battery1}{#1}}
\def\pgf@circ@europeaninductor@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}}
\def\pgf@circ@americaninductor@path#1{\pgf@circ@bipole@path{americaninductor}{#1}}
\def\pgf@circ@cuteinductor@path#1{\pgf@circ@bipole@path{cuteinductor}{#1}}
@@ -166,6 +170,7 @@
\def\pgf@circ@short@path#1{\pgf@circ@bipole@path{short}{#1}}
\def\pgf@circ@cspst@path#1{\pgf@circ@bipole@path{cspst}{#1}}
\def\pgf@circ@ospst@path#1{\pgf@circ@bipole@path{ospst}{#1}}
+\def\pgf@circ@pushbutton@path#1{\pgf@circ@bipole@path{pushbutton}{#1}}
\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}}
@@ -175,12 +180,17 @@
\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{}
+\def\pgf@circ@photoresistor@path#1{\pgf@circ@bipole@path{photoresistor}{#1}}
\def\pgf@circ@thyristor@path#1{\pgf@circ@bipole@path{thyristor}{#1}}
+\def\pgf@circ@toggleswitch@path#1{\pgf@circ@bipole@path{toggleswitch}{#1}}
\def\pgf@circ@memristor@path#1{\pgf@circ@bipole@path{memristor}{#1}}
\def\pgf@circ@triac@path#1{\pgf@circ@bipole@path{triac}{#1}}
\def\pgf@circ@tline@path#1{\pgf@circ@bipole@path{tline}{#1}}
\def\pgf@circ@squid@path#1{\pgf@circ@bipole@path{squid}{#1}}
\def\pgf@circ@barrier@path#1{\pgf@circ@bipole@path{barrier}{#1}}
+\def\pgf@circ@thermocouple@path#1{\pgf@circ@bipole@path{thermocouple}{#1}}
+\def\pgf@circ@fuse@path#1{\pgf@circ@bipole@path{fuse}{#1}}
+\def\pgf@circ@afuse@path#1{\pgf@circ@bipole@path{afuse}{#1}}
%% Styles
%% Aggiungere per thyristor e tripoli semplici
@@ -196,6 +206,11 @@
\tikzset{ammeter/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path, l=#1}}
\tikzset{voltmeter/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path, l=#1}}
\tikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@potentiometer@path, l=#1}}
+\tikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@varistor@path, l=#1}}
+\tikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@photoresistor@path, l=#1}}
+\tikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistor@path, l=#1}}
+\tikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorptc@path, l=#1}}
+\tikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorntc@path, l=#1}}
\tikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{potentiometer}{#1}, l=#1}}
\tikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{genericpotentiometer}{#1}, l=#1}}
\tikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vresistor@path, l=#1}}
@@ -205,6 +220,7 @@
\tikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@polarcapacitor@path, l=#1}}
\tikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcapacitor@path, l=#1}}
\tikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\tikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery1@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
\tikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductor@path, l=#1}}
\tikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americaninductor@path, l=#1}}
\tikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteinductor@path, l=#1}}
@@ -248,6 +264,9 @@
\tikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@squid@path}}
\tikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@barrier@path}}
+\tikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermocouple@path}}
+\tikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fuse@path}}
+\tikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}}
@@ -281,6 +300,8 @@
\tikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
\tikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ospst@path, l=#1}}
+\tikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}}
+\tikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@toggleswitch@path}}
\tikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path}}
\tikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path}}
@@ -303,6 +324,10 @@
\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}}
@@ -364,6 +389,9 @@
\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]
@@ -418,7 +446,6 @@
{\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
\pgfmathadd{\pgfmathresult}{-90}
\edef\pgf@circ@direction{\pgfmathresult}
- \ctikzset{bipole/direction = \pgfmathresult}
}
($(\tikztostart) ! .5 ! (\tikztotarget)$)
node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]