summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex221
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex240
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex28
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
5 files changed, 429 insertions, 68 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index 816eb2cef2..8972832190 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.5.3}
-\def\pgfcircversiondate{2022/07/02}
+\def\pgfcircversion{1.5.4}
+\def\pgfcircversiondate{2022/09/09}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index 0908574829..8fd93c0873 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -4381,7 +4381,7 @@
% %>>>
%%%%%%%%%%%%%
-%% switches and buttons
+%% switches, buttons and jumpers
%%%%%%%%%%%%%
%% Definitions for switches%<<<1
@@ -5166,6 +5166,225 @@
\pgfcirc@node@to@path{proximeter}{inline proximeter}{}
% %>>>
+% jumpers: definitions and code %<<<
+% definitons for jumpers
+\ctikzset{bipoles/jumper/width/.initial=0.4}
+\ctikzset{bipoles/tjumper/width/.initial=0.6}% normally is less than 0.4*2
+\ctikzset{tjumper connections/.initial=00}% bare-bare
+\ctikzset{bipoles/jumper/height/.initial=0.4}
+\ctikzset{bipoles/jumper/depth/.initial=0.1}
+\ctikzset{bipoles/jumper/shape/.initial=ocirc}
+\ctikzset{bipoles/jumper/curvature/.initial=2} % curvature of the arc
+\ctikzset{bipoles/jumper/open shift/.initial=3} % displacement to open the arc
+
+% jumpers
+% simple jumpers
+% #1 -> name
+% #2 -> height of the link arc (0 means no link, 1 closed, 2 open)
+\long\def\pgfcircdeclarejumper#1#2{
+ \pgfcircdeclarebipolescaled{switches}
+ {
+ % This is the radius of the "ocirc" shape (see pgfcircshapes.tex)
+ \saveddimen{\radius}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\ctikzvalof{nodes width}}}
+ % shapename
+ \savedmacro{\thisshape}{\edef\thisshape{\tikz@fig@name}}
+ % shape type
+ \savedmacro{\cshape}{\edef\cshape{\ctikzvalof{bipoles/jumper/shape}}}
+ % arc characteristics (can vary, must be saved...)
+ \savedmacro{\curvature}{\edef\curvature{\ctikzvalof{bipoles/jumper/curvature}}}
+ \savedmacro{\openshift}{\edef\openshift{\ctikzvalof{bipoles/jumper/open shift}}}
+ %
+ \anchor{cout}{\northeast \pgf@y=0cm}
+ \anchor{cin}{\southwest\pgf@y=0cm}
+ \anchor{out}{\northeast \pgf@y=0cm\advance\pgf@x by \radius}
+ \anchor{in}{\southwest\pgf@y=0cm\advance\pgf@x by -\radius}
+ \anchor{text}{\northeast
+ \pgf@x=\dimexpr -.5\wd\pgfnodeparttextbox\relax
+ \advance\pgf@y by .6\ht\pgfnodeparttextbox\relax
+ }
+ \anchor{top arc}{\northeast
+ \pgf@circ@res@other=\pgf@x
+ \pgf@circ@res@temp=\radius
+ \ifnum #2=1 \edef\@@b{1}\else\edef\@@b{\openshift}\fi
+ \pgfpointcurveattime{0.5}
+ {\pgfpoint{-0.9\pgf@circ@res@other}{{(\@@b)*\radius}}}
+ {\pgfpoint{-0.5\pgf@circ@res@other}{{(\@@b+\curvature)*\radius}}}
+ {\pgfpoint{0.5\pgf@circ@res@other}{{(\@@b+\curvature)*\radius}}}
+ {\pgfpoint{0.9\pgf@circ@res@other}{{(\@@b)*\radius}}}
+ }
+ }
+ {\ctikzvalof{bipoles/jumper/depth}}
+ {#1}
+ {\ctikzvalof{bipoles/jumper/height}}
+ {\ctikzvalof{bipoles/jumper/width}}{
+ %
+ \ifnum #2=0 \else
+ \ifnum #2=1 \edef\@@b{1}\else\edef\@@b{\openshift}\fi
+ \pgfpathmoveto{\pgfpoint{0.9*\pgf@circ@res@left}{(\@@b)*\radius}}
+ \pgfpathcurveto
+ {\pgfpoint{.5\pgf@circ@res@left}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{.5\pgf@circ@res@right}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{0.9*\pgf@circ@res@right}{(\@@b)*\radius}}
+ \pgfusepath{draw}
+ \fi
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfnode{\cshape}{center}{}{\thisshape-in}{\pgfusepath{draw}}
+ \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}}
+ \pgfnode{\cshape}{center}{}{\thisshape-out}{\pgfusepath{draw}}
+ }
+}
+\pgfcircdeclarejumper{bjumper}{0}
+\pgfcircdeclarejumper{cjumper}{1}
+\pgfcircdeclarejumper{ojumper}{2}
+\pgfcirc@activate@bipole{l}{bjumper}{bjumper}{bare jumper}
+\pgfcirc@activate@bipole{l}{ojumper}{ojumper}{open jumper}
+\pgfcirc@activate@bipole{l}{cjumper}{cjumper}{closed jumper}
+% jumpers
+% three pins (two-ways) jumpers
+% #1 -> name
+% #2 -> height of the first link arc (0 means no link, 1 closed, 2 open)
+% #3 -> height of the second link arc (0 means no link, 1 closed, 2 open)
+\def\pgf@circ@tjumper@splitstatus#1#2\relax{%split the two values
+ \edef\@@a{#1}\edef\@@b{#2}%
+}
+\pgfcircdeclarebipolescaled{switches}
+ {
+ % This is the radius of the "ocirc" shape (see pgfcircshapes.tex)
+ \saveddimen{\radius}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\ctikzvalof{nodes width}}}
+ % shapename
+ \savedmacro{\thisshape}{\def\thisshape{\tikz@fig@name}}
+ % shape type
+ \savedmacro{\cshape}{\def\cshape{\ctikzvalof{bipoles/jumper/shape}}}
+ % arc characteristics (can vary, must be saved...)
+ \savedmacro{\curvature}{\edef\curvature{\ctikzvalof{bipoles/jumper/curvature}}}
+ \savedmacro{\openshift}{\edef\openshift{\ctikzvalof{bipoles/jumper/open shift}}}
+ \savedmacro{\jumpertype}{\edef\jumpertype{\ctikzvalof{tjumper connections}}}
+ %
+ \anchor{cout}{\northeast \pgf@y=0cm}
+ \anchor{cin}{\southwest\pgf@y=0cm}
+ \anchor{ctap}{\pgf@x=0cm\pgf@y=0cm}
+ \anchor{out}{\northeast \pgf@y=0cm\advance\pgf@x by \radius}
+ \anchor{in}{\southwest\pgf@y=0cm\advance\pgf@x by -\radius}
+ \anchor{tap}{\pgf@x=0cm\pgf@y=0cm\advance\pgf@y by -\radius}
+ \anchor{top arc left}{\northeast
+ \pgf@circ@res@other=-\pgf@x
+ \pgf@circ@res@temp=\pgf@x
+ %
+ % read the status of the jumper
+ %
+ \expandafter\pgf@circ@tjumper@splitstatus\jumpertype\relax% a bit of magic...
+ \edef\@@S{S}%the "S" letter
+ \ifx\@@a\@@S %span, it's in the center
+ \ifnum \@@b=0\pgfpointorigin\else % no arc, anchor on the center-base
+ \ifnum \@@b=2 \edef\@@b{\openshift} \else \edef\@bb{1}\relax \fi
+ \pgfpointcurveattime{0.5}
+ {\pgfpoint{0.9*\pgf@circ@res@other}{(\@@b)*\radius}}
+ {\pgfpoint{.5*\pgf@circ@res@other}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{.5*\pgf@circ@res@temp}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{0.9*\pgf@circ@res@temp}{(\@@b)*\radius}}
+ \fi
+ \else
+ % adjust the lengths of the gap, if needed
+ \ifnum \@@a=2 \edef\@@a{\openshift} \else \edef\@aa{1} \relax \fi
+ \ifnum \@@b=2 \edef\@@b{\openshift} \else \edef\@bb{1} \relax \fi
+ % left join
+ \ifnum \@@a=0 \pgfpoint{0.475*\pgf@circ@res@other}{0pt}\else
+ \pgfpointcurveattime{0.5}
+ {\pgfpoint{0.95*\pgf@circ@res@other}{\@@a*\radius}}
+ {\pgfpoint{.75*\pgf@circ@res@other}{(\@@a+\curvature)*\radius}}
+ {\pgfpoint{.25*\pgf@circ@res@other}{(\@@a+\curvature)*\radius}}
+ {\pgfpoint{0.05*\pgf@circ@res@other}{\@@a*\radius}}
+ \fi
+ \fi
+ }
+ \anchor{top arc right}{\northeast
+ \pgf@circ@res@other=-\pgf@x
+ \pgf@circ@res@temp=\pgf@x
+ %
+ % read the status of the jumper
+ %
+ \expandafter\pgf@circ@tjumper@splitstatus\jumpertype\relax% a bit of magic...
+ \edef\@@S{S}%the "S" letter
+ \ifx\@@a\@@S %span, it's in the center
+ \ifnum \@@b=0\pgfpointorigin\else % no arc, anchor on the center-base
+ \ifnum \@@b=2 \edef\@@b{\openshift} \else \edef\@bb{1}\relax \fi
+ \pgfpointcurveattime{0.5}
+ {\pgfpoint{0.9*\pgf@circ@res@other}{(\@@b)*\radius}}
+ {\pgfpoint{.5*\pgf@circ@res@other}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{.5*\pgf@circ@res@temp}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{0.9*\pgf@circ@res@temp}{(\@@b)*\radius}}
+ \fi
+ \else
+ % adjust the lengths of the gap, if needed
+ \ifnum \@@a=2 \edef\@@a{\openshift} \else \edef\@aa{1} \relax \fi
+ \ifnum \@@b=2 \edef\@@b{\openshift} \else \edef\@bb{1} \relax \fi
+ % right join
+ \ifnum \@@b=0 \pgfpoint{0.475*\pgf@circ@res@temp}{0pt}\else
+ \pgfpointcurveattime{0.5}
+ {\pgfpoint{0.95*\pgf@circ@res@temp}{\@@b*\radius}}
+ {\pgfpoint{.75\pgf@circ@res@temp}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{.25\pgf@circ@res@temp}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{0.05*\pgf@circ@res@temp}{\@@b*\radius}}
+ \fi
+ \fi
+ }
+ }
+ {\ctikzvalof{bipoles/jumper/depth}}
+ {tjumper}
+ {\ctikzvalof{bipoles/jumper/height}}
+ {\ctikzvalof{bipoles/tjumper/width}}{
+ %
+ % read the status of the jumper
+ %
+ \expandafter\pgf@circ@tjumper@splitstatus\jumpertype\relax% a bit of magic...
+ \edef\@@S{S}%the "S" letter
+ \ifx\@@a\@@S %span
+ \ifnum \@@b=0 \else
+ \ifnum \@@b=2 \edef\@@b{\openshift} \else \edef\@bb{1}\relax \fi
+ \pgfpathmoveto{\pgfpoint{0.9*\pgf@circ@res@left}{(\@@b)*\radius}}
+ \pgfpathcurveto
+ {\pgfpoint{.5\pgf@circ@res@left}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{.5\pgf@circ@res@right}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{0.9*\pgf@circ@res@right}{(\@@b)*\radius}}
+ \pgfusepath{draw}
+ \fi
+ \else
+ % let's do the connection, if needed
+ % adjust the lengths of the gap, if needed
+ \ifnum \@@a=2 \edef\@@a{\openshift} \else \edef\@aa{1} \relax \fi
+ \ifnum \@@b=2 \edef\@@b{\openshift} \else \edef\@bb{1} \relax \fi
+ % left arc
+ \ifnum \@@a=0 \else
+ \pgfpathmoveto{\pgfpoint{0.95*\pgf@circ@res@left}{\@@a*\radius}}
+ \pgfpathcurveto
+ {\pgfpoint{.75\pgf@circ@res@left}{(\@@a+\curvature)*\radius}}
+ {\pgfpoint{.25\pgf@circ@res@left}{(\@@a+\curvature)*\radius}}
+ {\pgfpoint{0.05*\pgf@circ@res@left}{\@@a*\radius}}
+ \pgfusepath{draw}
+ \fi
+ % right arc
+ \ifnum \@@b=0 \else
+ \pgfpathmoveto{\pgfpoint{0.95*\pgf@circ@res@right}{\@@b*\radius}}
+ \pgfpathcurveto
+ {\pgfpoint{.75\pgf@circ@res@right}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{.25\pgf@circ@res@right}{(\@@b+\curvature)*\radius}}
+ {\pgfpoint{0.05*\pgf@circ@res@right}{\@@b*\radius}}
+ \pgfusepath{draw}
+ \fi
+ \fi
+ % draw the poles (always filled!)
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfnode{\cshape}{center}{}{\thisshape-in}{\pgfusepath{draw}}
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfnode{\cshape}{center}{}{\thisshape-tap}{\pgfusepath{draw}}
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfnode{\cshape}{center}{}{\thisshape-out}{\pgfusepath{draw}}
+ }
+
+\pgfcirc@activate@bipole{l}{tjumper}{tjumper}{three-pins jumper}
+
+% %>>>
+
%%%%%%%%%%%%%%%%%
%% Instruments
%%%%%%%%%%%%%%%%%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
index 44816fafc4..b34df68a01 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
@@ -36,7 +36,11 @@
\ctikzset{quadpoles/coupler/height/.initial=1.3}
\ctikzset{quadpoles/coupler2/width/.initial=1.3}
\ctikzset{quadpoles/coupler2/height/.initial=1.3}
-
+\ctikzset{quadpoles/double bipole/inner/.initial=0.4}
+\ctikzset{quadpoles/double bipole/width/.initial=1.5}
+\ctikzset{quadpoles/double bipole/width1/.initial=.4}
+\ctikzset{quadpoles/double bipole/height/.initial=1.5}
+\ctikzset{quadpoles/double bipole/height1/.initial=.8}
\ctikzset{quadpoles style/.is choice}
\ctikzset{quadpoles style/inward/.code={% default value
@@ -46,6 +50,8 @@
\ctikzset{quadpoles/transformer core/width=1.5}%
\ctikzset{quadpoles/gyrator/inner=0.4}%
\ctikzset{quadpoles/gyrator/width=1.5}%
+ \ctikzset{quadpoles/double bipole/inner=0.4}%
+ \ctikzset{quadpoles/double bipole/width=1.5}%
}%
}
\ctikzset{quadpoles style/inline/.code={% now horizontal baffle
@@ -55,6 +61,8 @@
\ctikzset{quadpoles/transformer core/width=0.6}%
\ctikzset{quadpoles/gyrator/inner=1} % FIXME
\ctikzset{quadpoles/gyrator/width=0.6}%
+ \ctikzset{quadpoles/double bipole/inner=1}%
+ \ctikzset{quadpoles/double bipole/width=0.6}%
}%
}
%%>>>
@@ -68,11 +76,6 @@
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
% shapename
\savedmacro{\thisshape}{\def\thisshape{\tikz@fig@name}}
- \anchor{center}{
- \northwest
- \pgf@x=0pt
- \pgf@y=0pt
- }
\savedmacro{\stretto}{\def\stretto{\ctikzvalof{quadpoles/#1/inner}}}
\savedanchor\northwest{%
\pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
@@ -81,7 +84,7 @@
\pgf@x=.5\pgf@circ@scaled@Rlen
\pgf@x=-\ctikzvalof{quadpoles/#1/width}\pgf@x
}
- %% we define the upper right (positive coord) dot (which is B1)
+ %% we define the upper right (positive coord) inner and outer dots (on the side of B1)
\savedanchor{\innerdot}{%
\pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
\pgf@xa=.5\pgf@circ@scaled@Rlen
@@ -120,22 +123,15 @@
\fi
\pgfmathsetlength\pgf@y{0.5*\pgf@circ@scaled@Rlen}
}
- \anchor{A2}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{B1}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{A1}{
- \northwest
- }
- \anchor{B2}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
+ % geographical
+ \anchor{center}{\northwest\pgf@x=0pt\pgf@y=0pt}
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{base}{\northwest\pgf@x=0pt}
+ % external wires
+ \anchor{A2}{\northwest\pgf@y=-\pgf@y}
+ \anchor{B1}{\northwest\pgf@x=-\pgf@x}
+ \anchor{A1}{\northwest}
+ \anchor{B2}{\northwest\pgf@x=-\pgf@x \pgf@y=-\pgf@y}
%% dot's anchors
\anchor{inner dot A1}{\innerdot\pgf@x=-\pgf@x}
\anchor{outer dot A1}{\outerdot\pgf@x=-\pgf@x}
@@ -145,44 +141,11 @@
\anchor{outer dot B1}{\outerdot}
\anchor{inner dot B2}{\innerdot\pgf@y=-\pgf@y}
\anchor{outer dot B2}{\outerdot\pgf@y=-\pgf@y}
- % geographical
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
- \anchor{base}{
+ % text above
+ \anchor{text}{
\northwest
- \pgf@x=0pt
+ \pgf@x=\dimexpr -.5\wd\pgfnodeparttextbox\relax
+ \advance\pgf@y by .6\ht\pgfnodeparttextbox\relax
}
#3%
\pgf@circ@draw@component{
@@ -199,8 +162,10 @@
}
+% these are deprecated anchors (really I do not know what they are --- Romano.)
+% They are here for compatibility, I suppose. Don't use.
\def\pgf@circ@drawtransformerbasicanchor{
- \ctikzvalof{quadpoles/trans/height}
+ % \ctikzvalof{quadpoles/trans/height}
\anchor{AA2}{
\northwest
\pgf@x=\ctikzvalof{quadpoles/transformer/width1}\pgf@x
@@ -389,6 +354,159 @@
}{}
% %>>>
+% Node shapes for generic double bipoles %<<<
+%
+\long\def\pgfcircdeclaredbipole#1#2#3{
+ \pgfdeclareshape{#1}
+ {
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{misc}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ % shapename
+ \savedmacro{\thisshape}{\def\thisshape{\tikz@fig@name}}
+ \savedmacro{\stretto}{\def\stretto{\ctikzvalof{quadpoles/#1/inner}}}
+ \savedanchor\northwest{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@y=\ctikzvalof{quadpoles/#1/height}\pgf@circ@scaled@Rlen
+ \pgf@y=.5\pgf@y
+ \pgf@x=.5\pgf@circ@scaled@Rlen
+ \pgf@x=-\ctikzvalof{quadpoles/#1/width}\pgf@x
+ }
+ %% we define the upper right (positive coord) inner and outer dot (near B1)
+ %% in the generic case, we just place the dot position in a fixed spot
+ %% we do not know the width of the component there...
+ \savedanchor{\innerdot}{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@xa=.5\pgf@circ@scaled@Rlen
+ \pgf@xa=-\ctikzvalof{quadpoles/#1/width}\pgf@xa
+ \pgfmathsetlength\pgf@x{-0.5*\stretto*\pgf@xa}
+ \pgfmathsetlength\pgf@y{0.5*\pgf@circ@scaled@Rlen}
+ }
+ \savedanchor{\outerdot}{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@xa=.5\pgf@circ@scaled@Rlen
+ \pgf@xa=-\ctikzvalof{quadpoles/#1/width}\pgf@xa
+ \pgfmathsetlength\pgf@x{-1.5*\stretto*\pgf@xa}
+ \pgfmathsetlength\pgf@y{0.5*\pgf@circ@scaled@Rlen}
+ }
+ % geographical
+ \anchor{center}{\northwest\pgf@x=0pt\pgf@y=0pt}
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{base}{\northwest\pgf@x=0pt}
+ % external wires
+ \anchor{A2}{\northwest\pgf@y=-\pgf@y}
+ \anchor{B1}{\northwest\pgf@x=-\pgf@x}
+ \anchor{A1}{\northwest}
+ \anchor{B2}{\northwest\pgf@x=-\pgf@x \pgf@y=-\pgf@y}
+ %% dot's anchors
+ \anchor{inner dot A1}{\innerdot\pgf@x=-\pgf@x}
+ \anchor{outer dot A1}{\outerdot\pgf@x=-\pgf@x}
+ \anchor{inner dot A2}{\innerdot\pgf@x=-\pgf@x\pgf@y=-\pgf@y}
+ \anchor{outer dot A2}{\outerdot\pgf@x=-\pgf@x\pgf@y=-\pgf@y}
+ \anchor{inner dot B1}{\innerdot}
+ \anchor{outer dot B1}{\outerdot}
+ \anchor{inner dot B2}{\innerdot\pgf@y=-\pgf@y}
+ \anchor{outer dot B2}{\outerdot\pgf@y=-\pgf@y}
+ % text above
+ \anchor{text}{
+ \northwest
+ \pgf@x=\dimexpr -.5\wd\pgfnodeparttextbox\relax
+ \advance\pgf@y by .6\ht\pgfnodeparttextbox\relax
+ }
+ #3%
+ \pgf@circ@draw@component{
+ \pgf@circ@setcolor
+ \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
+ #2%
+ }
+ }
+}
+
+\ctikzset{every double bipole L/.style={}}
+\ctikzset{every double bipole R/.style={}}
+\ctikzset{double bipole L/.initial=genericshape}
+\ctikzset{double bipole R/.initial=vsourceAMshape}
+\newif\ifpgf@circ@dbipoleL@invert\pgf@circ@dbipoleL@invertfalse
+\newif\ifpgf@circ@dbipoleR@invert\pgf@circ@dbipoleR@invertfalse
+\ctikzset{double bipole L invert/.is if=pgf@circ@dbipoleL@invert}
+\ctikzset{double bipole R invert/.is if=pgf@circ@dbipoleR@invert}
+
+\def\pgf@circ@drawdbipolebasicbody{
+ \pgfscope
+ \ifpgf@circ@dbipoleL@invert
+ \pgf@circ@res@temp=\pgf@circ@res@down
+ \pgf@circ@res@other=\pgf@circ@res@up
+ \else
+ \pgf@circ@res@temp=\pgf@circ@res@up
+ \pgf@circ@res@other=\pgf@circ@res@down
+ \fi
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgftransformlineattime{.5}{%
+ \pgfpoint%
+ {\stretto\pgf@circ@res@left}%
+ {\pgf@circ@res@temp}%
+ }{%
+ \pgfpoint
+ {\stretto\pgf@circ@res@left}%
+ {\pgf@circ@res@other}%
+ }
+ \pgfkeys{\circuitikzbasekey/.cd, every double bipole L}
+ \edef\pgf@circ@temp{\ctikzvalof{double bipole L}}%
+ \pgfnode{\pgf@circ@temp}{center}{}{\thisshape-L}{\pgfusepath{stroke}}
+ \endpgfscope
+ \pgfscope
+ \ifpgf@circ@dbipoleR@invert
+ \pgf@circ@res@temp=\pgf@circ@res@down
+ \pgf@circ@res@other=\pgf@circ@res@up
+ \else
+ \pgf@circ@res@temp=\pgf@circ@res@up
+ \pgf@circ@res@other=\pgf@circ@res@down
+ \fi
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgftransformlineattime{.5}{%
+ \pgfpoint%
+ {\stretto\pgf@circ@res@right}%
+ {\pgf@circ@res@other}%
+ }{%
+ \pgfpoint
+ {\stretto\pgf@circ@res@right}%
+ {\pgf@circ@res@temp}%
+ }
+ %
+ \pgfkeys{\circuitikzbasekey/.cd, every double bipole R}
+ \edef\pgf@circ@temp{\ctikzvalof{double bipole R}}%
+ \pgfnode{\pgf@circ@temp}{center}{}{\thisshape-R}{\pgfusepath{stroke}}
+ \endpgfscope
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpointanchor{\thisshape-L}{\ifpgf@circ@dbipoleL@invert a\else b\fi}}
+ %
+ \pgfpathmoveto{\pgfpointanchor{\thisshape-L}{\ifpgf@circ@dbipoleL@invert b\else a\fi}}
+ \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpointanchor{\thisshape-R}{\ifpgf@circ@dbipoleR@invert b\else a\fi}}
+ %
+ \pgfpathmoveto{\pgfpointanchor{\thisshape-R}{\ifpgf@circ@dbipoleR@invert a\else b\fi}}
+ \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+}
+\pgfcircdeclaredbipole{double bipole}{
+ \pgf@circ@drawdbipolebasicbody
+}{}
+
+
+% %>>>
+
%%%%%%%%%%%%%%%%%%%
%% Block diagrams
%%%%%%%%%%%%%%%%%%%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 596171c5ad..4887d89857 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -3375,8 +3375,16 @@
% 0 --- nothing, 1 --- solid, 2 --- dashed
\ctikzset{transistor circle/partial borders/.initial=none} % Value none for normal borders
\ctikzset{transistor circle/partial border dash/.initial={{2pt}{2pt}}}
+%
+% body diode style
+\ctikzset{transistor bodydiode/.is family}
+\ctikzset{transistor bodydiode/relative thickness/.initial=1}
+\ctikzset{transistor bodydiode/color/.initial=default}
+\ctikzset{transistor bodydiode/dash/.initial=default}
+
%%>>>
+
%% definitions of transistor shapes%<<<
%
% draw partial transistor outline
@@ -3406,7 +3414,7 @@
% add a circle to the transistor:
\def\pgf@circ@trcircle@draw@partial#1{%
\expandafter\pgf@circ@trcircle@split#1\relax
- \typeout{PARTIAL: \@@a:\@@b:\@@c:\@@d}
+ % \typeout{PARTIAL: \@@a:\@@b:\@@c:\@@d}
\pgfscope % right side upper arc
\pgfpathmoveto{\pgfpoint{\circleleft+\circleradius}{\circleradius}}
\pgfpatharc{90}{0}{\circleradius}
@@ -3905,7 +3913,23 @@
#3%
% BODY DIODE
\ifpgf@circuit@fet@bodydiode
- \drawbodydiode{#1}
+ \pgfscope
+ \pgfsetlinewidth{\ctikzvalof{transistor bodydiode/relative thickness}\pgflinewidth}
+ \edef\@@none{none}\edef\@@default{default}
+ \edef\@@tmp{\ctikzvalof{transistor bodydiode/color}}
+ \ifx\@@tmp\@@default\else
+ \pgfsetcolor{\@@tmp}
+ \fi
+ \edef\@@tmp{\ctikzvalof{transistor bodydiode/dash}}
+ \ifx\@@tmp\@@default\else
+ \ifx\@@tmp\@@none
+ \pgfsetdash{}{0pt}% solid line, override dash
+ \else
+ \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
+ \fi
+ \fi
+ \drawbodydiode{#1}
+ \endpgfscope
\fi
%
}
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index a49ce37f84..e7b158d512 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.5.3}
-\def\pgfcircversiondate{2022/07/02}
+\def\pgfcircversion{1.5.4}
+\def\pgfcircversiondate{2022/09/09}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]