diff options
author | Norbert Preining <norbert@preining.info> | 2023-02-12 03:01:46 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-02-12 03:01:46 +0000 |
commit | f76939750d63d6088b9bdeac794ce3fdf33d1269 (patch) | |
tree | 0cd0d327b53fe3a657722ae4188983b8b100468d /graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex | |
parent | 73abb311c03e955ad9f7b7464390a5722b20b915 (diff) |
CTAN sync 202302120301
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex')
-rw-r--r-- | graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex index 568caa1f64..127c2975df 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex @@ -1,7 +1,7 @@ -% Copyright 2018-2022 by Romano Giannetti -% Copyright 2015-2022 by Stefan Lindner -% Copyright 2013-2022 by Stefan Erhardt -% Copyright 2007-2022 by Massimo Redaelli +% Copyright 2018-2023 by Romano Giannetti +% Copyright 2015-2023 by Stefan Lindner +% Copyright 2013-2023 by Stefan Erhardt +% Copyright 2007-2023 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -1065,12 +1065,30 @@ } %% converters help function +%% definition for styling the DC symbols (GitHub issue #680) +\ctikzset{blocks dc in segments/.initial=1} +\ctikzset{blocks dc out segments/.initial=1} +\ctikzset{blocks dc segments/.code={% + \ctikzset{blocks dc in segments=#1}% + \ctikzset{blocks dc out segments=#1}% + } +} \def\pgf@circ@twoport@converter@dc#1#2{% \pgfscope \pgftransformshift{\pgfpoint{#1\pgf@circ@res@step}{#2\pgf@circ@res@step}} \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0.125\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{0.25\pgf@circ@res@step}{0.125\pgf@circ@res@step}} \pgfusepath{draw} + \ifpgf@circuit@full@dashed\else % do not apply the specific dash if fully dashing + \edef\@@up{\ctikzvalof{blocks dc in segments}} + \edef\@@down{\ctikzvalof{blocks dc out segments}} + \ifdim\dimexpr#1\pgf@circ@res@step\relax<0pt + \pgfmathsetlength{\pgf@circ@res@other}{\pgf@circ@res@step/(4*\@@up-2)} + \else + \pgfmathsetlength{\pgf@circ@res@other}{\pgf@circ@res@step/(4*\@@down-2)} + \fi + \pgfsetdash{{\pgf@circ@res@other}{\pgf@circ@res@other}}{0pt} + \fi \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{-0.125\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{0.25\pgf@circ@res@step}{-0.125\pgf@circ@res@step}} \pgfusepath{draw} |