summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-09 22:01:48 +0000
committerKarl Berry <karl@freefriends.org>2019-11-09 22:01:48 +0000
commit16df7ec0a0f02470b7343f4b149ab22a42ba0576 (patch)
tree73684fe1e6241c2cfac9985b1df8ae4b0366fe84 /Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
parent10df8aabc98589863e781801ad499a29df4b018e (diff)
circuitikz (9nov19)
git-svn-id: svn://tug.org/texlive/trunk@52709 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex')
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex31
1 files changed, 25 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
index facb041effc..31890ea44db 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
@@ -180,6 +180,12 @@
}
}
+%% Null styles that can be used to change individually the L1 and L2
+%% inductors of the transformer.
+
+\ctikzset{transformer L1/.style={}}
+\ctikzset{transformer L2/.style={}}
+
\def\pgf@circ@drawtransformerbasicbody{
\pgfscope
\pgfslopedattimetrue
@@ -194,6 +200,7 @@
{\pgf@circ@res@down}%
}
+ \pgfkeys{\circuitikzbasekey/.cd, transformer L1}
\edef\pgf@circ@temp{\ctikzvalof{inductor}}%
\def\pgf@temp{european}%
\ifx\pgf@temp\pgf@circ@temp%
@@ -222,6 +229,7 @@
{\pgf@circ@res@up}%
}
+ \pgfkeys{\circuitikzbasekey/.cd, transformer L2}
\edef\pgf@circ@temp{\ctikzvalof{inductor}}%
\def\pgf@temp{european}%
\ifx\pgf@temp\pgf@circ@temp%
@@ -266,23 +274,34 @@
\pgf@circ@drawtransformerbasicbody
+ % use the chocke line thickness
+ \pgfsetlinewidth{\ctikzvalof{bipoles/cutechoke/cthick}\pgflinewidth}
+
+ % Find the distance from center for the lines representing the core
+ % the 2.5 is for backward compatibility --- the distance was calculated as a fraction
+ % of the whole component, now as a fraction of the distance between coils, to be
+ % compatible with the quadpoles "inner" style.
+ \pgfmathsetlength{\pgf@circ@res@other}{2.5*\stretto*\ctikzvalof{quadpoles/transformer core/core width}*\pgf@circ@res@right}
+
\pgfmoveto{\pgfpoint%
- {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
+ {\pgf@circ@res@other}%
{\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
}
\pgflineto{
- \pgfpoint
- {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
+ \pgfpoint%
+ {\pgf@circ@res@other}%
{\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
}
+ %% this should be just -\pgf@circ@res@other, but in case someone define an asymmetric trafo someday...
+ \pgfmathsetlength{\pgf@circ@res@other}{2.5*\stretto*\ctikzvalof{quadpoles/transformer core/core width}*\pgf@circ@res@left}
\pgfmoveto{\pgfpoint%
- {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
+ {\pgf@circ@res@other}%
{\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
}
\pgflineto{
- \pgfpoint
- {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
+ \pgfpoint%
+ {\pgf@circ@res@other}%
{\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
}