diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-26 20:30:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-26 20:30:11 +0000 |
commit | 502c831e427186b6216c2e8a0d46453b013e345f (patch) | |
tree | f1f9c18327df63f72f564cb8a4bf7a0c2add76de /Master/texmf-dist/tex/generic | |
parent | 6190adeb5ec3b9128a55a4add7f367f18491742b (diff) |
circuitikz (26jul21)
git-svn-id: svn://tug.org/texlive/trunk@60078 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex | 2 |
2 files changed, 41 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex index 19d377e45c8..228c46e935a 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex @@ -736,8 +736,12 @@ \ctikzset{bipoles/vcapacitor/capacitor width/.code={% \pgfutil@packagewarning{circuitikz}{vcapacitor/capacitor width deprecated; ignored}% }}% deprecated +% piezoelectric (double size by default) \ctikzset{bipoles/piezoelectric/height/.initial=.7} \ctikzset{bipoles/piezoelectric/width/.initial=.4}% +% constant phase element (double size by default) +\ctikzset{bipoles/cpe/height/.initial=.6} +\ctikzset{bipoles/cpe/width/.initial=.4} % % style settings % @@ -747,12 +751,14 @@ capacitor/width=#1, ecapacitor/width=#1, ccapacitor/width=#1, vcapacitor/width=#1, piezoelectric/width=\pgfcirc@@double, + cpe/width=\pgfcirc@@double, }}} \ctikzset{capacitors/height/.code={% \ctikzset{bipoles/.cd, capacitor/height=#1, ecapacitor/height=#1, ccapacitor/height=#1, vcapacitor/height=#1, piezoelectric/height=#1, + cpe/height=#1, }}} \def\pgfcirc@maybe@fill@straight@capacitor{% \pgfscope @@ -1017,6 +1023,39 @@ \endpgfscope } +%% Constant phase element +\pgfcircdeclarebipolescaled{capacitors} +{} +{\ctikzvalof{bipoles/cpe/height}} +{cpe} +{\ctikzvalof{bipoles/cpe/height}} +{\ctikzvalof{bipoles/cpe/width}} +{ + \pgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathclose + \pgf@circ@maybefill + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpointorigin} + \pgfusepath{draw} + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfusepath{draw} +} + % %>>> %% Paths for capacitors%<<< @@ -1038,6 +1077,7 @@ \pgfcirc@style@to@style{capacitive sensor}{sC} \pgfcirc@activate@bipole@simple{l}{ferrocap} \pgfcirc@style@to@style{ferrocap}{feC} +\pgfcirc@activate@bipole@simple{l}{cpe} % %>>> %%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex index 8d9a4ad46ae..ae5fcf38def 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex @@ -96,7 +96,7 @@ %% changes suggested by Jonathan P. Spratte %% \newbox\ctikz@scratchbox -\long\def\ctikzsubcircuitdef#1#2#3{% +\pgfutil@protected\def\ctikzsubcircuitdef#1#2#3{% \expandafter\gdef\csname #1@Anchor\endcsname{}% \expandafter\gdef\csname #1@setanchors\endcsname{% \setbox\ctikz@scratchbox=\hbox{% |