diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
8 files changed, 986 insertions, 155 deletions
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.code.tex b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.code.tex index 5a33b71a775..3ed036a7cab 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.code.tex +++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.code.tex @@ -27,6 +27,9 @@ \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} @@ -43,23 +46,40 @@ \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/cute inductor/height/.initial=.3} -\ctikzset{bipoles/cute inductor/width/.initial=.8} -\ctikzset{bipoles/cute inductor/coils/.initial=6} -\ctikzset{bipoles/american inductor/height/.initial=.3} -\ctikzset{bipoles/american inductor/height 2/.initial=.1} -\ctikzset{bipoles/american inductor/width/.initial=.8} -\ctikzset{bipoles/american inductor/coils/.initial=4} +\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/vamerican inductor/height/.initial=.6} -\ctikzset{bipoles/vamerican inductor/height 2/.initial=.2} -\ctikzset{bipoles/vamerican inductor/width/.initial=.8} -\ctikzset{bipoles/vamerican inductor/coils/.initial=4} +\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} @@ -98,6 +118,8 @@ \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} @@ -107,6 +129,10 @@ \ctikzset{bipoles/interr/height 2/.initial=.1} \ctikzset{bipoles/generic/height/.initial=.30} \ctikzset{bipoles/generic/width/.initial=.80} +\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} @@ -115,9 +141,9 @@ \ctikzset{bipoles/memristor/height/.initial=.30} \ctikzset{bipoles/memristor/wave height/.initial=.5} \ctikzset{bipoles/memristor/width/.initial=.80} -\ctikzset{bipoles/tgeneric/height/.initial=.50} +\ctikzset{bipoles/tgeneric/height/.initial=.70} \ctikzset{bipoles/tgeneric/width/.initial=.80} -\ctikzset{bipoles/tfullgeneric/height/.initial=.50} +\ctikzset{bipoles/tfullgeneric/height/.initial=.70} \ctikzset{bipoles/tfullgeneric/width/.initial=.80} \ctikzset{bipoles/fullgeneric/height/.initial=.30} \ctikzset{bipoles/fullgeneric/width/.initial=.80} @@ -140,6 +166,12 @@ \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} \newif\ifpgf@circuit@mos@arrows \ctikzset{tripoles/mos style/.is choice} @@ -242,6 +274,17 @@ \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@circuit@europeanlogicport \ctikzset{logic ports/.is choice} \ctikzset{logic ports/european/.code= {\pgf@circuit@europeanlogicporttrue } } @@ -364,6 +407,10 @@ \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/height/.initial=.85} \ctikzset{tripoles/mixer/width/.initial=.85} \ctikzset{tripoles/mixer/margin/.initial=.75} @@ -382,7 +429,6 @@ \ctikzset{bipole/.is family} -\ctikzset{bipole/direction/.initial = 0} \ctikzset{bipole/kind/.initial = } \ctikzset{bipole/name/.initial = } \newif\ifpgf@circuit@bipole@reversed @@ -467,6 +513,38 @@ \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} diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty index 2d201ce2a5b..0a66adeb372 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty @@ -17,15 +17,15 @@ \NeedsTeXFormat{LaTeX2e} -\def\pgfcircversion{0.2.4} +\def\pgfcircversion{0.3.0} \ProvidesPackage{circuitikz}% - [2009/11/18 The CircuiTikz circuit drawing package version \pgfcircversion] + [2012/12/29 The CircuiTikz circuit drawing package version \pgfcircversion] %% Version 2.0 of pgf/TikZ is required \RequirePackage{tikz} \usetikzlibrary{calc} -\usepgflibrary{decorations.pathmorphing} +\usepgflibrary{decorations.pathmorphing,arrows} \DeclareOption{european}{ \ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european} 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}] diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty index 340b78f14a2..34c11a86c20 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcircbipoles.sty @@ -230,7 +230,7 @@ \pgfusepath{draw} \pgfscope - \pgfsetarrowsend{to} + \pgfsetarrowsend{latex'} \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}} \pgfusepath{draw} @@ -300,14 +300,37 @@ } +%% Battery 1 + +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{ + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}} + + + + + \pgfusepath{draw} +} + + %% cute inductor -\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cute inductor/height}}{cuteinductor}{\ctikzvalof{bipoles/cute inductor/height}}{\ctikzvalof{bipoles/cute inductor/width}}{ - \pgf@circ@res@step=\ctikzvalof{bipoles/cute inductor/width}\pgf@circ@Rlen - \divide \pgf@circ@res@step by \ctikzvalof{bipoles/cute inductor/coils} +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{ + \pgf@circ@res@step=\ctikzvalof{bipoles/cuteinductor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by \ctikzvalof{bipoles/cuteinductor/coils} - \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/cute inductor/height}\pgf@circ@Rlen + \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/cuteinductor/height}\pgf@circ@Rlen \pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude \pgfdecorationsegmentlength = \pgf@circ@res@step \pgfdecorationsegmentaspect=.6 @@ -324,11 +347,11 @@ %% american inductor -\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/american inductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/american inductor/height}}{\ctikzvalof{bipoles/american inductor/width}}{ - \pgf@circ@res@step=\ctikzvalof{bipoles/american inductor/width}\pgf@circ@Rlen - \divide \pgf@circ@res@step by \ctikzvalof{bipoles/american inductor/coils} +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{ + \pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils} - \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/american inductor/height}\pgf@circ@Rlen + \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/americaninductor/height}\pgf@circ@Rlen \pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude \pgfdecorationsegmentlength = 1.9\pgf@circ@res@step @@ -712,15 +735,14 @@ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfscope - \pgfsetarrowsend{to} - \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@up}{.7\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latex'} + \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@up}{.6\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@up}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@up}{.4\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@up}{.8\pgf@circ@res@up}} \pgfusepath{draw} - \endpgfscope } @@ -741,15 +763,14 @@ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfscope - \pgfsetarrowsend{to} - \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@up}{\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{.1\pgf@circ@res@up}{.7\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsstart{latex'} + \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@up}{.6\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@up}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@up}{.8\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@up}{.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@up}{.8\pgf@circ@res@up}} \pgfusepath{draw} - \endpgfscope } %% Black varcap @@ -879,11 +900,12 @@ \pgfusepath{draw} \pgfscope - \pgfsetarrowsend{to} - \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@up}{.7\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latex'} + \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@up}{.6\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@up}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@up}{.4\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@up}{.8\pgf@circ@res@up}} \pgfusepath{draw} \endpgfscope @@ -906,15 +928,14 @@ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfscope - \pgfsetarrowsend{to} - \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@up}{\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{.1\pgf@circ@res@up}{.7\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsstart{latex'} + \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@up}{.6\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@up}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@up}{.8\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@up}{.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@up}{.8\pgf@circ@res@up}} \pgfusepath{draw} - \endpgfscope } %% Empty varcap @@ -948,8 +969,13 @@ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@left}{.9\pgf@circ@res@up}} - \pgfpatharc{65}{15}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen} - \pgfsetarrowsend{to} + \pgfpatharc{65}{25}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen} + %\pgfsetarrowsend{latex'} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{.1\pgf@circ@res@right}{-.25\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.14\pgf@circ@res@right}{-.35\pgf@circ@res@up}} + \pgfsetarrowsend{latex'} \pgfusepath{draw} } @@ -963,12 +989,37 @@ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@right}{.1\pgf@circ@res@down}} - \pgfpatharc{15}{65}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen} - \pgfsetarrowsend{to} - \pgfusepath{draw} + \pgfpatharc{15}{50}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/interr/width}\pgf@circ@Rlen} + %\pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{.85\pgf@circ@res@left}{1.25\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.87\pgf@circ@res@left}{1.26\pgf@circ@res@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@circ@res@left}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{0}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}} + \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}} + \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}} +} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Ammeter @@ -994,27 +1045,24 @@ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} \pgfscope - \pgfpathcircle{\pgfpointorigin}{\pgf@circ@res@up} + \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up} \pgfusepath{draw} \endpgfscope \pgfsetlinewidth{\pgfstartlinewidth} - \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{.8\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.8\pgf@circ@res@down}} + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfnode{circle}{center}{\textbf{A}}{}{} - \pgfscope - \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{.8\pgf@circ@res@up}} - \pgftransformrotate{45} - \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} - \endpgfscope + \pgfsetarrowsend{} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} \pgfusepath{draw} - \pgfusepath{stroke} + \pgfnode{circle}{center}{\textbf{A}}{}{} } %% Voltmeter @@ -1040,27 +1088,25 @@ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} \pgfscope - \pgfpathcircle{\pgfpointorigin}{\pgf@circ@res@up} + \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up} \pgfusepath{draw} \endpgfscope \pgfsetlinewidth{\pgfstartlinewidth} - \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{.8\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.8\pgf@circ@res@down}} + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}} \pgfusepath{draw} - \pgfnode{circle}{center}{\textbf{V}}{}{} - \pgfscope - \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{.8\pgf@circ@res@up}} - \pgftransformrotate{45} - \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} - \endpgfscope + \pgfsetarrowsend{} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} \pgfusepath{draw} - \pgfusepath{stroke} + \pgfnode{circle}{center}{\textbf{V}}{}{} + } %% Short circuit @@ -1077,8 +1123,8 @@ \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/generic/height}}{generic}{\ctikzvalof{bipoles/generic/height}}{\ctikzvalof{bipoles/generic/width}}{ - \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen - \divide \pgf@circ@res@step by 14 + %\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} @@ -1087,12 +1133,28 @@ } +%% fuse + +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/fuse/height}}{fuse}{\ctikzvalof{bipoles/fuse/height}}{\ctikzvalof{bipoles/fuse/width}}{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfusepath{draw} + + \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{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 + %\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} @@ -1104,8 +1166,8 @@ %% Generic asymmetric bipole \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 + %\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} @@ -1117,6 +1179,25 @@ } +%% asymmetric fuse + +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/afuse/height}}{afuse}{\ctikzvalof{bipoles/afuse/height}}{\ctikzvalof{bipoles/afuse/width}}{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfusepath{draw} + + \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{draw} + + \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{stroke,fill} +} + + + %% Memristor @@ -1150,35 +1231,145 @@ %% Generic empty tunable \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tgeneric/height}}{tgeneric}{\ctikzvalof{bipoles/tgeneric/height}}{\ctikzvalof{bipoles/tgeneric/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}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + + \pgfscope + \pgfsetarrowsend{latex'} + \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} - \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}} +%% Photoresistor + +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/photoresistor/height 2}}{photoresistor}{\ctikzvalof{bipoles/photoresistor/height}}{\ctikzvalof{bipoles/photoresistor/width}}{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@down}} \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} \pgfusepath{draw} \pgfscope - \pgfsetarrowsend{to} - \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfsetarrowsend{latex'} + \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{-1.2\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@right}{-1.2\pgf@circ@res@down}} \pgfusepath{draw} \endpgfscope } + + + +%% Thermistor +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistor/height}}{thermistor}{\ctikzvalof{bipoles/thermistor/height}}{\ctikzvalof{bipoles/thermistor/width}}{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + + %\pgfscope + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + %\endpgfscope +} + + +%% Thermistor PTC +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorptc/height 2}}{thermistorptc}{\ctikzvalof{bipoles/thermistorptc/height}}{\ctikzvalof{bipoles/thermistorptc/width}}{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$} + \pgfsetarrowsend{latex'} + \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}} + \pgfusepath{draw} +} + +%% Thermistor NTC +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$} + \pgfsetarrowsend{latex'} + \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} +} + +%% thermocouple +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermocouple/height 2}}{thermocouple}{\ctikzvalof{bipoles/thermocouple/height}}{\ctikzvalof{bipoles/thermocouple/width}}{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfusepath{draw} +} + +%% Varistor +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varistor/height}}{varistor}{\ctikzvalof{bipoles/varistor/height}}{\ctikzvalof{bipoles/varistor/width}}{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgftext[top,x=.65\pgf@circ@res@left,y=1.2\pgf@circ@res@down]{{\tiny\textsf{U}}} +} + + + %% Generic full tunable \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tfullgeneric/height}}{tfullgeneric}{\ctikzvalof{bipoles/tfullgeneric/height}}{\ctikzvalof{bipoles/tfullgeneric/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}{.5\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}} \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} \pgfusepath{draw,fill} \pgfscope - \pgfsetarrowsend{to} - \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfsetarrowsend{latex'} + \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfusepath{draw} \endpgfscope } @@ -1203,7 +1394,7 @@ \pgfusepath{stroke} \pgfscope - \pgfsetarrowsend{to} + \pgfsetarrowsend{latex'} \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfusepath{draw} @@ -1213,11 +1404,11 @@ %% variable american inductor -\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamerican inductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamerican inductor/height}}{\ctikzvalof{bipoles/vamerican inductor/width}}{ - \pgf@circ@res@step=\ctikzvalof{bipoles/vamerican inductor/width}\pgf@circ@Rlen - \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamerican inductor/coils} +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{ + \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils} - \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/vamerican inductor/height}\pgf@circ@Rlen + \pgfdecorationsegmentamplitude=\ctikzvalof{bipoles/vamericaninductor/height}\pgf@circ@Rlen \pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude \pgfdecorationsegmentamplitude=.5\pgfdecorationsegmentamplitude % per freccia \pgfdecorationsegmentlength = 1.9\pgf@circ@res@step @@ -1230,7 +1421,7 @@ \pgfusepath{stroke} \pgfscope - \pgfsetarrowsend{to} + \pgfsetarrowsend{latex'} \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfusepath{draw} @@ -1255,7 +1446,7 @@ \pgfusepath{draw} \pgfscope - \pgfsetarrowsend{to} + \pgfsetarrowsend{latex'} \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} \pgfusepath{draw} @@ -1343,22 +1534,23 @@ \pgfusepath{draw} } -% Contributed by Leonardo Azzinnari \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/tline/height} }{tline}{\ctikzvalof{bipoles/tline/height} }{\ctikzvalof{bipoles/tline/width} - }{\pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - \pgfpathellipse{\pgfpoint{0.5\pgf@circ@res@step}{0\pgf@circ@res@step} - }{\pgfpoint{0.125\pgf@circ@res@step}{0\pgf@circ@res@step} - }{\pgfpoint{0\pgf@circ@res@step}{0.25\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step+0.125\pgf@circ@res@step}{0.25\pgf@circ@res@step}} - \pgfpatharc{-90}{90}{-0.125\pgf@circ@res@step and -0.25\pgf@circ@res@step} - \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}} - \pgfusepath{draw} - } + } + { + \pgf@circ@res@step=.2\pgf@circ@res@right % half x axis + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0}} + {\pgfpoint{\pgf@circ@res@step}{0}} + {\pgfpoint{0}{-\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpatharc{-90}{90}{-\pgf@circ@res@step and -\pgf@circ@res@up} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgfusepath{draw} +} diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcircmonopoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcircmonopoles.sty index 569c12039e6..80de0b7be64 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/pgfcircmonopoles.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcircmonopoles.sty @@ -50,6 +50,160 @@ } + +\pgfdeclareshape{rground}{ + \anchor{center}{ + \pgfpointorigin + } + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + + \pgfsetlinewidth{\pgfstartlinewidth} + + \endpgfscope + } + +} + +\pgfdeclareshape{sground}{ + \anchor{center}{ + \pgfpointorigin + } + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}} + \pgfpathclose + \pgfusepath{draw} + + + \pgfsetlinewidth{\pgfstartlinewidth} + + \endpgfscope + } + +} + +% noiseless ground +\pgfdeclareshape{nground}{ + \anchor{center}{ + \pgfpointorigin + } + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{1.3\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpatharc{0}{180}{1.3\pgf@circ@res@step} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \endpgfscope + } +} + +% protective ground +\pgfdeclareshape{pground}{ + \anchor{center}{ + \pgfpointorigin + } + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathcircle{\pgfpoint{0pt}{-\pgf@circ@res@step}} {1.2\pgf@circ@res@step} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \endpgfscope + } +} + +% chassis ground +\pgfdeclareshape{cground}{ +\anchor{center}{ + \pgfpointorigin +} +\behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/chassis/width}\pgf@circ@Rlen + + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-1.5\pgf@circ@res@step}{-2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}} + \pgfusepath{draw} + \endpgfscope + } +} + % Contributed by Leonardo Azzinnari \pgfdeclareshape{tlinestub}{ \anchor{center}{\pgfpointorigin} diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty index 33e63e6be85..723084851d1 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty @@ -210,6 +210,159 @@ } + + % contrib Kristofer M. Monisit + + \pgfdeclareshape{fd op amp} + { + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y + \pgf@y=.5\pgf@y + \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x + \pgf@x=.5\pgf@x + } + \anchor{south}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + } + \savedanchor\left{% + \pgf@y=0pt + } + \savedanchor\inOne{% + \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x + \pgf@x=.5\pgf@x + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + \savedanchor\up{% + \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y + \pgf@y=.5\pgf@y + \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{0pt}} + } + \anchor{up}{ + \up + } + \anchor{down}{ + \up + \pgf@y=-\pgf@y + } + \anchor{out +}{ + \northwest + \pgf@y=.5\pgf@y + \pgf@x=-.7\pgf@x + } + \anchor{out -}{ + \northwest + \pgf@y=-.5\pgf@y + \pgf@x=-.7\pgf@x + } + \anchor{west}{ + \left + } + \anchor{east}{ + \left + \pgf@x=-\pgf@x + } + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + % Negative input terminal + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\scriptsize\ $-$} + + + % Positive input terminal + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\scriptsize\ $+$} + + + % Negative output terminal + \pgfpathmoveto{\pgfpoint + {0.7\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@down}]{\scriptsize\ $-$} + + + % Positive output terminal + \pgfpathmoveto{\pgfpoint + {0.7\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\scriptsize\ $+$} + + + % Draw them all! + \pgfusepath{draw} + + % Triangle + \pgfscope + \pgfsetlinewidth{2\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfusepath{draw} + \endpgfscope + } + } + + + + \pgfcircdeclarequadpole{transformer}{ \pgf@circ@drawtransformerbasicbody @@ -270,3 +423,4 @@ \pgfusepath{draw} }{} + diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty index d077f87b73b..f40391c3853 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty @@ -1560,22 +1560,6 @@ % IGFET (e.g. MOSFET) \long\def\pgfcircdeclarefet#1#2#3{ \pgfcircdeclaretransistor{#1}{ - \anchor{G}{ - \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} - \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x - \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} - \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y - \pgf@y=.5\pgf@y - \pgf@y= -\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@y - } - \anchor{gate}{ - \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} - \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x - \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} - \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y - \pgf@y=.5\pgf@y - \pgf@y= -\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@y - } \anchor{B}{ \left \pgf@x=\pgf@circ@res@right @@ -1606,6 +1590,12 @@ \northeast \pgf@y=-\pgf@y } + \anchor{G}{ + \left + } + \anchor{gate}{ + \left + } }{% \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} @@ -1699,6 +1689,13 @@ \northeast \pgf@y=-\pgf@y } + \anchor{G}{ + \left + } + \anchor{gate}{ + \left + } + }{% \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} @@ -1799,6 +1796,16 @@ \northeast \pgf@y=-\pgf@y } + \anchor{G}{ + \northeast + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y + \left + \pgf@y=-\pgf@circ@res@step + } + \anchor{gate}{ + \northeast + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y + } }{% \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % DRAIN CONNECTION @@ -1900,6 +1907,17 @@ \northeast \pgf@y=-\pgf@y } + \anchor{G}{ + \northeast + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y + \left + \pgf@y=-\pgf@circ@res@step + } + \anchor{gate}{ + \northeast + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y + } + }{% \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % DRAIN CONNECTION @@ -1990,6 +2008,16 @@ \northeast \pgf@y=-\pgf@y } + \anchor{G}{ + \northeast + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y + \left + \pgf@y=-\pgf@circ@res@step + } + \anchor{gate}{ + \northeast + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y + } }{% \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % DRAIN CONNECTION @@ -2099,6 +2127,16 @@ \northeast \pgf@y=-\pgf@y } + \anchor{G}{ + \northeast + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y + \left + \pgf@y=-\pgf@circ@res@step + } + \anchor{gate}{ + \northeast + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y + } }{% \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % DRAIN CONNECTION @@ -2362,6 +2400,7 @@ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2370,6 +2409,118 @@ +% ISFET +\pgfcircdeclarefet{isfet}{ + \anchor{D}{ + \northeast + } + \anchor{drain}{ + \northeast + } + \anchor{S}{ + \northeast + \pgf@y=-\pgf@y + } + \anchor{source}{ + \northeast + \pgf@y=-\pgf@y + } +}{% + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + % DRAIN CONNECTION + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}} + % DRAIN + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}} + \pgfusepath{draw} + + % GATE, DEPLETION TYPE + \pgfscope %% added + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@down}} + \pgfsetlinewidth{2\pgflinewidth} %% added + \pgfusepath{draw} %% added + \endpgfscope %% added + + % BULK + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgf@circ@res@up+\pgf@circ@res@down}} + + % SOURCE + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}} + % SOURCE CONNECTION + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + + % GATE + %\pgfscope + %\pgfpathmoveto{\pgfpoint + % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left} + % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}} + %\pgfpathlineto{\pgfpoint + % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate width}\pgf@circ@res@left} + % {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}} + %\pgfsetlinewidth{2\pgflinewidth} + %\pgfusepath{draw} + %\endpgfscope + + % ARROW + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + \pgftransformlineattime{.6}{% + \pgfpoint + {\pgf@circ@res@right}% + {\pgf@circ@res@up+\pgf@circ@res@down}% + }{% + \pgfpoint% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}% + {\pgf@circ@res@up+\pgf@circ@res@down}% + } + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + \pgfusepath{draw} + + % Wavy lines + \pgfscope + \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{0cm}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + +} @@ -2503,6 +2654,53 @@ +\pgfcircdeclarebipole{ + \anchor{out 1}{ + \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi + \pgf@y=0cm + } + \anchor{out 2}{ + \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi + \pgf@y=.8\pgf@y + } +}{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@left}{0pt}} + \pgfusepath{draw} + \pgfscope + \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@left}{0pt}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{.5\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{0}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.15\pgf@circ@res@up}} + \pgfusepath{draw} + + + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetdash{{.08\pgf@circ@res@up}{.04\pgf@circ@res@up}{.7\pgf@circ@res@up}{.04\pgf@circ@res@up}{.8\pgf@circ@res@up}}{0cm} + \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@left}{.6\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{.2\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfsetdash{}{0cm} +} + + + + @@ -2599,7 +2797,7 @@ \pgfpathlineto{\pgfpoint {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} - \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\ $-$} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\scriptsize\ $-$} \pgfpathmoveto{\pgfpoint @@ -2608,7 +2806,7 @@ \pgfpathlineto{\pgfpoint {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} - \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\ $+$} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\scriptsize\ $+$} \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} @@ -2634,7 +2832,7 @@ } } - + @@ -2673,8 +2871,8 @@ \pgfusepath{draw} \pgfscope - \pgfsetlinewidth{\pgfstartlinewidth} - \pgfsetarrowsend{to} + %\pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latex'} \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}} \pgfusepath{draw} @@ -2682,7 +2880,10 @@ } -%% Generic bipole - used as resistor by some (bleah) + + + +%% Generic tunable \pgfcircdeclarebipole{ \anchor{wiper}{ @@ -2700,8 +2901,8 @@ \pgfusepath{draw} \pgfscope - \pgfsetlinewidth{\pgfstartlinewidth} - \pgfsetarrowsend{to} + %\pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latex'} \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}} \pgfusepath{draw} diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcircvoltage.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcircvoltage.sty index bccd7eb9859..c453a5d6c3d 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/pgfcircvoltage.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcircvoltage.sty @@ -85,20 +85,29 @@ \else \def\pgf@circ@voltage@angle{-90} \fi + + \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node} + \pgfkeysifdefined{\pgf@temp} + { \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} } + { \edef\distacefromnode{\ctikzvalof{voltage/distance from node}} } + \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b} + \pgfkeysifdefined{\pgf@temp} + { \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} } + { \edef\bumpb{\ctikzvalof{voltage/bump b}} } } - coordinate (pgfcirc@mid) at ($(\tikztostart) ! \ctikzvalof{voltage/distance from node} ! (\ctikzvalof{bipole/name}.left)$) + coordinate (pgfcirc@mid) at ($(\tikztostart) ! \distacefromnode ! (\ctikzvalof{bipole/name}.left)$) coordinate (pgfcirc@Vfrom) at ($(pgfcirc@mid) ! -\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen ! \pgf@circ@voltage@angle:(\ctikzvalof{bipole/name}.left)$) - - coordinate (pgfcirc@mid) at ($(\tikztotarget) ! \ctikzvalof{voltage/distance from node} ! (\ctikzvalof{bipole/name}.right)$) + + coordinate (pgfcirc@mid) at ($(\tikztotarget) ! \distacefromnode ! (\ctikzvalof{bipole/name}.right)$) coordinate (pgfcirc@Vto) at ($(pgfcirc@mid) ! \ctikzvalof{voltage/distance from line}\pgf@circ@Rlen ! \pgf@circ@voltage@angle : (\ctikzvalof{bipole/name}.right)$) \ifpgf@circuit@bipole@voltage@below - coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump b} ! (\ctikzvalof{bipole/name}.-110)$) - coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump b} ! (\ctikzvalof{bipole/name}.-70)$) + coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$) + coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$) \else - coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump b} ! (\ctikzvalof{bipole/name}.110)$) - coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump b} ! (\ctikzvalof{bipole/name}.70)$) + coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.110)$) + coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.70)$) \fi \ifpgf@circuit@europeanvoltage @@ -113,10 +122,10 @@ \fi \else \ifpgf@circuit@bipole@voltage@backward - (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$} + (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$} (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$} \else - (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$} + (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$} (pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$} \fi \fi @@ -143,11 +152,22 @@ \else % american voltage \pgfextra{ - \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}} + \def\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}} \def\pgf@circ@temp{battery} + \ifx\pgf@temp\pgf@circ@temp + \edef\pgf@circ@batteria{battery} + \else + \def\pgf@circ@temp{battery1} + \ifx\pgf@temp\pgf@circ@temp + \edef\pgf@circ@batteria{battery} + \else + \edef\pgf@circ@batteria{false} + \fi + \fi + \edef\pgf@circ@temp{battery} } - \ifx\pgf@temp\pgf@circ@temp % if it is a battery, must put + and - + \ifx\pgf@circ@batteria\pgf@circ@temp % if it is a battery, must put + and - \ifpgf@circuit@bipole@voltage@backward (pgfcirc@Vcont2) node {$-$} (pgfcirc@Vcont1) node {$+$} \else @@ -162,8 +182,7 @@ \def\pgf@circ@drawvoltage{ % node name \pgfextra{ - \edef\pgf@circ@ffffff{\ctikzvalof{bipole/direction}} - \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil} + \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86 \ifpgf@circuit@bipole@voltage@below @@ -207,24 +226,29 @@ \else\def\pgf@circ@bipole@voltage@label@anchor{south west} \fi \fi\fi - \ifnum\pgfcircmathresult <5 + \ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5 \ifpgf@circuit@bipole@voltage@below \def\pgf@circ@bipole@voltage@label@anchor{north} \else\def\pgf@circ@bipole@voltage@label@anchor{south} \fi - \fi - \ifnum\pgfcircmathresult >355 + \fi\fi + \ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361 \ifpgf@circuit@bipole@voltage@below \def\pgf@circ@bipole@voltage@label@anchor{north} \else\def\pgf@circ@bipole@voltage@label@anchor{south} \fi - \fi + \fi\fi \ifpgf@circuit@bipole@voltage@below \def\pgf@circ@bipole@voltage@label@where{-90} \else \def\pgf@circ@bipole@voltage@label@where{90} \fi + + \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance} + \pgfkeysifdefined{\pgf@temp} + { \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} } + { \edef\eudist{\ctikzvalof{voltage/european label distance}} } } \ifpgf@circuit@bipole@isvoltage @@ -232,9 +256,9 @@ \else \pgf@circ@drawvoltagegeneric \fi - + (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where) coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) ! - \ifpgf@circuit@europeanvoltage\ctikzvalof{voltage/european label distance}\else\ctikzvalof{voltage/american label distance}\fi ! + \ifpgf@circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi ! (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)$) node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=0] at (Vlab) { \pgf@circ@finallabel{voltage/} } @@ -242,6 +266,7 @@ + \endinput coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! |