diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex | 142 |
1 files changed, 108 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex index b30e741458d..c1292d49690 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex @@ -1,7 +1,7 @@ -% Copyright 2018-2024 by Romano Giannetti -% Copyright 2015-2024 by Stefan Lindner -% Copyright 2013-2024 by Stefan Erhardt -% Copyright 2007-2024 by Massimo Redaelli +% Copyright 2018-2025 by Romano Giannetti +% Copyright 2015-2025 by Stefan Lindner +% Copyright 2013-2025 by Stefan Erhardt +% Copyright 2007-2025 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -1966,6 +1966,9 @@ \ctikzset{bipoles/battery1/width/.initial=.3} \ctikzset{bipoles/battery2/height/.initial=.6} \ctikzset{bipoles/battery2/width/.initial=.3} +\ctikzset{bipoles/solar/height/.initial=.6} +\ctikzset{bipoles/solar/width/.initial=.3} + % noise sources \ctikzset{bipoles/noise sources/fillcolor/.initial=gray!50} @@ -2139,6 +2142,41 @@ \pgfusepath{draw} } +% Solar cell +\pgfcircdeclarebipolescaled{batteries} +{} +{\ctikzvalof{bipoles/solar/height}} +{solar} +{\ctikzvalof{bipoles/solar/height}} +{\ctikzvalof{bipoles/solar/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} + + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \ifpgf@circ@fixbatteries + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfsetlinewidth{3\pgflinewidth} + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}} + \else + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfsetlinewidth{3\pgflinewidth} + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}} + \fi + + \pgfusepath{draw} + \pgf@circ@draw@pdarrows +} + %%% %%% https://xkcd.com/2818/ %%% Also https://chat.stackexchange.com/transcript/message/64238058#64238058 @@ -3441,6 +3479,9 @@ \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true} \pgfcirc@activate@bipole@opt{v}{batterytwo}{battery2}{battery2}{\circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true} +\pgfcirc@activate@bipole@opt{v}{solarsource}{solar}{solar}{\circuitikzbasekey/bipole/is voltage=true, + \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true} + %% Sources: voltage \pgfcirc@activate@bipole@opt{v}{vsource}{vsource}{european voltage source}{% @@ -3463,6 +3504,11 @@ \pgfcirc@style@to@style{controlled voltage source}{cvsource} \pgfcirc@style@to@style{controlled voltage source}{controlled vsource} \pgfcirc@style@to@style{controlled voltage source}{cV} +%% fix the mess about not having the shortcut accessible in every mode... +\pgfcirc@style@to@style{american voltage source}{vsourceAM} +\pgfcirc@style@to@style{american controlled voltage source}{cvsourceAM} +\pgfcirc@style@to@style{european voltage source}{vsourceEU} +\pgfcirc@style@to@style{european controlled voltage source}{cvsourceEU} \pgfcirc@activate@bipole@simple@opt{v}{esource}{% \circuitikzbasekey/bipole/is voltage=true, @@ -3558,6 +3604,11 @@ \pgfcirc@style@to@style{controlled current source}{cisource} \pgfcirc@style@to@style{controlled current source}{controlled isource} \pgfcirc@style@to@style{controlled current source}{cI} +%% fix the mess about not having the shortcut accessible in every mode... +\pgfcirc@style@to@style{american current source}{isourceAM} +\pgfcirc@style@to@style{american controlled current source}{cisourceAM} +\pgfcirc@style@to@style{european current source}{isourceEU} +\pgfcirc@style@to@style{european controlled current source}{cisourceEU} \pgfcirc@activate@bipole@opt{i}{isourcesin}{isourcesin}{sinusoidal current source}{% \circuitikzbasekey/bipole/is current=true} @@ -3684,6 +3735,13 @@ }} % +% Whiskers for ZZener and TVS +% +\newif\ifpgf@zz@straightwhisk +\pgf@zz@straightwhiskfalse +\ctikzset{diode straight whiskers/.code=\pgf@zz@straightwhisktrue} +\ctikzset{diode sloped whiskers/.code=\pgf@zz@straightwhiskfalse} +% % Flipping arrows in LED and photodiodes % \newif\ifpgf@led@fliparrows @@ -3777,10 +3835,15 @@ { \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgf@circ@fulldiode@triangle@shift - \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-0.5\pgf@circ@res@up}} + \ifpgf@zz@straightwhisk + \edef\@@tmp{0.0} + \else + \edef\@@tmp{0.5} + \fi + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-\@@tmp\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-0.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-\@@tmp\pgf@circ@res@down}} \pgfusepath{draw} } @@ -4062,10 +4125,15 @@ \pgfscope \pgf@circ@basicdiodeshape - \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-0.5\pgf@circ@res@up}} + \ifpgf@zz@straightwhisk + \edef\@@tmp{0.0} + \else + \edef\@@tmp{0.5} + \fi + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-\@@tmp\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-0.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-\@@tmp\pgf@circ@res@down}} \pgfusepath{draw} \endpgfscope } @@ -4243,10 +4311,15 @@ \pgftransformxshift{\pgf@circ@res@left} \pgf@circ@basicdiodeshape \endpgfscope - \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{1.3\pgf@circ@res@up}} + \ifpgf@zz@straightwhisk + \edef\@@tmp{1.0} + \else + \edef\@@tmp{1.3} + \fi + \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{\@@tmp\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} - \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{1.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{\@@tmp\pgf@circ@res@down}} \pgfusepath{draw} \endpgfscope } @@ -4271,10 +4344,15 @@ \pgftransformxshift{\pgf@circ@res@left} \pgf@circ@fulldiode@triangle@shift \endpgfscope - \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{1.3\pgf@circ@res@up}} + \ifpgf@zz@straightwhisk + \edef\@@tmp{1.0} + \else + \edef\@@tmp{1.3} + \fi + \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{\@@tmp\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} - \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{1.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{\@@tmp\pgf@circ@res@down}} \pgfusepath{draw} } @@ -4752,6 +4830,8 @@ \pgfcirc@style@to@style{#1 agtobar}{aGTOb#2} \pgfcirc@node@to@style{l}{emptytriac}{#1 triac}{\circuitikzbasekey/bipole/is strokedsymbol=true} \pgfcirc@style@to@style{#1 triac}{Tr#2} + \pgfcirc@node@to@style{l}{emptytvsdiode}{#1 tvsdiode}{\circuitikzbasekey/bipole/is strokedsymbol=true} + \pgfcirc@style@to@style{#1 tvsdiode}{Tr#2} } \pgfcirc@tmp@generatestrokeddiodes{stroke}{-} \def\pgfcircdiodestylemacro{\ifpgf@circuit@strokediode stroke \else\ifpgf@circuit@fulldiode full \else empty \fi\fi} @@ -7066,9 +7146,10 @@ % \ctikzset{bipoles/squid/height/.initial=.60} \ctikzset{bipoles/squid/width/.initial=.60} -\ctikzset{bipoles/barrier/height/.initial=.60} -\ctikzset{bipoles/barrier/width/.initial=.60} -\ctikzset{bipoles/openbarrier/gap/.initial=0.5} +\ctikzset{bipoles/barrier/height/.initial=.21} +\ctikzset{bipoles/barrier/width/.initial=.0} +\ctikzset{bipoles/openbarrier/width/.initial=.3} +\ctikzset{bipoles/openbarrier/gap/.initial=1} \ctikzset{bipoles/thermocouple/height/.initial=.250} \ctikzset{bipoles/thermocouple/height 2/.initial=.60} \ctikzset{bipoles/thermocouple/width/.initial=.140} @@ -7343,46 +7424,39 @@ {\ctikzvalof{bipoles/barrier/height}} {\ctikzvalof{bipoles/barrier/width}} { - \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} - \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}} - \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}} - \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}} - + \pgfusepath{draw} + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@down}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@up}{\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@down}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@up}{\pgf@circ@res@up}} \pgfusepath{draw} } -% % open version of the barrier symbol % suggested by Radványi Patrik Tamás <patrikradvanyi@gmail.com> -% \pgfcircdeclarebipolescaled{misc} {} {\ctikzvalof{bipoles/barrier/height}} {openbarrier} {\ctikzvalof{bipoles/barrier/height}} -{\ctikzvalof{bipoles/barrier/width}} +{\ctikzvalof{bipoles/openbarrier/width}} { - % this is set with normal wire linewidth \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/openbarrier/gap}*\pgf@circ@res@left}{0pt}} \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/openbarrier/gap}*\pgf@circ@res@right}{0pt}} \pgfusepath{draw} - - % do the cross part \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}} - \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}} - \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}} - + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@down}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@up}{\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@down}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@up}{\pgf@circ@res@up}} \pgfusepath{draw} } + %% Lamp \pgfcircdeclarebipolescaled{misc} {} |