diff options
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex')
7 files changed, 432 insertions, 149 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty index d4d3078950..d3fa441ab7 100644 --- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty +++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty @@ -12,8 +12,8 @@ \NeedsTeXFormat{LaTeX2e} -\def\pgfcircversion{1.2.2} -\def\pgfcircversiondate{2020/07/15} +\def\pgfcircversion{1.2.3} +\def\pgfcircversiondate{2020/08/07} \ProvidesPackage{circuitikz}% [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion] diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex index e3686e4d94..fe87271f5e 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex @@ -994,6 +994,9 @@ \ctikzset{tripoles/wilkinson/height/.initial=1.3} \ctikzset{tripoles/wilkinson/width/.initial=1.3} + +\ctikzset{tripoles/mzm/height/.initial=1.3} +\ctikzset{tripoles/mzm/width/.initial=1.3} %%>>> % Transistors %<<<1 diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex index 36ddd5d079..d9b8e7ca4d 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex @@ -205,6 +205,35 @@ } } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% anchor adjustment macros +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Extend the border anchor position by the specified factors on the right-top (north east corner) +% and the left-down (southwest border). Argument must be number (possibly decimal) without sign + +\def\pgfcirc@border@extend@full#1#2#3#4{% right, top, left, down + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@up=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \fi + \ifdim\pgf@circ@res@up>0cm + \northeastborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{#1\pgf@x}{#2\pgf@y}} + \else + \southwestborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-#3\pgf@x}{-#4\pgf@y}} + \fi + } +} + +% Just up and down (very common) +\def\pgfcirc@border@extend@updown#1#2{\pgfcirc@border@extend@full{1}{#1}{1}{#2}} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Standard bipole shapes declarations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -440,13 +469,14 @@ %% Thermistor \pgfcircdeclarebipolescaled{resistors} -{{% anchor for labelling the type of dependency +{% anchor for labelling the type of dependency \anchor{label}{% \southwest \pgf@x=0.4\pgf@x \pgf@y=1.2\pgf@y }% -}} + \pgfcirc@border@extend@updown{1}{1.2} +} {\ctikzvalof{bipoles/thermistor/height}} {thermistor} {\ctikzvalof{bipoles/thermistor/height}} @@ -713,6 +743,7 @@ \pgfcircdeclarebipolescaled{capacitors} { \anchor{label}{\southwest\pgf@x=2.6\pgf@x\pgf@y=1.2\pgf@y}% + \pgfcirc@border@extend@full{2.6}{1}{4.4}{1.2} } {\ctikzvalof{bipoles/capacitor/height}} {capacitivesens} @@ -943,6 +974,7 @@ } } \anchor{midtap}{\midtap} + \pgfcirc@border@extend@full{1}{2}{1.6}{2.6} } {\ctikzvalof{bipoles/cuteinductor/lower coil height}} {scuteinductor} @@ -1132,6 +1164,7 @@ } } \anchor{midtap}{\midtap} + \pgfcirc@border@extend@full{1}{2}{1.6}{2.6} } {\ctikzvalof{bipoles/americaninductor/height 2}} {samericaninductor} @@ -1227,6 +1260,7 @@ {% anchor for labelling the type of dependency \anchor{label}{\southwest\pgf@x=0.4\pgf@x\pgf@y=2\pgf@y}% \anchor{midtap}{\northeast\pgf@x=0pt\relax} + \pgfcirc@border@extend@full{1}{2}{1}{2} } {\ctikzvalof{bipoles/fullgeneric/height}} {sfullgeneric} @@ -1665,7 +1699,7 @@ \pgftransformscale{-.015\pgf@circ@res@left*#1} \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} \pgftransformrotate{-\pgfcircmathresult} - + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpointorigin} @@ -1682,16 +1716,16 @@ \pgftransformscale{-.015\pgf@circ@res@left*#1} \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} \pgftransformrotate{-\pgfcircmathresult} - + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpointpolar{90}{.5\pgf@circ@res@up}} \pgfpathlineto{\pgfpointpolar{60}{\pgf@circ@res@up}} - + \pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpointpolar{210}{.5\pgf@circ@res@up}} \pgfpathlineto{\pgfpointpolar{0}{\pgf@circ@res@down}} - + \pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpointpolar{330}{.5\pgf@circ@res@up}} \pgfpathlineto{\pgfpointpolar{-60}{\pgf@circ@res@up}} @@ -1707,7 +1741,7 @@ {\ctikzvalof{bipoles/oosourcetrans/height}} {\ctikzvalof{bipoles/oosourcetrans/width}} { - + \pgfpointorigin \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@left}{0}} @@ -1719,43 +1753,43 @@ \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@left}{0}} {\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} \pgfusepath{draw} - - + + % % % % draw inner symbols - + %%primary winding \ifpgf@circ@prim@delta \pgfscope \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} \pgf@circ@delta{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@prim@wye \pgfscope \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} \pgf@circ@wye{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@prim@zig \pgfscope \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} \pgf@circ@zig{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} \endpgfscope \fi\fi\fi - + %%secondary winding \ifpgf@circ@sec@delta \pgfscope \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right} \pgf@circ@delta{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@sec@wye \pgfscope \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right} \pgf@circ@wye{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@sec@zig \pgfscope \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right} @@ -1767,7 +1801,7 @@ % % % % ooosource for three phase transformer \pgfcircdeclarebipolescaled{sources} -{ +{ \anchor{right}{ \northeast \pgf@y=0pt @@ -1814,7 +1848,7 @@ \anchor{centertert}{ \centertert } - + % add some anchors in case the are needed :) \anchor{prim1}{ \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen @@ -1863,13 +1897,13 @@ {\ctikzvalof{bipoles/ooosource/height}} { % \pgf@circ@res@other = \ctikzvalof{bipoles/ooosource/vectorgroup} \pgf@circ@scaled@Rlen - + % % filling % left \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@left}{0}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left} - \pgf@circ@maybefill - + \pgf@circ@maybefill + % up \pgfscope \pgfpointorigin @@ -1887,14 +1921,14 @@ % left \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@left}{0}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left} \pgfusepath{draw} - + % up \pgfscope \pgfpointorigin \pgfpathcircle{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@right}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right} \pgfusepath{draw} \endpgfscope - + % % % draw inner symbols % % primary winding @@ -1903,20 +1937,20 @@ \pgftransformxshift{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left} \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@prim@wye \pgfscope \pgftransformxshift{.6\pgf@circ@res@left} \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@prim@zig \pgfscope \pgftransformxshift{.6\pgf@circ@res@left} \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope \fi\fi\fi - + % % secondary winding \ifpgf@circ@sec@delta \pgfscope @@ -1924,33 +1958,33 @@ \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@sec@wye \pgfscope \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@sec@zig \pgfscope \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope \fi\fi\fi - + % % tertiary winding \ifpgf@circ@tert@delta \pgfscope \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@tert@wye \pgfscope \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope - + \else\ifpgf@circ@tert@zig \pgfscope \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} @@ -2437,22 +2471,7 @@ %% Black alternative zigzag Zener diode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border - \anchorborder{% - \ifpgf@circuit@bipole@inverted - \pgf@circ@res@left=-\pgf@x - \pgf@circ@res@up=-\pgf@y - \else - \pgf@circ@res@left=\pgf@x - \pgf@circ@res@up=\pgf@y - \fi - \ifdim\pgf@circ@res@up>0cm - \northeastborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.3\pgf@y}} - \else - \southwestborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-1.3\pgf@y}} - \fi - } + \pgfcirc@border@extend@updown{1.3}{1.3} } {\ctikzvalof{bipoles/diode/height}} {fullzzdiode} @@ -2580,22 +2599,7 @@ %% Black light emitting diode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border - \anchorborder{% - \ifpgf@circuit@bipole@inverted - \pgf@circ@res@left=-\pgf@x - \pgf@circ@res@up=-\pgf@y - \else - \pgf@circ@res@left=\pgf@x - \pgf@circ@res@up=\pgf@y - \fi - \ifdim\pgf@circ@res@up>0cm - \northeastborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}} - \else - \southwestborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} - \fi - } + \pgfcirc@border@extend@updown{1.8}{1} } {\ctikzvalof{bipoles/diode/height}} {fulllediode} @@ -2622,22 +2626,7 @@ %% Black photodiode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border - \anchorborder{% - \ifpgf@circuit@bipole@inverted - \pgf@circ@res@left=-\pgf@x - \pgf@circ@res@up=-\pgf@y - \else - \pgf@circ@res@left=\pgf@x - \pgf@circ@res@up=\pgf@y - \fi - \ifdim\pgf@circ@res@up>0cm - \northeastborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}} - \else - \southwestborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} - \fi - } + \pgfcirc@border@extend@updown{1.8}{1} } {\ctikzvalof{bipoles/diode/height}} {fullpdiode} @@ -2745,22 +2734,7 @@ %% Empty alternative zigzag Zener diode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border - \anchorborder{% - \ifpgf@circuit@bipole@inverted - \pgf@circ@res@left=-\pgf@x - \pgf@circ@res@up=-\pgf@y - \else - \pgf@circ@res@left=\pgf@x - \pgf@circ@res@up=\pgf@y - \fi - \ifdim\pgf@circ@res@up>0cm - \northeastborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.3\pgf@y}} - \else - \southwestborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-1.3\pgf@y}} - \fi - } + \pgfcirc@border@extend@updown{1.3}{1.3} } {\ctikzvalof{bipoles/diode/height}} {emptyzzdiode} @@ -2826,22 +2800,7 @@ %% Empty light emitting diode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border - \anchorborder{% - \ifpgf@circuit@bipole@inverted - \pgf@circ@res@left=-\pgf@x - \pgf@circ@res@up=-\pgf@y - \else - \pgf@circ@res@left=\pgf@x - \pgf@circ@res@up=\pgf@y - \fi - \ifdim\pgf@circ@res@up>0cm - \northeastborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}} - \else - \southwestborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} - \fi - } + \pgfcirc@border@extend@updown{1.8}{1} } {\ctikzvalof{bipoles/diode/height}} {emptylediode} @@ -2863,22 +2822,7 @@ %% Empty photodiode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border - \anchorborder{% - \ifpgf@circuit@bipole@inverted - \pgf@circ@res@left=-\pgf@x - \pgf@circ@res@up=-\pgf@y - \else - \pgf@circ@res@left=\pgf@x - \pgf@circ@res@up=\pgf@y - \fi - \ifdim\pgf@circ@res@up>0cm - \northeastborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}} - \else - \southwestborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} - \fi - } + \pgfcirc@border@extend@updown{1.8}{1} } {\ctikzvalof{bipoles/diode/height}} {emptypdiode} @@ -3974,7 +3918,9 @@ %% Varistor \pgfcircdeclarebipolescaled{resistors} -{} +{ + \pgfcirc@border@extend@updown{1}{1.4} +} {\ctikzvalof{bipoles/varistor/height}} {varistor} {\ctikzvalof{bipoles/varistor/height}} @@ -5232,7 +5178,7 @@ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfusepath{draw} - + % draw sin wave \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.5\pgf@circ@res@step}} \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} @@ -5240,7 +5186,7 @@ \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} \pgfusepath{draw} - + % draw equal sign \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}} @@ -5312,7 +5258,7 @@ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfusepath{draw} - + % draw sin wave \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.5\pgf@circ@res@step}} \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} @@ -5320,7 +5266,7 @@ \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} \pgfusepath{draw} - + % draw equal sign \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}} @@ -5404,7 +5350,7 @@ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfusepath{draw} - + % draw sin waves \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.65\pgf@circ@res@step}} \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} @@ -5424,10 +5370,10 @@ \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} \pgfusepath{draw} - - - - + + + + % draw equal sign \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}} @@ -5510,7 +5456,7 @@ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfusepath{draw} - + % draw sin waves \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.65\pgf@circ@res@step}} \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} @@ -5530,10 +5476,10 @@ \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} \pgfusepath{draw} - - - - + + + + % draw equal sign \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}} diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex index ed5399d441..ad7b791397 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex @@ -1232,7 +1232,11 @@ \ifpgf@circuit@ieeelogicport \def\@@notcirc{notcirc} \else - \def\@@notcirc{ocirc} + \ifpgf@circ@european@port@circle@ieee + \def\@@notcirc{notcirc} + \else + \def\@@notcirc{ocirc} + \fi \fi \pgfsetlinewidth{\ctikzvalof{multipoles/external pins thickness}\pgflinewidth} \pgf@circ@count@a=\numpins\relax diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex index 692b6ec40c..d889f4ab0a 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex @@ -369,6 +369,11 @@ \northwest \pgf@y=0pt } + \anchor{right}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } \anchor{1}{ \northwest \pgf@y=0pt @@ -437,6 +442,33 @@ \northwest \pgf@x=0pt } + \anchor{e}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{w}{ + \northwest + \pgf@y=0pt + } + \anchor{s}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{n}{ + \northwest + \pgf@x=0pt + } + \anchor{down}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{up}{ + \northwest + \pgf@x=0pt + } \anchor{south west}{ \northwest \pgf@y=-\pgf@y @@ -453,6 +485,12 @@ \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} + }{\pgfpoint{\ctikzvalof{tripoles/mixer/width}*\scaledRlen/2}{\ctikzvalof{tripoles/mixer/width}*\scaledRlen/2}} + } \backgroundpath{ \pgfsetcolor{\ctikzvalof{color}} \pgf@circ@scaled@Rlen=\scaledRlen @@ -517,6 +555,11 @@ \northwest \pgf@y=0pt } + \anchor{right}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } \anchor{1}{ \northwest \pgf@y=0pt @@ -585,6 +628,33 @@ \northwest \pgf@x=0pt } + \anchor{e}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{w}{ + \northwest + \pgf@y=0pt + } + \anchor{s}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{n}{ + \northwest + \pgf@x=0pt + } + \anchor{down}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{up}{ + \northwest + \pgf@x=0pt + } \anchor{south west}{ \northwest \pgf@y=-\pgf@y @@ -601,6 +671,12 @@ \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} + }{\pgfpoint{\ctikzvalof{tripoles/adder/width}*\scaledRlen/2}{\ctikzvalof{tripoles/adder/width}*\scaledRlen/2}} + } \backgroundpath{ \pgfsetcolor{\ctikzvalof{color}} \pgf@circ@scaled@Rlen=\scaledRlen @@ -679,6 +755,51 @@ \northwest \pgf@y=0pt } + \anchor{up}{ + \northwest + \pgf@x=.5\pgf@x + } + \anchor{down}{ + \northwest + \pgf@x=.5\pgf@x + \pgf@y=-\pgf@y + } + \anchor{n}{ + \northwest + \pgf@x=.5\pgf@x + } + \anchor{s}{ + \northwest + \pgf@x=.5\pgf@x + \pgf@y=-\pgf@y + } + \anchor{e}{ + \northwest + \pgf@y=0pt + \pgf@x=0pt + } + \anchor{w}{ + \northwest + \pgf@y=0pt + } + \anchor{up}{ + \northwest + \pgf@x=.5\pgf@x + } + \anchor{down}{ + \northwest + \pgf@x=.5\pgf@x + \pgf@y=-\pgf@y + } + \anchor{right}{ + \northwest + \pgf@y=0pt + \pgf@x=0pt + } + \anchor{left}{ + \northwest + \pgf@y=0pt + } \anchor{south west}{ \northwest \pgf@y=-\pgf@y} \anchor{north east}{ \northwest \pgf@x=0pt\relax} \anchor{north west}{ \northwest } @@ -688,6 +809,13 @@ \advance \pgf@x by -.5\wd\pgfnodeparttextbox \advance \pgf@y by -1.5\ht\pgfnodeparttextbox } + \anchorborder{ + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} + }{\pgfpoint{\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2}{\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2}} + \pgfmathsetlength{\pgf@x}{\pgf@x-\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2} + } \backgroundpath{ \pgfsetcolor{\ctikzvalof{color}} \pgf@circ@scaled@Rlen=\scaledRlen @@ -755,6 +883,11 @@ \northwest \pgf@y=0pt } + \anchor{right}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } \anchor{1}{ \northwest \pgf@y=0pt @@ -787,6 +920,33 @@ \northwest \pgf@x=0pt } + \anchor{e}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{w}{ + \northwest + \pgf@y=0pt + } + \anchor{s}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{n}{ + \northwest + \pgf@x=0pt + } + \anchor{down}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{up}{ + \northwest + \pgf@x=0pt + } \anchor{south west}{ \northwest \pgf@y=-\pgf@y @@ -803,6 +963,12 @@ \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} + }{\pgfpoint{\ctikzvalof{tripoles/circulator/width}*\scaledRlen/2}{\ctikzvalof{tripoles/circulator/width}*\scaledRlen/2}} + } \backgroundpath{ \pgfsetcolor{\ctikzvalof{color}} \pgf@circ@scaled@Rlen=\scaledRlen @@ -1175,6 +1341,24 @@ \northwest \pgf@y=0.5\pgf@y } + \anchor{left down}{ + \northwest + \pgf@y=-0.5\pgf@y + } + \anchor{right down}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-0.5\pgf@y + } + \anchor{right up}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=0.5\pgf@y + } + \anchor{left up}{ + \northwest + \pgf@y=0.5\pgf@y + } \anchor{1}{ \northwest \pgf@y=-0.5\pgf@y @@ -1282,3 +1466,143 @@ \endpgfscope } +% mach zehnder modulator +\pgfdeclareshape{mzm}{ + \savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}} + \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}} + \savedanchor\northwest{% + \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen} + \pgf@y=\ctikzvalof{tripoles/mzm/height}\pgf@circ@scaled@Rlen + \pgf@y=.5\pgf@y + \pgf@x= \pgf@circ@scaled@Rlen + \pgf@x=.5\pgf@x + \pgf@x=-\ctikzvalof{tripoles/mzm/width}\pgf@x + } + \anchor{center}{ + \northwest + \pgf@x=0pt + \pgf@y=0pt + } + \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{in}{ + \northwest + \pgf@y=0pt + } + \anchor{mod}{ + \northwest + \pgf@x=0pt + } + \anchor{out}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=0pt + } + \anchor{text}{ + \northwest + \advance \pgf@y by 0.5\ht\pgfnodeparttextbox + \pgf@x=-.5\wd\pgfnodeparttextbox + } + \backgroundpath{ + \pgfsetcolor{\ctikzvalof{color}} + \pgf@circ@scaled@Rlen=\scaledRlen + + \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 + + \pgfstartlinewidth=\pgflinewidth + + % draw outer box + \pgf@circ@twoportbox + + % draw inner stuff + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{0.35\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.25\pgf@circ@res@right}{0.1\pgf@circ@res@up}} + \pgfusepath{draw} + + } +} diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex index 966128140e..45497d7e61 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex @@ -45,6 +45,12 @@ \ctikzset{poles/full fill opacity=#1}% }} +% +% Provision for changing default background +% + +\ctikzset{open poles fill/.initial={white}} + %% Full terminal \pgfdeclareshape{circ}{ @@ -123,7 +129,7 @@ \pgfsetcolor{\ctikzvalof{color}} \ifx\tikz@fillcolor\pgfutil@empty % set the default fill color to white - \pgfsetfillcolor{white} + \pgfsetfillcolor{\ctikzvalof{open poles fill}} % ...but override it if the class is defined! % note that this element has no class, but will inherit it when used % into another component @@ -240,7 +246,7 @@ \pgfsetcolor{\ctikzvalof{color}} \ifx\tikz@fillcolor\pgfutil@empty % set the default fill color to white - \pgfsetfillcolor{white} + \pgfsetfillcolor{\ctikzvalof{open poles fill}} % ...but override it if the class is defined! % note that this element has no class, but will inherit it when used % into another component @@ -337,7 +343,7 @@ \pgfsetcolor{\ctikzvalof{color}} \ifx\tikz@fillcolor\pgfutil@empty % set the default fill color to white - \pgfsetfillcolor{white} + \pgfsetfillcolor{\ctikzvalof{open poles fill}} % ...but override it if the class is defined! % note that this element has no class, but will inherit it when used % into another component diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex index 62fdaedb83..473dc34f43 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.2.2} -\def\pgfcircversiondate{2020/07/15} +\def\pgfcircversion{1.2.3} +\def\pgfcircversiondate{2020/08/07} \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion} \usemodule[tikz] |